diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBase64BinaryPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBase64BinaryPrimitive.php index 0552513bad..9de15d1a44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBase64BinaryPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBase64BinaryPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -177,8 +177,8 @@ public function _writeToFile($fileHandle) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBinary.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBinary.php index 1ffabb441a..42c40b0a16 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -69,12 +69,10 @@ class FHIRBinary implements PHPFHIRCommentContainerInterface, PHPFHIRContainedTy const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINARY; const FIELD_CONTENT_TYPE = 'contentType'; - const FIELD_CONTENT_TYPE_EXT = '_contentType'; const FIELD_ID = 'id'; - const FIELD_ID_EXT = '_id'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive @@ -231,8 +229,8 @@ public function setId($id = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** @@ -333,6 +331,7 @@ public function jsonSerialize() if (null !== ($v = $this->getId())) { $a[self::FIELD_ID] = $v; } + return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBooleanPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBooleanPrimitive.php index 9af04eb7c5..2246871e5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBooleanPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBooleanPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|boolean @@ -163,8 +163,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRCodePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRCodePrimitive.php index 6886e60588..5a7745854f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRCodePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRCodePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRCodePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -167,8 +167,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDatePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDatePrimitive.php index f057dfbe9a..85e88625c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDatePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDatePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRDatePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -196,8 +196,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDateTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDateTimePrimitive.php index d46d2d0c74..b4a5b70665 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDateTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDateTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -197,8 +197,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDecimalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDecimalPrimitive.php index 002522cb54..b7d47aa509 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDecimalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDecimalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|double @@ -163,8 +163,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement.php index b6ffa538e9..838970610a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterf const FIELD_EXTENSION = 'extension'; const FIELD_ID = 'id'; - const FIELD_ID_EXT = '_id'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Optional Extensions Element - found in all resources. @@ -278,8 +277,8 @@ public function setId($id = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** @@ -374,11 +373,18 @@ public function jsonSerialize() $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } if ([] !== ($vs = $this->getExtension())) { - $a[self::FIELD_EXTENSION] = $vs; + $a[self::FIELD_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXTENSION][] = $v; + } } if (null !== ($v = $this->getId())) { $a[self::FIELD_ID] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddress.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddress.php index f37f2dd6b9..1f8f3ba1c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddress.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddress.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRAddress extends FHIRElement const FIELD_ZIP_EXT = '_zip'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -198,65 +198,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CITY])) { - $ext = (isset($data[self::FIELD_CITY_EXT]) && is_array($data[self::FIELD_CITY_EXT])) - ? $data[self::FIELD_CITY_EXT] - : null; - if ($data[self::FIELD_CITY] instanceof FHIRString) { - $this->setCity($data[self::FIELD_CITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CITY])) { - $this->setCity(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CITY]] + $ext)); - } else if (is_array($data[self::FIELD_CITY])) { - $this->setCity(new FHIRString(array_merge($ext, $data[self::FIELD_CITY]))); - } + if (isset($data[self::FIELD_CITY]) || isset($data[self::FIELD_CITY_EXT])) { + if (isset($data[self::FIELD_CITY])) { + $value = $data[self::FIELD_CITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CITY_EXT]) && is_array($data[self::FIELD_CITY_EXT])) { + $ext = $data[self::FIELD_CITY_EXT]; } else { - $this->setCity(new FHIRString($data[self::FIELD_CITY])); - } - } - if (isset($data[self::FIELD_COUNTRY])) { - $ext = (isset($data[self::FIELD_COUNTRY_EXT]) && is_array($data[self::FIELD_COUNTRY_EXT])) - ? $data[self::FIELD_COUNTRY_EXT] - : null; - if ($data[self::FIELD_COUNTRY] instanceof FHIRString) { - $this->setCountry($data[self::FIELD_COUNTRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNTRY])) { - $this->setCountry(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COUNTRY]] + $ext)); - } else if (is_array($data[self::FIELD_COUNTRY])) { - $this->setCountry(new FHIRString(array_merge($ext, $data[self::FIELD_COUNTRY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCity($value); + } else if (is_array($value)) { + $this->setCity(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCity(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCity(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COUNTRY]) || isset($data[self::FIELD_COUNTRY_EXT])) { + if (isset($data[self::FIELD_COUNTRY])) { + $value = $data[self::FIELD_COUNTRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNTRY_EXT]) && is_array($data[self::FIELD_COUNTRY_EXT])) { + $ext = $data[self::FIELD_COUNTRY_EXT]; } else { - $this->setCountry(new FHIRString($data[self::FIELD_COUNTRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCountry($value); + } else if (is_array($value)) { + $this->setCountry(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCountry(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCountry(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LINE])) { - $ext = (isset($data[self::FIELD_LINE_EXT]) && is_array($data[self::FIELD_LINE_EXT])) - ? $data[self::FIELD_LINE_EXT] - : null; - if (is_array($data[self::FIELD_LINE])) { - foreach($data[self::FIELD_LINE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLine($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLine(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINE]) || isset($data[self::FIELD_LINE_EXT])) { + if (isset($data[self::FIELD_LINE])) { + $value = $data[self::FIELD_LINE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINE_EXT]) && is_array($data[self::FIELD_LINE_EXT])) { + $ext = $data[self::FIELD_LINE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLine($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLine($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLine(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLine(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLine(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLine(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LINE] instanceof FHIRString) { - $this->addLine($data[self::FIELD_LINE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINE])) { - $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINE]] + $ext)); - } else { - $this->addLine(new FHIRString($data[self::FIELD_LINE])); } } if (isset($data[self::FIELD_PERIOD])) { @@ -266,68 +289,96 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATE])) { - $ext = (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) - ? $data[self::FIELD_STATE_EXT] - : null; - if ($data[self::FIELD_STATE] instanceof FHIRString) { - $this->setState($data[self::FIELD_STATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATE])) { - $this->setState(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATE])) { - $this->setState(new FHIRString(array_merge($ext, $data[self::FIELD_STATE]))); - } + if (isset($data[self::FIELD_STATE]) || isset($data[self::FIELD_STATE_EXT])) { + if (isset($data[self::FIELD_STATE])) { + $value = $data[self::FIELD_STATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) { + $ext = $data[self::FIELD_STATE_EXT]; } else { - $this->setState(new FHIRString($data[self::FIELD_STATE])); - } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setState($value); + } else if (is_array($value)) { + $this->setState(new FHIRString(array_merge($ext, $value))); + } else { + $this->setState(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setState(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRAddressUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRAddressUse([FHIRAddressUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRAddressUse(array_merge($ext, $data[self::FIELD_USE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIRAddressUse($data[self::FIELD_USE])); - } - } - if (isset($data[self::FIELD_ZIP])) { - $ext = (isset($data[self::FIELD_ZIP_EXT]) && is_array($data[self::FIELD_ZIP_EXT])) - ? $data[self::FIELD_ZIP_EXT] - : null; - if ($data[self::FIELD_ZIP] instanceof FHIRString) { - $this->setZip($data[self::FIELD_ZIP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ZIP])) { - $this->setZip(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ZIP]] + $ext)); - } else if (is_array($data[self::FIELD_ZIP])) { - $this->setZip(new FHIRString(array_merge($ext, $data[self::FIELD_ZIP]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAddressUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRAddressUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRAddressUse([FHIRAddressUse::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUse(new FHIRAddressUse($ext)); + } + } + if (isset($data[self::FIELD_ZIP]) || isset($data[self::FIELD_ZIP_EXT])) { + if (isset($data[self::FIELD_ZIP])) { + $value = $data[self::FIELD_ZIP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ZIP_EXT]) && is_array($data[self::FIELD_ZIP_EXT])) { + $ext = $data[self::FIELD_ZIP_EXT]; } else { - $this->setZip(new FHIRString($data[self::FIELD_ZIP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setZip($value); + } else if (is_array($value)) { + $this->setZip(new FHIRString(array_merge($ext, $value))); + } else { + $this->setZip(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setZip(new FHIRString($ext)); } } } @@ -661,8 +712,8 @@ public function setZip($zip = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -825,64 +876,87 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCity())) { $a[self::FIELD_CITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CITY_EXT] = $enc; } } if (null !== ($v = $this->getCountry())) { $a[self::FIELD_COUNTRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COUNTRY_EXT] = $enc; } } if ([] !== ($vs = $this->getLine())) { $a[self::FIELD_LINE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINE_EXT] = $encs; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if (null !== ($v = $this->getState())) { $a[self::FIELD_STATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATE_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAddressUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAddressUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } if (null !== ($v = $this->getZip())) { $a[self::FIELD_ZIP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ZIP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddressUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddressUse.php index 780d3d7b3a..924abe281d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddressUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAddressUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRAddressUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRAddressUseList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAggregationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAggregationMode.php index e277ec4ffa..24ac34eb0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAggregationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAggregationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRAggregationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRAggregationModeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAlertStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAlertStatus.php index 728f90e47d..059c631dc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAlertStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAlertStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIRAlertStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALERT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRAlertStatusList @@ -167,8 +166,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -251,6 +250,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAttachment.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAttachment.php index 17f8ac3cac..5237bcf61f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAttachment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRAttachment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRAttachment extends FHIRElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -191,116 +191,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); - } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRBase64Binary) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DATA]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; } else { - $this->setData(new FHIRBase64Binary($data[self::FIELD_DATA])); - } - } - if (isset($data[self::FIELD_HASH])) { - $ext = (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) - ? $data[self::FIELD_HASH_EXT] - : null; - if ($data[self::FIELD_HASH] instanceof FHIRBase64Binary) { - $this->setHash($data[self::FIELD_HASH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HASH])) { - $this->setHash(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_HASH]] + $ext)); - } else if (is_array($data[self::FIELD_HASH])) { - $this->setHash(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_HASH]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setData(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_HASH]) || isset($data[self::FIELD_HASH_EXT])) { + if (isset($data[self::FIELD_HASH])) { + $value = $data[self::FIELD_HASH]; } else { - $this->setHash(new FHIRBase64Binary($data[self::FIELD_HASH])); - } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + $value = null; + } + if (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) { + $ext = $data[self::FIELD_HASH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setHash($value); + } else if (is_array($value)) { + $this->setHash(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setHash(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHash(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); - } - } - if (isset($data[self::FIELD_SIZE])) { - $ext = (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) - ? $data[self::FIELD_SIZE_EXT] - : null; - if ($data[self::FIELD_SIZE] instanceof FHIRInteger) { - $this->setSize($data[self::FIELD_SIZE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SIZE]] + $ext)); - } else if (is_array($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRInteger(array_merge($ext, $data[self::FIELD_SIZE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_SIZE]) || isset($data[self::FIELD_SIZE_EXT])) { + if (isset($data[self::FIELD_SIZE])) { + $value = $data[self::FIELD_SIZE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) { + $ext = $data[self::FIELD_SIZE_EXT]; } else { - $this->setSize(new FHIRInteger($data[self::FIELD_SIZE])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setSize($value); + } else if (is_array($value)) { + $this->setSize(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setSize(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSize(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -598,8 +647,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -765,53 +814,70 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } if (null !== ($v = $this->getHash())) { $a[self::FIELD_HASH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_HASH_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getSize())) { $a[self::FIELD_SIZE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_SIZE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement.php index fac9b57649..d5d4822729 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,7 +74,7 @@ class FHIRBackboneElement extends FHIRElement const FIELD_MODIFIER_EXTENSION = 'modifierExtension'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Optional Extensions Element - found in all resources. @@ -214,8 +214,8 @@ public function setModifierExtension(array $modifierExtension = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -295,7 +295,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getModifierExtension())) { - $a[self::FIELD_MODIFIER_EXTENSION] = $vs; + $a[self::FIELD_MODIFIER_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER_EXTENSION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposure.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposure.php index 8d4cd225c0..0e84afa19f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposure.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRAdverseReactionExposure extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How likely is it that the given exposure caused a reaction @@ -155,36 +155,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CAUSALITY_EXPECTATION])) { - $ext = (isset($data[self::FIELD_CAUSALITY_EXPECTATION_EXT]) && is_array($data[self::FIELD_CAUSALITY_EXPECTATION_EXT])) - ? $data[self::FIELD_CAUSALITY_EXPECTATION_EXT] - : null; - if ($data[self::FIELD_CAUSALITY_EXPECTATION] instanceof FHIRCausalityExpectation) { - $this->setCausalityExpectation($data[self::FIELD_CAUSALITY_EXPECTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CAUSALITY_EXPECTATION])) { - $this->setCausalityExpectation(new FHIRCausalityExpectation([FHIRCausalityExpectation::FIELD_VALUE => $data[self::FIELD_CAUSALITY_EXPECTATION]] + $ext)); - } else if (is_array($data[self::FIELD_CAUSALITY_EXPECTATION])) { - $this->setCausalityExpectation(new FHIRCausalityExpectation(array_merge($ext, $data[self::FIELD_CAUSALITY_EXPECTATION]))); - } + if (isset($data[self::FIELD_CAUSALITY_EXPECTATION]) || isset($data[self::FIELD_CAUSALITY_EXPECTATION_EXT])) { + if (isset($data[self::FIELD_CAUSALITY_EXPECTATION])) { + $value = $data[self::FIELD_CAUSALITY_EXPECTATION]; } else { - $this->setCausalityExpectation(new FHIRCausalityExpectation($data[self::FIELD_CAUSALITY_EXPECTATION])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + if (isset($data[self::FIELD_CAUSALITY_EXPECTATION_EXT]) && is_array($data[self::FIELD_CAUSALITY_EXPECTATION_EXT])) { + $ext = $data[self::FIELD_CAUSALITY_EXPECTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCausalityExpectation) { + $this->setCausalityExpectation($value); + } else if (is_array($value)) { + $this->setCausalityExpectation(new FHIRCausalityExpectation(array_merge($ext, $value))); + } else { + $this->setCausalityExpectation(new FHIRCausalityExpectation([FHIRCausalityExpectation::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCausalityExpectation(new FHIRCausalityExpectation($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SUBSTANCE])) { @@ -194,20 +208,27 @@ public function __construct($data = null) $this->setSubstance(new FHIRResourceReference($data[self::FIELD_SUBSTANCE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRExposureType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRExposureType([FHIRExposureType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRExposureType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRExposureType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExposureType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRExposureType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRExposureType([FHIRExposureType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRExposureType($ext)); } } } @@ -369,8 +390,8 @@ public function setType(FHIRExposureType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -470,15 +491,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCausalityExpectation())) { $a[self::FIELD_CAUSALITY_EXPECTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCausalityExpectation::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCausalityExpectation::FIELD_VALUE]); $a[self::FIELD_CAUSALITY_EXPECTATION_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -487,11 +512,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExposureType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExposureType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptom.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptom.php index 711e35868e..137374252d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptom.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptom.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRAdverseReactionSymptom extends FHIRBackboneElement const FIELD_SEVERITY_EXT = '_severity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -132,20 +132,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRReactionSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRReactionSeverity([FHIRReactionSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRReactionSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); - } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; } else { - $this->setSeverity(new FHIRReactionSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRReactionSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRReactionSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRReactionSeverity([FHIRReactionSeverity::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRReactionSeverity($ext)); } } } @@ -235,8 +242,8 @@ public function setSeverity(FHIRReactionSeverity $severity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -319,11 +326,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRReactionSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRReactionSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php index b931b01055..9a501a348f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,6 @@ class FHIRCarePlanActivity extends FHIRBackboneElement const FIELD_ACTION_RESULTING = 'actionResulting'; const FIELD_DETAIL = 'detail'; const FIELD_GOAL = 'goal'; - const FIELD_GOAL_EXT = '_goal'; const FIELD_NOTES = 'notes'; const FIELD_NOTES_EXT = '_notes'; const FIELD_PROHIBITED = 'prohibited'; @@ -91,7 +90,7 @@ class FHIRCarePlanActivity extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -226,36 +225,50 @@ public function __construct($data = null) $this->addGoal($data[self::FIELD_GOAL]); } } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->setNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else if (is_array($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString(array_merge($ext, $data[self::FIELD_NOTES]))); - } + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; } else { - $this->setNotes(new FHIRString($data[self::FIELD_NOTES])); + $value = null; } - } - if (isset($data[self::FIELD_PROHIBITED])) { - $ext = (isset($data[self::FIELD_PROHIBITED_EXT]) && is_array($data[self::FIELD_PROHIBITED_EXT])) - ? $data[self::FIELD_PROHIBITED_EXT] - : null; - if ($data[self::FIELD_PROHIBITED] instanceof FHIRBoolean) { - $this->setProhibited($data[self::FIELD_PROHIBITED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROHIBITED])) { - $this->setProhibited(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PROHIBITED]] + $ext)); - } else if (is_array($data[self::FIELD_PROHIBITED])) { - $this->setProhibited(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PROHIBITED]))); + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNotes($value); + } else if (is_array($value)) { + $this->setNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNotes(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PROHIBITED]) || isset($data[self::FIELD_PROHIBITED_EXT])) { + if (isset($data[self::FIELD_PROHIBITED])) { + $value = $data[self::FIELD_PROHIBITED]; } else { - $this->setProhibited(new FHIRBoolean($data[self::FIELD_PROHIBITED])); + $value = null; + } + if (isset($data[self::FIELD_PROHIBITED_EXT]) && is_array($data[self::FIELD_PROHIBITED_EXT])) { + $ext = $data[self::FIELD_PROHIBITED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setProhibited($value); + } else if (is_array($value)) { + $this->setProhibited(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setProhibited(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProhibited(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_SIMPLE])) { @@ -265,20 +278,27 @@ public function __construct($data = null) $this->setSimple(new FHIRCarePlanSimple($data[self::FIELD_SIMPLE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCarePlanActivityStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanActivityStatus([FHIRCarePlanActivityStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanActivityStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCarePlanActivityStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanActivityStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCarePlanActivityStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCarePlanActivityStatus([FHIRCarePlanActivityStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCarePlanActivityStatus($ext)); } } } @@ -578,8 +598,8 @@ public function setStatus(FHIRCarePlanActivityStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -718,37 +738,41 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getActionResulting())) { - $a[self::FIELD_ACTION_RESULTING] = $vs; + $a[self::FIELD_ACTION_RESULTING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION_RESULTING][] = $v; + } } if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v; } if ([] !== ($vs = $this->getGoal())) { $a[self::FIELD_GOAL] = []; - foreach ($vs as $v) { + foreach($vs as $v) { if (null === $v) { continue; } - $a[self::FIELD_GOAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_GOAL_EXT][] = $enc; - } else { - $a[self::FIELD_GOAL_EXT][] = null; - } + $a[self::FIELD_GOAL][] = $v; } } if (null !== ($v = $this->getNotes())) { $a[self::FIELD_NOTES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTES_EXT] = $enc; } } if (null !== ($v = $this->getProhibited())) { $a[self::FIELD_PROHIBITED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PROHIBITED_EXT] = $enc; } } @@ -757,11 +781,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanActivityStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanActivityStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoal.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoal.php index e0d2b49033..1533c85685 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRCarePlanGoal extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -169,52 +169,73 @@ public function __construct($data = null) $this->addConcern(new FHIRResourceReference($data[self::FIELD_CONCERN])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->setNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else if (is_array($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString(array_merge($ext, $data[self::FIELD_NOTES]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setNotes(new FHIRString($data[self::FIELD_NOTES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCarePlanGoalStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanGoalStatus([FHIRCarePlanGoalStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanGoalStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNotes($value); + } else if (is_array($value)) { + $this->setNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNotes(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCarePlanGoalStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanGoalStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCarePlanGoalStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCarePlanGoalStatus([FHIRCarePlanGoalStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCarePlanGoalStatus($ext)); } } } @@ -403,8 +424,8 @@ public function setStatus(FHIRCarePlanGoalStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -518,29 +539,44 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getConcern())) { - $a[self::FIELD_CONCERN] = $vs; + $a[self::FIELD_CONCERN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCERN][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getNotes())) { $a[self::FIELD_NOTES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTES_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanGoalStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanGoalStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php index 7e057e0348..8da2def2d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRCarePlanParticipant extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -235,8 +235,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -320,6 +320,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimple.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimple.php index 905b160a4f..32a311af2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimple.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimple.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRCarePlanSimple extends FHIRBackboneElement const FIELD_TIMING_STRING_EXT = '_timingString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * High-level categorization of the type of activity in a care plan. @@ -250,20 +250,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRCarePlanActivityCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRCarePlanActivityCategory([FHIRCarePlanActivityCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRCarePlanActivityCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; } else { - $this->setCategory(new FHIRCarePlanActivityCategory($data[self::FIELD_CATEGORY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanActivityCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRCarePlanActivityCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRCarePlanActivityCategory([FHIRCarePlanActivityCategory::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCategory(new FHIRCarePlanActivityCategory($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -280,20 +287,27 @@ public function __construct($data = null) $this->setDailyAmount(new FHIRQuantity($data[self::FIELD_DAILY_AMOUNT])); } } - if (isset($data[self::FIELD_DETAILS])) { - $ext = (isset($data[self::FIELD_DETAILS_EXT]) && is_array($data[self::FIELD_DETAILS_EXT])) - ? $data[self::FIELD_DETAILS_EXT] - : null; - if ($data[self::FIELD_DETAILS] instanceof FHIRString) { - $this->setDetails($data[self::FIELD_DETAILS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAILS])) { - $this->setDetails(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DETAILS]] + $ext)); - } else if (is_array($data[self::FIELD_DETAILS])) { - $this->setDetails(new FHIRString(array_merge($ext, $data[self::FIELD_DETAILS]))); - } + if (isset($data[self::FIELD_DETAILS]) || isset($data[self::FIELD_DETAILS_EXT])) { + if (isset($data[self::FIELD_DETAILS])) { + $value = $data[self::FIELD_DETAILS]; } else { - $this->setDetails(new FHIRString($data[self::FIELD_DETAILS])); + $value = null; + } + if (isset($data[self::FIELD_DETAILS_EXT]) && is_array($data[self::FIELD_DETAILS_EXT])) { + $ext = $data[self::FIELD_DETAILS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDetails($value); + } else if (is_array($value)) { + $this->setDetails(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDetails(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetails(new FHIRString($ext)); } } if (isset($data[self::FIELD_LOCATION])) { @@ -349,20 +363,27 @@ public function __construct($data = null) $this->setTimingSchedule(new FHIRSchedule($data[self::FIELD_TIMING_SCHEDULE])); } } - if (isset($data[self::FIELD_TIMING_STRING])) { - $ext = (isset($data[self::FIELD_TIMING_STRING_EXT]) && is_array($data[self::FIELD_TIMING_STRING_EXT])) - ? $data[self::FIELD_TIMING_STRING_EXT] - : null; - if ($data[self::FIELD_TIMING_STRING] instanceof FHIRString) { - $this->setTimingString($data[self::FIELD_TIMING_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_STRING])) { - $this->setTimingString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TIMING_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_STRING])) { - $this->setTimingString(new FHIRString(array_merge($ext, $data[self::FIELD_TIMING_STRING]))); - } + if (isset($data[self::FIELD_TIMING_STRING]) || isset($data[self::FIELD_TIMING_STRING_EXT])) { + if (isset($data[self::FIELD_TIMING_STRING])) { + $value = $data[self::FIELD_TIMING_STRING]; } else { - $this->setTimingString(new FHIRString($data[self::FIELD_TIMING_STRING])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_STRING_EXT]) && is_array($data[self::FIELD_TIMING_STRING_EXT])) { + $ext = $data[self::FIELD_TIMING_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTimingString($value); + } else if (is_array($value)) { + $this->setTimingString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTimingString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingString(new FHIRString($ext)); } } } @@ -782,8 +803,8 @@ public function setTimingString($timingString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -940,8 +961,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanActivityCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanActivityCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } @@ -953,8 +976,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDetails())) { $a[self::FIELD_DETAILS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DETAILS_EXT] = $enc; } } @@ -962,7 +987,13 @@ public function jsonSerialize() $a[self::FIELD_LOCATION] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getProduct())) { $a[self::FIELD_PRODUCT] = $v; @@ -978,11 +1009,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingString())) { $a[self::FIELD_TIMING_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TIMING_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php index 69088fec63..40fb2b02c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRCompositionAttester extends FHIRBackboneElement const FIELD_TIME_EXT = '_time'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The way in which a person authenticated a composition @@ -146,33 +146,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if (is_array($data[self::FIELD_MODE])) { - foreach($data[self::FIELD_MODE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCompositionAttestationMode) { - $this->addMode($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addMode(new FHIRCompositionAttestationMode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionAttestationMode) { + $this->addMode($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCompositionAttestationMode) { + $this->addMode($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addMode(new FHIRCompositionAttestationMode(array_merge($v, $iext))); + } else { + $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addMode(new FHIRCompositionAttestationMode($v)); } + } elseif (is_array($value)) { + $this->addMode(new FHIRCompositionAttestationMode(array_merge($ext, $value))); + } else { + $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addMode(new FHIRCompositionAttestationMode($iext)); } - } elseif ($data[self::FIELD_MODE] instanceof FHIRCompositionAttestationMode) { - $this->addMode($data[self::FIELD_MODE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MODE])) { - $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else { - $this->addMode(new FHIRCompositionAttestationMode($data[self::FIELD_MODE])); } } if (isset($data[self::FIELD_PARTY])) { @@ -182,20 +191,27 @@ public function __construct($data = null) $this->setParty(new FHIRResourceReference($data[self::FIELD_PARTY])); } } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRDateTime) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME]))); - } + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; } else { - $this->setTime(new FHIRDateTime($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTime(new FHIRDateTime($ext)); } } } @@ -350,8 +366,8 @@ public function setTime($time = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -452,29 +468,42 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getMode())) { $a[self::FIELD_MODE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MODE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MODE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCompositionAttestationMode::FIELD_VALUE]) || array_key_exists(FHIRCompositionAttestationMode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MODE_EXT][] = null; + unset($enc[FHIRCompositionAttestationMode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MODE_EXT] = $encs; + } } if (null !== ($v = $this->getParty())) { $a[self::FIELD_PARTY] = $v; } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php index 8b0103bfa9..6036e621da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCompositionEvent extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -373,8 +373,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -473,14 +473,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php index 0e21adaa6d..3c130ea77a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRCompositionSection extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -205,20 +205,27 @@ public function __construct($data = null) $this->setSubject(new FHIRResourceReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -437,8 +444,8 @@ public function setTitle($title = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -556,18 +563,29 @@ public function jsonSerialize() $a[self::FIELD_CONTENT] = $v; } if ([] !== ($vs = $this->getSection())) { - $a[self::FIELD_SECTION] = $vs; + $a[self::FIELD_SECTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECTION][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConcept.php index 92d9d91de9..198d219d75 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConceptMapConcept extends FHIRBackboneElement const FIELD_SYSTEM_EXT = '_system'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -150,20 +150,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DEPENDS_ON])) { @@ -202,20 +209,27 @@ public function __construct($data = null) $this->addMap(new FHIRConceptMapMap($data[self::FIELD_MAP])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } } @@ -433,8 +447,8 @@ public function setSystem($system = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -556,24 +570,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getDependsOn())) { - $a[self::FIELD_DEPENDS_ON] = $vs; + $a[self::FIELD_DEPENDS_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEPENDS_ON][] = $v; + } } if ([] !== ($vs = $this->getMap())) { - $a[self::FIELD_MAP] = $vs; + $a[self::FIELD_MAP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAP][] = $v; + } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php index 00f79c2f71..0c85e6cbb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRConceptMapDependsOn extends FHIRBackboneElement const FIELD_SYSTEM_EXT = '_system'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -141,52 +141,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_CONCEPT])) { - $ext = (isset($data[self::FIELD_CONCEPT_EXT]) && is_array($data[self::FIELD_CONCEPT_EXT])) - ? $data[self::FIELD_CONCEPT_EXT] - : null; - if ($data[self::FIELD_CONCEPT] instanceof FHIRUri) { - $this->setConcept($data[self::FIELD_CONCEPT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONCEPT])) { - $this->setConcept(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_CONCEPT]] + $ext)); - } else if (is_array($data[self::FIELD_CONCEPT])) { - $this->setConcept(new FHIRUri(array_merge($ext, $data[self::FIELD_CONCEPT]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setConcept(new FHIRUri($data[self::FIELD_CONCEPT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (isset($data[self::FIELD_CONCEPT]) || isset($data[self::FIELD_CONCEPT_EXT])) { + if (isset($data[self::FIELD_CONCEPT])) { + $value = $data[self::FIELD_CONCEPT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONCEPT_EXT]) && is_array($data[self::FIELD_CONCEPT_EXT])) { + $ext = $data[self::FIELD_CONCEPT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setConcept($value); + } else if (is_array($value)) { + $this->setConcept(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setConcept(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConcept(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } } @@ -334,8 +355,8 @@ public function setSystem($system = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -445,25 +466,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getConcept())) { $a[self::FIELD_CONCEPT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_CONCEPT_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMap.php index 86ced3eb05..db0cbcafba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRConceptMapMap extends FHIRBackboneElement const FIELD_SYSTEM_EXT = '_system'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -167,52 +167,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_COMMENTS])) { - $ext = (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) - ? $data[self::FIELD_COMMENTS_EXT] - : null; - if ($data[self::FIELD_COMMENTS] instanceof FHIRString) { - $this->setComments($data[self::FIELD_COMMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENTS]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setComments(new FHIRString($data[self::FIELD_COMMENTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_EQUIVALENCE])) { - $ext = (isset($data[self::FIELD_EQUIVALENCE_EXT]) && is_array($data[self::FIELD_EQUIVALENCE_EXT])) - ? $data[self::FIELD_EQUIVALENCE_EXT] - : null; - if ($data[self::FIELD_EQUIVALENCE] instanceof FHIRConceptMapEquivalence) { - $this->setEquivalence($data[self::FIELD_EQUIVALENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EQUIVALENCE])) { - $this->setEquivalence(new FHIRConceptMapEquivalence([FHIRConceptMapEquivalence::FIELD_VALUE => $data[self::FIELD_EQUIVALENCE]] + $ext)); - } else if (is_array($data[self::FIELD_EQUIVALENCE])) { - $this->setEquivalence(new FHIRConceptMapEquivalence(array_merge($ext, $data[self::FIELD_EQUIVALENCE]))); + if (isset($data[self::FIELD_COMMENTS]) || isset($data[self::FIELD_COMMENTS_EXT])) { + if (isset($data[self::FIELD_COMMENTS])) { + $value = $data[self::FIELD_COMMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) { + $ext = $data[self::FIELD_COMMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComments($value); + } else if (is_array($value)) { + $this->setComments(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComments(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EQUIVALENCE]) || isset($data[self::FIELD_EQUIVALENCE_EXT])) { + if (isset($data[self::FIELD_EQUIVALENCE])) { + $value = $data[self::FIELD_EQUIVALENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EQUIVALENCE_EXT]) && is_array($data[self::FIELD_EQUIVALENCE_EXT])) { + $ext = $data[self::FIELD_EQUIVALENCE_EXT]; } else { - $this->setEquivalence(new FHIRConceptMapEquivalence($data[self::FIELD_EQUIVALENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConceptMapEquivalence) { + $this->setEquivalence($value); + } else if (is_array($value)) { + $this->setEquivalence(new FHIRConceptMapEquivalence(array_merge($ext, $value))); + } else { + $this->setEquivalence(new FHIRConceptMapEquivalence([FHIRConceptMapEquivalence::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEquivalence(new FHIRConceptMapEquivalence($ext)); } } if (isset($data[self::FIELD_PRODUCT])) { @@ -233,20 +254,27 @@ public function __construct($data = null) $this->addProduct(new FHIRConceptMapDependsOn($data[self::FIELD_PRODUCT])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } } @@ -480,8 +508,8 @@ public function setSystem($system = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -610,35 +638,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getComments())) { $a[self::FIELD_COMMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENTS_EXT] = $enc; } } if (null !== ($v = $this->getEquivalence())) { $a[self::FIELD_EQUIVALENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConceptMapEquivalence::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConceptMapEquivalence::FIELD_VALUE]); $a[self::FIELD_EQUIVALENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getProduct())) { - $a[self::FIELD_PRODUCT] = $vs; + $a[self::FIELD_PRODUCT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRODUCT][] = $v; + } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php index 2cd65a17e8..4e9600a8ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRConditionEvidence extends FHIRBackboneElement const FIELD_DETAIL = 'detail'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -267,8 +267,8 @@ public function setDetail(array $detail = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -357,7 +357,16 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocation.php index 3657211728..bd7f3b1273 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRConditionLocation extends FHIRBackboneElement const FIELD_DETAIL_EXT = '_detail'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -134,20 +134,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DETAIL])) { - $ext = (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) - ? $data[self::FIELD_DETAIL_EXT] - : null; - if ($data[self::FIELD_DETAIL] instanceof FHIRString) { - $this->setDetail($data[self::FIELD_DETAIL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DETAIL]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString(array_merge($ext, $data[self::FIELD_DETAIL]))); - } + if (isset($data[self::FIELD_DETAIL]) || isset($data[self::FIELD_DETAIL_EXT])) { + if (isset($data[self::FIELD_DETAIL])) { + $value = $data[self::FIELD_DETAIL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) { + $ext = $data[self::FIELD_DETAIL_EXT]; } else { - $this->setDetail(new FHIRString($data[self::FIELD_DETAIL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDetail($value); + } else if (is_array($value)) { + $this->setDetail(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetail(new FHIRString($ext)); } } } @@ -245,8 +252,8 @@ public function setDetail($detail = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -337,11 +344,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DETAIL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItem.php index 3e6eb09af5..565d8fc660 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRConditionRelatedItem extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -155,20 +155,27 @@ public function __construct($data = null) $this->setTarget(new FHIRResourceReference($data[self::FIELD_TARGET])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRConditionRelationshipType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRConditionRelationshipType([FHIRConditionRelationshipType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRConditionRelationshipType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRConditionRelationshipType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionRelationshipType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRConditionRelationshipType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRConditionRelationshipType([FHIRConditionRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRConditionRelationshipType($ext)); } } } @@ -290,8 +297,8 @@ public function setType(FHIRConditionRelationshipType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -383,11 +390,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionRelationshipType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php index cbceaf795e..f009f902fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRConditionStage extends FHIRBackboneElement const FIELD_SUMMARY = 'summary'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -274,8 +274,8 @@ public function setSummary(FHIRCodeableConcept $summary = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -361,11 +361,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAssessment())) { - $a[self::FIELD_ASSESSMENT] = $vs; + $a[self::FIELD_ASSESSMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ASSESSMENT][] = $v; + } } if (null !== ($v = $this->getSummary())) { $a[self::FIELD_SUMMARY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php index ad92a705c1..0a0aee667c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRConformanceCertificate extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -127,36 +127,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BLOB])) { - $ext = (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) - ? $data[self::FIELD_BLOB_EXT] - : null; - if ($data[self::FIELD_BLOB] instanceof FHIRBase64Binary) { - $this->setBlob($data[self::FIELD_BLOB]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_BLOB]] + $ext)); - } else if (is_array($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_BLOB]))); - } + if (isset($data[self::FIELD_BLOB]) || isset($data[self::FIELD_BLOB_EXT])) { + if (isset($data[self::FIELD_BLOB])) { + $value = $data[self::FIELD_BLOB]; } else { - $this->setBlob(new FHIRBase64Binary($data[self::FIELD_BLOB])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) { + $ext = $data[self::FIELD_BLOB_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setBlob($value); + } else if (is_array($value)) { + $this->setBlob(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBlob(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -262,8 +276,8 @@ public function setType($type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -359,18 +373,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBlob())) { $a[self::FIELD_BLOB] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_BLOB_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php index dac512bdcd..583a38f131 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRConformanceDocument extends FHIRBackboneElement const FIELD_PROFILE = 'profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -140,36 +140,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRDocumentMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRDocumentMode([FHIRDocumentMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRDocumentMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRDocumentMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRDocumentMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRDocumentMode([FHIRDocumentMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRDocumentMode($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -304,8 +318,8 @@ public function setProfile(FHIRResourceReference $profile = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -399,21 +413,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php index 4c66ed2c8d..150403b579 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRConformanceEvent extends FHIRBackboneElement const FIELD_RESPONSE = 'response'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The impact of the content of a message @@ -206,20 +206,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRMessageSignificanceCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; } else { - $this->setCategory(new FHIRMessageSignificanceCategory($data[self::FIELD_CATEGORY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMessageSignificanceCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCategory(new FHIRMessageSignificanceCategory($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -229,52 +236,73 @@ public function __construct($data = null) $this->setCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_FOCUS])) { - $ext = (isset($data[self::FIELD_FOCUS_EXT]) && is_array($data[self::FIELD_FOCUS_EXT])) - ? $data[self::FIELD_FOCUS_EXT] - : null; - if ($data[self::FIELD_FOCUS] instanceof FHIRCode) { - $this->setFocus($data[self::FIELD_FOCUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCUS])) { - $this->setFocus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FOCUS]] + $ext)); - } else if (is_array($data[self::FIELD_FOCUS])) { - $this->setFocus(new FHIRCode(array_merge($ext, $data[self::FIELD_FOCUS]))); - } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setFocus(new FHIRCode($data[self::FIELD_FOCUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRConformanceEventMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRConformanceEventMode([FHIRConformanceEventMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRConformanceEventMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (isset($data[self::FIELD_FOCUS]) || isset($data[self::FIELD_FOCUS_EXT])) { + if (isset($data[self::FIELD_FOCUS])) { + $value = $data[self::FIELD_FOCUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FOCUS_EXT]) && is_array($data[self::FIELD_FOCUS_EXT])) { + $ext = $data[self::FIELD_FOCUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setFocus($value); + } else if (is_array($value)) { + $this->setFocus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setFocus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFocus(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRConformanceEventMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConformanceEventMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRConformanceEventMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRConformanceEventMode([FHIRConformanceEventMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRConformanceEventMode($ext)); } } if (isset($data[self::FIELD_PROTOCOL])) { @@ -621,8 +649,8 @@ public function setResponse(FHIRResourceReference $response = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -761,8 +789,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMessageSignificanceCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMessageSignificanceCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } @@ -771,27 +801,39 @@ public function jsonSerialize() } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getFocus())) { $a[self::FIELD_FOCUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_FOCUS_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConformanceEventMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConformanceEventMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if ([] !== ($vs = $this->getProtocol())) { - $a[self::FIELD_PROTOCOL] = $vs; + $a[self::FIELD_PROTOCOL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROTOCOL][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -799,6 +841,9 @@ public function jsonSerialize() if (null !== ($v = $this->getResponse())) { $a[self::FIELD_RESPONSE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php index 6b699ea1dd..d72d4a7b33 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRConformanceImplementation extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -127,36 +127,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -262,8 +276,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -359,18 +373,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php index 4688df2b56..a3f2638c8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConformanceMessaging extends FHIRBackboneElement const FIELD_RELIABLE_CACHE_EXT = '_reliableCache'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -157,36 +157,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUri) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri(array_merge($ext, $data[self::FIELD_ENDPOINT]))); + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUri($data[self::FIELD_ENDPOINT])); + $value = null; + } + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUri($ext)); } } if (isset($data[self::FIELD_EVENT])) { @@ -207,20 +221,27 @@ public function __construct($data = null) $this->addEvent(new FHIRConformanceEvent($data[self::FIELD_EVENT])); } } - if (isset($data[self::FIELD_RELIABLE_CACHE])) { - $ext = (isset($data[self::FIELD_RELIABLE_CACHE_EXT]) && is_array($data[self::FIELD_RELIABLE_CACHE_EXT])) - ? $data[self::FIELD_RELIABLE_CACHE_EXT] - : null; - if ($data[self::FIELD_RELIABLE_CACHE] instanceof FHIRInteger) { - $this->setReliableCache($data[self::FIELD_RELIABLE_CACHE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELIABLE_CACHE])) { - $this->setReliableCache(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_RELIABLE_CACHE]] + $ext)); - } else if (is_array($data[self::FIELD_RELIABLE_CACHE])) { - $this->setReliableCache(new FHIRInteger(array_merge($ext, $data[self::FIELD_RELIABLE_CACHE]))); - } + if (isset($data[self::FIELD_RELIABLE_CACHE]) || isset($data[self::FIELD_RELIABLE_CACHE_EXT])) { + if (isset($data[self::FIELD_RELIABLE_CACHE])) { + $value = $data[self::FIELD_RELIABLE_CACHE]; } else { - $this->setReliableCache(new FHIRInteger($data[self::FIELD_RELIABLE_CACHE])); + $value = null; + } + if (isset($data[self::FIELD_RELIABLE_CACHE_EXT]) && is_array($data[self::FIELD_RELIABLE_CACHE_EXT])) { + $ext = $data[self::FIELD_RELIABLE_CACHE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setReliableCache($value); + } else if (is_array($value)) { + $this->setReliableCache(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setReliableCache(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReliableCache(new FHIRInteger($ext)); } } } @@ -420,8 +441,8 @@ public function setReliableCache($reliableCache = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -544,28 +565,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getReliableCache())) { $a[self::FIELD_RELIABLE_CACHE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_RELIABLE_CACHE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php index d988ddf91a..e718316845 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRConformanceOperation extends FHIRBackboneElement const FIELD_DOCUMENTATION_EXT = '_documentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Operations supported by REST at the type or instance level @@ -127,36 +127,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRRestfulOperationType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRRestfulOperationType([FHIRRestfulOperationType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRRestfulOperationType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRRestfulOperationType($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRestfulOperationType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRRestfulOperationType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRRestfulOperationType([FHIRRestfulOperationType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRRestfulOperationType($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } } @@ -254,8 +268,8 @@ public function setDocumentation($documentation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -343,18 +357,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRestfulOperationType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRestfulOperationType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1.php index c77bf56199..c74be4aeb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRConformanceOperation1 extends FHIRBackboneElement const FIELD_DOCUMENTATION_EXT = '_documentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Operations supported by REST at the system level @@ -127,36 +127,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRRestfulOperationSystem) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRRestfulOperationSystem([FHIRRestfulOperationSystem::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRRestfulOperationSystem(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRRestfulOperationSystem($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRestfulOperationSystem) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRRestfulOperationSystem(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRRestfulOperationSystem([FHIRRestfulOperationSystem::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRRestfulOperationSystem($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } } @@ -254,8 +268,8 @@ public function setDocumentation($documentation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -343,18 +357,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRestfulOperationSystem::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRestfulOperationSystem::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQuery.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQuery.php index 597656fa0d..f47d8ebb01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQuery.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQuery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRConformanceQuery extends FHIRBackboneElement const FIELD_PARAMETER = 'parameter'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -151,52 +151,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRUri) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; } else { - $this->setDefinition(new FHIRUri($data[self::FIELD_DEFINITION])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -412,8 +433,8 @@ public function setParameter(array $parameter = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -536,27 +557,42 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php index 1f2101d32b..9c9a1db1a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRConformanceResource extends FHIRBackboneElement const FIELD_UPDATE_CREATE_EXT = '_updateCreate'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A conformance statement is a set of requirements for a desired implementation or @@ -224,49 +224,65 @@ public function __construct($data = null) $this->setProfile(new FHIRResourceReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_READ_HISTORY])) { - $ext = (isset($data[self::FIELD_READ_HISTORY_EXT]) && is_array($data[self::FIELD_READ_HISTORY_EXT])) - ? $data[self::FIELD_READ_HISTORY_EXT] - : null; - if ($data[self::FIELD_READ_HISTORY] instanceof FHIRBoolean) { - $this->setReadHistory($data[self::FIELD_READ_HISTORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READ_HISTORY])) { - $this->setReadHistory(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_READ_HISTORY]] + $ext)); - } else if (is_array($data[self::FIELD_READ_HISTORY])) { - $this->setReadHistory(new FHIRBoolean(array_merge($ext, $data[self::FIELD_READ_HISTORY]))); - } + if (isset($data[self::FIELD_READ_HISTORY]) || isset($data[self::FIELD_READ_HISTORY_EXT])) { + if (isset($data[self::FIELD_READ_HISTORY])) { + $value = $data[self::FIELD_READ_HISTORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_READ_HISTORY_EXT]) && is_array($data[self::FIELD_READ_HISTORY_EXT])) { + $ext = $data[self::FIELD_READ_HISTORY_EXT]; } else { - $this->setReadHistory(new FHIRBoolean($data[self::FIELD_READ_HISTORY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReadHistory($value); + } else if (is_array($value)) { + $this->setReadHistory(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReadHistory(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReadHistory(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_SEARCH_INCLUDE])) { - $ext = (isset($data[self::FIELD_SEARCH_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_INCLUDE_EXT])) - ? $data[self::FIELD_SEARCH_INCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_SEARCH_INCLUDE])) { - foreach($data[self::FIELD_SEARCH_INCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSearchInclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSearchInclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEARCH_INCLUDE]) || isset($data[self::FIELD_SEARCH_INCLUDE_EXT])) { + if (isset($data[self::FIELD_SEARCH_INCLUDE])) { + $value = $data[self::FIELD_SEARCH_INCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_INCLUDE_EXT])) { + $ext = $data[self::FIELD_SEARCH_INCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSearchInclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSearchInclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSearchInclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSearchInclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSearchInclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSearchInclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_SEARCH_INCLUDE] instanceof FHIRString) { - $this->addSearchInclude($data[self::FIELD_SEARCH_INCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEARCH_INCLUDE])) { - $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEARCH_INCLUDE]] + $ext)); - } else { - $this->addSearchInclude(new FHIRString($data[self::FIELD_SEARCH_INCLUDE])); } } if (isset($data[self::FIELD_SEARCH_PARAM])) { @@ -287,36 +303,50 @@ public function __construct($data = null) $this->addSearchParam(new FHIRConformanceSearchParam($data[self::FIELD_SEARCH_PARAM])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_UPDATE_CREATE])) { - $ext = (isset($data[self::FIELD_UPDATE_CREATE_EXT]) && is_array($data[self::FIELD_UPDATE_CREATE_EXT])) - ? $data[self::FIELD_UPDATE_CREATE_EXT] - : null; - if ($data[self::FIELD_UPDATE_CREATE] instanceof FHIRBoolean) { - $this->setUpdateCreate($data[self::FIELD_UPDATE_CREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UPDATE_CREATE])) { - $this->setUpdateCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_UPDATE_CREATE]] + $ext)); - } else if (is_array($data[self::FIELD_UPDATE_CREATE])) { - $this->setUpdateCreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_UPDATE_CREATE]))); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_UPDATE_CREATE]) || isset($data[self::FIELD_UPDATE_CREATE_EXT])) { + if (isset($data[self::FIELD_UPDATE_CREATE])) { + $value = $data[self::FIELD_UPDATE_CREATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UPDATE_CREATE_EXT]) && is_array($data[self::FIELD_UPDATE_CREATE_EXT])) { + $ext = $data[self::FIELD_UPDATE_CREATE_EXT]; } else { - $this->setUpdateCreate(new FHIRBoolean($data[self::FIELD_UPDATE_CREATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setUpdateCreate($value); + } else if (is_array($value)) { + $this->setUpdateCreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setUpdateCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUpdateCreate(new FHIRBoolean($ext)); } } } @@ -673,8 +703,8 @@ public function setUpdateCreate($updateCreate = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -828,50 +858,79 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getOperation())) { - $a[self::FIELD_OPERATION] = $vs; + $a[self::FIELD_OPERATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPERATION][] = $v; + } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } if (null !== ($v = $this->getReadHistory())) { $a[self::FIELD_READ_HISTORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_READ_HISTORY_EXT] = $enc; } } if ([] !== ($vs = $this->getSearchInclude())) { $a[self::FIELD_SEARCH_INCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEARCH_INCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEARCH_INCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEARCH_INCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEARCH_INCLUDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSearchParam())) { - $a[self::FIELD_SEARCH_PARAM] = $vs; + $a[self::FIELD_SEARCH_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SEARCH_PARAM][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUpdateCreate())) { $a[self::FIELD_UPDATE_CREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_UPDATE_CREATE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php index df0cb736a0..3bd8a712e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRConformanceRest extends FHIRBackboneElement const FIELD_SECURITY = 'security'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -197,65 +197,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENT_MAILBOX])) { - $ext = (isset($data[self::FIELD_DOCUMENT_MAILBOX_EXT]) && is_array($data[self::FIELD_DOCUMENT_MAILBOX_EXT])) - ? $data[self::FIELD_DOCUMENT_MAILBOX_EXT] - : null; - if (is_array($data[self::FIELD_DOCUMENT_MAILBOX])) { - foreach($data[self::FIELD_DOCUMENT_MAILBOX] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addDocumentMailbox($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDocumentMailbox(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDocumentMailbox(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DOCUMENT_MAILBOX]) || isset($data[self::FIELD_DOCUMENT_MAILBOX_EXT])) { + if (isset($data[self::FIELD_DOCUMENT_MAILBOX])) { + $value = $data[self::FIELD_DOCUMENT_MAILBOX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENT_MAILBOX_EXT]) && is_array($data[self::FIELD_DOCUMENT_MAILBOX_EXT])) { + $ext = $data[self::FIELD_DOCUMENT_MAILBOX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addDocumentMailbox($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addDocumentMailbox($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDocumentMailbox(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addDocumentMailbox(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDocumentMailbox(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addDocumentMailbox(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addDocumentMailbox(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DOCUMENT_MAILBOX] instanceof FHIRUri) { - $this->addDocumentMailbox($data[self::FIELD_DOCUMENT_MAILBOX]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DOCUMENT_MAILBOX])) { - $this->addDocumentMailbox(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DOCUMENT_MAILBOX]] + $ext)); - } else { - $this->addDocumentMailbox(new FHIRUri($data[self::FIELD_DOCUMENT_MAILBOX])); - } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDocumentMailbox(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); - } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRRestfulConformanceMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRRestfulConformanceMode([FHIRRestfulConformanceMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRRestfulConformanceMode(array_merge($ext, $data[self::FIELD_MODE]))); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIRRestfulConformanceMode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRestfulConformanceMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRRestfulConformanceMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRRestfulConformanceMode([FHIRRestfulConformanceMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRRestfulConformanceMode($ext)); } } if (isset($data[self::FIELD_OPERATION])) { @@ -688,8 +711,8 @@ public function setSecurity(FHIRConformanceSecurity $security = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -835,45 +858,78 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDocumentMailbox())) { $a[self::FIELD_DOCUMENT_MAILBOX] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DOCUMENT_MAILBOX][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DOCUMENT_MAILBOX_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DOCUMENT_MAILBOX_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DOCUMENT_MAILBOX_EXT] = $encs; + } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRestfulConformanceMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRestfulConformanceMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if ([] !== ($vs = $this->getOperation())) { - $a[self::FIELD_OPERATION] = $vs; + $a[self::FIELD_OPERATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPERATION][] = $v; + } } if ([] !== ($vs = $this->getQuery())) { - $a[self::FIELD_QUERY] = $vs; + $a[self::FIELD_QUERY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUERY][] = $v; + } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } } if (null !== ($v = $this->getSecurity())) { $a[self::FIELD_SECURITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php index 1fcbea327c..8e171399df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRConformanceSearchParam extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -179,126 +179,172 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CHAIN])) { - $ext = (isset($data[self::FIELD_CHAIN_EXT]) && is_array($data[self::FIELD_CHAIN_EXT])) - ? $data[self::FIELD_CHAIN_EXT] - : null; - if (is_array($data[self::FIELD_CHAIN])) { - foreach($data[self::FIELD_CHAIN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addChain($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addChain(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CHAIN]) || isset($data[self::FIELD_CHAIN_EXT])) { + if (isset($data[self::FIELD_CHAIN])) { + $value = $data[self::FIELD_CHAIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CHAIN_EXT]) && is_array($data[self::FIELD_CHAIN_EXT])) { + $ext = $data[self::FIELD_CHAIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addChain($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addChain($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addChain(new FHIRString(array_merge($v, $iext))); + } else { + $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addChain(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addChain(new FHIRString(array_merge($ext, $value))); + } else { + $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_CHAIN] instanceof FHIRString) { - $this->addChain($data[self::FIELD_CHAIN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CHAIN])) { - $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CHAIN]] + $ext)); - } else { - $this->addChain(new FHIRString($data[self::FIELD_CHAIN])); - } - } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRUri) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addChain(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRUri($data[self::FIELD_DEFINITION])); - } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TARGET])) { - $ext = (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) - ? $data[self::FIELD_TARGET_EXT] - : null; - if (is_array($data[self::FIELD_TARGET])) { - foreach($data[self::FIELD_TARGET] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addTarget($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTarget(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TARGET]) || isset($data[self::FIELD_TARGET_EXT])) { + if (isset($data[self::FIELD_TARGET])) { + $value = $data[self::FIELD_TARGET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) { + $ext = $data[self::FIELD_TARGET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addTarget($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addTarget($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTarget(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTarget(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addTarget(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_TARGET] instanceof FHIRCode) { - $this->addTarget($data[self::FIELD_TARGET]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TARGET])) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TARGET]] + $ext)); - } else { - $this->addTarget(new FHIRCode($data[self::FIELD_TARGET])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSearchParamType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType(array_merge($ext, $data[self::FIELD_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTarget(new FHIRCode($iext)); } + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRSearchParamType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchParamType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSearchParamType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRSearchParamType($ext)); } } } @@ -596,8 +642,8 @@ public function setType(FHIRSearchParamType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -739,62 +785,89 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getChain())) { $a[self::FIELD_CHAIN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CHAIN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CHAIN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CHAIN_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CHAIN_EXT] = $encs; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { $a[self::FIELD_TARGET] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TARGET][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TARGET_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TARGET_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TARGET_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchParamType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchParamType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php index 5dd1b83b44..fa4724280b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRConformanceSecurity extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A conformance statement is a set of requirements for a desired implementation or @@ -170,36 +170,50 @@ public function __construct($data = null) $this->addCertificate(new FHIRConformanceCertificate($data[self::FIELD_CERTIFICATE])); } } - if (isset($data[self::FIELD_CORS])) { - $ext = (isset($data[self::FIELD_CORS_EXT]) && is_array($data[self::FIELD_CORS_EXT])) - ? $data[self::FIELD_CORS_EXT] - : null; - if ($data[self::FIELD_CORS] instanceof FHIRBoolean) { - $this->setCors($data[self::FIELD_CORS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CORS])) { - $this->setCors(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CORS]] + $ext)); - } else if (is_array($data[self::FIELD_CORS])) { - $this->setCors(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CORS]))); - } + if (isset($data[self::FIELD_CORS]) || isset($data[self::FIELD_CORS_EXT])) { + if (isset($data[self::FIELD_CORS])) { + $value = $data[self::FIELD_CORS]; } else { - $this->setCors(new FHIRBoolean($data[self::FIELD_CORS])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CORS_EXT]) && is_array($data[self::FIELD_CORS_EXT])) { + $ext = $data[self::FIELD_CORS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCors($value); + } else if (is_array($value)) { + $this->setCors(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCors(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCors(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -436,8 +450,8 @@ public function setService(array $service = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -558,24 +572,43 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCertificate())) { - $a[self::FIELD_CERTIFICATE] = $vs; + $a[self::FIELD_CERTIFICATE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CERTIFICATE][] = $v; + } } if (null !== ($v = $this->getCors())) { $a[self::FIELD_CORS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CORS_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getService())) { - $a[self::FIELD_SERVICE] = $vs; + $a[self::FIELD_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php index c1a9ee4730..805b0c2ba4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRConformanceSoftware extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -140,52 +140,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_RELEASE_DATE])) { - $ext = (isset($data[self::FIELD_RELEASE_DATE_EXT]) && is_array($data[self::FIELD_RELEASE_DATE_EXT])) - ? $data[self::FIELD_RELEASE_DATE_EXT] - : null; - if ($data[self::FIELD_RELEASE_DATE] instanceof FHIRDateTime) { - $this->setReleaseDate($data[self::FIELD_RELEASE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELEASE_DATE])) { - $this->setReleaseDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RELEASE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RELEASE_DATE])) { - $this->setReleaseDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RELEASE_DATE]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setReleaseDate(new FHIRDateTime($data[self::FIELD_RELEASE_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_RELEASE_DATE]) || isset($data[self::FIELD_RELEASE_DATE_EXT])) { + if (isset($data[self::FIELD_RELEASE_DATE])) { + $value = $data[self::FIELD_RELEASE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELEASE_DATE_EXT]) && is_array($data[self::FIELD_RELEASE_DATE_EXT])) { + $ext = $data[self::FIELD_RELEASE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReleaseDate($value); + } else if (is_array($value)) { + $this->setReleaseDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReleaseDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReleaseDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -329,8 +350,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -440,25 +461,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getReleaseDate())) { $a[self::FIELD_RELEASE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RELEASE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannel.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannel.php index b52c031499..a40bf43b01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannel.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceObservationReportChannel extends FHIRBackboneElement const FIELD_METRIC = 'metric'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -255,8 +255,8 @@ public function setMetric(array $metric = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -345,7 +345,16 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getMetric())) { - $a[self::FIELD_METRIC] = $vs; + $a[self::FIELD_METRIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_METRIC][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetric.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetric.php index c00caa41b4..885c2559aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetric.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetric.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,7 +75,7 @@ class FHIRDeviceObservationReportMetric extends FHIRBackboneElement const FIELD_OBSERVATION = 'observation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -174,8 +174,8 @@ public function setObservation(FHIRResourceReference $observation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +250,9 @@ public function jsonSerialize() if (null !== ($v = $this->getObservation())) { $a[self::FIELD_OBSERVATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDevice.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDevice.php index 371fabd94d..84f95fe51d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceObservationReportVirtualDevice extends FHIRBackboneElement const FIELD_CODE = 'code'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the data produced by a device at a point in time. @@ -255,8 +255,8 @@ public function setCode(FHIRCodeableConcept $code = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -342,11 +342,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getChannel())) { - $a[self::FIELD_CHANNEL] = $vs; + $a[self::FIELD_CHANNEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHANNEL][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php index e4c385beaf..3add892235 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRDiagnosticOrderEvent extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -161,20 +161,27 @@ public function __construct($data = null) $this->setActor(new FHIRResourceReference($data[self::FIELD_ACTOR])); } } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DESCRIPTION])) { @@ -184,20 +191,27 @@ public function __construct($data = null) $this->setDescription(new FHIRCodeableConcept($data[self::FIELD_DESCRIPTION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticOrderStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRDiagnosticOrderStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticOrderStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticOrderStatus($ext)); } } } @@ -361,8 +375,8 @@ public function setStatus(FHIRDiagnosticOrderStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -465,8 +479,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } @@ -475,11 +491,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticOrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticOrderStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php index 74c080c05e..f29e01678a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDiagnosticOrderItem extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -212,20 +212,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRResourceReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticOrderStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDiagnosticOrderStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticOrderStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticOrderStatus($ext)); } } } @@ -458,8 +465,8 @@ public function setStatus(FHIRDiagnosticOrderStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -576,18 +583,35 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticOrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticOrderStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php index dfa639faf9..23410ab2a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDiagnosticReportImage extends FHIRBackboneElement const FIELD_LINK = 'link'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -129,20 +129,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_LINK])) { @@ -249,8 +256,8 @@ public function setLink(FHIRResourceReference $link = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -338,14 +345,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getLink())) { $a[self::FIELD_LINK] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php index c8a0a0ec02..3647b1b8ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRDocumentReferenceContext extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -332,8 +332,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -425,7 +425,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getFacilityType())) { $a[self::FIELD_FACILITY_TYPE] = $v; @@ -433,6 +439,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameter.php index 7d8e5b3d92..cc07f823a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRDocumentReferenceParameter extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -122,36 +122,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -253,8 +267,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -351,18 +365,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php index 29529ecb6d..47ecbc458c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRDocumentReferenceRelatesTo extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The type of relationship between documents @@ -123,20 +123,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRDocumentRelationshipType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRDocumentRelationshipType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentRelationshipType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRDocumentRelationshipType($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -231,8 +238,8 @@ public function setTarget(FHIRResourceReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -312,14 +319,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentRelationshipType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceService.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceService.php index e54d0873f7..5032ad9155 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceService.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceService.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRDocumentReferenceService extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -134,20 +134,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDRESS])) { - $ext = (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) - ? $data[self::FIELD_ADDRESS_EXT] - : null; - if ($data[self::FIELD_ADDRESS] instanceof FHIRString) { - $this->setAddress($data[self::FIELD_ADDRESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADDRESS]] + $ext)); - } else if (is_array($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRString(array_merge($ext, $data[self::FIELD_ADDRESS]))); - } + if (isset($data[self::FIELD_ADDRESS]) || isset($data[self::FIELD_ADDRESS_EXT])) { + if (isset($data[self::FIELD_ADDRESS])) { + $value = $data[self::FIELD_ADDRESS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) { + $ext = $data[self::FIELD_ADDRESS_EXT]; } else { - $this->setAddress(new FHIRString($data[self::FIELD_ADDRESS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAddress($value); + } else if (is_array($value)) { + $this->setAddress(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAddress(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAddress(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -320,8 +327,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -422,17 +429,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAddress())) { $a[self::FIELD_ADDRESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADDRESS_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodation.php index ad2dee11f6..137cdca860 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIREncounterAccomodation extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -225,8 +225,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -310,6 +310,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php index cefc71a9f4..67bdf4a86c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREncounterHospitalization extends FHIRBackboneElement const FIELD_SPECIAL_COURTESY = 'specialCourtesy'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An interaction between a patient and healthcare provider(s) for the purpose of @@ -326,20 +326,27 @@ public function __construct($data = null) $this->setPreAdmissionIdentifier(new FHIRIdentifier($data[self::FIELD_PRE_ADMISSION_IDENTIFIER])); } } - if (isset($data[self::FIELD_RE_ADMISSION])) { - $ext = (isset($data[self::FIELD_RE_ADMISSION_EXT]) && is_array($data[self::FIELD_RE_ADMISSION_EXT])) - ? $data[self::FIELD_RE_ADMISSION_EXT] - : null; - if ($data[self::FIELD_RE_ADMISSION] instanceof FHIRBoolean) { - $this->setReAdmission($data[self::FIELD_RE_ADMISSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RE_ADMISSION])) { - $this->setReAdmission(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_RE_ADMISSION]] + $ext)); - } else if (is_array($data[self::FIELD_RE_ADMISSION])) { - $this->setReAdmission(new FHIRBoolean(array_merge($ext, $data[self::FIELD_RE_ADMISSION]))); - } + if (isset($data[self::FIELD_RE_ADMISSION]) || isset($data[self::FIELD_RE_ADMISSION_EXT])) { + if (isset($data[self::FIELD_RE_ADMISSION])) { + $value = $data[self::FIELD_RE_ADMISSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RE_ADMISSION_EXT]) && is_array($data[self::FIELD_RE_ADMISSION_EXT])) { + $ext = $data[self::FIELD_RE_ADMISSION_EXT]; } else { - $this->setReAdmission(new FHIRBoolean($data[self::FIELD_RE_ADMISSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReAdmission($value); + } else if (is_array($value)) { + $this->setReAdmission(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReAdmission(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReAdmission(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_SPECIAL_ARRANGEMENT])) { @@ -860,8 +867,8 @@ public function setSpecialCourtesy(array $specialCourtesy = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1029,7 +1036,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAccomodation())) { - $a[self::FIELD_ACCOMODATION] = $vs; + $a[self::FIELD_ACCOMODATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACCOMODATION][] = $v; + } } if (null !== ($v = $this->getAdmitSource())) { $a[self::FIELD_ADMIT_SOURCE] = $v; @@ -1057,16 +1070,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getReAdmission())) { $a[self::FIELD_RE_ADMISSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_RE_ADMISSION_EXT] = $enc; } } if ([] !== ($vs = $this->getSpecialArrangement())) { - $a[self::FIELD_SPECIAL_ARRANGEMENT] = $vs; + $a[self::FIELD_SPECIAL_ARRANGEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_ARRANGEMENT][] = $v; + } } if ([] !== ($vs = $this->getSpecialCourtesy())) { - $a[self::FIELD_SPECIAL_COURTESY] = $vs; + $a[self::FIELD_SPECIAL_COURTESY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_COURTESY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php index b7a9757dee..39e18ef322 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIREncounterLocation extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -225,8 +225,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -310,6 +310,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php index 48a0f7ce7d..a15b5431cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIREncounterParticipant extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -266,8 +266,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -356,7 +356,16 @@ public function jsonSerialize() $a[self::FIELD_INDIVIDUAL] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryCondition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryCondition.php index 6eed17aab6..a97250bd8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRFamilyHistoryCondition extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -181,20 +181,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NOTE])) { - $ext = (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) - ? $data[self::FIELD_NOTE_EXT] - : null; - if ($data[self::FIELD_NOTE] instanceof FHIRString) { - $this->setNote($data[self::FIELD_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString(array_merge($ext, $data[self::FIELD_NOTE]))); - } + if (isset($data[self::FIELD_NOTE]) || isset($data[self::FIELD_NOTE_EXT])) { + if (isset($data[self::FIELD_NOTE])) { + $value = $data[self::FIELD_NOTE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) { + $ext = $data[self::FIELD_NOTE_EXT]; } else { - $this->setNote(new FHIRString($data[self::FIELD_NOTE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNote($value); + } else if (is_array($value)) { + $this->setNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNote(new FHIRString($ext)); } } if (isset($data[self::FIELD_ONSET_AGE])) { @@ -211,20 +218,27 @@ public function __construct($data = null) $this->setOnsetRange(new FHIRRange($data[self::FIELD_ONSET_RANGE])); } } - if (isset($data[self::FIELD_ONSET_STRING])) { - $ext = (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) - ? $data[self::FIELD_ONSET_STRING_EXT] - : null; - if ($data[self::FIELD_ONSET_STRING] instanceof FHIRString) { - $this->setOnsetString($data[self::FIELD_ONSET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ONSET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString(array_merge($ext, $data[self::FIELD_ONSET_STRING]))); - } + if (isset($data[self::FIELD_ONSET_STRING]) || isset($data[self::FIELD_ONSET_STRING_EXT])) { + if (isset($data[self::FIELD_ONSET_STRING])) { + $value = $data[self::FIELD_ONSET_STRING]; } else { - $this->setOnsetString(new FHIRString($data[self::FIELD_ONSET_STRING])); + $value = null; + } + if (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) { + $ext = $data[self::FIELD_ONSET_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOnsetString($value); + } else if (is_array($value)) { + $this->setOnsetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetString(new FHIRString($ext)); } } if (isset($data[self::FIELD_OUTCOME])) { @@ -474,8 +488,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -595,8 +609,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTE_EXT] = $enc; } } @@ -608,8 +624,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetString())) { $a[self::FIELD_ONSET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ONSET_STRING_EXT] = $enc; } } @@ -619,6 +637,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelation.php index 91d194f7fc..6b76ba3303 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRFamilyHistoryRelation extends FHIRBackboneElement const FIELD_RELATIONSHIP = 'relationship'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, or partial date (e.g. just year or year + month). There is no time zone. @@ -276,20 +276,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BORN_DATE])) { - $ext = (isset($data[self::FIELD_BORN_DATE_EXT]) && is_array($data[self::FIELD_BORN_DATE_EXT])) - ? $data[self::FIELD_BORN_DATE_EXT] - : null; - if ($data[self::FIELD_BORN_DATE] instanceof FHIRDate) { - $this->setBornDate($data[self::FIELD_BORN_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BORN_DATE])) { - $this->setBornDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BORN_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BORN_DATE])) { - $this->setBornDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BORN_DATE]))); - } + if (isset($data[self::FIELD_BORN_DATE]) || isset($data[self::FIELD_BORN_DATE_EXT])) { + if (isset($data[self::FIELD_BORN_DATE])) { + $value = $data[self::FIELD_BORN_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BORN_DATE_EXT]) && is_array($data[self::FIELD_BORN_DATE_EXT])) { + $ext = $data[self::FIELD_BORN_DATE_EXT]; } else { - $this->setBornDate(new FHIRDate($data[self::FIELD_BORN_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBornDate($value); + } else if (is_array($value)) { + $this->setBornDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBornDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBornDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_BORN_PERIOD])) { @@ -299,20 +306,27 @@ public function __construct($data = null) $this->setBornPeriod(new FHIRPeriod($data[self::FIELD_BORN_PERIOD])); } } - if (isset($data[self::FIELD_BORN_STRING])) { - $ext = (isset($data[self::FIELD_BORN_STRING_EXT]) && is_array($data[self::FIELD_BORN_STRING_EXT])) - ? $data[self::FIELD_BORN_STRING_EXT] - : null; - if ($data[self::FIELD_BORN_STRING] instanceof FHIRString) { - $this->setBornString($data[self::FIELD_BORN_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BORN_STRING])) { - $this->setBornString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BORN_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_BORN_STRING])) { - $this->setBornString(new FHIRString(array_merge($ext, $data[self::FIELD_BORN_STRING]))); - } + if (isset($data[self::FIELD_BORN_STRING]) || isset($data[self::FIELD_BORN_STRING_EXT])) { + if (isset($data[self::FIELD_BORN_STRING])) { + $value = $data[self::FIELD_BORN_STRING]; } else { - $this->setBornString(new FHIRString($data[self::FIELD_BORN_STRING])); + $value = null; + } + if (isset($data[self::FIELD_BORN_STRING_EXT]) && is_array($data[self::FIELD_BORN_STRING_EXT])) { + $ext = $data[self::FIELD_BORN_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBornString($value); + } else if (is_array($value)) { + $this->setBornString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBornString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBornString(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONDITION])) { @@ -340,36 +354,50 @@ public function __construct($data = null) $this->setDeceasedAge(new FHIRAge($data[self::FIELD_DECEASED_AGE])); } } - if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) - ? $data[self::FIELD_DECEASED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DECEASED_BOOLEAN] instanceof FHIRBoolean) { - $this->setDeceasedBoolean($data[self::FIELD_DECEASED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DECEASED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DECEASED_BOOLEAN]))); - } + if (isset($data[self::FIELD_DECEASED_BOOLEAN]) || isset($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { + $value = $data[self::FIELD_DECEASED_BOOLEAN]; } else { - $this->setDeceasedBoolean(new FHIRBoolean($data[self::FIELD_DECEASED_BOOLEAN])); + $value = null; } - } - if (isset($data[self::FIELD_DECEASED_DATE])) { - $ext = (isset($data[self::FIELD_DECEASED_DATE_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_EXT])) - ? $data[self::FIELD_DECEASED_DATE_EXT] - : null; - if ($data[self::FIELD_DECEASED_DATE] instanceof FHIRDate) { - $this->setDeceasedDate($data[self::FIELD_DECEASED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_DATE])) { - $this->setDeceasedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DECEASED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_DATE])) { - $this->setDeceasedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DECEASED_DATE]))); + if (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DECEASED_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeceasedBoolean($value); + } else if (is_array($value)) { + $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DECEASED_DATE]) || isset($data[self::FIELD_DECEASED_DATE_EXT])) { + if (isset($data[self::FIELD_DECEASED_DATE])) { + $value = $data[self::FIELD_DECEASED_DATE]; } else { - $this->setDeceasedDate(new FHIRDate($data[self::FIELD_DECEASED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_DATE_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_EXT])) { + $ext = $data[self::FIELD_DECEASED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDeceasedDate($value); + } else if (is_array($value)) { + $this->setDeceasedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDeceasedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeceasedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_DECEASED_RANGE])) { @@ -379,52 +407,73 @@ public function __construct($data = null) $this->setDeceasedRange(new FHIRRange($data[self::FIELD_DECEASED_RANGE])); } } - if (isset($data[self::FIELD_DECEASED_STRING])) { - $ext = (isset($data[self::FIELD_DECEASED_STRING_EXT]) && is_array($data[self::FIELD_DECEASED_STRING_EXT])) - ? $data[self::FIELD_DECEASED_STRING_EXT] - : null; - if ($data[self::FIELD_DECEASED_STRING] instanceof FHIRString) { - $this->setDeceasedString($data[self::FIELD_DECEASED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_STRING])) { - $this->setDeceasedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DECEASED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_STRING])) { - $this->setDeceasedString(new FHIRString(array_merge($ext, $data[self::FIELD_DECEASED_STRING]))); - } + if (isset($data[self::FIELD_DECEASED_STRING]) || isset($data[self::FIELD_DECEASED_STRING_EXT])) { + if (isset($data[self::FIELD_DECEASED_STRING])) { + $value = $data[self::FIELD_DECEASED_STRING]; } else { - $this->setDeceasedString(new FHIRString($data[self::FIELD_DECEASED_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_DECEASED_STRING_EXT]) && is_array($data[self::FIELD_DECEASED_STRING_EXT])) { + $ext = $data[self::FIELD_DECEASED_STRING_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeceasedString($value); + } else if (is_array($value)) { + $this->setDeceasedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeceasedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeceasedString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_NOTE])) { - $ext = (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) - ? $data[self::FIELD_NOTE_EXT] - : null; - if ($data[self::FIELD_NOTE] instanceof FHIRString) { - $this->setNote($data[self::FIELD_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString(array_merge($ext, $data[self::FIELD_NOTE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NOTE]) || isset($data[self::FIELD_NOTE_EXT])) { + if (isset($data[self::FIELD_NOTE])) { + $value = $data[self::FIELD_NOTE]; } else { - $this->setNote(new FHIRString($data[self::FIELD_NOTE])); + $value = null; + } + if (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) { + $ext = $data[self::FIELD_NOTE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNote($value); + } else if (is_array($value)) { + $this->setNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNote(new FHIRString($ext)); } } if (isset($data[self::FIELD_RELATIONSHIP])) { @@ -945,8 +994,8 @@ public function setRelationship(FHIRCodeableConcept $relationship = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1149,8 +1198,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBornDate())) { $a[self::FIELD_BORN_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BORN_DATE_EXT] = $enc; } } @@ -1159,28 +1210,40 @@ public function jsonSerialize() } if (null !== ($v = $this->getBornString())) { $a[self::FIELD_BORN_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BORN_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if (null !== ($v = $this->getDeceasedAge())) { $a[self::FIELD_DECEASED_AGE] = $v; } if (null !== ($v = $this->getDeceasedBoolean())) { $a[self::FIELD_DECEASED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DECEASED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDeceasedDate())) { $a[self::FIELD_DECEASED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DECEASED_DATE_EXT] = $enc; } } @@ -1189,28 +1252,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDeceasedString())) { $a[self::FIELD_DECEASED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DECEASED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTE_EXT] = $enc; } } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php index 226e2b5f5a..bbe3e7f03a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRGroupCharacteristic extends FHIRBackboneElement const FIELD_VALUE_RANGE = 'valueRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -191,36 +191,50 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_EXCLUDE])) { - $ext = (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) - ? $data[self::FIELD_EXCLUDE_EXT] - : null; - if ($data[self::FIELD_EXCLUDE] instanceof FHIRBoolean) { - $this->setExclude($data[self::FIELD_EXCLUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDE]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDE]))); - } + if (isset($data[self::FIELD_EXCLUDE]) || isset($data[self::FIELD_EXCLUDE_EXT])) { + if (isset($data[self::FIELD_EXCLUDE])) { + $value = $data[self::FIELD_EXCLUDE]; } else { - $this->setExclude(new FHIRBoolean($data[self::FIELD_EXCLUDE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + if (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExclude($value); + } else if (is_array($value)) { + $this->setExclude(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExclude(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -481,8 +495,8 @@ public function setValueRange(FHIRRange $valueRange = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -605,15 +619,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getExclude())) { $a[self::FIELD_EXCLUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDE_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -626,6 +644,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValueRange())) { $a[self::FIELD_VALUE_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php index 9230ae9018..cbe9dd3525 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRImagingStudyInstance extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -197,100 +197,142 @@ public function __construct($data = null) $this->setAttachment(new FHIRResourceReference($data[self::FIELD_ATTACHMENT])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRInteger) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; } else { - $this->setNumber(new FHIRInteger($data[self::FIELD_NUMBER])); - } - } - if (isset($data[self::FIELD_SOPCLASS])) { - $ext = (isset($data[self::FIELD_SOPCLASS_EXT]) && is_array($data[self::FIELD_SOPCLASS_EXT])) - ? $data[self::FIELD_SOPCLASS_EXT] - : null; - if ($data[self::FIELD_SOPCLASS] instanceof FHIROid) { - $this->setSopclass($data[self::FIELD_SOPCLASS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOPCLASS])) { - $this->setSopclass(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_SOPCLASS]] + $ext)); - } else if (is_array($data[self::FIELD_SOPCLASS])) { - $this->setSopclass(new FHIROid(array_merge($ext, $data[self::FIELD_SOPCLASS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumber(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_SOPCLASS]) || isset($data[self::FIELD_SOPCLASS_EXT])) { + if (isset($data[self::FIELD_SOPCLASS])) { + $value = $data[self::FIELD_SOPCLASS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOPCLASS_EXT]) && is_array($data[self::FIELD_SOPCLASS_EXT])) { + $ext = $data[self::FIELD_SOPCLASS_EXT]; } else { - $this->setSopclass(new FHIROid($data[self::FIELD_SOPCLASS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setSopclass($value); + } else if (is_array($value)) { + $this->setSopclass(new FHIROid(array_merge($ext, $value))); + } else { + $this->setSopclass(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSopclass(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -570,8 +612,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -732,46 +774,61 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getSopclass())) { $a[self::FIELD_SOPCLASS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_SOPCLASS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php index 8a754e9c66..f53c6c499f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRImagingStudySeries extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Availability of the resource @@ -236,20 +236,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AVAILABILITY])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY] instanceof FHIRInstanceAvailability) { - $this->setAvailability($data[self::FIELD_AVAILABILITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $data[self::FIELD_AVAILABILITY]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $data[self::FIELD_AVAILABILITY]))); - } + if (isset($data[self::FIELD_AVAILABILITY]) || isset($data[self::FIELD_AVAILABILITY_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY])) { + $value = $data[self::FIELD_AVAILABILITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXT]; } else { - $this->setAvailability(new FHIRInstanceAvailability($data[self::FIELD_AVAILABILITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstanceAvailability) { + $this->setAvailability($value); + } else if (is_array($value)) { + $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $value))); + } else { + $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailability(new FHIRInstanceAvailability($ext)); } } if (isset($data[self::FIELD_BODY_SITE])) { @@ -259,36 +266,50 @@ public function __construct($data = null) $this->setBodySite(new FHIRCoding($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_INSTANCE])) { @@ -309,84 +330,119 @@ public function __construct($data = null) $this->addInstance(new FHIRImagingStudyInstance($data[self::FIELD_INSTANCE])); } } - if (isset($data[self::FIELD_MODALITY])) { - $ext = (isset($data[self::FIELD_MODALITY_EXT]) && is_array($data[self::FIELD_MODALITY_EXT])) - ? $data[self::FIELD_MODALITY_EXT] - : null; - if ($data[self::FIELD_MODALITY] instanceof FHIRModality) { - $this->setModality($data[self::FIELD_MODALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODALITY])) { - $this->setModality(new FHIRModality([FHIRModality::FIELD_VALUE => $data[self::FIELD_MODALITY]] + $ext)); - } else if (is_array($data[self::FIELD_MODALITY])) { - $this->setModality(new FHIRModality(array_merge($ext, $data[self::FIELD_MODALITY]))); - } + if (isset($data[self::FIELD_MODALITY]) || isset($data[self::FIELD_MODALITY_EXT])) { + if (isset($data[self::FIELD_MODALITY])) { + $value = $data[self::FIELD_MODALITY]; } else { - $this->setModality(new FHIRModality($data[self::FIELD_MODALITY])); + $value = null; } - } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRInteger) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_MODALITY_EXT]) && is_array($data[self::FIELD_MODALITY_EXT])) { + $ext = $data[self::FIELD_MODALITY_EXT]; } else { - $this->setNumber(new FHIRInteger($data[self::FIELD_NUMBER])); + $ext = []; } - } - if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) - ? $data[self::FIELD_NUMBER_OF_INSTANCES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_INSTANCES] instanceof FHIRInteger) { - $this->setNumberOfInstances($data[self::FIELD_NUMBER_OF_INSTANCES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_INSTANCES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_INSTANCES]))); + if (null !== $value) { + if ($value instanceof FHIRModality) { + $this->setModality($value); + } else if (is_array($value)) { + $this->setModality(new FHIRModality(array_merge($ext, $value))); + } else { + $this->setModality(new FHIRModality([FHIRModality::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setNumberOfInstances(new FHIRInteger($data[self::FIELD_NUMBER_OF_INSTANCES])); + } else if ([] !== $ext) { + $this->setModality(new FHIRModality($ext)); } } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumber(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES]) || isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { + $value = $data[self::FIELD_NUMBER_OF_INSTANCES]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_INSTANCES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfInstances($value); + } else if (is_array($value)) { + $this->setNumberOfInstances(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfInstances(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfInstances(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -784,8 +840,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -968,8 +1024,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAvailability())) { $a[self::FIELD_AVAILABILITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstanceAvailability::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstanceAvailability::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXT] = $enc; } } @@ -978,56 +1036,79 @@ public function jsonSerialize() } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if (null !== ($v = $this->getModality())) { $a[self::FIELD_MODALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRModality::FIELD_VALUE, $enc)))) { + unset($enc[FHIRModality::FIELD_VALUE]); $a[self::FIELD_MODALITY_EXT] = $enc; } } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfInstances())) { $a[self::FIELD_NUMBER_OF_INSTANCES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_INSTANCES_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php index ea96414799..0d5828db93 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRImmunizationExplanation extends FHIRBackboneElement const FIELD_REFUSAL_REASON = 'refusalReason'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -305,8 +305,8 @@ public function setRefusalReason(array $refusalReason = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -399,10 +399,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getRefusalReason())) { - $a[self::FIELD_REFUSAL_REASON] = $vs; + $a[self::FIELD_REFUSAL_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFUSAL_REASON][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php index 8972ec3726..274e078cc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRImmunizationReaction extends FHIRBackboneElement const FIELD_REPORTED_EXT = '_reported'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -139,20 +139,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -162,20 +169,27 @@ public function __construct($data = null) $this->setDetail(new FHIRResourceReference($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_REPORTED])) { - $ext = (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) - ? $data[self::FIELD_REPORTED_EXT] - : null; - if ($data[self::FIELD_REPORTED] instanceof FHIRBoolean) { - $this->setReported($data[self::FIELD_REPORTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPORTED]] + $ext)); - } else if (is_array($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPORTED]))); - } + if (isset($data[self::FIELD_REPORTED]) || isset($data[self::FIELD_REPORTED_EXT])) { + if (isset($data[self::FIELD_REPORTED])) { + $value = $data[self::FIELD_REPORTED]; } else { - $this->setReported(new FHIRBoolean($data[self::FIELD_REPORTED])); + $value = null; + } + if (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) { + $ext = $data[self::FIELD_REPORTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReported($value); + } else if (is_array($value)) { + $this->setReported(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReported(new FHIRBoolean($ext)); } } } @@ -313,8 +327,8 @@ public function setReported($reported = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -416,8 +430,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -426,11 +442,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getReported())) { $a[self::FIELD_REPORTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPORTED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php index 5eccd23c69..1d4124ce8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRImmunizationVaccinationProtocol extends FHIRBackboneElement const FIELD_SERIES_DOSES_EXT = '_seriesDoses'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -210,36 +210,50 @@ public function __construct($data = null) $this->setAuthority(new FHIRResourceReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_DOSE_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) - ? $data[self::FIELD_DOSE_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_DOSE_SEQUENCE] instanceof FHIRInteger) { - $this->setDoseSequence($data[self::FIELD_DOSE_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DOSE_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRInteger(array_merge($ext, $data[self::FIELD_DOSE_SEQUENCE]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DOSE_SEQUENCE]) || isset($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DOSE_SEQUENCE])) { + $value = $data[self::FIELD_DOSE_SEQUENCE]; } else { - $this->setDoseSequence(new FHIRInteger($data[self::FIELD_DOSE_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DOSE_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDoseSequence($value); + } else if (is_array($value)) { + $this->setDoseSequence(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDoseSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoseSequence(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_DOSE_STATUS])) { @@ -263,36 +277,50 @@ public function __construct($data = null) $this->setDoseTarget(new FHIRCodeableConcept($data[self::FIELD_DOSE_TARGET])); } } - if (isset($data[self::FIELD_SERIES])) { - $ext = (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) - ? $data[self::FIELD_SERIES_EXT] - : null; - if ($data[self::FIELD_SERIES] instanceof FHIRString) { - $this->setSeries($data[self::FIELD_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES]))); - } + if (isset($data[self::FIELD_SERIES]) || isset($data[self::FIELD_SERIES_EXT])) { + if (isset($data[self::FIELD_SERIES])) { + $value = $data[self::FIELD_SERIES]; } else { - $this->setSeries(new FHIRString($data[self::FIELD_SERIES])); + $value = null; } - } - if (isset($data[self::FIELD_SERIES_DOSES])) { - $ext = (isset($data[self::FIELD_SERIES_DOSES_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_EXT])) - ? $data[self::FIELD_SERIES_DOSES_EXT] - : null; - if ($data[self::FIELD_SERIES_DOSES] instanceof FHIRInteger) { - $this->setSeriesDoses($data[self::FIELD_SERIES_DOSES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES_DOSES])) { - $this->setSeriesDoses(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SERIES_DOSES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES_DOSES])) { - $this->setSeriesDoses(new FHIRInteger(array_merge($ext, $data[self::FIELD_SERIES_DOSES]))); + if (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) { + $ext = $data[self::FIELD_SERIES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeries($value); + } else if (is_array($value)) { + $this->setSeries(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeries(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SERIES_DOSES]) || isset($data[self::FIELD_SERIES_DOSES_EXT])) { + if (isset($data[self::FIELD_SERIES_DOSES])) { + $value = $data[self::FIELD_SERIES_DOSES]; } else { - $this->setSeriesDoses(new FHIRInteger($data[self::FIELD_SERIES_DOSES])); + $value = null; + } + if (isset($data[self::FIELD_SERIES_DOSES_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_EXT])) { + $ext = $data[self::FIELD_SERIES_DOSES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setSeriesDoses($value); + } else if (is_array($value)) { + $this->setSeriesDoses(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setSeriesDoses(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeriesDoses(new FHIRInteger($ext)); } } } @@ -598,8 +626,8 @@ public function setSeriesDoses($seriesDoses = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -750,15 +778,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoseSequence())) { $a[self::FIELD_DOSE_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DOSE_SEQUENCE_EXT] = $enc; } } @@ -773,18 +805,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getSeries())) { $a[self::FIELD_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_EXT] = $enc; } } if (null !== ($v = $this->getSeriesDoses())) { $a[self::FIELD_SERIES_DOSES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_SERIES_DOSES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php index b31cccb708..2351b9dbfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRImmunizationRecommendationDateCriterion extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -136,20 +136,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDateTime) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDateTime($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDateTime($ext)); } } } @@ -255,8 +262,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -348,11 +355,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php index 13321ac749..0c7fa750a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRImmunizationRecommendationProtocol extends FHIRBackboneElement const FIELD_SERIES_EXT = '_series'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -159,52 +159,73 @@ public function __construct($data = null) $this->setAuthority(new FHIRResourceReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_DOSE_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) - ? $data[self::FIELD_DOSE_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_DOSE_SEQUENCE] instanceof FHIRInteger) { - $this->setDoseSequence($data[self::FIELD_DOSE_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DOSE_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRInteger(array_merge($ext, $data[self::FIELD_DOSE_SEQUENCE]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDoseSequence(new FHIRInteger($data[self::FIELD_DOSE_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SERIES])) { - $ext = (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) - ? $data[self::FIELD_SERIES_EXT] - : null; - if ($data[self::FIELD_SERIES] instanceof FHIRString) { - $this->setSeries($data[self::FIELD_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES]))); + if (isset($data[self::FIELD_DOSE_SEQUENCE]) || isset($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DOSE_SEQUENCE])) { + $value = $data[self::FIELD_DOSE_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DOSE_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDoseSequence($value); + } else if (is_array($value)) { + $this->setDoseSequence(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDoseSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDoseSequence(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_SERIES]) || isset($data[self::FIELD_SERIES_EXT])) { + if (isset($data[self::FIELD_SERIES])) { + $value = $data[self::FIELD_SERIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) { + $ext = $data[self::FIELD_SERIES_EXT]; } else { - $this->setSeries(new FHIRString($data[self::FIELD_SERIES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeries($value); + } else if (is_array($value)) { + $this->setSeries(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeries(new FHIRString($ext)); } } } @@ -378,8 +399,8 @@ public function setSeries($series = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -498,25 +519,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoseSequence())) { $a[self::FIELD_DOSE_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DOSE_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getSeries())) { $a[self::FIELD_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php index bdec45e4e7..e50fa38092 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRImmunizationRecommendationRecommendation extends FHIRBackboneElement const FIELD_VACCINE_TYPE = 'vaccineType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -205,20 +205,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DATE_CRITERION])) { @@ -239,20 +246,27 @@ public function __construct($data = null) $this->addDateCriterion(new FHIRImmunizationRecommendationDateCriterion($data[self::FIELD_DATE_CRITERION])); } } - if (isset($data[self::FIELD_DOSE_NUMBER])) { - $ext = (isset($data[self::FIELD_DOSE_NUMBER_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_EXT])) - ? $data[self::FIELD_DOSE_NUMBER_EXT] - : null; - if ($data[self::FIELD_DOSE_NUMBER] instanceof FHIRInteger) { - $this->setDoseNumber($data[self::FIELD_DOSE_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_NUMBER])) { - $this->setDoseNumber(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DOSE_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_NUMBER])) { - $this->setDoseNumber(new FHIRInteger(array_merge($ext, $data[self::FIELD_DOSE_NUMBER]))); - } + if (isset($data[self::FIELD_DOSE_NUMBER]) || isset($data[self::FIELD_DOSE_NUMBER_EXT])) { + if (isset($data[self::FIELD_DOSE_NUMBER])) { + $value = $data[self::FIELD_DOSE_NUMBER]; } else { - $this->setDoseNumber(new FHIRInteger($data[self::FIELD_DOSE_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_DOSE_NUMBER_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_EXT])) { + $ext = $data[self::FIELD_DOSE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDoseNumber($value); + } else if (is_array($value)) { + $this->setDoseNumber(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDoseNumber(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoseNumber(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_FORECAST_STATUS])) { @@ -684,8 +698,8 @@ public function setVaccineType(FHIRCodeableConcept $vaccineType = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -838,18 +852,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDateCriterion())) { - $a[self::FIELD_DATE_CRITERION] = $vs; + $a[self::FIELD_DATE_CRITERION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATE_CRITERION][] = $v; + } } if (null !== ($v = $this->getDoseNumber())) { $a[self::FIELD_DOSE_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DOSE_NUMBER_EXT] = $enc; } } @@ -860,14 +884,29 @@ public function jsonSerialize() $a[self::FIELD_PROTOCOL] = $v; } if ([] !== ($vs = $this->getSupportingImmunization())) { - $a[self::FIELD_SUPPORTING_IMMUNIZATION] = $vs; + $a[self::FIELD_SUPPORTING_IMMUNIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_IMMUNIZATION][] = $v; + } } if ([] !== ($vs = $this->getSupportingPatientInformation())) { - $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION][] = $v; + } } if (null !== ($v = $this->getVaccineType())) { $a[self::FIELD_VACCINE_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php index 9b392a3436..2c30a49723 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRListEntry extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -154,36 +154,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DELETED])) { - $ext = (isset($data[self::FIELD_DELETED_EXT]) && is_array($data[self::FIELD_DELETED_EXT])) - ? $data[self::FIELD_DELETED_EXT] - : null; - if ($data[self::FIELD_DELETED] instanceof FHIRBoolean) { - $this->setDeleted($data[self::FIELD_DELETED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DELETED])) { - $this->setDeleted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DELETED]] + $ext)); - } else if (is_array($data[self::FIELD_DELETED])) { - $this->setDeleted(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DELETED]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DELETED]) || isset($data[self::FIELD_DELETED_EXT])) { + if (isset($data[self::FIELD_DELETED])) { + $value = $data[self::FIELD_DELETED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DELETED_EXT]) && is_array($data[self::FIELD_DELETED_EXT])) { + $ext = $data[self::FIELD_DELETED_EXT]; } else { - $this->setDeleted(new FHIRBoolean($data[self::FIELD_DELETED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeleted($value); + } else if (is_array($value)) { + $this->setDeleted(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeleted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeleted(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FLAG])) { @@ -408,8 +422,8 @@ public function setItem(FHIRResourceReference $item = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -524,24 +538,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDeleted())) { $a[self::FIELD_DELETED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DELETED_EXT] = $enc; } } if ([] !== ($vs = $this->getFlag())) { - $a[self::FIELD_FLAG] = $vs; + $a[self::FIELD_FLAG] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FLAG][] = $v; + } } if (null !== ($v = $this->getItem())) { $a[self::FIELD_ITEM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php index 2ff32abede..8a5e47f3fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRLocationPosition extends FHIRBackboneElement const FIELD_LONGITUDE_EXT = '_longitude'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -139,52 +139,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALTITUDE])) { - $ext = (isset($data[self::FIELD_ALTITUDE_EXT]) && is_array($data[self::FIELD_ALTITUDE_EXT])) - ? $data[self::FIELD_ALTITUDE_EXT] - : null; - if ($data[self::FIELD_ALTITUDE] instanceof FHIRDecimal) { - $this->setAltitude($data[self::FIELD_ALTITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALTITUDE])) { - $this->setAltitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ALTITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_ALTITUDE])) { - $this->setAltitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ALTITUDE]))); - } + if (isset($data[self::FIELD_ALTITUDE]) || isset($data[self::FIELD_ALTITUDE_EXT])) { + if (isset($data[self::FIELD_ALTITUDE])) { + $value = $data[self::FIELD_ALTITUDE]; } else { - $this->setAltitude(new FHIRDecimal($data[self::FIELD_ALTITUDE])); + $value = null; } - } - if (isset($data[self::FIELD_LATITUDE])) { - $ext = (isset($data[self::FIELD_LATITUDE_EXT]) && is_array($data[self::FIELD_LATITUDE_EXT])) - ? $data[self::FIELD_LATITUDE_EXT] - : null; - if ($data[self::FIELD_LATITUDE] instanceof FHIRDecimal) { - $this->setLatitude($data[self::FIELD_LATITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LATITUDE])) { - $this->setLatitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LATITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_LATITUDE])) { - $this->setLatitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LATITUDE]))); - } + if (isset($data[self::FIELD_ALTITUDE_EXT]) && is_array($data[self::FIELD_ALTITUDE_EXT])) { + $ext = $data[self::FIELD_ALTITUDE_EXT]; } else { - $this->setLatitude(new FHIRDecimal($data[self::FIELD_LATITUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAltitude($value); + } else if (is_array($value)) { + $this->setAltitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAltitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAltitude(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_LONGITUDE])) { - $ext = (isset($data[self::FIELD_LONGITUDE_EXT]) && is_array($data[self::FIELD_LONGITUDE_EXT])) - ? $data[self::FIELD_LONGITUDE_EXT] - : null; - if ($data[self::FIELD_LONGITUDE] instanceof FHIRDecimal) { - $this->setLongitude($data[self::FIELD_LONGITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LONGITUDE])) { - $this->setLongitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LONGITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_LONGITUDE])) { - $this->setLongitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LONGITUDE]))); + if (isset($data[self::FIELD_LATITUDE]) || isset($data[self::FIELD_LATITUDE_EXT])) { + if (isset($data[self::FIELD_LATITUDE])) { + $value = $data[self::FIELD_LATITUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LATITUDE_EXT]) && is_array($data[self::FIELD_LATITUDE_EXT])) { + $ext = $data[self::FIELD_LATITUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLatitude($value); + } else if (is_array($value)) { + $this->setLatitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLatitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLatitude(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_LONGITUDE]) || isset($data[self::FIELD_LONGITUDE_EXT])) { + if (isset($data[self::FIELD_LONGITUDE])) { + $value = $data[self::FIELD_LONGITUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LONGITUDE_EXT]) && is_array($data[self::FIELD_LONGITUDE_EXT])) { + $ext = $data[self::FIELD_LONGITUDE_EXT]; } else { - $this->setLongitude(new FHIRDecimal($data[self::FIELD_LONGITUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLongitude($value); + } else if (is_array($value)) { + $this->setLongitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLongitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLongitude(new FHIRDecimal($ext)); } } } @@ -328,8 +349,8 @@ public function setLongitude($longitude = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -439,25 +460,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAltitude())) { $a[self::FIELD_ALTITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ALTITUDE_EXT] = $enc; } } if (null !== ($v = $this->getLatitude())) { $a[self::FIELD_LATITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LATITUDE_EXT] = $enc; } } if (null !== ($v = $this->getLongitude())) { $a[self::FIELD_LONGITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LONGITUDE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php index 4bc2962537..e6cdec7514 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRMedicationContent extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -231,8 +231,8 @@ public function setItem(FHIRResourceReference $item = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -316,6 +316,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItem())) { $a[self::FIELD_ITEM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php index 12a144aa4c..f177f931d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRMedicationIngredient extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A relationship of two Quantity values - expressed as a numerator and a @@ -234,8 +234,8 @@ public function setItem(FHIRResourceReference $item = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItem())) { $a[self::FIELD_ITEM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php index 47aaab8e3a..9f7c2e8cea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMedicationPackage extends FHIRBackboneElement const FIELD_CONTENT = 'content'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -260,8 +260,8 @@ public function setContent(array $content = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -350,7 +350,16 @@ public function jsonSerialize() $a[self::FIELD_CONTAINER] = $v; } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php index 2503e06920..9ab068f40d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMedicationProduct extends FHIRBackboneElement const FIELD_INGREDIENT = 'ingredient'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -260,8 +260,8 @@ public function setIngredient(array $ingredient = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -350,7 +350,16 @@ public function jsonSerialize() $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php index 7600fc061f..2145b44ad9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRMedicationAdministrationDosage extends FHIRBackboneElement const FIELD_TIMING_PERIOD = 'timingPeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -258,20 +258,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -323,20 +330,27 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -749,8 +763,8 @@ public function setTimingPeriod(FHIRPeriod $timingPeriod = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -894,8 +908,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -922,14 +938,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getTimingPeriod())) { $a[self::FIELD_TIMING_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispense.php index 12845912fe..3483dd9773 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMedicationDispenseDispense extends FHIRBackboneElement const FIELD_WHEN_PREPARED_EXT = '_whenPrepared'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -304,20 +304,27 @@ public function __construct($data = null) $this->addReceiver(new FHIRResourceReference($data[self::FIELD_RECEIVER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationDispenseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationDispenseStatus([FHIRMedicationDispenseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationDispenseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationDispenseStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationDispenseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationDispenseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationDispenseStatus([FHIRMedicationDispenseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationDispenseStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -327,36 +334,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_WHEN_HANDED_OVER])) { - $ext = (isset($data[self::FIELD_WHEN_HANDED_OVER_EXT]) && is_array($data[self::FIELD_WHEN_HANDED_OVER_EXT])) - ? $data[self::FIELD_WHEN_HANDED_OVER_EXT] - : null; - if ($data[self::FIELD_WHEN_HANDED_OVER] instanceof FHIRDateTime) { - $this->setWhenHandedOver($data[self::FIELD_WHEN_HANDED_OVER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN_HANDED_OVER])) { - $this->setWhenHandedOver(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_WHEN_HANDED_OVER]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN_HANDED_OVER])) { - $this->setWhenHandedOver(new FHIRDateTime(array_merge($ext, $data[self::FIELD_WHEN_HANDED_OVER]))); - } + if (isset($data[self::FIELD_WHEN_HANDED_OVER]) || isset($data[self::FIELD_WHEN_HANDED_OVER_EXT])) { + if (isset($data[self::FIELD_WHEN_HANDED_OVER])) { + $value = $data[self::FIELD_WHEN_HANDED_OVER]; } else { - $this->setWhenHandedOver(new FHIRDateTime($data[self::FIELD_WHEN_HANDED_OVER])); + $value = null; } - } - if (isset($data[self::FIELD_WHEN_PREPARED])) { - $ext = (isset($data[self::FIELD_WHEN_PREPARED_EXT]) && is_array($data[self::FIELD_WHEN_PREPARED_EXT])) - ? $data[self::FIELD_WHEN_PREPARED_EXT] - : null; - if ($data[self::FIELD_WHEN_PREPARED] instanceof FHIRDateTime) { - $this->setWhenPrepared($data[self::FIELD_WHEN_PREPARED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN_PREPARED])) { - $this->setWhenPrepared(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_WHEN_PREPARED]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN_PREPARED])) { - $this->setWhenPrepared(new FHIRDateTime(array_merge($ext, $data[self::FIELD_WHEN_PREPARED]))); + if (isset($data[self::FIELD_WHEN_HANDED_OVER_EXT]) && is_array($data[self::FIELD_WHEN_HANDED_OVER_EXT])) { + $ext = $data[self::FIELD_WHEN_HANDED_OVER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setWhenHandedOver($value); + } else if (is_array($value)) { + $this->setWhenHandedOver(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setWhenHandedOver(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setWhenHandedOver(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_WHEN_PREPARED]) || isset($data[self::FIELD_WHEN_PREPARED_EXT])) { + if (isset($data[self::FIELD_WHEN_PREPARED])) { + $value = $data[self::FIELD_WHEN_PREPARED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHEN_PREPARED_EXT]) && is_array($data[self::FIELD_WHEN_PREPARED_EXT])) { + $ext = $data[self::FIELD_WHEN_PREPARED_EXT]; } else { - $this->setWhenPrepared(new FHIRDateTime($data[self::FIELD_WHEN_PREPARED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setWhenPrepared($value); + } else if (is_array($value)) { + $this->setWhenPrepared(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setWhenPrepared(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhenPrepared(new FHIRDateTime($ext)); } } } @@ -781,8 +802,8 @@ public function setWhenPrepared($whenPrepared = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -942,7 +963,13 @@ public function jsonSerialize() $a[self::FIELD_DESTINATION] = $v; } if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; @@ -954,12 +981,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReceiver())) { - $a[self::FIELD_RECEIVER] = $vs; + $a[self::FIELD_RECEIVER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECEIVER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationDispenseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationDispenseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -968,18 +1003,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getWhenHandedOver())) { $a[self::FIELD_WHEN_HANDED_OVER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_WHEN_HANDED_OVER_EXT] = $enc; } } if (null !== ($v = $this->getWhenPrepared())) { $a[self::FIELD_WHEN_PREPARED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_WHEN_PREPARED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosage.php index fbc45c4973..8b1387ee3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRMedicationDispenseDosage extends FHIRBackboneElement const FIELD_TIMING_SCHEDULE = 'timingSchedule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -292,20 +292,27 @@ public function __construct($data = null) $this->setAdditionalInstructions(new FHIRCodeableConcept($data[self::FIELD_ADDITIONAL_INSTRUCTIONS])); } } - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -357,20 +364,27 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -858,8 +872,8 @@ public function setTimingSchedule(FHIRSchedule $timingSchedule = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1018,8 +1032,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -1046,8 +1062,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -1057,6 +1075,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTimingSchedule())) { $a[self::FIELD_TIMING_SCHEDULE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php index 4ee1d3ac9d..c6b7bb5538 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRMedicationDispenseSubstitution extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -362,8 +362,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -462,14 +462,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getResponsibleParty())) { - $a[self::FIELD_RESPONSIBLE_PARTY] = $vs; + $a[self::FIELD_RESPONSIBLE_PARTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESPONSIBLE_PARTY][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispense.php index 6de67effb0..5eafc5e6fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicationPrescriptionDispense extends FHIRBackboneElement const FIELD_VALIDITY_PERIOD = 'validityPeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Identifies the period time over which the supplied product is expected to be @@ -195,20 +195,27 @@ public function __construct($data = null) $this->setMedication(new FHIRResourceReference($data[self::FIELD_MEDICATION])); } } - if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]) && is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) - ? $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] instanceof FHIRInteger) { - $this->setNumberOfRepeatsAllowed($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $this->setNumberOfRepeatsAllowed(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $this->setNumberOfRepeatsAllowed(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]))); - } + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]) || isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $value = $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]) && is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]; } else { - $this->setNumberOfRepeatsAllowed(new FHIRInteger($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfRepeatsAllowed($value); + } else if (is_array($value)) { + $this->setNumberOfRepeatsAllowed(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfRepeatsAllowed(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfRepeatsAllowed(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -444,8 +451,8 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -557,8 +564,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumberOfRepeatsAllowed())) { $a[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT] = $enc; } } @@ -568,6 +577,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValidityPeriod())) { $a[self::FIELD_VALIDITY_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstruction.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstruction.php index cf44e7156e..3543e91f3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstruction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstruction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRMedicationPrescriptionDosageInstruction extends FHIRBackboneElement const FIELD_TIMING_SCHEDULE = 'timingSchedule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -306,20 +306,27 @@ public function __construct($data = null) $this->setAdditionalInstructions(new FHIRCodeableConcept($data[self::FIELD_ADDITIONAL_INSTRUCTIONS])); } } - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -371,36 +378,50 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; } - } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -926,8 +947,8 @@ public function setTimingSchedule(FHIRSchedule $timingSchedule = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1100,8 +1121,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -1128,15 +1151,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -1146,6 +1173,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTimingSchedule())) { $a[self::FIELD_TIMING_SCHEDULE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitution.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitution.php index 62e8d275aa..a70829682b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRMedicationPrescriptionSubstitution extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -236,8 +236,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php index 4ae255416f..faa4917796 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRMedicationStatementDosage extends FHIRBackboneElement const FIELD_TIMING = 'timing'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -237,20 +237,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -662,8 +669,8 @@ public function setTiming(FHIRSchedule $timing = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -793,8 +800,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -822,6 +831,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTiming())) { $a[self::FIELD_TIMING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php index fa74b37954..8abd7287eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRMessageHeaderDestination extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -140,36 +140,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUri) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUri($data[self::FIELD_ENDPOINT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -310,8 +324,8 @@ public function setTarget(FHIRResourceReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -413,21 +427,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php index ac1b99eb04..9fbb142620 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRMessageHeaderResponse extends FHIRBackboneElement const FIELD_IDENTIFIER_EXT = '_identifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of response to a message @@ -143,20 +143,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRResponseType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResponseType([FHIRResponseType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResponseType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRResponseType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResponseType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRResponseType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRResponseType([FHIRResponseType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRResponseType($ext)); } } if (isset($data[self::FIELD_DETAILS])) { @@ -166,20 +173,27 @@ public function __construct($data = null) $this->setDetails(new FHIRResourceReference($data[self::FIELD_DETAILS])); } } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRId) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; } else { - $this->setIdentifier(new FHIRId($data[self::FIELD_IDENTIFIER])); + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRId($ext)); } } } @@ -311,8 +325,8 @@ public function setIdentifier($identifier = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -406,8 +420,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResponseType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResponseType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } @@ -416,11 +432,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php index 7010a36d1c..06767127cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRMessageHeaderSource extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * All kinds of technology mediated contact details for a person or organization, @@ -173,68 +173,96 @@ public function __construct($data = null) $this->setContact(new FHIRContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUri) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUri($data[self::FIELD_ENDPOINT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_SOFTWARE])) { - $ext = (isset($data[self::FIELD_SOFTWARE_EXT]) && is_array($data[self::FIELD_SOFTWARE_EXT])) - ? $data[self::FIELD_SOFTWARE_EXT] - : null; - if ($data[self::FIELD_SOFTWARE] instanceof FHIRString) { - $this->setSoftware($data[self::FIELD_SOFTWARE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOFTWARE])) { - $this->setSoftware(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOFTWARE]] + $ext)); - } else if (is_array($data[self::FIELD_SOFTWARE])) { - $this->setSoftware(new FHIRString(array_merge($ext, $data[self::FIELD_SOFTWARE]))); + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setSoftware(new FHIRString($data[self::FIELD_SOFTWARE])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SOFTWARE]) || isset($data[self::FIELD_SOFTWARE_EXT])) { + if (isset($data[self::FIELD_SOFTWARE])) { + $value = $data[self::FIELD_SOFTWARE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOFTWARE_EXT]) && is_array($data[self::FIELD_SOFTWARE_EXT])) { + $ext = $data[self::FIELD_SOFTWARE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSoftware($value); + } else if (is_array($value)) { + $this->setSoftware(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSoftware(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSoftware(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -444,8 +472,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -578,32 +606,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getSoftware())) { $a[self::FIELD_SOFTWARE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOFTWARE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php index f115ab9af0..4935e7be45 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRObservationReferenceRange extends FHIRBackboneElement const FIELD_MEANING = 'meaning'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of ordered Quantities defined by a low and high limit. @@ -348,8 +348,8 @@ public function setMeaning(FHIRCodeableConcept $meaning = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -451,6 +451,9 @@ public function jsonSerialize() if (null !== ($v = $this->getMeaning())) { $a[self::FIELD_MEANING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php index af506b0ed2..e1e4689fd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRObservationRelated extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -132,20 +132,27 @@ public function __construct($data = null) $this->setTarget(new FHIRResourceReference($data[self::FIELD_TARGET])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRObservationRelationshipType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRObservationRelationshipType([FHIRObservationRelationshipType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRObservationRelationshipType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRObservationRelationshipType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationRelationshipType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRObservationRelationshipType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRObservationRelationshipType([FHIRObservationRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRObservationRelationshipType($ext)); } } } @@ -235,8 +242,8 @@ public function setType(FHIRObservationRelationshipType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -319,11 +326,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationRelationshipType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php index 6c43bdf694..4182b7a88f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIROperationOutcomeIssue extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -151,65 +151,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DETAILS])) { - $ext = (isset($data[self::FIELD_DETAILS_EXT]) && is_array($data[self::FIELD_DETAILS_EXT])) - ? $data[self::FIELD_DETAILS_EXT] - : null; - if ($data[self::FIELD_DETAILS] instanceof FHIRString) { - $this->setDetails($data[self::FIELD_DETAILS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAILS])) { - $this->setDetails(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DETAILS]] + $ext)); - } else if (is_array($data[self::FIELD_DETAILS])) { - $this->setDetails(new FHIRString(array_merge($ext, $data[self::FIELD_DETAILS]))); - } + if (isset($data[self::FIELD_DETAILS]) || isset($data[self::FIELD_DETAILS_EXT])) { + if (isset($data[self::FIELD_DETAILS])) { + $value = $data[self::FIELD_DETAILS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DETAILS_EXT]) && is_array($data[self::FIELD_DETAILS_EXT])) { + $ext = $data[self::FIELD_DETAILS_EXT]; } else { - $this->setDetails(new FHIRString($data[self::FIELD_DETAILS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDetails($value); + } else if (is_array($value)) { + $this->setDetails(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDetails(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetails(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LOCATION])) { - $ext = (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) - ? $data[self::FIELD_LOCATION_EXT] - : null; - if (is_array($data[self::FIELD_LOCATION])) { - foreach($data[self::FIELD_LOCATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLocation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLocation(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LOCATION]) || isset($data[self::FIELD_LOCATION_EXT])) { + if (isset($data[self::FIELD_LOCATION])) { + $value = $data[self::FIELD_LOCATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) { + $ext = $data[self::FIELD_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLocation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLocation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLocation(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLocation(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLocation(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLocation(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LOCATION] instanceof FHIRString) { - $this->addLocation($data[self::FIELD_LOCATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LOCATION])) { - $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOCATION]] + $ext)); - } else { - $this->addLocation(new FHIRString($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRIssueSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRIssueSeverity([FHIRIssueSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRIssueSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); - } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; } else { - $this->setSeverity(new FHIRIssueSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIssueSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRIssueSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRIssueSeverity([FHIRIssueSeverity::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRIssueSeverity($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -407,8 +430,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -515,36 +538,51 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDetails())) { $a[self::FIELD_DETAILS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DETAILS_EXT] = $enc; } } if ([] !== ($vs = $this->getLocation())) { $a[self::FIELD_LOCATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LOCATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LOCATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LOCATION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LOCATION_EXT] = $encs; + } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIssueSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIssueSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php index a5f5ab5c95..8ea9337c0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIROrderWhen extends FHIRBackboneElement const FIELD_SCHEDULE = 'schedule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -233,8 +233,8 @@ public function setSchedule(FHIRSchedule $schedule = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -318,6 +318,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSchedule())) { $a[self::FIELD_SCHEDULE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php index 3bed90a684..e43839d102 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIROrganizationContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * There is a variety of postal address formats defined around the world. This @@ -433,8 +433,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -550,7 +550,16 @@ public function jsonSerialize() $a[self::FIELD_PURPOSE] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php index de32100db7..4525559352 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRPatientAnimal extends FHIRBackboneElement const FIELD_SPECIES = 'species'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -282,8 +282,8 @@ public function setSpecies(FHIRCodeableConcept $species = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -376,6 +376,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSpecies())) { $a[self::FIELD_SPECIES] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php index 83444845ca..84b9caa987 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRPatientContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * There is a variety of postal address formats defined around the world. This @@ -518,8 +518,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -648,10 +648,25 @@ public function jsonSerialize() $a[self::FIELD_ORGANIZATION] = $v; } if ([] !== ($vs = $this->getRelationship())) { - $a[self::FIELD_RELATIONSHIP] = $vs; + $a[self::FIELD_RELATIONSHIP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATIONSHIP][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php index e2f9578986..83408df848 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRPatientLink extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -131,20 +131,27 @@ public function __construct($data = null) $this->setOther(new FHIRResourceReference($data[self::FIELD_OTHER])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRLinkType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkType([FHIRLinkType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRLinkType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLinkType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRLinkType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRLinkType([FHIRLinkType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRLinkType($ext)); } } } @@ -232,8 +239,8 @@ public function setType(FHIRLinkType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -316,11 +323,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLinkType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLinkType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php index 92bb9698e5..428f06a2e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRPractitionerQualification extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -278,8 +278,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -372,6 +372,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php index 00c345ccb4..6ae19e897e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRProcedurePerformer extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -228,8 +228,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -313,6 +313,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItem.php index 2bfc88311b..d6e3ad94b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRProcedureRelatedItem extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -131,20 +131,27 @@ public function __construct($data = null) $this->setTarget(new FHIRResourceReference($data[self::FIELD_TARGET])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRProcedureRelationshipType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRProcedureRelationshipType([FHIRProcedureRelationshipType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRProcedureRelationshipType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRProcedureRelationshipType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRProcedureRelationshipType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRProcedureRelationshipType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRProcedureRelationshipType([FHIRProcedureRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRProcedureRelationshipType($ext)); } } } @@ -232,8 +239,8 @@ public function setType(FHIRProcedureRelationshipType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -316,11 +323,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRProcedureRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRProcedureRelationshipType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBinding.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBinding.php index 0579972ea6..8da20c7a78 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRProfileBinding extends FHIRBackboneElement const FIELD_REFERENCE_URI_EXT = '_referenceUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Binding conformance for applications @@ -182,68 +182,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONFORMANCE])) { - $ext = (isset($data[self::FIELD_CONFORMANCE_EXT]) && is_array($data[self::FIELD_CONFORMANCE_EXT])) - ? $data[self::FIELD_CONFORMANCE_EXT] - : null; - if ($data[self::FIELD_CONFORMANCE] instanceof FHIRBindingConformance) { - $this->setConformance($data[self::FIELD_CONFORMANCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONFORMANCE])) { - $this->setConformance(new FHIRBindingConformance([FHIRBindingConformance::FIELD_VALUE => $data[self::FIELD_CONFORMANCE]] + $ext)); - } else if (is_array($data[self::FIELD_CONFORMANCE])) { - $this->setConformance(new FHIRBindingConformance(array_merge($ext, $data[self::FIELD_CONFORMANCE]))); - } + if (isset($data[self::FIELD_CONFORMANCE]) || isset($data[self::FIELD_CONFORMANCE_EXT])) { + if (isset($data[self::FIELD_CONFORMANCE])) { + $value = $data[self::FIELD_CONFORMANCE]; } else { - $this->setConformance(new FHIRBindingConformance($data[self::FIELD_CONFORMANCE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_CONFORMANCE_EXT]) && is_array($data[self::FIELD_CONFORMANCE_EXT])) { + $ext = $data[self::FIELD_CONFORMANCE_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; } - } - if (isset($data[self::FIELD_IS_EXTENSIBLE])) { - $ext = (isset($data[self::FIELD_IS_EXTENSIBLE_EXT]) && is_array($data[self::FIELD_IS_EXTENSIBLE_EXT])) - ? $data[self::FIELD_IS_EXTENSIBLE_EXT] - : null; - if ($data[self::FIELD_IS_EXTENSIBLE] instanceof FHIRBoolean) { - $this->setIsExtensible($data[self::FIELD_IS_EXTENSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_EXTENSIBLE])) { - $this->setIsExtensible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_EXTENSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_IS_EXTENSIBLE])) { - $this->setIsExtensible(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_EXTENSIBLE]))); + if (null !== $value) { + if ($value instanceof FHIRBindingConformance) { + $this->setConformance($value); + } else if (is_array($value)) { + $this->setConformance(new FHIRBindingConformance(array_merge($ext, $value))); + } else { + $this->setConformance(new FHIRBindingConformance([FHIRBindingConformance::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConformance(new FHIRBindingConformance($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setIsExtensible(new FHIRBoolean($data[self::FIELD_IS_EXTENSIBLE])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_IS_EXTENSIBLE]) || isset($data[self::FIELD_IS_EXTENSIBLE_EXT])) { + if (isset($data[self::FIELD_IS_EXTENSIBLE])) { + $value = $data[self::FIELD_IS_EXTENSIBLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_EXTENSIBLE_EXT]) && is_array($data[self::FIELD_IS_EXTENSIBLE_EXT])) { + $ext = $data[self::FIELD_IS_EXTENSIBLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsExtensible($value); + } else if (is_array($value)) { + $this->setIsExtensible(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsExtensible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIsExtensible(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_REFERENCE_RESOURCE])) { @@ -253,20 +281,27 @@ public function __construct($data = null) $this->setReferenceResource(new FHIRResourceReference($data[self::FIELD_REFERENCE_RESOURCE])); } } - if (isset($data[self::FIELD_REFERENCE_URI])) { - $ext = (isset($data[self::FIELD_REFERENCE_URI_EXT]) && is_array($data[self::FIELD_REFERENCE_URI_EXT])) - ? $data[self::FIELD_REFERENCE_URI_EXT] - : null; - if ($data[self::FIELD_REFERENCE_URI] instanceof FHIRUri) { - $this->setReferenceUri($data[self::FIELD_REFERENCE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE_URI])) { - $this->setReferenceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_REFERENCE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE_URI])) { - $this->setReferenceUri(new FHIRUri(array_merge($ext, $data[self::FIELD_REFERENCE_URI]))); - } + if (isset($data[self::FIELD_REFERENCE_URI]) || isset($data[self::FIELD_REFERENCE_URI_EXT])) { + if (isset($data[self::FIELD_REFERENCE_URI])) { + $value = $data[self::FIELD_REFERENCE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_URI_EXT]) && is_array($data[self::FIELD_REFERENCE_URI_EXT])) { + $ext = $data[self::FIELD_REFERENCE_URI_EXT]; } else { - $this->setReferenceUri(new FHIRUri($data[self::FIELD_REFERENCE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setReferenceUri($value); + } else if (is_array($value)) { + $this->setReferenceUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setReferenceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReferenceUri(new FHIRUri($ext)); } } } @@ -510,8 +545,8 @@ public function setReferenceUri($referenceUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -647,29 +682,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getConformance())) { $a[self::FIELD_CONFORMANCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBindingConformance::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBindingConformance::FIELD_VALUE]); $a[self::FIELD_CONFORMANCE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getIsExtensible())) { $a[self::FIELD_IS_EXTENSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_EXTENSIBLE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -678,11 +721,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getReferenceUri())) { $a[self::FIELD_REFERENCE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_REFERENCE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraint.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraint.php index b3edf0fc15..7e0c98b3d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraint.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRProfileConstraint extends FHIRBackboneElement const FIELD_XPATH_EXT = '_xpath'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -170,84 +170,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_HUMAN])) { - $ext = (isset($data[self::FIELD_HUMAN_EXT]) && is_array($data[self::FIELD_HUMAN_EXT])) - ? $data[self::FIELD_HUMAN_EXT] - : null; - if ($data[self::FIELD_HUMAN] instanceof FHIRString) { - $this->setHuman($data[self::FIELD_HUMAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HUMAN])) { - $this->setHuman(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HUMAN]] + $ext)); - } else if (is_array($data[self::FIELD_HUMAN])) { - $this->setHuman(new FHIRString(array_merge($ext, $data[self::FIELD_HUMAN]))); - } + if (isset($data[self::FIELD_HUMAN]) || isset($data[self::FIELD_HUMAN_EXT])) { + if (isset($data[self::FIELD_HUMAN])) { + $value = $data[self::FIELD_HUMAN]; } else { - $this->setHuman(new FHIRString($data[self::FIELD_HUMAN])); + $value = null; } - } - if (isset($data[self::FIELD_KEY])) { - $ext = (isset($data[self::FIELD_KEY_EXT]) && is_array($data[self::FIELD_KEY_EXT])) - ? $data[self::FIELD_KEY_EXT] - : null; - if ($data[self::FIELD_KEY] instanceof FHIRId) { - $this->setKey($data[self::FIELD_KEY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KEY])) { - $this->setKey(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_KEY]] + $ext)); - } else if (is_array($data[self::FIELD_KEY])) { - $this->setKey(new FHIRId(array_merge($ext, $data[self::FIELD_KEY]))); - } + if (isset($data[self::FIELD_HUMAN_EXT]) && is_array($data[self::FIELD_HUMAN_EXT])) { + $ext = $data[self::FIELD_HUMAN_EXT]; } else { - $this->setKey(new FHIRId($data[self::FIELD_KEY])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHuman($value); + } else if (is_array($value)) { + $this->setHuman(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHuman(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + } else if ([] !== $ext) { + $this->setHuman(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRConstraintSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRConstraintSeverity([FHIRConstraintSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRConstraintSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + if (isset($data[self::FIELD_KEY]) || isset($data[self::FIELD_KEY_EXT])) { + if (isset($data[self::FIELD_KEY])) { + $value = $data[self::FIELD_KEY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KEY_EXT]) && is_array($data[self::FIELD_KEY_EXT])) { + $ext = $data[self::FIELD_KEY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setKey($value); + } else if (is_array($value)) { + $this->setKey(new FHIRId(array_merge($ext, $value))); + } else { + $this->setKey(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKey(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setSeverity(new FHIRConstraintSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_XPATH])) { - $ext = (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) - ? $data[self::FIELD_XPATH_EXT] - : null; - if ($data[self::FIELD_XPATH] instanceof FHIRString) { - $this->setXpath($data[self::FIELD_XPATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_XPATH]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString(array_merge($ext, $data[self::FIELD_XPATH]))); + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConstraintSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRConstraintSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRConstraintSeverity([FHIRConstraintSeverity::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRConstraintSeverity($ext)); + } + } + if (isset($data[self::FIELD_XPATH]) || isset($data[self::FIELD_XPATH_EXT])) { + if (isset($data[self::FIELD_XPATH])) { + $value = $data[self::FIELD_XPATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) { + $ext = $data[self::FIELD_XPATH_EXT]; } else { - $this->setXpath(new FHIRString($data[self::FIELD_XPATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setXpath($value); + } else if (is_array($value)) { + $this->setXpath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setXpath(new FHIRString($ext)); } } } @@ -465,8 +500,8 @@ public function setXpath($xpath = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -596,39 +631,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getHuman())) { $a[self::FIELD_HUMAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HUMAN_EXT] = $enc; } } if (null !== ($v = $this->getKey())) { $a[self::FIELD_KEY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_KEY_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConstraintSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConstraintSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getXpath())) { $a[self::FIELD_XPATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_XPATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinition.php index 95526ea96e..2f8e502092 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -210,7 +210,7 @@ class FHIRProfileDefinition extends FHIRBackboneElement const FIELD_VALUE_UUID_EXT = '_valueUuid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A Resource Profile - a statement of use of one or more FHIR Resources. It may @@ -1032,49 +1032,65 @@ public function __construct($data = null) $this->setBinding(new FHIRProfileBinding($data[self::FIELD_BINDING])); } } - if (isset($data[self::FIELD_COMMENTS])) { - $ext = (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) - ? $data[self::FIELD_COMMENTS_EXT] - : null; - if ($data[self::FIELD_COMMENTS] instanceof FHIRString) { - $this->setComments($data[self::FIELD_COMMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENTS]))); - } + if (isset($data[self::FIELD_COMMENTS]) || isset($data[self::FIELD_COMMENTS_EXT])) { + if (isset($data[self::FIELD_COMMENTS])) { + $value = $data[self::FIELD_COMMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) { + $ext = $data[self::FIELD_COMMENTS_EXT]; } else { - $this->setComments(new FHIRString($data[self::FIELD_COMMENTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComments($value); + } else if (is_array($value)) { + $this->setComments(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComments(new FHIRString($ext)); } } - if (isset($data[self::FIELD_CONDITION])) { - $ext = (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) - ? $data[self::FIELD_CONDITION_EXT] - : null; - if (is_array($data[self::FIELD_CONDITION])) { - foreach($data[self::FIELD_CONDITION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRId) { - $this->addCondition($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCondition(new FHIRId(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CONDITION]) || isset($data[self::FIELD_CONDITION_EXT])) { + if (isset($data[self::FIELD_CONDITION])) { + $value = $data[self::FIELD_CONDITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) { + $ext = $data[self::FIELD_CONDITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->addCondition($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRId) { + $this->addCondition($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCondition(new FHIRId(array_merge($v, $iext))); + } else { + $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCondition(new FHIRId($v)); } + } elseif (is_array($value)) { + $this->addCondition(new FHIRId(array_merge($ext, $value))); + } else { + $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCondition(new FHIRId($iext)); } - } elseif ($data[self::FIELD_CONDITION] instanceof FHIRId) { - $this->addCondition($data[self::FIELD_CONDITION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONDITION])) { - $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_CONDITION]] + $ext)); - } else { - $this->addCondition(new FHIRId($data[self::FIELD_CONDITION])); } } if (isset($data[self::FIELD_CONSTRAINT])) { @@ -1109,52 +1125,73 @@ public function __construct($data = null) $this->setExampleAttachment(new FHIRAttachment($data[self::FIELD_EXAMPLE_ATTACHMENT])); } } - if (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setExampleBase64Binary($data[self::FIELD_EXAMPLE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_BASE_64BINARY])) { - $this->setExampleBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_EXAMPLE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_BASE_64BINARY])) { - $this->setExampleBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_EXAMPLE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY]) || isset($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY])) { + $value = $data[self::FIELD_EXAMPLE_BASE_64BINARY]; } else { - $this->setExampleBase64Binary(new FHIRBase64Binary($data[self::FIELD_EXAMPLE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT]) && is_array($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) - ? $data[self::FIELD_EXAMPLE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_BOOLEAN] instanceof FHIRBoolean) { - $this->setExampleBoolean($data[self::FIELD_EXAMPLE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $this->setExampleBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXAMPLE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $this->setExampleBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXAMPLE_BOOLEAN]))); - } + if (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT]; } else { - $this->setExampleBoolean(new FHIRBoolean($data[self::FIELD_EXAMPLE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setExampleBase64Binary($value); + } else if (is_array($value)) { + $this->setExampleBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setExampleBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_EXAMPLE_CODE])) { - $ext = (isset($data[self::FIELD_EXAMPLE_CODE_EXT]) && is_array($data[self::FIELD_EXAMPLE_CODE_EXT])) - ? $data[self::FIELD_EXAMPLE_CODE_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_CODE] instanceof FHIRCode) { - $this->setExampleCode($data[self::FIELD_EXAMPLE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_CODE])) { - $this->setExampleCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_EXAMPLE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_CODE])) { - $this->setExampleCode(new FHIRCode(array_merge($ext, $data[self::FIELD_EXAMPLE_CODE]))); + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN]) || isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN])) { + $value = $data[self::FIELD_EXAMPLE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT]) && is_array($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExampleBoolean($value); + } else if (is_array($value)) { + $this->setExampleBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExampleBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_CODE]) || isset($data[self::FIELD_EXAMPLE_CODE_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_CODE])) { + $value = $data[self::FIELD_EXAMPLE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_CODE_EXT]) && is_array($data[self::FIELD_EXAMPLE_CODE_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_CODE_EXT]; } else { - $this->setExampleCode(new FHIRCode($data[self::FIELD_EXAMPLE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setExampleCode($value); + } else if (is_array($value)) { + $this->setExampleCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setExampleCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_EXAMPLE_CODEABLE_CONCEPT])) { @@ -1178,52 +1215,73 @@ public function __construct($data = null) $this->setExampleContact(new FHIRContact($data[self::FIELD_EXAMPLE_CONTACT])); } } - if (isset($data[self::FIELD_EXAMPLE_DATE])) { - $ext = (isset($data[self::FIELD_EXAMPLE_DATE_EXT]) && is_array($data[self::FIELD_EXAMPLE_DATE_EXT])) - ? $data[self::FIELD_EXAMPLE_DATE_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_DATE] instanceof FHIRDate) { - $this->setExampleDate($data[self::FIELD_EXAMPLE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_DATE])) { - $this->setExampleDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_EXAMPLE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_DATE])) { - $this->setExampleDate(new FHIRDate(array_merge($ext, $data[self::FIELD_EXAMPLE_DATE]))); - } + if (isset($data[self::FIELD_EXAMPLE_DATE]) || isset($data[self::FIELD_EXAMPLE_DATE_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_DATE])) { + $value = $data[self::FIELD_EXAMPLE_DATE]; } else { - $this->setExampleDate(new FHIRDate($data[self::FIELD_EXAMPLE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EXAMPLE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EXAMPLE_DATE_TIME_EXT])) - ? $data[self::FIELD_EXAMPLE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_DATE_TIME] instanceof FHIRDateTime) { - $this->setExampleDateTime($data[self::FIELD_EXAMPLE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_DATE_TIME])) { - $this->setExampleDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXAMPLE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_DATE_TIME])) { - $this->setExampleDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXAMPLE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EXAMPLE_DATE_EXT]) && is_array($data[self::FIELD_EXAMPLE_DATE_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_DATE_EXT]; } else { - $this->setExampleDateTime(new FHIRDateTime($data[self::FIELD_EXAMPLE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setExampleDate($value); + } else if (is_array($value)) { + $this->setExampleDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setExampleDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_EXAMPLE_DECIMAL])) { - $ext = (isset($data[self::FIELD_EXAMPLE_DECIMAL_EXT]) && is_array($data[self::FIELD_EXAMPLE_DECIMAL_EXT])) - ? $data[self::FIELD_EXAMPLE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_DECIMAL] instanceof FHIRDecimal) { - $this->setExampleDecimal($data[self::FIELD_EXAMPLE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_DECIMAL])) { - $this->setExampleDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_EXAMPLE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_DECIMAL])) { - $this->setExampleDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_EXAMPLE_DECIMAL]))); + if (isset($data[self::FIELD_EXAMPLE_DATE_TIME]) || isset($data[self::FIELD_EXAMPLE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_DATE_TIME])) { + $value = $data[self::FIELD_EXAMPLE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EXAMPLE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExampleDateTime($value); + } else if (is_array($value)) { + $this->setExampleDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExampleDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_DECIMAL]) || isset($data[self::FIELD_EXAMPLE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_DECIMAL])) { + $value = $data[self::FIELD_EXAMPLE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_DECIMAL_EXT]) && is_array($data[self::FIELD_EXAMPLE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_DECIMAL_EXT]; } else { - $this->setExampleDecimal(new FHIRDecimal($data[self::FIELD_EXAMPLE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setExampleDecimal($value); + } else if (is_array($value)) { + $this->setExampleDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setExampleDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_EXAMPLE_HUMAN_NAME])) { @@ -1233,20 +1291,27 @@ public function __construct($data = null) $this->setExampleHumanName(new FHIRHumanName($data[self::FIELD_EXAMPLE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_EXAMPLE_ID])) { - $ext = (isset($data[self::FIELD_EXAMPLE_ID_EXT]) && is_array($data[self::FIELD_EXAMPLE_ID_EXT])) - ? $data[self::FIELD_EXAMPLE_ID_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_ID] instanceof FHIRId) { - $this->setExampleId($data[self::FIELD_EXAMPLE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_ID])) { - $this->setExampleId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_EXAMPLE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_ID])) { - $this->setExampleId(new FHIRId(array_merge($ext, $data[self::FIELD_EXAMPLE_ID]))); - } + if (isset($data[self::FIELD_EXAMPLE_ID]) || isset($data[self::FIELD_EXAMPLE_ID_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_ID])) { + $value = $data[self::FIELD_EXAMPLE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_ID_EXT]) && is_array($data[self::FIELD_EXAMPLE_ID_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_ID_EXT]; } else { - $this->setExampleId(new FHIRId($data[self::FIELD_EXAMPLE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setExampleId($value); + } else if (is_array($value)) { + $this->setExampleId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setExampleId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleId(new FHIRId($ext)); } } if (isset($data[self::FIELD_EXAMPLE_IDENTIFIER])) { @@ -1256,52 +1321,73 @@ public function __construct($data = null) $this->setExampleIdentifier(new FHIRIdentifier($data[self::FIELD_EXAMPLE_IDENTIFIER])); } } - if (isset($data[self::FIELD_EXAMPLE_INSTANT])) { - $ext = (isset($data[self::FIELD_EXAMPLE_INSTANT_EXT]) && is_array($data[self::FIELD_EXAMPLE_INSTANT_EXT])) - ? $data[self::FIELD_EXAMPLE_INSTANT_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_INSTANT] instanceof FHIRInstant) { - $this->setExampleInstant($data[self::FIELD_EXAMPLE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_INSTANT])) { - $this->setExampleInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_EXAMPLE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_INSTANT])) { - $this->setExampleInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_EXAMPLE_INSTANT]))); - } + if (isset($data[self::FIELD_EXAMPLE_INSTANT]) || isset($data[self::FIELD_EXAMPLE_INSTANT_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_INSTANT])) { + $value = $data[self::FIELD_EXAMPLE_INSTANT]; } else { - $this->setExampleInstant(new FHIRInstant($data[self::FIELD_EXAMPLE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_INTEGER])) { - $ext = (isset($data[self::FIELD_EXAMPLE_INTEGER_EXT]) && is_array($data[self::FIELD_EXAMPLE_INTEGER_EXT])) - ? $data[self::FIELD_EXAMPLE_INTEGER_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_INTEGER] instanceof FHIRInteger) { - $this->setExampleInteger($data[self::FIELD_EXAMPLE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_INTEGER])) { - $this->setExampleInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_EXAMPLE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_INTEGER])) { - $this->setExampleInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_EXAMPLE_INTEGER]))); - } + if (isset($data[self::FIELD_EXAMPLE_INSTANT_EXT]) && is_array($data[self::FIELD_EXAMPLE_INSTANT_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_INSTANT_EXT]; } else { - $this->setExampleInteger(new FHIRInteger($data[self::FIELD_EXAMPLE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setExampleInstant($value); + } else if (is_array($value)) { + $this->setExampleInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setExampleInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_EXAMPLE_OID])) { - $ext = (isset($data[self::FIELD_EXAMPLE_OID_EXT]) && is_array($data[self::FIELD_EXAMPLE_OID_EXT])) - ? $data[self::FIELD_EXAMPLE_OID_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_OID] instanceof FHIROid) { - $this->setExampleOid($data[self::FIELD_EXAMPLE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_OID])) { - $this->setExampleOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_EXAMPLE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_OID])) { - $this->setExampleOid(new FHIROid(array_merge($ext, $data[self::FIELD_EXAMPLE_OID]))); + if (isset($data[self::FIELD_EXAMPLE_INTEGER]) || isset($data[self::FIELD_EXAMPLE_INTEGER_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_INTEGER])) { + $value = $data[self::FIELD_EXAMPLE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_INTEGER_EXT]) && is_array($data[self::FIELD_EXAMPLE_INTEGER_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setExampleInteger($value); + } else if (is_array($value)) { + $this->setExampleInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setExampleInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_OID]) || isset($data[self::FIELD_EXAMPLE_OID_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_OID])) { + $value = $data[self::FIELD_EXAMPLE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_OID_EXT]) && is_array($data[self::FIELD_EXAMPLE_OID_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_OID_EXT]; } else { - $this->setExampleOid(new FHIROid($data[self::FIELD_EXAMPLE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setExampleOid($value); + } else if (is_array($value)) { + $this->setExampleOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setExampleOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_EXAMPLE_PERIOD])) { @@ -1353,84 +1439,119 @@ public function __construct($data = null) $this->setExampleSchedule(new FHIRSchedule($data[self::FIELD_EXAMPLE_SCHEDULE])); } } - if (isset($data[self::FIELD_EXAMPLE_STRING])) { - $ext = (isset($data[self::FIELD_EXAMPLE_STRING_EXT]) && is_array($data[self::FIELD_EXAMPLE_STRING_EXT])) - ? $data[self::FIELD_EXAMPLE_STRING_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_STRING] instanceof FHIRString) { - $this->setExampleString($data[self::FIELD_EXAMPLE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_STRING])) { - $this->setExampleString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXAMPLE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_STRING])) { - $this->setExampleString(new FHIRString(array_merge($ext, $data[self::FIELD_EXAMPLE_STRING]))); - } + if (isset($data[self::FIELD_EXAMPLE_STRING]) || isset($data[self::FIELD_EXAMPLE_STRING_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_STRING])) { + $value = $data[self::FIELD_EXAMPLE_STRING]; } else { - $this->setExampleString(new FHIRString($data[self::FIELD_EXAMPLE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_URI])) { - $ext = (isset($data[self::FIELD_EXAMPLE_URI_EXT]) && is_array($data[self::FIELD_EXAMPLE_URI_EXT])) - ? $data[self::FIELD_EXAMPLE_URI_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_URI] instanceof FHIRUri) { - $this->setExampleUri($data[self::FIELD_EXAMPLE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_URI])) { - $this->setExampleUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_EXAMPLE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_URI])) { - $this->setExampleUri(new FHIRUri(array_merge($ext, $data[self::FIELD_EXAMPLE_URI]))); - } + if (isset($data[self::FIELD_EXAMPLE_STRING_EXT]) && is_array($data[self::FIELD_EXAMPLE_STRING_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_STRING_EXT]; } else { - $this->setExampleUri(new FHIRUri($data[self::FIELD_EXAMPLE_URI])); + $ext = []; } - } - if (isset($data[self::FIELD_EXAMPLE_UUID])) { - $ext = (isset($data[self::FIELD_EXAMPLE_UUID_EXT]) && is_array($data[self::FIELD_EXAMPLE_UUID_EXT])) - ? $data[self::FIELD_EXAMPLE_UUID_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_UUID] instanceof FHIRUuid) { - $this->setExampleUuid($data[self::FIELD_EXAMPLE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_UUID])) { - $this->setExampleUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_EXAMPLE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_UUID])) { - $this->setExampleUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_EXAMPLE_UUID]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExampleString($value); + } else if (is_array($value)) { + $this->setExampleString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExampleString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setExampleUuid(new FHIRUuid($data[self::FIELD_EXAMPLE_UUID])); + } else if ([] !== $ext) { + $this->setExampleString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_FORMAL])) { - $ext = (isset($data[self::FIELD_FORMAL_EXT]) && is_array($data[self::FIELD_FORMAL_EXT])) - ? $data[self::FIELD_FORMAL_EXT] - : null; - if ($data[self::FIELD_FORMAL] instanceof FHIRString) { - $this->setFormal($data[self::FIELD_FORMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FORMAL])) { - $this->setFormal(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FORMAL]] + $ext)); - } else if (is_array($data[self::FIELD_FORMAL])) { - $this->setFormal(new FHIRString(array_merge($ext, $data[self::FIELD_FORMAL]))); + if (isset($data[self::FIELD_EXAMPLE_URI]) || isset($data[self::FIELD_EXAMPLE_URI_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_URI])) { + $value = $data[self::FIELD_EXAMPLE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_URI_EXT]) && is_array($data[self::FIELD_EXAMPLE_URI_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setExampleUri($value); + } else if (is_array($value)) { + $this->setExampleUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setExampleUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_UUID]) || isset($data[self::FIELD_EXAMPLE_UUID_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_UUID])) { + $value = $data[self::FIELD_EXAMPLE_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_UUID_EXT]) && is_array($data[self::FIELD_EXAMPLE_UUID_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_UUID_EXT]; } else { - $this->setFormal(new FHIRString($data[self::FIELD_FORMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setExampleUuid($value); + } else if (is_array($value)) { + $this->setExampleUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setExampleUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleUuid(new FHIRUuid($ext)); } } - if (isset($data[self::FIELD_IS_MODIFIER])) { - $ext = (isset($data[self::FIELD_IS_MODIFIER_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_EXT])) - ? $data[self::FIELD_IS_MODIFIER_EXT] - : null; - if ($data[self::FIELD_IS_MODIFIER] instanceof FHIRBoolean) { - $this->setIsModifier($data[self::FIELD_IS_MODIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_MODIFIER])) { - $this->setIsModifier(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_MODIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IS_MODIFIER])) { - $this->setIsModifier(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_MODIFIER]))); + if (isset($data[self::FIELD_FORMAL]) || isset($data[self::FIELD_FORMAL_EXT])) { + if (isset($data[self::FIELD_FORMAL])) { + $value = $data[self::FIELD_FORMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FORMAL_EXT]) && is_array($data[self::FIELD_FORMAL_EXT])) { + $ext = $data[self::FIELD_FORMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setFormal($value); + } else if (is_array($value)) { + $this->setFormal(new FHIRString(array_merge($ext, $value))); + } else { + $this->setFormal(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFormal(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IS_MODIFIER]) || isset($data[self::FIELD_IS_MODIFIER_EXT])) { + if (isset($data[self::FIELD_IS_MODIFIER])) { + $value = $data[self::FIELD_IS_MODIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_MODIFIER_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_EXT])) { + $ext = $data[self::FIELD_IS_MODIFIER_EXT]; } else { - $this->setIsModifier(new FHIRBoolean($data[self::FIELD_IS_MODIFIER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsModifier($value); + } else if (is_array($value)) { + $this->setIsModifier(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsModifier(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsModifier(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_MAPPING])) { @@ -1451,145 +1572,203 @@ public function __construct($data = null) $this->addMapping(new FHIRProfileMapping1($data[self::FIELD_MAPPING])); } } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_LENGTH])) { - $ext = (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) - ? $data[self::FIELD_MAX_LENGTH_EXT] - : null; - if ($data[self::FIELD_MAX_LENGTH] instanceof FHIRInteger) { - $this->setMaxLength($data[self::FIELD_MAX_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MAX_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_MAX_LENGTH]))); - } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMaxLength(new FHIRInteger($data[self::FIELD_MAX_LENGTH])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); } } - if (isset($data[self::FIELD_MUST_SUPPORT])) { - $ext = (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) - ? $data[self::FIELD_MUST_SUPPORT_EXT] - : null; - if ($data[self::FIELD_MUST_SUPPORT] instanceof FHIRBoolean) { - $this->setMustSupport($data[self::FIELD_MUST_SUPPORT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MUST_SUPPORT])) { - $this->setMustSupport(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MUST_SUPPORT]] + $ext)); - } else if (is_array($data[self::FIELD_MUST_SUPPORT])) { - $this->setMustSupport(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MUST_SUPPORT]))); - } + if (isset($data[self::FIELD_MAX_LENGTH]) || isset($data[self::FIELD_MAX_LENGTH_EXT])) { + if (isset($data[self::FIELD_MAX_LENGTH])) { + $value = $data[self::FIELD_MAX_LENGTH]; } else { - $this->setMustSupport(new FHIRBoolean($data[self::FIELD_MUST_SUPPORT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME_REFERENCE])) { - $ext = (isset($data[self::FIELD_NAME_REFERENCE_EXT]) && is_array($data[self::FIELD_NAME_REFERENCE_EXT])) - ? $data[self::FIELD_NAME_REFERENCE_EXT] - : null; - if ($data[self::FIELD_NAME_REFERENCE] instanceof FHIRString) { - $this->setNameReference($data[self::FIELD_NAME_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME_REFERENCE])) { - $this->setNameReference(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_NAME_REFERENCE])) { - $this->setNameReference(new FHIRString(array_merge($ext, $data[self::FIELD_NAME_REFERENCE]))); + if (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) { + $ext = $data[self::FIELD_MAX_LENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMaxLength($value); + } else if (is_array($value)) { + $this->setMaxLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMaxLength(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; } else { - $this->setNameReference(new FHIRString($data[self::FIELD_NAME_REFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + if (isset($data[self::FIELD_MUST_SUPPORT]) || isset($data[self::FIELD_MUST_SUPPORT_EXT])) { + if (isset($data[self::FIELD_MUST_SUPPORT])) { + $value = $data[self::FIELD_MUST_SUPPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) { + $ext = $data[self::FIELD_MUST_SUPPORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMustSupport($value); + } else if (is_array($value)) { + $this->setMustSupport(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMustSupport(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMustSupport(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_NAME_REFERENCE]) || isset($data[self::FIELD_NAME_REFERENCE_EXT])) { + if (isset($data[self::FIELD_NAME_REFERENCE])) { + $value = $data[self::FIELD_NAME_REFERENCE]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); + $value = null; + } + if (isset($data[self::FIELD_NAME_REFERENCE_EXT]) && is_array($data[self::FIELD_NAME_REFERENCE_EXT])) { + $ext = $data[self::FIELD_NAME_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNameReference($value); + } else if (is_array($value)) { + $this->setNameReference(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNameReference(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNameReference(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SHORT])) { - $ext = (isset($data[self::FIELD_SHORT_EXT]) && is_array($data[self::FIELD_SHORT_EXT])) - ? $data[self::FIELD_SHORT_EXT] - : null; - if ($data[self::FIELD_SHORT] instanceof FHIRString) { - $this->setShort($data[self::FIELD_SHORT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SHORT])) { - $this->setShort(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SHORT]] + $ext)); - } else if (is_array($data[self::FIELD_SHORT])) { - $this->setShort(new FHIRString(array_merge($ext, $data[self::FIELD_SHORT]))); + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SHORT]) || isset($data[self::FIELD_SHORT_EXT])) { + if (isset($data[self::FIELD_SHORT])) { + $value = $data[self::FIELD_SHORT]; } else { - $this->setShort(new FHIRString($data[self::FIELD_SHORT])); + $value = null; + } + if (isset($data[self::FIELD_SHORT_EXT]) && is_array($data[self::FIELD_SHORT_EXT])) { + $ext = $data[self::FIELD_SHORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setShort($value); + } else if (is_array($value)) { + $this->setShort(new FHIRString(array_merge($ext, $value))); + } else { + $this->setShort(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setShort(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SYNONYM])) { - $ext = (isset($data[self::FIELD_SYNONYM_EXT]) && is_array($data[self::FIELD_SYNONYM_EXT])) - ? $data[self::FIELD_SYNONYM_EXT] - : null; - if (is_array($data[self::FIELD_SYNONYM])) { - foreach($data[self::FIELD_SYNONYM] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSynonym($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSynonym(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSynonym(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SYNONYM]) || isset($data[self::FIELD_SYNONYM_EXT])) { + if (isset($data[self::FIELD_SYNONYM])) { + $value = $data[self::FIELD_SYNONYM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYNONYM_EXT]) && is_array($data[self::FIELD_SYNONYM_EXT])) { + $ext = $data[self::FIELD_SYNONYM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSynonym($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSynonym($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSynonym(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSynonym(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSynonym(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSynonym(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSynonym(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSynonym(new FHIRString($iext)); } - } elseif ($data[self::FIELD_SYNONYM] instanceof FHIRString) { - $this->addSynonym($data[self::FIELD_SYNONYM]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SYNONYM])) { - $this->addSynonym(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SYNONYM]] + $ext)); - } else { - $this->addSynonym(new FHIRString($data[self::FIELD_SYNONYM])); } } if (isset($data[self::FIELD_TYPE])) { @@ -1624,52 +1803,73 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -1693,52 +1893,73 @@ public function __construct($data = null) $this->setValueContact(new FHIRContact($data[self::FIELD_VALUE_CONTACT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_HUMAN_NAME])) { @@ -1748,20 +1969,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -1771,52 +1999,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -1868,52 +2117,73 @@ public function __construct($data = null) $this->setValueSchedule(new FHIRSchedule($data[self::FIELD_VALUE_SCHEDULE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); - } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) - ? $data[self::FIELD_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_VALUE_UUID] instanceof FHIRUuid) { - $this->setValueUuid($data[self::FIELD_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_VALUE_UUID]))); + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VALUE_UUID]) || isset($data[self::FIELD_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_VALUE_UUID])) { + $value = $data[self::FIELD_VALUE_UUID]; } else { - $this->setValueUuid(new FHIRUuid($data[self::FIELD_VALUE_UUID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_VALUE_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setValueUuid($value); + } else if (is_array($value)) { + $this->setValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUuid(new FHIRUuid($ext)); } } } @@ -4523,8 +4793,8 @@ public function setValueUuid($valueUuid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -5338,28 +5608,44 @@ public function jsonSerialize() } if (null !== ($v = $this->getComments())) { $a[self::FIELD_COMMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENTS_EXT] = $enc; } } if ([] !== ($vs = $this->getCondition())) { $a[self::FIELD_CONDITION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONDITION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONDITION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRId::FIELD_VALUE]) || array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONDITION_EXT][] = null; + unset($enc[FHIRId::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONDITION_EXT] = $encs; + } } if ([] !== ($vs = $this->getConstraint())) { - $a[self::FIELD_CONSTRAINT] = $vs; + $a[self::FIELD_CONSTRAINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONSTRAINT][] = $v; + } } if (null !== ($v = $this->getExampleAddress())) { $a[self::FIELD_EXAMPLE_ADDRESS] = $v; @@ -5369,22 +5655,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleBase64Binary())) { $a[self::FIELD_EXAMPLE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getExampleBoolean())) { $a[self::FIELD_EXAMPLE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getExampleCode())) { $a[self::FIELD_EXAMPLE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_CODE_EXT] = $enc; } } @@ -5399,22 +5691,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleDate())) { $a[self::FIELD_EXAMPLE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getExampleDateTime())) { $a[self::FIELD_EXAMPLE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getExampleDecimal())) { $a[self::FIELD_EXAMPLE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_DECIMAL_EXT] = $enc; } } @@ -5423,8 +5721,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleId())) { $a[self::FIELD_EXAMPLE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_ID_EXT] = $enc; } } @@ -5433,22 +5733,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleInstant())) { $a[self::FIELD_EXAMPLE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getExampleInteger())) { $a[self::FIELD_EXAMPLE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getExampleOid())) { $a[self::FIELD_EXAMPLE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_OID_EXT] = $enc; } } @@ -5475,108 +5781,152 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleString())) { $a[self::FIELD_EXAMPLE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getExampleUri())) { $a[self::FIELD_EXAMPLE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_URI_EXT] = $enc; } } if (null !== ($v = $this->getExampleUuid())) { $a[self::FIELD_EXAMPLE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_UUID_EXT] = $enc; } } if (null !== ($v = $this->getFormal())) { $a[self::FIELD_FORMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FORMAL_EXT] = $enc; } } if (null !== ($v = $this->getIsModifier())) { $a[self::FIELD_IS_MODIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_MODIFIER_EXT] = $enc; } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMaxLength())) { $a[self::FIELD_MAX_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MAX_LENGTH_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getMustSupport())) { $a[self::FIELD_MUST_SUPPORT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MUST_SUPPORT_EXT] = $enc; } } if (null !== ($v = $this->getNameReference())) { $a[self::FIELD_NAME_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_REFERENCE_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getShort())) { $a[self::FIELD_SHORT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SHORT_EXT] = $enc; } } if ([] !== ($vs = $this->getSynonym())) { $a[self::FIELD_SYNONYM] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SYNONYM][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SYNONYM_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SYNONYM_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SYNONYM_EXT] = $encs; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if (null !== ($v = $this->getValueAddress())) { $a[self::FIELD_VALUE_ADDRESS] = $v; @@ -5586,22 +5936,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -5616,22 +5972,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -5640,8 +6002,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -5650,22 +6014,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -5692,25 +6062,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getValueUuid())) { $a[self::FIELD_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_VALUE_UUID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElement.php index 417baa64cc..ec6d94ad62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRProfileElement extends FHIRBackboneElement const FIELD_SLICING = 'slicing'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A Resource Profile - a statement of use of one or more FHIR Resources. It may @@ -178,65 +178,88 @@ public function __construct($data = null) $this->setDefinition(new FHIRProfileDefinition($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } - if (isset($data[self::FIELD_REPRESENTATION])) { - $ext = (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) - ? $data[self::FIELD_REPRESENTATION_EXT] - : null; - if (is_array($data[self::FIELD_REPRESENTATION])) { - foreach($data[self::FIELD_REPRESENTATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPropertyRepresentation) { - $this->addRepresentation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_REPRESENTATION]) || isset($data[self::FIELD_REPRESENTATION_EXT])) { + if (isset($data[self::FIELD_REPRESENTATION])) { + $value = $data[self::FIELD_REPRESENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) { + $ext = $data[self::FIELD_REPRESENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPropertyRepresentation) { + $this->addRepresentation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPropertyRepresentation) { + $this->addRepresentation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($v, $iext))); + } else { + $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addRepresentation(new FHIRPropertyRepresentation($v)); } + } elseif (is_array($value)) { + $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($ext, $value))); + } else { + $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addRepresentation(new FHIRPropertyRepresentation($iext)); } - } elseif ($data[self::FIELD_REPRESENTATION] instanceof FHIRPropertyRepresentation) { - $this->addRepresentation($data[self::FIELD_REPRESENTATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REPRESENTATION])) { - $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $data[self::FIELD_REPRESENTATION]] + $ext)); - } else { - $this->addRepresentation(new FHIRPropertyRepresentation($data[self::FIELD_REPRESENTATION])); } } if (isset($data[self::FIELD_SLICING])) { @@ -479,8 +502,8 @@ public function setSlicing(FHIRProfileSlicing $slicing = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -604,36 +627,51 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if ([] !== ($vs = $this->getRepresentation())) { $a[self::FIELD_REPRESENTATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REPRESENTATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REPRESENTATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPropertyRepresentation::FIELD_VALUE]) || array_key_exists(FHIRPropertyRepresentation::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REPRESENTATION_EXT][] = null; + unset($enc[FHIRPropertyRepresentation::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REPRESENTATION_EXT] = $encs; + } } if (null !== ($v = $this->getSlicing())) { $a[self::FIELD_SLICING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefn.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefn.php index 7b3a58cefa..79463da817 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefn.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRProfileExtensionDefn extends FHIRBackboneElement const FIELD_DISPLAY_EXT = '_display'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -170,65 +170,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_CONTEXT])) { - $ext = (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) - ? $data[self::FIELD_CONTEXT_EXT] - : null; - if (is_array($data[self::FIELD_CONTEXT])) { - foreach($data[self::FIELD_CONTEXT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addContext($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addContext(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CONTEXT]) || isset($data[self::FIELD_CONTEXT_EXT])) { + if (isset($data[self::FIELD_CONTEXT])) { + $value = $data[self::FIELD_CONTEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) { + $ext = $data[self::FIELD_CONTEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addContext($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addContext($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addContext(new FHIRString(array_merge($v, $iext))); + } else { + $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addContext(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addContext(new FHIRString(array_merge($ext, $value))); + } else { + $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addContext(new FHIRString($iext)); } - } elseif ($data[self::FIELD_CONTEXT] instanceof FHIRString) { - $this->addContext($data[self::FIELD_CONTEXT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONTEXT])) { - $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTEXT]] + $ext)); - } else { - $this->addContext(new FHIRString($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_CONTEXT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) - ? $data[self::FIELD_CONTEXT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTEXT_TYPE] instanceof FHIRExtensionContext) { - $this->setContextType($data[self::FIELD_CONTEXT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRExtensionContext([FHIRExtensionContext::FIELD_VALUE => $data[self::FIELD_CONTEXT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRExtensionContext(array_merge($ext, $data[self::FIELD_CONTEXT_TYPE]))); - } + if (isset($data[self::FIELD_CONTEXT_TYPE]) || isset($data[self::FIELD_CONTEXT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTEXT_TYPE])) { + $value = $data[self::FIELD_CONTEXT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTEXT_TYPE_EXT]; } else { - $this->setContextType(new FHIRExtensionContext($data[self::FIELD_CONTEXT_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExtensionContext) { + $this->setContextType($value); + } else if (is_array($value)) { + $this->setContextType(new FHIRExtensionContext(array_merge($ext, $value))); + } else { + $this->setContextType(new FHIRExtensionContext([FHIRExtensionContext::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContextType(new FHIRExtensionContext($ext)); } } if (isset($data[self::FIELD_DEFINITION])) { @@ -238,20 +261,27 @@ public function __construct($data = null) $this->setDefinition(new FHIRProfileDefinition($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } } @@ -481,8 +511,8 @@ public function setDisplay($display = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -603,30 +633,42 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getContext())) { $a[self::FIELD_CONTEXT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONTEXT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONTEXT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONTEXT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONTEXT_EXT] = $encs; + } } if (null !== ($v = $this->getContextType())) { $a[self::FIELD_CONTEXT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExtensionContext::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExtensionContext::FIELD_VALUE]); $a[self::FIELD_CONTEXT_TYPE_EXT] = $enc; } } @@ -635,11 +677,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping.php index d23a6039f2..8d2980c6f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRProfileMapping extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -155,68 +155,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENTS])) { - $ext = (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) - ? $data[self::FIELD_COMMENTS_EXT] - : null; - if ($data[self::FIELD_COMMENTS] instanceof FHIRString) { - $this->setComments($data[self::FIELD_COMMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENTS]))); - } + if (isset($data[self::FIELD_COMMENTS]) || isset($data[self::FIELD_COMMENTS_EXT])) { + if (isset($data[self::FIELD_COMMENTS])) { + $value = $data[self::FIELD_COMMENTS]; } else { - $this->setComments(new FHIRString($data[self::FIELD_COMMENTS])); + $value = null; } - } - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) { + $ext = $data[self::FIELD_COMMENTS_EXT]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComments($value); + } else if (is_array($value)) { + $this->setComments(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComments(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -400,8 +428,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -525,32 +553,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComments())) { $a[self::FIELD_COMMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENTS_EXT] = $enc; } } if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1.php index b6e66a7f86..47bf42c697 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRProfileMapping1 extends FHIRBackboneElement const FIELD_MAP_EXT = '_map'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number in the range to 2^64-1, optionally represented in hex, a uuid, an @@ -128,36 +128,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $value = null; } - } - if (isset($data[self::FIELD_MAP])) { - $ext = (isset($data[self::FIELD_MAP_EXT]) && is_array($data[self::FIELD_MAP_EXT])) - ? $data[self::FIELD_MAP_EXT] - : null; - if ($data[self::FIELD_MAP] instanceof FHIRString) { - $this->setMap($data[self::FIELD_MAP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAP])) { - $this->setMap(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAP]] + $ext)); - } else if (is_array($data[self::FIELD_MAP])) { - $this->setMap(new FHIRString(array_merge($ext, $data[self::FIELD_MAP]))); + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_MAP]) || isset($data[self::FIELD_MAP_EXT])) { + if (isset($data[self::FIELD_MAP])) { + $value = $data[self::FIELD_MAP]; } else { - $this->setMap(new FHIRString($data[self::FIELD_MAP])); + $value = null; + } + if (isset($data[self::FIELD_MAP_EXT]) && is_array($data[self::FIELD_MAP_EXT])) { + $ext = $data[self::FIELD_MAP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMap($value); + } else if (is_array($value)) { + $this->setMap(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMap(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMap(new FHIRString($ext)); } } } @@ -265,8 +279,8 @@ public function setMap($map = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -362,18 +376,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getMap())) { $a[self::FIELD_MAP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQuery.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQuery.php index 5623d3293e..e4ffe96f22 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQuery.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQuery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRProfileQuery extends FHIRBackboneElement const FIELD_PARAMETER = 'parameter'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -140,36 +140,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -353,8 +367,8 @@ public function setParameter(array $parameter = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -463,20 +477,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParam.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParam.php index 4bc21f45af..947988d5b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRProfileSearchParam extends FHIRBackboneElement const FIELD_XPATH_EXT = '_xpath'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -166,97 +166,134 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TARGET])) { - $ext = (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) - ? $data[self::FIELD_TARGET_EXT] - : null; - if (is_array($data[self::FIELD_TARGET])) { - foreach($data[self::FIELD_TARGET] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addTarget($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTarget(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TARGET]) || isset($data[self::FIELD_TARGET_EXT])) { + if (isset($data[self::FIELD_TARGET])) { + $value = $data[self::FIELD_TARGET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) { + $ext = $data[self::FIELD_TARGET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addTarget($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addTarget($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTarget(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTarget(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addTarget(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTarget(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_TARGET] instanceof FHIRCode) { - $this->addTarget($data[self::FIELD_TARGET]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TARGET])) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TARGET]] + $ext)); - } else { - $this->addTarget(new FHIRCode($data[self::FIELD_TARGET])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSearchParamType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRSearchParamType($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_XPATH])) { - $ext = (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) - ? $data[self::FIELD_XPATH_EXT] - : null; - if ($data[self::FIELD_XPATH] instanceof FHIRString) { - $this->setXpath($data[self::FIELD_XPATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_XPATH]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString(array_merge($ext, $data[self::FIELD_XPATH]))); + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchParamType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSearchParamType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRSearchParamType($ext)); + } + } + if (isset($data[self::FIELD_XPATH]) || isset($data[self::FIELD_XPATH_EXT])) { + if (isset($data[self::FIELD_XPATH])) { + $value = $data[self::FIELD_XPATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) { + $ext = $data[self::FIELD_XPATH_EXT]; } else { - $this->setXpath(new FHIRString($data[self::FIELD_XPATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setXpath($value); + } else if (is_array($value)) { + $this->setXpath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setXpath(new FHIRString($ext)); } } } @@ -493,8 +530,8 @@ public function setXpath($xpath = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -623,47 +660,66 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { $a[self::FIELD_TARGET] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TARGET][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TARGET_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TARGET_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TARGET_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchParamType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchParamType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getXpath())) { $a[self::FIELD_XPATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_XPATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicing.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicing.php index 8dbe295e2b..49ddb48abf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicing.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRProfileSlicing extends FHIRBackboneElement const FIELD_RULES_EXT = '_rules'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number in the range to 2^64-1, optionally represented in hex, a uuid, an @@ -146,52 +146,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISCRIMINATOR])) { - $ext = (isset($data[self::FIELD_DISCRIMINATOR_EXT]) && is_array($data[self::FIELD_DISCRIMINATOR_EXT])) - ? $data[self::FIELD_DISCRIMINATOR_EXT] - : null; - if ($data[self::FIELD_DISCRIMINATOR] instanceof FHIRId) { - $this->setDiscriminator($data[self::FIELD_DISCRIMINATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISCRIMINATOR])) { - $this->setDiscriminator(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_DISCRIMINATOR]] + $ext)); - } else if (is_array($data[self::FIELD_DISCRIMINATOR])) { - $this->setDiscriminator(new FHIRId(array_merge($ext, $data[self::FIELD_DISCRIMINATOR]))); - } + if (isset($data[self::FIELD_DISCRIMINATOR]) || isset($data[self::FIELD_DISCRIMINATOR_EXT])) { + if (isset($data[self::FIELD_DISCRIMINATOR])) { + $value = $data[self::FIELD_DISCRIMINATOR]; } else { - $this->setDiscriminator(new FHIRId($data[self::FIELD_DISCRIMINATOR])); + $value = null; } - } - if (isset($data[self::FIELD_ORDERED])) { - $ext = (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) - ? $data[self::FIELD_ORDERED_EXT] - : null; - if ($data[self::FIELD_ORDERED] instanceof FHIRBoolean) { - $this->setOrdered($data[self::FIELD_ORDERED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ORDERED]] + $ext)); - } else if (is_array($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ORDERED]))); - } + if (isset($data[self::FIELD_DISCRIMINATOR_EXT]) && is_array($data[self::FIELD_DISCRIMINATOR_EXT])) { + $ext = $data[self::FIELD_DISCRIMINATOR_EXT]; } else { - $this->setOrdered(new FHIRBoolean($data[self::FIELD_ORDERED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setDiscriminator($value); + } else if (is_array($value)) { + $this->setDiscriminator(new FHIRId(array_merge($ext, $value))); + } else { + $this->setDiscriminator(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDiscriminator(new FHIRId($ext)); } } - if (isset($data[self::FIELD_RULES])) { - $ext = (isset($data[self::FIELD_RULES_EXT]) && is_array($data[self::FIELD_RULES_EXT])) - ? $data[self::FIELD_RULES_EXT] - : null; - if ($data[self::FIELD_RULES] instanceof FHIRSlicingRules) { - $this->setRules($data[self::FIELD_RULES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULES])) { - $this->setRules(new FHIRSlicingRules([FHIRSlicingRules::FIELD_VALUE => $data[self::FIELD_RULES]] + $ext)); - } else if (is_array($data[self::FIELD_RULES])) { - $this->setRules(new FHIRSlicingRules(array_merge($ext, $data[self::FIELD_RULES]))); + if (isset($data[self::FIELD_ORDERED]) || isset($data[self::FIELD_ORDERED_EXT])) { + if (isset($data[self::FIELD_ORDERED])) { + $value = $data[self::FIELD_ORDERED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) { + $ext = $data[self::FIELD_ORDERED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOrdered($value); + } else if (is_array($value)) { + $this->setOrdered(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOrdered(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_RULES]) || isset($data[self::FIELD_RULES_EXT])) { + if (isset($data[self::FIELD_RULES])) { + $value = $data[self::FIELD_RULES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RULES_EXT]) && is_array($data[self::FIELD_RULES_EXT])) { + $ext = $data[self::FIELD_RULES_EXT]; } else { - $this->setRules(new FHIRSlicingRules($data[self::FIELD_RULES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSlicingRules) { + $this->setRules($value); + } else if (is_array($value)) { + $this->setRules(new FHIRSlicingRules(array_merge($ext, $value))); + } else { + $this->setRules(new FHIRSlicingRules([FHIRSlicingRules::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRules(new FHIRSlicingRules($ext)); } } } @@ -337,8 +358,8 @@ public function setRules(FHIRSlicingRules $rules = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -440,25 +461,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDiscriminator())) { $a[self::FIELD_DISCRIMINATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_DISCRIMINATOR_EXT] = $enc; } } if (null !== ($v = $this->getOrdered())) { $a[self::FIELD_ORDERED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ORDERED_EXT] = $enc; } } if (null !== ($v = $this->getRules())) { $a[self::FIELD_RULES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSlicingRules::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSlicingRules::FIELD_VALUE]); $a[self::FIELD_RULES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructure.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructure.php index 7009a4af5e..97540d1f35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRProfileStructure extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A Resource Profile - a statement of use of one or more FHIR Resources. It may @@ -197,52 +197,73 @@ public function __construct($data = null) $this->addElement(new FHIRProfileElement($data[self::FIELD_ELEMENT])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISH])) { - $ext = (isset($data[self::FIELD_PUBLISH_EXT]) && is_array($data[self::FIELD_PUBLISH_EXT])) - ? $data[self::FIELD_PUBLISH_EXT] - : null; - if ($data[self::FIELD_PUBLISH] instanceof FHIRBoolean) { - $this->setPublish($data[self::FIELD_PUBLISH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISH])) { - $this->setPublish(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PUBLISH]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISH])) { - $this->setPublish(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PUBLISH]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISH]) || isset($data[self::FIELD_PUBLISH_EXT])) { + if (isset($data[self::FIELD_PUBLISH])) { + $value = $data[self::FIELD_PUBLISH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISH_EXT]) && is_array($data[self::FIELD_PUBLISH_EXT])) { + $ext = $data[self::FIELD_PUBLISH_EXT]; } else { - $this->setPublish(new FHIRBoolean($data[self::FIELD_PUBLISH])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRString) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRString(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPublish($value); + } else if (is_array($value)) { + $this->setPublish(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPublish(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublish(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRString($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRString($ext)); } } if (isset($data[self::FIELD_SEARCH_PARAM])) { @@ -263,20 +284,27 @@ public function __construct($data = null) $this->addSearchParam(new FHIRProfileSearchParam($data[self::FIELD_SEARCH_PARAM])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -572,8 +600,8 @@ public function setType($type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -722,39 +750,62 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublish())) { $a[self::FIELD_PUBLISH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PUBLISH_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getSearchParam())) { - $a[self::FIELD_SEARCH_PARAM] = $vs; + $a[self::FIELD_SEARCH_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SEARCH_PARAM][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileType.php index 512e5c7b36..7e4dc0874b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRProfileType extends FHIRBackboneElement const FIELD_PROFILE_EXT = '_profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How resource references can be aggregated @@ -144,65 +144,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AGGREGATION])) { - $ext = (isset($data[self::FIELD_AGGREGATION_EXT]) && is_array($data[self::FIELD_AGGREGATION_EXT])) - ? $data[self::FIELD_AGGREGATION_EXT] - : null; - if (is_array($data[self::FIELD_AGGREGATION])) { - foreach($data[self::FIELD_AGGREGATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRAggregationMode) { - $this->addAggregation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAggregation(new FHIRAggregationMode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_AGGREGATION]) || isset($data[self::FIELD_AGGREGATION_EXT])) { + if (isset($data[self::FIELD_AGGREGATION])) { + $value = $data[self::FIELD_AGGREGATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AGGREGATION_EXT]) && is_array($data[self::FIELD_AGGREGATION_EXT])) { + $ext = $data[self::FIELD_AGGREGATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAggregationMode) { + $this->addAggregation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRAggregationMode) { + $this->addAggregation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAggregation(new FHIRAggregationMode(array_merge($v, $iext))); + } else { + $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAggregation(new FHIRAggregationMode($v)); } + } elseif (is_array($value)) { + $this->addAggregation(new FHIRAggregationMode(array_merge($ext, $value))); + } else { + $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAggregation(new FHIRAggregationMode($iext)); } - } elseif ($data[self::FIELD_AGGREGATION] instanceof FHIRAggregationMode) { - $this->addAggregation($data[self::FIELD_AGGREGATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_AGGREGATION])) { - $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $data[self::FIELD_AGGREGATION]] + $ext)); - } else { - $this->addAggregation(new FHIRAggregationMode($data[self::FIELD_AGGREGATION])); } } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRUri) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRUri(array_merge($ext, $data[self::FIELD_PROFILE]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; } else { - $this->setProfile(new FHIRUri($data[self::FIELD_PROFILE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProfile(new FHIRUri($ext)); } } } @@ -371,8 +394,8 @@ public function setProfile($profile = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -481,33 +504,48 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAggregation())) { $a[self::FIELD_AGGREGATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_AGGREGATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_AGGREGATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRAggregationMode::FIELD_VALUE]) || array_key_exists(FHIRAggregationMode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_AGGREGATION_EXT][] = null; + unset($enc[FHIRAggregationMode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_AGGREGATION_EXT] = $encs; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php index 7c3414facf..2854a564ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRProvenanceAgent extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -153,36 +153,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRUri) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri(array_merge($ext, $data[self::FIELD_REFERENCE]))); + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRUri($data[self::FIELD_REFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRUri($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -360,8 +374,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -469,15 +483,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } @@ -487,6 +505,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php index b59c291b83..dc2f1d1c7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRProvenanceEntity extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Provenance information that describes the activity that led to the creation of a @@ -179,52 +179,73 @@ public function __construct($data = null) $this->setAgent(new FHIRProvenanceAgent($data[self::FIELD_AGENT])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRUri) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri(array_merge($ext, $data[self::FIELD_REFERENCE]))); - } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setReference(new FHIRUri($data[self::FIELD_REFERENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_ROLE])) { - $ext = (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) - ? $data[self::FIELD_ROLE_EXT] - : null; - if ($data[self::FIELD_ROLE] instanceof FHIRProvenanceEntityRole) { - $this->setRole($data[self::FIELD_ROLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRProvenanceEntityRole([FHIRProvenanceEntityRole::FIELD_VALUE => $data[self::FIELD_ROLE]] + $ext)); - } else if (is_array($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRProvenanceEntityRole(array_merge($ext, $data[self::FIELD_ROLE]))); + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReference(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_ROLE]) || isset($data[self::FIELD_ROLE_EXT])) { + if (isset($data[self::FIELD_ROLE])) { + $value = $data[self::FIELD_ROLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) { + $ext = $data[self::FIELD_ROLE_EXT]; } else { - $this->setRole(new FHIRProvenanceEntityRole($data[self::FIELD_ROLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRProvenanceEntityRole) { + $this->setRole($value); + } else if (is_array($value)) { + $this->setRole(new FHIRProvenanceEntityRole(array_merge($ext, $value))); + } else { + $this->setRole(new FHIRProvenanceEntityRole([FHIRProvenanceEntityRole::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRole(new FHIRProvenanceEntityRole($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -435,8 +456,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -553,28 +574,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRProvenanceEntityRole::FIELD_VALUE, $enc)))) { + unset($enc[FHIRProvenanceEntityRole::FIELD_VALUE]); $a[self::FIELD_ROLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponse.php index a9df1684df..1d1c786191 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRQueryResponse extends FHIRBackboneElement const FIELD_TOTAL_EXT = '_total'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Optional Extensions Element - found in all resources. @@ -228,20 +228,27 @@ public function __construct($data = null) $this->addFirst(new FHIRExtension($data[self::FIELD_FIRST])); } } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRUri) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; } else { - $this->setIdentifier(new FHIRUri($data[self::FIELD_IDENTIFIER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRUri($ext)); } } if (isset($data[self::FIELD_LAST])) { @@ -280,20 +287,27 @@ public function __construct($data = null) $this->addNext(new FHIRExtension($data[self::FIELD_NEXT])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRQueryOutcome) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRQueryOutcome([FHIRQueryOutcome::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRQueryOutcome(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; } else { - $this->setOutcome(new FHIRQueryOutcome($data[self::FIELD_OUTCOME])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQueryOutcome) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRQueryOutcome(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRQueryOutcome([FHIRQueryOutcome::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRQueryOutcome($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -350,20 +364,27 @@ public function __construct($data = null) $this->addReference(new FHIRResourceReference($data[self::FIELD_REFERENCE])); } } - if (isset($data[self::FIELD_TOTAL])) { - $ext = (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) - ? $data[self::FIELD_TOTAL_EXT] - : null; - if ($data[self::FIELD_TOTAL] instanceof FHIRInteger) { - $this->setTotal($data[self::FIELD_TOTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_TOTAL]] + $ext)); - } else if (is_array($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRInteger(array_merge($ext, $data[self::FIELD_TOTAL]))); - } + if (isset($data[self::FIELD_TOTAL]) || isset($data[self::FIELD_TOTAL_EXT])) { + if (isset($data[self::FIELD_TOTAL])) { + $value = $data[self::FIELD_TOTAL]; } else { - $this->setTotal(new FHIRInteger($data[self::FIELD_TOTAL])); + $value = null; + } + if (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) { + $ext = $data[self::FIELD_TOTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setTotal($value); + } else if (is_array($value)) { + $this->setTotal(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setTotal(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTotal(new FHIRInteger($ext)); } } } @@ -829,8 +850,8 @@ public function setTotal($total = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1009,44 +1030,89 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getFirst())) { - $a[self::FIELD_FIRST] = $vs; + $a[self::FIELD_FIRST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FIRST][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if ([] !== ($vs = $this->getLast())) { - $a[self::FIELD_LAST] = $vs; + $a[self::FIELD_LAST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LAST][] = $v; + } } if ([] !== ($vs = $this->getNext())) { - $a[self::FIELD_NEXT] = $vs; + $a[self::FIELD_NEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NEXT][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQueryOutcome::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQueryOutcome::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if ([] !== ($vs = $this->getPrevious())) { - $a[self::FIELD_PREVIOUS] = $vs; + $a[self::FIELD_PREVIOUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PREVIOUS][] = $v; + } } if ([] !== ($vs = $this->getReference())) { - $a[self::FIELD_REFERENCE] = $vs; + $a[self::FIELD_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE][] = $v; + } } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_TOTAL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php index 70d88919b7..342a892f2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRQuestionnaireGroup extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of questions and their answers. The Questionnaire may contain @@ -200,20 +200,27 @@ public function __construct($data = null) $this->addGroup(new FHIRQuestionnaireGroup($data[self::FIELD_GROUP])); } } - if (isset($data[self::FIELD_HEADER])) { - $ext = (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) - ? $data[self::FIELD_HEADER_EXT] - : null; - if ($data[self::FIELD_HEADER] instanceof FHIRString) { - $this->setHeader($data[self::FIELD_HEADER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEADER])) { - $this->setHeader(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER]] + $ext)); - } else if (is_array($data[self::FIELD_HEADER])) { - $this->setHeader(new FHIRString(array_merge($ext, $data[self::FIELD_HEADER]))); - } + if (isset($data[self::FIELD_HEADER]) || isset($data[self::FIELD_HEADER_EXT])) { + if (isset($data[self::FIELD_HEADER])) { + $value = $data[self::FIELD_HEADER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) { + $ext = $data[self::FIELD_HEADER_EXT]; } else { - $this->setHeader(new FHIRString($data[self::FIELD_HEADER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHeader($value); + } else if (is_array($value)) { + $this->setHeader(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHeader(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHeader(new FHIRString($ext)); } } if (isset($data[self::FIELD_NAME])) { @@ -248,20 +255,27 @@ public function __construct($data = null) $this->setSubject(new FHIRResourceReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -553,8 +567,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -687,12 +701,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getHeader())) { $a[self::FIELD_HEADER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HEADER_EXT] = $enc; } } @@ -700,18 +722,29 @@ public function jsonSerialize() $a[self::FIELD_NAME] = $v; } if ([] !== ($vs = $this->getQuestion())) { - $a[self::FIELD_QUESTION] = $vs; + $a[self::FIELD_QUESTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUESTION][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php index 88de47514c..991597a68a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -165,7 +165,7 @@ class FHIRQuestionnaireQuestion extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -638,116 +638,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ANSWER_BOOLEAN])) { - $ext = (isset($data[self::FIELD_ANSWER_BOOLEAN_EXT]) && is_array($data[self::FIELD_ANSWER_BOOLEAN_EXT])) - ? $data[self::FIELD_ANSWER_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_ANSWER_BOOLEAN] instanceof FHIRBoolean) { - $this->setAnswerBoolean($data[self::FIELD_ANSWER_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_BOOLEAN])) { - $this->setAnswerBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ANSWER_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_BOOLEAN])) { - $this->setAnswerBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ANSWER_BOOLEAN]))); - } + if (isset($data[self::FIELD_ANSWER_BOOLEAN]) || isset($data[self::FIELD_ANSWER_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_ANSWER_BOOLEAN])) { + $value = $data[self::FIELD_ANSWER_BOOLEAN]; } else { - $this->setAnswerBoolean(new FHIRBoolean($data[self::FIELD_ANSWER_BOOLEAN])); + $value = null; } - } - if (isset($data[self::FIELD_ANSWER_DATE])) { - $ext = (isset($data[self::FIELD_ANSWER_DATE_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_EXT])) - ? $data[self::FIELD_ANSWER_DATE_EXT] - : null; - if ($data[self::FIELD_ANSWER_DATE] instanceof FHIRDate) { - $this->setAnswerDate($data[self::FIELD_ANSWER_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_DATE])) { - $this->setAnswerDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_ANSWER_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_DATE])) { - $this->setAnswerDate(new FHIRDate(array_merge($ext, $data[self::FIELD_ANSWER_DATE]))); - } + if (isset($data[self::FIELD_ANSWER_BOOLEAN_EXT]) && is_array($data[self::FIELD_ANSWER_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_ANSWER_BOOLEAN_EXT]; } else { - $this->setAnswerDate(new FHIRDate($data[self::FIELD_ANSWER_DATE])); + $ext = []; } - } - if (isset($data[self::FIELD_ANSWER_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ANSWER_DATE_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_TIME_EXT])) - ? $data[self::FIELD_ANSWER_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ANSWER_DATE_TIME] instanceof FHIRDateTime) { - $this->setAnswerDateTime($data[self::FIELD_ANSWER_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_DATE_TIME])) { - $this->setAnswerDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ANSWER_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_DATE_TIME])) { - $this->setAnswerDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ANSWER_DATE_TIME]))); + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAnswerBoolean($value); + } else if (is_array($value)) { + $this->setAnswerBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAnswerBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setAnswerDateTime(new FHIRDateTime($data[self::FIELD_ANSWER_DATE_TIME])); + } else if ([] !== $ext) { + $this->setAnswerBoolean(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_ANSWER_DECIMAL])) { - $ext = (isset($data[self::FIELD_ANSWER_DECIMAL_EXT]) && is_array($data[self::FIELD_ANSWER_DECIMAL_EXT])) - ? $data[self::FIELD_ANSWER_DECIMAL_EXT] - : null; - if ($data[self::FIELD_ANSWER_DECIMAL] instanceof FHIRDecimal) { - $this->setAnswerDecimal($data[self::FIELD_ANSWER_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_DECIMAL])) { - $this->setAnswerDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ANSWER_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_DECIMAL])) { - $this->setAnswerDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ANSWER_DECIMAL]))); - } + if (isset($data[self::FIELD_ANSWER_DATE]) || isset($data[self::FIELD_ANSWER_DATE_EXT])) { + if (isset($data[self::FIELD_ANSWER_DATE])) { + $value = $data[self::FIELD_ANSWER_DATE]; } else { - $this->setAnswerDecimal(new FHIRDecimal($data[self::FIELD_ANSWER_DECIMAL])); + $value = null; } - } - if (isset($data[self::FIELD_ANSWER_INSTANT])) { - $ext = (isset($data[self::FIELD_ANSWER_INSTANT_EXT]) && is_array($data[self::FIELD_ANSWER_INSTANT_EXT])) - ? $data[self::FIELD_ANSWER_INSTANT_EXT] - : null; - if ($data[self::FIELD_ANSWER_INSTANT] instanceof FHIRInstant) { - $this->setAnswerInstant($data[self::FIELD_ANSWER_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_INSTANT])) { - $this->setAnswerInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_ANSWER_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_INSTANT])) { - $this->setAnswerInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_ANSWER_INSTANT]))); + if (isset($data[self::FIELD_ANSWER_DATE_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_EXT])) { + $ext = $data[self::FIELD_ANSWER_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setAnswerDate($value); + } else if (is_array($value)) { + $this->setAnswerDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setAnswerDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAnswerDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_ANSWER_DATE_TIME]) || isset($data[self::FIELD_ANSWER_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ANSWER_DATE_TIME])) { + $value = $data[self::FIELD_ANSWER_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_DATE_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ANSWER_DATE_TIME_EXT]; } else { - $this->setAnswerInstant(new FHIRInstant($data[self::FIELD_ANSWER_INSTANT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAnswerDateTime($value); + } else if (is_array($value)) { + $this->setAnswerDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAnswerDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerDateTime(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_ANSWER_INTEGER])) { - $ext = (isset($data[self::FIELD_ANSWER_INTEGER_EXT]) && is_array($data[self::FIELD_ANSWER_INTEGER_EXT])) - ? $data[self::FIELD_ANSWER_INTEGER_EXT] - : null; - if ($data[self::FIELD_ANSWER_INTEGER] instanceof FHIRInteger) { - $this->setAnswerInteger($data[self::FIELD_ANSWER_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_INTEGER])) { - $this->setAnswerInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_ANSWER_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_INTEGER])) { - $this->setAnswerInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_ANSWER_INTEGER]))); + if (isset($data[self::FIELD_ANSWER_DECIMAL]) || isset($data[self::FIELD_ANSWER_DECIMAL_EXT])) { + if (isset($data[self::FIELD_ANSWER_DECIMAL])) { + $value = $data[self::FIELD_ANSWER_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_DECIMAL_EXT]) && is_array($data[self::FIELD_ANSWER_DECIMAL_EXT])) { + $ext = $data[self::FIELD_ANSWER_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAnswerDecimal($value); + } else if (is_array($value)) { + $this->setAnswerDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAnswerDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAnswerDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_ANSWER_INSTANT]) || isset($data[self::FIELD_ANSWER_INSTANT_EXT])) { + if (isset($data[self::FIELD_ANSWER_INSTANT])) { + $value = $data[self::FIELD_ANSWER_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_INSTANT_EXT]) && is_array($data[self::FIELD_ANSWER_INSTANT_EXT])) { + $ext = $data[self::FIELD_ANSWER_INSTANT_EXT]; } else { - $this->setAnswerInteger(new FHIRInteger($data[self::FIELD_ANSWER_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setAnswerInstant($value); + } else if (is_array($value)) { + $this->setAnswerInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setAnswerInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_ANSWER_STRING])) { - $ext = (isset($data[self::FIELD_ANSWER_STRING_EXT]) && is_array($data[self::FIELD_ANSWER_STRING_EXT])) - ? $data[self::FIELD_ANSWER_STRING_EXT] - : null; - if ($data[self::FIELD_ANSWER_STRING] instanceof FHIRString) { - $this->setAnswerString($data[self::FIELD_ANSWER_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_STRING])) { - $this->setAnswerString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ANSWER_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_STRING])) { - $this->setAnswerString(new FHIRString(array_merge($ext, $data[self::FIELD_ANSWER_STRING]))); + if (isset($data[self::FIELD_ANSWER_INTEGER]) || isset($data[self::FIELD_ANSWER_INTEGER_EXT])) { + if (isset($data[self::FIELD_ANSWER_INTEGER])) { + $value = $data[self::FIELD_ANSWER_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_INTEGER_EXT]) && is_array($data[self::FIELD_ANSWER_INTEGER_EXT])) { + $ext = $data[self::FIELD_ANSWER_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setAnswerInteger($value); + } else if (is_array($value)) { + $this->setAnswerInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setAnswerInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAnswerInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_ANSWER_STRING]) || isset($data[self::FIELD_ANSWER_STRING_EXT])) { + if (isset($data[self::FIELD_ANSWER_STRING])) { + $value = $data[self::FIELD_ANSWER_STRING]; } else { - $this->setAnswerString(new FHIRString($data[self::FIELD_ANSWER_STRING])); + $value = null; + } + if (isset($data[self::FIELD_ANSWER_STRING_EXT]) && is_array($data[self::FIELD_ANSWER_STRING_EXT])) { + $ext = $data[self::FIELD_ANSWER_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAnswerString($value); + } else if (is_array($value)) { + $this->setAnswerString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAnswerString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerString(new FHIRString($ext)); } } if (isset($data[self::FIELD_CHOICE])) { @@ -782,52 +831,73 @@ public function __construct($data = null) $this->setDataAttachment(new FHIRAttachment($data[self::FIELD_DATA_ATTACHMENT])); } } - if (isset($data[self::FIELD_DATA_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_DATA_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DATA_BASE_64BINARY_EXT])) - ? $data[self::FIELD_DATA_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_DATA_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setDataBase64Binary($data[self::FIELD_DATA_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_BASE_64BINARY])) { - $this->setDataBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DATA_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_BASE_64BINARY])) { - $this->setDataBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DATA_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_DATA_BASE_64BINARY]) || isset($data[self::FIELD_DATA_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_DATA_BASE_64BINARY])) { + $value = $data[self::FIELD_DATA_BASE_64BINARY]; } else { - $this->setDataBase64Binary(new FHIRBase64Binary($data[self::FIELD_DATA_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_DATA_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DATA_BOOLEAN_EXT]) && is_array($data[self::FIELD_DATA_BOOLEAN_EXT])) - ? $data[self::FIELD_DATA_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DATA_BOOLEAN] instanceof FHIRBoolean) { - $this->setDataBoolean($data[self::FIELD_DATA_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_BOOLEAN])) { - $this->setDataBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DATA_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_BOOLEAN])) { - $this->setDataBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DATA_BOOLEAN]))); - } + if (isset($data[self::FIELD_DATA_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DATA_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_DATA_BASE_64BINARY_EXT]; } else { - $this->setDataBoolean(new FHIRBoolean($data[self::FIELD_DATA_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setDataBase64Binary($value); + } else if (is_array($value)) { + $this->setDataBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setDataBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDataBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_DATA_CODE])) { - $ext = (isset($data[self::FIELD_DATA_CODE_EXT]) && is_array($data[self::FIELD_DATA_CODE_EXT])) - ? $data[self::FIELD_DATA_CODE_EXT] - : null; - if ($data[self::FIELD_DATA_CODE] instanceof FHIRCode) { - $this->setDataCode($data[self::FIELD_DATA_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_CODE])) { - $this->setDataCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_DATA_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_CODE])) { - $this->setDataCode(new FHIRCode(array_merge($ext, $data[self::FIELD_DATA_CODE]))); + if (isset($data[self::FIELD_DATA_BOOLEAN]) || isset($data[self::FIELD_DATA_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DATA_BOOLEAN])) { + $value = $data[self::FIELD_DATA_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_BOOLEAN_EXT]) && is_array($data[self::FIELD_DATA_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DATA_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDataBoolean($value); + } else if (is_array($value)) { + $this->setDataBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDataBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDataBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DATA_CODE]) || isset($data[self::FIELD_DATA_CODE_EXT])) { + if (isset($data[self::FIELD_DATA_CODE])) { + $value = $data[self::FIELD_DATA_CODE]; } else { - $this->setDataCode(new FHIRCode($data[self::FIELD_DATA_CODE])); + $value = null; + } + if (isset($data[self::FIELD_DATA_CODE_EXT]) && is_array($data[self::FIELD_DATA_CODE_EXT])) { + $ext = $data[self::FIELD_DATA_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setDataCode($value); + } else if (is_array($value)) { + $this->setDataCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setDataCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDataCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DATA_CODEABLE_CONCEPT])) { @@ -851,52 +921,73 @@ public function __construct($data = null) $this->setDataContact(new FHIRContact($data[self::FIELD_DATA_CONTACT])); } } - if (isset($data[self::FIELD_DATA_DATE])) { - $ext = (isset($data[self::FIELD_DATA_DATE_EXT]) && is_array($data[self::FIELD_DATA_DATE_EXT])) - ? $data[self::FIELD_DATA_DATE_EXT] - : null; - if ($data[self::FIELD_DATA_DATE] instanceof FHIRDate) { - $this->setDataDate($data[self::FIELD_DATA_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_DATE])) { - $this->setDataDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATA_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_DATE])) { - $this->setDataDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATA_DATE]))); - } + if (isset($data[self::FIELD_DATA_DATE]) || isset($data[self::FIELD_DATA_DATE_EXT])) { + if (isset($data[self::FIELD_DATA_DATE])) { + $value = $data[self::FIELD_DATA_DATE]; } else { - $this->setDataDate(new FHIRDate($data[self::FIELD_DATA_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DATA_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATA_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATA_DATE_TIME_EXT])) - ? $data[self::FIELD_DATA_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATA_DATE_TIME] instanceof FHIRDateTime) { - $this->setDataDateTime($data[self::FIELD_DATA_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_DATE_TIME])) { - $this->setDataDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATA_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_DATE_TIME])) { - $this->setDataDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATA_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATA_DATE_EXT]) && is_array($data[self::FIELD_DATA_DATE_EXT])) { + $ext = $data[self::FIELD_DATA_DATE_EXT]; } else { - $this->setDataDateTime(new FHIRDateTime($data[self::FIELD_DATA_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDataDate($value); + } else if (is_array($value)) { + $this->setDataDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDataDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDataDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_DATA_DECIMAL])) { - $ext = (isset($data[self::FIELD_DATA_DECIMAL_EXT]) && is_array($data[self::FIELD_DATA_DECIMAL_EXT])) - ? $data[self::FIELD_DATA_DECIMAL_EXT] - : null; - if ($data[self::FIELD_DATA_DECIMAL] instanceof FHIRDecimal) { - $this->setDataDecimal($data[self::FIELD_DATA_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_DECIMAL])) { - $this->setDataDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DATA_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_DECIMAL])) { - $this->setDataDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DATA_DECIMAL]))); + if (isset($data[self::FIELD_DATA_DATE_TIME]) || isset($data[self::FIELD_DATA_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATA_DATE_TIME])) { + $value = $data[self::FIELD_DATA_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATA_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATA_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDataDateTime($value); + } else if (is_array($value)) { + $this->setDataDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDataDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDataDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DATA_DECIMAL]) || isset($data[self::FIELD_DATA_DECIMAL_EXT])) { + if (isset($data[self::FIELD_DATA_DECIMAL])) { + $value = $data[self::FIELD_DATA_DECIMAL]; } else { - $this->setDataDecimal(new FHIRDecimal($data[self::FIELD_DATA_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_DATA_DECIMAL_EXT]) && is_array($data[self::FIELD_DATA_DECIMAL_EXT])) { + $ext = $data[self::FIELD_DATA_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDataDecimal($value); + } else if (is_array($value)) { + $this->setDataDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDataDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDataDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_DATA_HUMAN_NAME])) { @@ -906,20 +997,27 @@ public function __construct($data = null) $this->setDataHumanName(new FHIRHumanName($data[self::FIELD_DATA_HUMAN_NAME])); } } - if (isset($data[self::FIELD_DATA_ID])) { - $ext = (isset($data[self::FIELD_DATA_ID_EXT]) && is_array($data[self::FIELD_DATA_ID_EXT])) - ? $data[self::FIELD_DATA_ID_EXT] - : null; - if ($data[self::FIELD_DATA_ID] instanceof FHIRId) { - $this->setDataId($data[self::FIELD_DATA_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_ID])) { - $this->setDataId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_DATA_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_ID])) { - $this->setDataId(new FHIRId(array_merge($ext, $data[self::FIELD_DATA_ID]))); - } + if (isset($data[self::FIELD_DATA_ID]) || isset($data[self::FIELD_DATA_ID_EXT])) { + if (isset($data[self::FIELD_DATA_ID])) { + $value = $data[self::FIELD_DATA_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_ID_EXT]) && is_array($data[self::FIELD_DATA_ID_EXT])) { + $ext = $data[self::FIELD_DATA_ID_EXT]; } else { - $this->setDataId(new FHIRId($data[self::FIELD_DATA_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setDataId($value); + } else if (is_array($value)) { + $this->setDataId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setDataId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDataId(new FHIRId($ext)); } } if (isset($data[self::FIELD_DATA_IDENTIFIER])) { @@ -929,52 +1027,73 @@ public function __construct($data = null) $this->setDataIdentifier(new FHIRIdentifier($data[self::FIELD_DATA_IDENTIFIER])); } } - if (isset($data[self::FIELD_DATA_INSTANT])) { - $ext = (isset($data[self::FIELD_DATA_INSTANT_EXT]) && is_array($data[self::FIELD_DATA_INSTANT_EXT])) - ? $data[self::FIELD_DATA_INSTANT_EXT] - : null; - if ($data[self::FIELD_DATA_INSTANT] instanceof FHIRInstant) { - $this->setDataInstant($data[self::FIELD_DATA_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_INSTANT])) { - $this->setDataInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_DATA_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_INSTANT])) { - $this->setDataInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_DATA_INSTANT]))); - } + if (isset($data[self::FIELD_DATA_INSTANT]) || isset($data[self::FIELD_DATA_INSTANT_EXT])) { + if (isset($data[self::FIELD_DATA_INSTANT])) { + $value = $data[self::FIELD_DATA_INSTANT]; } else { - $this->setDataInstant(new FHIRInstant($data[self::FIELD_DATA_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_DATA_INTEGER])) { - $ext = (isset($data[self::FIELD_DATA_INTEGER_EXT]) && is_array($data[self::FIELD_DATA_INTEGER_EXT])) - ? $data[self::FIELD_DATA_INTEGER_EXT] - : null; - if ($data[self::FIELD_DATA_INTEGER] instanceof FHIRInteger) { - $this->setDataInteger($data[self::FIELD_DATA_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_INTEGER])) { - $this->setDataInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DATA_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_INTEGER])) { - $this->setDataInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_DATA_INTEGER]))); - } + if (isset($data[self::FIELD_DATA_INSTANT_EXT]) && is_array($data[self::FIELD_DATA_INSTANT_EXT])) { + $ext = $data[self::FIELD_DATA_INSTANT_EXT]; } else { - $this->setDataInteger(new FHIRInteger($data[self::FIELD_DATA_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setDataInstant($value); + } else if (is_array($value)) { + $this->setDataInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setDataInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDataInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_DATA_OID])) { - $ext = (isset($data[self::FIELD_DATA_OID_EXT]) && is_array($data[self::FIELD_DATA_OID_EXT])) - ? $data[self::FIELD_DATA_OID_EXT] - : null; - if ($data[self::FIELD_DATA_OID] instanceof FHIROid) { - $this->setDataOid($data[self::FIELD_DATA_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_OID])) { - $this->setDataOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_DATA_OID]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_OID])) { - $this->setDataOid(new FHIROid(array_merge($ext, $data[self::FIELD_DATA_OID]))); + if (isset($data[self::FIELD_DATA_INTEGER]) || isset($data[self::FIELD_DATA_INTEGER_EXT])) { + if (isset($data[self::FIELD_DATA_INTEGER])) { + $value = $data[self::FIELD_DATA_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_INTEGER_EXT]) && is_array($data[self::FIELD_DATA_INTEGER_EXT])) { + $ext = $data[self::FIELD_DATA_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDataInteger($value); + } else if (is_array($value)) { + $this->setDataInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDataInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDataInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_DATA_OID]) || isset($data[self::FIELD_DATA_OID_EXT])) { + if (isset($data[self::FIELD_DATA_OID])) { + $value = $data[self::FIELD_DATA_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_OID_EXT]) && is_array($data[self::FIELD_DATA_OID_EXT])) { + $ext = $data[self::FIELD_DATA_OID_EXT]; } else { - $this->setDataOid(new FHIROid($data[self::FIELD_DATA_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setDataOid($value); + } else if (is_array($value)) { + $this->setDataOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setDataOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDataOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_DATA_PERIOD])) { @@ -1026,52 +1145,73 @@ public function __construct($data = null) $this->setDataSchedule(new FHIRSchedule($data[self::FIELD_DATA_SCHEDULE])); } } - if (isset($data[self::FIELD_DATA_STRING])) { - $ext = (isset($data[self::FIELD_DATA_STRING_EXT]) && is_array($data[self::FIELD_DATA_STRING_EXT])) - ? $data[self::FIELD_DATA_STRING_EXT] - : null; - if ($data[self::FIELD_DATA_STRING] instanceof FHIRString) { - $this->setDataString($data[self::FIELD_DATA_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_STRING])) { - $this->setDataString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DATA_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_STRING])) { - $this->setDataString(new FHIRString(array_merge($ext, $data[self::FIELD_DATA_STRING]))); - } + if (isset($data[self::FIELD_DATA_STRING]) || isset($data[self::FIELD_DATA_STRING_EXT])) { + if (isset($data[self::FIELD_DATA_STRING])) { + $value = $data[self::FIELD_DATA_STRING]; } else { - $this->setDataString(new FHIRString($data[self::FIELD_DATA_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_DATA_URI])) { - $ext = (isset($data[self::FIELD_DATA_URI_EXT]) && is_array($data[self::FIELD_DATA_URI_EXT])) - ? $data[self::FIELD_DATA_URI_EXT] - : null; - if ($data[self::FIELD_DATA_URI] instanceof FHIRUri) { - $this->setDataUri($data[self::FIELD_DATA_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_URI])) { - $this->setDataUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DATA_URI]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_URI])) { - $this->setDataUri(new FHIRUri(array_merge($ext, $data[self::FIELD_DATA_URI]))); - } + if (isset($data[self::FIELD_DATA_STRING_EXT]) && is_array($data[self::FIELD_DATA_STRING_EXT])) { + $ext = $data[self::FIELD_DATA_STRING_EXT]; } else { - $this->setDataUri(new FHIRUri($data[self::FIELD_DATA_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDataString($value); + } else if (is_array($value)) { + $this->setDataString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDataString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDataString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_DATA_UUID])) { - $ext = (isset($data[self::FIELD_DATA_UUID_EXT]) && is_array($data[self::FIELD_DATA_UUID_EXT])) - ? $data[self::FIELD_DATA_UUID_EXT] - : null; - if ($data[self::FIELD_DATA_UUID] instanceof FHIRUuid) { - $this->setDataUuid($data[self::FIELD_DATA_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA_UUID])) { - $this->setDataUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_DATA_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_DATA_UUID])) { - $this->setDataUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_DATA_UUID]))); + if (isset($data[self::FIELD_DATA_URI]) || isset($data[self::FIELD_DATA_URI_EXT])) { + if (isset($data[self::FIELD_DATA_URI])) { + $value = $data[self::FIELD_DATA_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_URI_EXT]) && is_array($data[self::FIELD_DATA_URI_EXT])) { + $ext = $data[self::FIELD_DATA_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDataUri($value); + } else if (is_array($value)) { + $this->setDataUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDataUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDataUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DATA_UUID]) || isset($data[self::FIELD_DATA_UUID_EXT])) { + if (isset($data[self::FIELD_DATA_UUID])) { + $value = $data[self::FIELD_DATA_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_UUID_EXT]) && is_array($data[self::FIELD_DATA_UUID_EXT])) { + $ext = $data[self::FIELD_DATA_UUID_EXT]; } else { - $this->setDataUuid(new FHIRUuid($data[self::FIELD_DATA_UUID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setDataUuid($value); + } else if (is_array($value)) { + $this->setDataUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setDataUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDataUuid(new FHIRUuid($ext)); } } if (isset($data[self::FIELD_GROUP])) { @@ -1106,36 +1246,50 @@ public function __construct($data = null) $this->setOptions(new FHIRResourceReference($data[self::FIELD_OPTIONS])); } } - if (isset($data[self::FIELD_REMARKS])) { - $ext = (isset($data[self::FIELD_REMARKS_EXT]) && is_array($data[self::FIELD_REMARKS_EXT])) - ? $data[self::FIELD_REMARKS_EXT] - : null; - if ($data[self::FIELD_REMARKS] instanceof FHIRString) { - $this->setRemarks($data[self::FIELD_REMARKS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REMARKS])) { - $this->setRemarks(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REMARKS]] + $ext)); - } else if (is_array($data[self::FIELD_REMARKS])) { - $this->setRemarks(new FHIRString(array_merge($ext, $data[self::FIELD_REMARKS]))); - } + if (isset($data[self::FIELD_REMARKS]) || isset($data[self::FIELD_REMARKS_EXT])) { + if (isset($data[self::FIELD_REMARKS])) { + $value = $data[self::FIELD_REMARKS]; } else { - $this->setRemarks(new FHIRString($data[self::FIELD_REMARKS])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + if (isset($data[self::FIELD_REMARKS_EXT]) && is_array($data[self::FIELD_REMARKS_EXT])) { + $ext = $data[self::FIELD_REMARKS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRemarks($value); + } else if (is_array($value)) { + $this->setRemarks(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRemarks(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRemarks(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -2613,8 +2767,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -3112,55 +3266,75 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAnswerBoolean())) { $a[self::FIELD_ANSWER_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ANSWER_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getAnswerDate())) { $a[self::FIELD_ANSWER_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_ANSWER_DATE_EXT] = $enc; } } if (null !== ($v = $this->getAnswerDateTime())) { $a[self::FIELD_ANSWER_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ANSWER_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getAnswerDecimal())) { $a[self::FIELD_ANSWER_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ANSWER_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getAnswerInstant())) { $a[self::FIELD_ANSWER_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_ANSWER_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getAnswerInteger())) { $a[self::FIELD_ANSWER_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_ANSWER_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getAnswerString())) { $a[self::FIELD_ANSWER_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ANSWER_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getChoice())) { - $a[self::FIELD_CHOICE] = $vs; + $a[self::FIELD_CHOICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHOICE][] = $v; + } } if (null !== ($v = $this->getDataAddress())) { $a[self::FIELD_DATA_ADDRESS] = $v; @@ -3170,22 +3344,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDataBase64Binary())) { $a[self::FIELD_DATA_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DATA_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getDataBoolean())) { $a[self::FIELD_DATA_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DATA_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDataCode())) { $a[self::FIELD_DATA_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_DATA_CODE_EXT] = $enc; } } @@ -3200,22 +3380,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDataDate())) { $a[self::FIELD_DATA_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATA_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDataDateTime())) { $a[self::FIELD_DATA_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATA_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDataDecimal())) { $a[self::FIELD_DATA_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DATA_DECIMAL_EXT] = $enc; } } @@ -3224,8 +3410,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDataId())) { $a[self::FIELD_DATA_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_DATA_ID_EXT] = $enc; } } @@ -3234,22 +3422,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDataInstant())) { $a[self::FIELD_DATA_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_DATA_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getDataInteger())) { $a[self::FIELD_DATA_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DATA_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getDataOid())) { $a[self::FIELD_DATA_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_DATA_OID_EXT] = $enc; } } @@ -3276,27 +3470,39 @@ public function jsonSerialize() } if (null !== ($v = $this->getDataString())) { $a[self::FIELD_DATA_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DATA_STRING_EXT] = $enc; } } if (null !== ($v = $this->getDataUri())) { $a[self::FIELD_DATA_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DATA_URI_EXT] = $enc; } } if (null !== ($v = $this->getDataUuid())) { $a[self::FIELD_DATA_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_DATA_UUID_EXT] = $enc; } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v; @@ -3306,18 +3512,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getRemarks())) { $a[self::FIELD_REMARKS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REMARKS_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource.php index b1d948acb8..0eec75e073 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRResource extends FHIRBackboneElement const FIELD_TEXT = 'text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Contained, inline Resources. These resources do not have an independent @@ -157,20 +157,27 @@ public function __construct($data = null) $this->addContained($data[self::FIELD_CONTAINED]); } } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); - } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_TEXT])) { @@ -351,8 +358,8 @@ public function setText(FHIRNarrative $text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -455,18 +462,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContained())) { - $a[self::FIELD_CONTAINED] = $vs; + $a[self::FIELD_CONTAINED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINED][] = $v; + } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReaction.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReaction.php index d153def35e..1d9e2dd6b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRAdverseReaction extends FHIRResource implements PHPFHIRContainedTypeIn const FIELD_SYMPTOM = 'symptom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -195,36 +195,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DID_NOT_OCCUR_FLAG])) { - $ext = (isset($data[self::FIELD_DID_NOT_OCCUR_FLAG_EXT]) && is_array($data[self::FIELD_DID_NOT_OCCUR_FLAG_EXT])) - ? $data[self::FIELD_DID_NOT_OCCUR_FLAG_EXT] - : null; - if ($data[self::FIELD_DID_NOT_OCCUR_FLAG] instanceof FHIRBoolean) { - $this->setDidNotOccurFlag($data[self::FIELD_DID_NOT_OCCUR_FLAG]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DID_NOT_OCCUR_FLAG])) { - $this->setDidNotOccurFlag(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DID_NOT_OCCUR_FLAG]] + $ext)); - } else if (is_array($data[self::FIELD_DID_NOT_OCCUR_FLAG])) { - $this->setDidNotOccurFlag(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DID_NOT_OCCUR_FLAG]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DID_NOT_OCCUR_FLAG]) || isset($data[self::FIELD_DID_NOT_OCCUR_FLAG_EXT])) { + if (isset($data[self::FIELD_DID_NOT_OCCUR_FLAG])) { + $value = $data[self::FIELD_DID_NOT_OCCUR_FLAG]; } else { - $this->setDidNotOccurFlag(new FHIRBoolean($data[self::FIELD_DID_NOT_OCCUR_FLAG])); + $value = null; + } + if (isset($data[self::FIELD_DID_NOT_OCCUR_FLAG_EXT]) && is_array($data[self::FIELD_DID_NOT_OCCUR_FLAG_EXT])) { + $ext = $data[self::FIELD_DID_NOT_OCCUR_FLAG_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDidNotOccurFlag($value); + } else if (is_array($value)) { + $this->setDidNotOccurFlag(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDidNotOccurFlag(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDidNotOccurFlag(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_EXPOSURE])) { @@ -641,8 +655,8 @@ public function setSymptom(array $symptom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -789,23 +803,39 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDidNotOccurFlag())) { $a[self::FIELD_DID_NOT_OCCUR_FLAG] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DID_NOT_OCCUR_FLAG_EXT] = $enc; } } if ([] !== ($vs = $this->getExposure())) { - $a[self::FIELD_EXPOSURE] = $vs; + $a[self::FIELD_EXPOSURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXPOSURE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getRecorder())) { $a[self::FIELD_RECORDER] = $v; @@ -814,7 +844,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSymptom())) { - $a[self::FIELD_SYMPTOM] = $vs; + $a[self::FIELD_SYMPTOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SYMPTOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlert.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlert.php index 5c887a7a69..c2dc202a06 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlert.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRAlert extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -212,36 +212,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NOTE])) { - $ext = (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) - ? $data[self::FIELD_NOTE_EXT] - : null; - if ($data[self::FIELD_NOTE] instanceof FHIRString) { - $this->setNote($data[self::FIELD_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString(array_merge($ext, $data[self::FIELD_NOTE]))); - } + if (isset($data[self::FIELD_NOTE]) || isset($data[self::FIELD_NOTE_EXT])) { + if (isset($data[self::FIELD_NOTE])) { + $value = $data[self::FIELD_NOTE]; } else { - $this->setNote(new FHIRString($data[self::FIELD_NOTE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRAlertStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAlertStatus([FHIRAlertStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAlertStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) { + $ext = $data[self::FIELD_NOTE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNote($value); + } else if (is_array($value)) { + $this->setNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNote(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRAlertStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAlertStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRAlertStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRAlertStatus([FHIRAlertStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRAlertStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -505,8 +519,8 @@ public function setSubject(FHIRResourceReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -630,25 +644,38 @@ public function jsonSerialize() $a[self::FIELD_CATEGORY] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAlertStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAlertStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntolerance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntolerance.php index 2a09d36b3f..de26110c22 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntolerance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntolerance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRAllergyIntolerance extends FHIRResource implements PHPFHIRContainedTyp const FIELD_SUBSTANCE = 'substance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The criticality of an adverse sensitivity @@ -232,20 +232,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CRITICALITY])) { - $ext = (isset($data[self::FIELD_CRITICALITY_EXT]) && is_array($data[self::FIELD_CRITICALITY_EXT])) - ? $data[self::FIELD_CRITICALITY_EXT] - : null; - if ($data[self::FIELD_CRITICALITY] instanceof FHIRCriticality) { - $this->setCriticality($data[self::FIELD_CRITICALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITICALITY])) { - $this->setCriticality(new FHIRCriticality([FHIRCriticality::FIELD_VALUE => $data[self::FIELD_CRITICALITY]] + $ext)); - } else if (is_array($data[self::FIELD_CRITICALITY])) { - $this->setCriticality(new FHIRCriticality(array_merge($ext, $data[self::FIELD_CRITICALITY]))); - } + if (isset($data[self::FIELD_CRITICALITY]) || isset($data[self::FIELD_CRITICALITY_EXT])) { + if (isset($data[self::FIELD_CRITICALITY])) { + $value = $data[self::FIELD_CRITICALITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CRITICALITY_EXT]) && is_array($data[self::FIELD_CRITICALITY_EXT])) { + $ext = $data[self::FIELD_CRITICALITY_EXT]; } else { - $this->setCriticality(new FHIRCriticality($data[self::FIELD_CRITICALITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCriticality) { + $this->setCriticality($value); + } else if (is_array($value)) { + $this->setCriticality(new FHIRCriticality(array_merge($ext, $value))); + } else { + $this->setCriticality(new FHIRCriticality([FHIRCriticality::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCriticality(new FHIRCriticality($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -284,20 +291,27 @@ public function __construct($data = null) $this->addReaction(new FHIRResourceReference($data[self::FIELD_REACTION])); } } - if (isset($data[self::FIELD_RECORDED_DATE])) { - $ext = (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) - ? $data[self::FIELD_RECORDED_DATE_EXT] - : null; - if ($data[self::FIELD_RECORDED_DATE] instanceof FHIRDateTime) { - $this->setRecordedDate($data[self::FIELD_RECORDED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED_DATE]))); - } + if (isset($data[self::FIELD_RECORDED_DATE]) || isset($data[self::FIELD_RECORDED_DATE_EXT])) { + if (isset($data[self::FIELD_RECORDED_DATE])) { + $value = $data[self::FIELD_RECORDED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) { + $ext = $data[self::FIELD_RECORDED_DATE_EXT]; } else { - $this->setRecordedDate(new FHIRDateTime($data[self::FIELD_RECORDED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecordedDate($value); + } else if (is_array($value)) { + $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecordedDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_RECORDER])) { @@ -325,36 +339,50 @@ public function __construct($data = null) $this->addSensitivityTest(new FHIRResourceReference($data[self::FIELD_SENSITIVITY_TEST])); } } - if (isset($data[self::FIELD_SENSITIVITY_TYPE])) { - $ext = (isset($data[self::FIELD_SENSITIVITY_TYPE_EXT]) && is_array($data[self::FIELD_SENSITIVITY_TYPE_EXT])) - ? $data[self::FIELD_SENSITIVITY_TYPE_EXT] - : null; - if ($data[self::FIELD_SENSITIVITY_TYPE] instanceof FHIRSensitivityType) { - $this->setSensitivityType($data[self::FIELD_SENSITIVITY_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SENSITIVITY_TYPE])) { - $this->setSensitivityType(new FHIRSensitivityType([FHIRSensitivityType::FIELD_VALUE => $data[self::FIELD_SENSITIVITY_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_SENSITIVITY_TYPE])) { - $this->setSensitivityType(new FHIRSensitivityType(array_merge($ext, $data[self::FIELD_SENSITIVITY_TYPE]))); - } + if (isset($data[self::FIELD_SENSITIVITY_TYPE]) || isset($data[self::FIELD_SENSITIVITY_TYPE_EXT])) { + if (isset($data[self::FIELD_SENSITIVITY_TYPE])) { + $value = $data[self::FIELD_SENSITIVITY_TYPE]; } else { - $this->setSensitivityType(new FHIRSensitivityType($data[self::FIELD_SENSITIVITY_TYPE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSensitivityStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSensitivityStatus([FHIRSensitivityStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSensitivityStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_SENSITIVITY_TYPE_EXT]) && is_array($data[self::FIELD_SENSITIVITY_TYPE_EXT])) { + $ext = $data[self::FIELD_SENSITIVITY_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSensitivityType) { + $this->setSensitivityType($value); + } else if (is_array($value)) { + $this->setSensitivityType(new FHIRSensitivityType(array_merge($ext, $value))); + } else { + $this->setSensitivityType(new FHIRSensitivityType([FHIRSensitivityType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSensitivityType(new FHIRSensitivityType($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSensitivityStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSensitivityStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSensitivityStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSensitivityStatus([FHIRSensitivityStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSensitivityStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -799,8 +827,8 @@ public function setSubstance(FHIRResourceReference $substance = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -957,21 +985,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCriticality())) { $a[self::FIELD_CRITICALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCriticality::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCriticality::FIELD_VALUE]); $a[self::FIELD_CRITICALITY_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getReaction())) { - $a[self::FIELD_REACTION] = $vs; + $a[self::FIELD_REACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REACTION][] = $v; + } } if (null !== ($v = $this->getRecordedDate())) { $a[self::FIELD_RECORDED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_DATE_EXT] = $enc; } } @@ -979,19 +1023,29 @@ public function jsonSerialize() $a[self::FIELD_RECORDER] = $v; } if ([] !== ($vs = $this->getSensitivityTest())) { - $a[self::FIELD_SENSITIVITY_TEST] = $vs; + $a[self::FIELD_SENSITIVITY_TEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SENSITIVITY_TEST][] = $v; + } } if (null !== ($v = $this->getSensitivityType())) { $a[self::FIELD_SENSITIVITY_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSensitivityType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSensitivityType::FIELD_VALUE]); $a[self::FIELD_SENSITIVITY_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSensitivityStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSensitivityStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1001,6 +1055,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubstance())) { $a[self::FIELD_SUBSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlan.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlan.php index 801298ffa3..443324a0b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRCarePlan extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the intention of how one or more practitioners intend to deliver care @@ -313,36 +313,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MODIFIED])) { - $ext = (isset($data[self::FIELD_MODIFIED_EXT]) && is_array($data[self::FIELD_MODIFIED_EXT])) - ? $data[self::FIELD_MODIFIED_EXT] - : null; - if ($data[self::FIELD_MODIFIED] instanceof FHIRDateTime) { - $this->setModified($data[self::FIELD_MODIFIED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODIFIED])) { - $this->setModified(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MODIFIED]] + $ext)); - } else if (is_array($data[self::FIELD_MODIFIED])) { - $this->setModified(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MODIFIED]))); - } + if (isset($data[self::FIELD_MODIFIED]) || isset($data[self::FIELD_MODIFIED_EXT])) { + if (isset($data[self::FIELD_MODIFIED])) { + $value = $data[self::FIELD_MODIFIED]; } else { - $this->setModified(new FHIRDateTime($data[self::FIELD_MODIFIED])); + $value = null; } - } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->setNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else if (is_array($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString(array_merge($ext, $data[self::FIELD_NOTES]))); + if (isset($data[self::FIELD_MODIFIED_EXT]) && is_array($data[self::FIELD_MODIFIED_EXT])) { + $ext = $data[self::FIELD_MODIFIED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setModified($value); + } else if (is_array($value)) { + $this->setModified(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setModified(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setModified(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; } else { - $this->setNotes(new FHIRString($data[self::FIELD_NOTES])); + $value = null; + } + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNotes($value); + } else if (is_array($value)) { + $this->setNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotes(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARTICIPANT])) { @@ -377,20 +391,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCarePlanStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanStatus([FHIRCarePlanStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCarePlanStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCarePlanStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCarePlanStatus([FHIRCarePlanStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCarePlanStatus($ext)); } } } @@ -896,8 +917,8 @@ public function setStatus(FHIRCarePlanStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1075,33 +1096,67 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getActivity())) { - $a[self::FIELD_ACTIVITY] = $vs; + $a[self::FIELD_ACTIVITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTIVITY][] = $v; + } } if ([] !== ($vs = $this->getConcern())) { - $a[self::FIELD_CONCERN] = $vs; + $a[self::FIELD_CONCERN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCERN][] = $v; + } } if ([] !== ($vs = $this->getGoal())) { - $a[self::FIELD_GOAL] = $vs; + $a[self::FIELD_GOAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GOAL][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getModified())) { $a[self::FIELD_MODIFIED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MODIFIED_EXT] = $enc; } } if (null !== ($v = $this->getNotes())) { $a[self::FIELD_NOTES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTES_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -1111,11 +1166,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRComposition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRComposition.php index d4ceed61d8..a9a9a63a81 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRComposition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRComposition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRComposition extends FHIRResource implements PHPFHIRContainedTypeInterf const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of healthcare-related information that is assembled together into a single @@ -362,20 +362,27 @@ public function __construct($data = null) $this->setCustodian(new FHIRResourceReference($data[self::FIELD_CUSTODIAN])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -417,20 +424,27 @@ public function __construct($data = null) $this->addSection(new FHIRCompositionSection($data[self::FIELD_SECTION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCompositionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCompositionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCompositionStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCompositionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCompositionStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -440,20 +454,27 @@ public function __construct($data = null) $this->setSubject(new FHIRResourceReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1051,8 +1072,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1240,10 +1261,22 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAttester())) { - $a[self::FIELD_ATTESTER] = $vs; + $a[self::FIELD_ATTESTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ATTESTER][] = $v; + } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v; @@ -1256,8 +1289,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1271,12 +1306,20 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getSection())) { - $a[self::FIELD_SECTION] = $vs; + $a[self::FIELD_SECTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECTION][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompositionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompositionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1285,14 +1328,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMap.php index b3ec657d68..db6df42268 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRConceptMap extends FHIRResource implements PHPFHIRContainedTypeInterfa const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A statement of relationships from one set of concepts to one or more other @@ -294,116 +294,165 @@ public function __construct($data = null) $this->addConcept(new FHIRConceptMapConcept($data[self::FIELD_CONCEPT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRString) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRString($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + } else if ([] !== $ext) { + $this->setCopyright(new FHIRString($ext)); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; } - } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRString) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setIdentifier(new FHIRString($data[self::FIELD_IDENTIFIER])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -413,20 +462,27 @@ public function __construct($data = null) $this->setSource(new FHIRResourceReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRValueSetStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRValueSetStatus([FHIRValueSetStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRValueSetStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRValueSetStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRValueSetStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRValueSetStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRValueSetStatus([FHIRValueSetStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRValueSetStatus($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -454,20 +510,27 @@ public function __construct($data = null) $this->addTelecom(new FHIRContact($data[self::FIELD_TELECOM])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1020,8 +1083,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1244,54 +1307,74 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } @@ -1300,8 +1383,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRValueSetStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRValueSetStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1309,15 +1394,26 @@ public function jsonSerialize() $a[self::FIELD_TARGET] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCondition.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCondition.php index 7b923ce3e6..9e0497b4c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRCondition extends FHIRResource implements PHPFHIRContainedTypeInterfac const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The date or estimated date that the condition resolved or went into remission. @@ -387,36 +387,50 @@ public function __construct($data = null) $this->setAbatementAge(new FHIRAge($data[self::FIELD_ABATEMENT_AGE])); } } - if (isset($data[self::FIELD_ABATEMENT_BOOLEAN])) { - $ext = (isset($data[self::FIELD_ABATEMENT_BOOLEAN_EXT]) && is_array($data[self::FIELD_ABATEMENT_BOOLEAN_EXT])) - ? $data[self::FIELD_ABATEMENT_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_BOOLEAN] instanceof FHIRBoolean) { - $this->setAbatementBoolean($data[self::FIELD_ABATEMENT_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_BOOLEAN])) { - $this->setAbatementBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABATEMENT_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_BOOLEAN])) { - $this->setAbatementBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABATEMENT_BOOLEAN]))); - } + if (isset($data[self::FIELD_ABATEMENT_BOOLEAN]) || isset($data[self::FIELD_ABATEMENT_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_BOOLEAN])) { + $value = $data[self::FIELD_ABATEMENT_BOOLEAN]; } else { - $this->setAbatementBoolean(new FHIRBoolean($data[self::FIELD_ABATEMENT_BOOLEAN])); + $value = null; } - } - if (isset($data[self::FIELD_ABATEMENT_DATE])) { - $ext = (isset($data[self::FIELD_ABATEMENT_DATE_EXT]) && is_array($data[self::FIELD_ABATEMENT_DATE_EXT])) - ? $data[self::FIELD_ABATEMENT_DATE_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_DATE] instanceof FHIRDate) { - $this->setAbatementDate($data[self::FIELD_ABATEMENT_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_DATE])) { - $this->setAbatementDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_ABATEMENT_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_DATE])) { - $this->setAbatementDate(new FHIRDate(array_merge($ext, $data[self::FIELD_ABATEMENT_DATE]))); + if (isset($data[self::FIELD_ABATEMENT_BOOLEAN_EXT]) && is_array($data[self::FIELD_ABATEMENT_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbatementBoolean($value); + } else if (is_array($value)) { + $this->setAbatementBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbatementBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbatementBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_ABATEMENT_DATE]) || isset($data[self::FIELD_ABATEMENT_DATE_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_DATE])) { + $value = $data[self::FIELD_ABATEMENT_DATE]; } else { - $this->setAbatementDate(new FHIRDate($data[self::FIELD_ABATEMENT_DATE])); + $value = null; + } + if (isset($data[self::FIELD_ABATEMENT_DATE_EXT]) && is_array($data[self::FIELD_ABATEMENT_DATE_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setAbatementDate($value); + } else if (is_array($value)) { + $this->setAbatementDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setAbatementDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAbatementDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_ASSERTER])) { @@ -447,20 +461,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DATE_ASSERTED])) { - $ext = (isset($data[self::FIELD_DATE_ASSERTED_EXT]) && is_array($data[self::FIELD_DATE_ASSERTED_EXT])) - ? $data[self::FIELD_DATE_ASSERTED_EXT] - : null; - if ($data[self::FIELD_DATE_ASSERTED] instanceof FHIRDate) { - $this->setDateAsserted($data[self::FIELD_DATE_ASSERTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_ASSERTED])) { - $this->setDateAsserted(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE_ASSERTED]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_ASSERTED])) { - $this->setDateAsserted(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE_ASSERTED]))); - } + if (isset($data[self::FIELD_DATE_ASSERTED]) || isset($data[self::FIELD_DATE_ASSERTED_EXT])) { + if (isset($data[self::FIELD_DATE_ASSERTED])) { + $value = $data[self::FIELD_DATE_ASSERTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_ASSERTED_EXT]) && is_array($data[self::FIELD_DATE_ASSERTED_EXT])) { + $ext = $data[self::FIELD_DATE_ASSERTED_EXT]; } else { - $this->setDateAsserted(new FHIRDate($data[self::FIELD_DATE_ASSERTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDateAsserted($value); + } else if (is_array($value)) { + $this->setDateAsserted(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDateAsserted(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateAsserted(new FHIRDate($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -524,20 +545,27 @@ public function __construct($data = null) $this->addLocation(new FHIRConditionLocation($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->setNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else if (is_array($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString(array_merge($ext, $data[self::FIELD_NOTES]))); - } + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; } else { - $this->setNotes(new FHIRString($data[self::FIELD_NOTES])); + $value = null; + } + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNotes($value); + } else if (is_array($value)) { + $this->setNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotes(new FHIRString($ext)); } } if (isset($data[self::FIELD_ONSET_AGE])) { @@ -547,20 +575,27 @@ public function __construct($data = null) $this->setOnsetAge(new FHIRAge($data[self::FIELD_ONSET_AGE])); } } - if (isset($data[self::FIELD_ONSET_DATE])) { - $ext = (isset($data[self::FIELD_ONSET_DATE_EXT]) && is_array($data[self::FIELD_ONSET_DATE_EXT])) - ? $data[self::FIELD_ONSET_DATE_EXT] - : null; - if ($data[self::FIELD_ONSET_DATE] instanceof FHIRDate) { - $this->setOnsetDate($data[self::FIELD_ONSET_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_DATE])) { - $this->setOnsetDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_ONSET_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_DATE])) { - $this->setOnsetDate(new FHIRDate(array_merge($ext, $data[self::FIELD_ONSET_DATE]))); - } + if (isset($data[self::FIELD_ONSET_DATE]) || isset($data[self::FIELD_ONSET_DATE_EXT])) { + if (isset($data[self::FIELD_ONSET_DATE])) { + $value = $data[self::FIELD_ONSET_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_DATE_EXT]) && is_array($data[self::FIELD_ONSET_DATE_EXT])) { + $ext = $data[self::FIELD_ONSET_DATE_EXT]; } else { - $this->setOnsetDate(new FHIRDate($data[self::FIELD_ONSET_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setOnsetDate($value); + } else if (is_array($value)) { + $this->setOnsetDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setOnsetDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_RELATED_ITEM])) { @@ -595,20 +630,27 @@ public function __construct($data = null) $this->setStage(new FHIRConditionStage($data[self::FIELD_STAGE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRConditionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRConditionStatus([FHIRConditionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRConditionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRConditionStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRConditionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRConditionStatus([FHIRConditionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRConditionStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1446,8 +1488,8 @@ public function setSubject(FHIRResourceReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1706,15 +1748,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAbatementBoolean())) { $a[self::FIELD_ABATEMENT_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getAbatementDate())) { $a[self::FIELD_ABATEMENT_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_DATE_EXT] = $enc; } } @@ -1732,8 +1778,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDateAsserted())) { $a[self::FIELD_DATE_ASSERTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_ASSERTED_EXT] = $enc; } } @@ -1741,18 +1789,38 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvidence())) { - $a[self::FIELD_EVIDENCE] = $vs; + $a[self::FIELD_EVIDENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVIDENCE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getNotes())) { $a[self::FIELD_NOTES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTES_EXT] = $enc; } } @@ -1761,13 +1829,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetDate())) { $a[self::FIELD_ONSET_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_ONSET_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedItem())) { - $a[self::FIELD_RELATED_ITEM] = $vs; + $a[self::FIELD_RELATED_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ITEM][] = $v; + } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v; @@ -1777,14 +1853,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformance.php index f9902851e3..9e7a6ab6cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRConformance extends FHIRResource implements PHPFHIRContainedTypeInterf const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -364,52 +364,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACCEPT_UNKNOWN])) { - $ext = (isset($data[self::FIELD_ACCEPT_UNKNOWN_EXT]) && is_array($data[self::FIELD_ACCEPT_UNKNOWN_EXT])) - ? $data[self::FIELD_ACCEPT_UNKNOWN_EXT] - : null; - if ($data[self::FIELD_ACCEPT_UNKNOWN] instanceof FHIRBoolean) { - $this->setAcceptUnknown($data[self::FIELD_ACCEPT_UNKNOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACCEPT_UNKNOWN])) { - $this->setAcceptUnknown(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACCEPT_UNKNOWN]] + $ext)); - } else if (is_array($data[self::FIELD_ACCEPT_UNKNOWN])) { - $this->setAcceptUnknown(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACCEPT_UNKNOWN]))); - } + if (isset($data[self::FIELD_ACCEPT_UNKNOWN]) || isset($data[self::FIELD_ACCEPT_UNKNOWN_EXT])) { + if (isset($data[self::FIELD_ACCEPT_UNKNOWN])) { + $value = $data[self::FIELD_ACCEPT_UNKNOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACCEPT_UNKNOWN_EXT]) && is_array($data[self::FIELD_ACCEPT_UNKNOWN_EXT])) { + $ext = $data[self::FIELD_ACCEPT_UNKNOWN_EXT]; } else { - $this->setAcceptUnknown(new FHIRBoolean($data[self::FIELD_ACCEPT_UNKNOWN])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAcceptUnknown($value); + } else if (is_array($value)) { + $this->setAcceptUnknown(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAcceptUnknown(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAcceptUnknown(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOCUMENT])) { @@ -430,81 +451,111 @@ public function __construct($data = null) $this->addDocument(new FHIRConformanceDocument($data[self::FIELD_DOCUMENT])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRId) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; } else { - $this->setFhirVersion(new FHIRId($data[self::FIELD_FHIR_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRId($ext)); } } - if (isset($data[self::FIELD_FORMAT])) { - $ext = (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) - ? $data[self::FIELD_FORMAT_EXT] - : null; - if (is_array($data[self::FIELD_FORMAT])) { - foreach($data[self::FIELD_FORMAT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addFormat($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFormat(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FORMAT]) || isset($data[self::FIELD_FORMAT_EXT])) { + if (isset($data[self::FIELD_FORMAT])) { + $value = $data[self::FIELD_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) { + $ext = $data[self::FIELD_FORMAT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addFormat($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addFormat($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFormat(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFormat(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_FORMAT] instanceof FHIRCode) { - $this->addFormat($data[self::FIELD_FORMAT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FORMAT])) { - $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FORMAT]] + $ext)); - } else { - $this->addFormat(new FHIRCode($data[self::FIELD_FORMAT])); - } - } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRString) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFormat(new FHIRCode($iext)); } + } + } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; } else { - $this->setIdentifier(new FHIRString($data[self::FIELD_IDENTIFIER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRString($ext)); } } if (isset($data[self::FIELD_IMPLEMENTATION])) { @@ -532,20 +583,27 @@ public function __construct($data = null) $this->addMessaging(new FHIRConformanceMessaging($data[self::FIELD_MESSAGING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -566,20 +624,27 @@ public function __construct($data = null) $this->addProfile(new FHIRResourceReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } if (isset($data[self::FIELD_REST])) { @@ -607,20 +672,27 @@ public function __construct($data = null) $this->setSoftware(new FHIRConformanceSoftware($data[self::FIELD_SOFTWARE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRConformanceStatementStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRConformanceStatementStatus([FHIRConformanceStatementStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRConformanceStatementStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRConformanceStatementStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConformanceStatementStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRConformanceStatementStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRConformanceStatementStatus([FHIRConformanceStatementStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRConformanceStatementStatus($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -641,20 +713,27 @@ public function __construct($data = null) $this->addTelecom(new FHIRContact($data[self::FIELD_TELECOM])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1513,8 +1592,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1804,61 +1883,87 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAcceptUnknown())) { $a[self::FIELD_ACCEPT_UNKNOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACCEPT_UNKNOWN_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDocument())) { - $a[self::FIELD_DOCUMENT] = $vs; + $a[self::FIELD_DOCUMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENT][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getFormat())) { $a[self::FIELD_FORMAT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FORMAT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FORMAT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FORMAT_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FORMAT_EXT] = $encs; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } @@ -1866,48 +1971,83 @@ public function jsonSerialize() $a[self::FIELD_IMPLEMENTATION] = $v; } if ([] !== ($vs = $this->getMessaging())) { - $a[self::FIELD_MESSAGING] = $vs; + $a[self::FIELD_MESSAGING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MESSAGING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getProfile())) { - $a[self::FIELD_PROFILE] = $vs; + $a[self::FIELD_PROFILE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROFILE][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if ([] !== ($vs = $this->getRest())) { - $a[self::FIELD_REST] = $vs; + $a[self::FIELD_REST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REST][] = $v; + } } if (null !== ($v = $this->getSoftware())) { $a[self::FIELD_SOFTWARE] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConformanceStatementStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConformanceStatementStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDevice.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDevice.php index 5676abdcb0..e457ad5274 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRDevice extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * All kinds of technology mediated contact details for a person or organization, @@ -300,20 +300,27 @@ public function __construct($data = null) $this->addContact(new FHIRContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_EXPIRY])) { - $ext = (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) - ? $data[self::FIELD_EXPIRY_EXT] - : null; - if ($data[self::FIELD_EXPIRY] instanceof FHIRDate) { - $this->setExpiry($data[self::FIELD_EXPIRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_EXPIRY]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDate(array_merge($ext, $data[self::FIELD_EXPIRY]))); - } + if (isset($data[self::FIELD_EXPIRY]) || isset($data[self::FIELD_EXPIRY_EXT])) { + if (isset($data[self::FIELD_EXPIRY])) { + $value = $data[self::FIELD_EXPIRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) { + $ext = $data[self::FIELD_EXPIRY_EXT]; } else { - $this->setExpiry(new FHIRDate($data[self::FIELD_EXPIRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setExpiry($value); + } else if (is_array($value)) { + $this->setExpiry(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setExpiry(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpiry(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -341,52 +348,73 @@ public function __construct($data = null) $this->setLocation(new FHIRResourceReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); - } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_MANUFACTURER])) { - $ext = (isset($data[self::FIELD_MANUFACTURER_EXT]) && is_array($data[self::FIELD_MANUFACTURER_EXT])) - ? $data[self::FIELD_MANUFACTURER_EXT] - : null; - if ($data[self::FIELD_MANUFACTURER] instanceof FHIRString) { - $this->setManufacturer($data[self::FIELD_MANUFACTURER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MANUFACTURER])) { - $this->setManufacturer(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MANUFACTURER]] + $ext)); - } else if (is_array($data[self::FIELD_MANUFACTURER])) { - $this->setManufacturer(new FHIRString(array_merge($ext, $data[self::FIELD_MANUFACTURER]))); - } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; } else { - $this->setManufacturer(new FHIRString($data[self::FIELD_MANUFACTURER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); } } - if (isset($data[self::FIELD_MODEL])) { - $ext = (isset($data[self::FIELD_MODEL_EXT]) && is_array($data[self::FIELD_MODEL_EXT])) - ? $data[self::FIELD_MODEL_EXT] - : null; - if ($data[self::FIELD_MODEL] instanceof FHIRString) { - $this->setModel($data[self::FIELD_MODEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODEL])) { - $this->setModel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MODEL]] + $ext)); - } else if (is_array($data[self::FIELD_MODEL])) { - $this->setModel(new FHIRString(array_merge($ext, $data[self::FIELD_MODEL]))); + if (isset($data[self::FIELD_MANUFACTURER]) || isset($data[self::FIELD_MANUFACTURER_EXT])) { + if (isset($data[self::FIELD_MANUFACTURER])) { + $value = $data[self::FIELD_MANUFACTURER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MANUFACTURER_EXT]) && is_array($data[self::FIELD_MANUFACTURER_EXT])) { + $ext = $data[self::FIELD_MANUFACTURER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setManufacturer($value); + } else if (is_array($value)) { + $this->setManufacturer(new FHIRString(array_merge($ext, $value))); + } else { + $this->setManufacturer(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setManufacturer(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODEL]) || isset($data[self::FIELD_MODEL_EXT])) { + if (isset($data[self::FIELD_MODEL])) { + $value = $data[self::FIELD_MODEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODEL_EXT]) && is_array($data[self::FIELD_MODEL_EXT])) { + $ext = $data[self::FIELD_MODEL_EXT]; } else { - $this->setModel(new FHIRString($data[self::FIELD_MODEL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setModel($value); + } else if (is_array($value)) { + $this->setModel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setModel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setModel(new FHIRString($ext)); } } if (isset($data[self::FIELD_OWNER])) { @@ -410,52 +438,73 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_UDI])) { - $ext = (isset($data[self::FIELD_UDI_EXT]) && is_array($data[self::FIELD_UDI_EXT])) - ? $data[self::FIELD_UDI_EXT] - : null; - if ($data[self::FIELD_UDI] instanceof FHIRString) { - $this->setUdi($data[self::FIELD_UDI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UDI])) { - $this->setUdi(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_UDI]] + $ext)); - } else if (is_array($data[self::FIELD_UDI])) { - $this->setUdi(new FHIRString(array_merge($ext, $data[self::FIELD_UDI]))); - } + if (isset($data[self::FIELD_UDI]) || isset($data[self::FIELD_UDI_EXT])) { + if (isset($data[self::FIELD_UDI])) { + $value = $data[self::FIELD_UDI]; } else { - $this->setUdi(new FHIRString($data[self::FIELD_UDI])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_UDI_EXT]) && is_array($data[self::FIELD_UDI_EXT])) { + $ext = $data[self::FIELD_UDI_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUdi($value); + } else if (is_array($value)) { + $this->setUdi(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUdi(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUdi(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1012,8 +1061,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1228,39 +1277,59 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getExpiry())) { $a[self::FIELD_EXPIRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_EXPIRY_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getManufacturer())) { $a[self::FIELD_MANUFACTURER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MANUFACTURER_EXT] = $enc; } } if (null !== ($v = $this->getModel())) { $a[self::FIELD_MODEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MODEL_EXT] = $enc; } } @@ -1275,25 +1344,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getUdi())) { $a[self::FIELD_UDI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_UDI_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReport.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReport.php index e951556739..d9e2693129 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReport.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRDeviceObservationReport extends FHIRResource implements PHPFHIRContain const FIELD_VIRTUAL_DEVICE = 'virtualDevice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -169,20 +169,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANT])) { - $ext = (isset($data[self::FIELD_INSTANT_EXT]) && is_array($data[self::FIELD_INSTANT_EXT])) - ? $data[self::FIELD_INSTANT_EXT] - : null; - if ($data[self::FIELD_INSTANT] instanceof FHIRInstant) { - $this->setInstant($data[self::FIELD_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTANT])) { - $this->setInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_INSTANT])) { - $this->setInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_INSTANT]))); - } + if (isset($data[self::FIELD_INSTANT]) || isset($data[self::FIELD_INSTANT_EXT])) { + if (isset($data[self::FIELD_INSTANT])) { + $value = $data[self::FIELD_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANT_EXT]) && is_array($data[self::FIELD_INSTANT_EXT])) { + $ext = $data[self::FIELD_INSTANT_EXT]; } else { - $this->setInstant(new FHIRInstant($data[self::FIELD_INSTANT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setInstant($value); + } else if (is_array($value)) { + $this->setInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInstant(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -430,8 +437,8 @@ public function setVirtualDevice(array $virtualDevice = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -547,8 +554,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getInstant())) { $a[self::FIELD_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_INSTANT_EXT] = $enc; } } @@ -559,7 +568,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getVirtualDevice())) { - $a[self::FIELD_VIRTUAL_DEVICE] = $vs; + $a[self::FIELD_VIRTUAL_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VIRTUAL_DEVICE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrder.php index 3defd99de1..56670a3b68 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRDiagnosticOrder extends FHIRResource implements PHPFHIRContainedTypeIn const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -231,20 +231,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CLINICAL_NOTES])) { - $ext = (isset($data[self::FIELD_CLINICAL_NOTES_EXT]) && is_array($data[self::FIELD_CLINICAL_NOTES_EXT])) - ? $data[self::FIELD_CLINICAL_NOTES_EXT] - : null; - if ($data[self::FIELD_CLINICAL_NOTES] instanceof FHIRString) { - $this->setClinicalNotes($data[self::FIELD_CLINICAL_NOTES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLINICAL_NOTES])) { - $this->setClinicalNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CLINICAL_NOTES]] + $ext)); - } else if (is_array($data[self::FIELD_CLINICAL_NOTES])) { - $this->setClinicalNotes(new FHIRString(array_merge($ext, $data[self::FIELD_CLINICAL_NOTES]))); - } + if (isset($data[self::FIELD_CLINICAL_NOTES]) || isset($data[self::FIELD_CLINICAL_NOTES_EXT])) { + if (isset($data[self::FIELD_CLINICAL_NOTES])) { + $value = $data[self::FIELD_CLINICAL_NOTES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CLINICAL_NOTES_EXT]) && is_array($data[self::FIELD_CLINICAL_NOTES_EXT])) { + $ext = $data[self::FIELD_CLINICAL_NOTES_EXT]; } else { - $this->setClinicalNotes(new FHIRString($data[self::FIELD_CLINICAL_NOTES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setClinicalNotes($value); + } else if (is_array($value)) { + $this->setClinicalNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->setClinicalNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setClinicalNotes(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -315,20 +322,27 @@ public function __construct($data = null) $this->setOrderer(new FHIRResourceReference($data[self::FIELD_ORDERER])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRDiagnosticOrderPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRDiagnosticOrderPriority([FHIRDiagnosticOrderPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRDiagnosticOrderPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRDiagnosticOrderPriority($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticOrderPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRDiagnosticOrderPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRDiagnosticOrderPriority([FHIRDiagnosticOrderPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRDiagnosticOrderPriority($ext)); } } if (isset($data[self::FIELD_SPECIMEN])) { @@ -349,20 +363,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRResourceReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticOrderStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRDiagnosticOrderStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticOrderStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticOrderStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -823,8 +844,8 @@ public function setSubject(FHIRResourceReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -988,8 +1009,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getClinicalNotes())) { $a[self::FIELD_CLINICAL_NOTES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CLINICAL_NOTES_EXT] = $enc; } } @@ -997,37 +1020,68 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getOrderer())) { $a[self::FIELD_ORDERER] = $v; } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticOrderPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticOrderPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticOrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticOrderStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReport.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReport.php index ba8042a3a2..b9a818788c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReport.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRDiagnosticReport extends FHIRResource implements PHPFHIRContainedTypeI const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -363,36 +363,50 @@ public function __construct($data = null) $this->addCodedDiagnosis(new FHIRCodeableConcept($data[self::FIELD_CODED_DIAGNOSIS])); } } - if (isset($data[self::FIELD_CONCLUSION])) { - $ext = (isset($data[self::FIELD_CONCLUSION_EXT]) && is_array($data[self::FIELD_CONCLUSION_EXT])) - ? $data[self::FIELD_CONCLUSION_EXT] - : null; - if ($data[self::FIELD_CONCLUSION] instanceof FHIRString) { - $this->setConclusion($data[self::FIELD_CONCLUSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONCLUSION])) { - $this->setConclusion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONCLUSION]] + $ext)); - } else if (is_array($data[self::FIELD_CONCLUSION])) { - $this->setConclusion(new FHIRString(array_merge($ext, $data[self::FIELD_CONCLUSION]))); - } + if (isset($data[self::FIELD_CONCLUSION]) || isset($data[self::FIELD_CONCLUSION_EXT])) { + if (isset($data[self::FIELD_CONCLUSION])) { + $value = $data[self::FIELD_CONCLUSION]; } else { - $this->setConclusion(new FHIRString($data[self::FIELD_CONCLUSION])); + $value = null; } - } - if (isset($data[self::FIELD_DIAGNOSTIC_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DIAGNOSTIC_DATE_TIME_EXT]) && is_array($data[self::FIELD_DIAGNOSTIC_DATE_TIME_EXT])) - ? $data[self::FIELD_DIAGNOSTIC_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DIAGNOSTIC_DATE_TIME] instanceof FHIRDateTime) { - $this->setDiagnosticDateTime($data[self::FIELD_DIAGNOSTIC_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIAGNOSTIC_DATE_TIME])) { - $this->setDiagnosticDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DIAGNOSTIC_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DIAGNOSTIC_DATE_TIME])) { - $this->setDiagnosticDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DIAGNOSTIC_DATE_TIME]))); + if (isset($data[self::FIELD_CONCLUSION_EXT]) && is_array($data[self::FIELD_CONCLUSION_EXT])) { + $ext = $data[self::FIELD_CONCLUSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setConclusion($value); + } else if (is_array($value)) { + $this->setConclusion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setConclusion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConclusion(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DIAGNOSTIC_DATE_TIME]) || isset($data[self::FIELD_DIAGNOSTIC_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DIAGNOSTIC_DATE_TIME])) { + $value = $data[self::FIELD_DIAGNOSTIC_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIAGNOSTIC_DATE_TIME_EXT]) && is_array($data[self::FIELD_DIAGNOSTIC_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DIAGNOSTIC_DATE_TIME_EXT]; } else { - $this->setDiagnosticDateTime(new FHIRDateTime($data[self::FIELD_DIAGNOSTIC_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDiagnosticDateTime($value); + } else if (is_array($value)) { + $this->setDiagnosticDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDiagnosticDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDiagnosticDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DIAGNOSTIC_PERIOD])) { @@ -445,20 +459,27 @@ public function __construct($data = null) $this->addImagingStudy(new FHIRResourceReference($data[self::FIELD_IMAGING_STUDY])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRDateTime) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; } else { - $this->setIssued(new FHIRDateTime($data[self::FIELD_ISSUED])); + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_NAME])) { @@ -554,20 +575,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRResourceReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticReportStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticReportStatus([FHIRDiagnosticReportStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticReportStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDiagnosticReportStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticReportStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticReportStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticReportStatus([FHIRDiagnosticReportStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticReportStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1389,8 +1417,8 @@ public function setSubject(FHIRResourceReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1632,19 +1660,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCodedDiagnosis())) { - $a[self::FIELD_CODED_DIAGNOSIS] = $vs; + $a[self::FIELD_CODED_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODED_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getConclusion())) { $a[self::FIELD_CONCLUSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONCLUSION_EXT] = $enc; } } if (null !== ($v = $this->getDiagnosticDateTime())) { $a[self::FIELD_DIAGNOSTIC_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DIAGNOSTIC_DATE_TIME_EXT] = $enc; } } @@ -1655,15 +1693,29 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getImage())) { - $a[self::FIELD_IMAGE] = $vs; + $a[self::FIELD_IMAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGE][] = $v; + } } if ([] !== ($vs = $this->getImagingStudy())) { - $a[self::FIELD_IMAGING_STUDY] = $vs; + $a[self::FIELD_IMAGING_STUDY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGING_STUDY][] = $v; + } } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } @@ -1674,30 +1726,59 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getPresentedForm())) { - $a[self::FIELD_PRESENTED_FORM] = $vs; + $a[self::FIELD_PRESENTED_FORM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRESENTED_FORM][] = $v; + } } if ([] !== ($vs = $this->getRequestDetail())) { - $a[self::FIELD_REQUEST_DETAIL] = $vs; + $a[self::FIELD_REQUEST_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUEST_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getResult())) { - $a[self::FIELD_RESULT] = $vs; + $a[self::FIELD_RESULT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESULT][] = $v; + } } if (null !== ($v = $this->getServiceCategory())) { $a[self::FIELD_SERVICE_CATEGORY] = $v; } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticReportStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticReportStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifest.php index eac64c64ee..35ed123283 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRDocumentManifest extends FHIRResource implements PHPFHIRContainedTypeI const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -333,36 +333,50 @@ public function __construct($data = null) $this->addContent(new FHIRResourceReference($data[self::FIELD_CONTENT])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -408,36 +422,50 @@ public function __construct($data = null) $this->addRecipient(new FHIRResourceReference($data[self::FIELD_RECIPIENT])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDocumentReferenceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDocumentReferenceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentReferenceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDocumentReferenceStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1091,8 +1119,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1296,53 +1324,91 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getConfidentiality())) { $a[self::FIELD_CONFIDENTIALITY] = $v; } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMasterIdentifier())) { $a[self::FIELD_MASTER_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentReferenceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentReferenceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if (null !== ($v = $this->getSupercedes())) { $a[self::FIELD_SUPERCEDES] = $v; @@ -1350,6 +1416,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReference.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReference.php index ef802f0318..bdb4ddb99b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReference.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRDocumentReference extends FHIRResource implements PHPFHIRContainedType const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -478,20 +478,27 @@ public function __construct($data = null) $this->setContext(new FHIRDocumentReferenceContext($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_CUSTODIAN])) { @@ -501,20 +508,27 @@ public function __construct($data = null) $this->setCustodian(new FHIRResourceReference($data[self::FIELD_CUSTODIAN])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOC_STATUS])) { @@ -524,49 +538,65 @@ public function __construct($data = null) $this->setDocStatus(new FHIRCodeableConcept($data[self::FIELD_DOC_STATUS])); } } - if (isset($data[self::FIELD_FORMAT])) { - $ext = (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) - ? $data[self::FIELD_FORMAT_EXT] - : null; - if (is_array($data[self::FIELD_FORMAT])) { - foreach($data[self::FIELD_FORMAT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addFormat($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFormat(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFormat(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FORMAT]) || isset($data[self::FIELD_FORMAT_EXT])) { + if (isset($data[self::FIELD_FORMAT])) { + $value = $data[self::FIELD_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) { + $ext = $data[self::FIELD_FORMAT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addFormat($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addFormat($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFormat(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addFormat(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFormat(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addFormat(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addFormat(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_FORMAT] instanceof FHIRUri) { - $this->addFormat($data[self::FIELD_FORMAT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FORMAT])) { - $this->addFormat(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_FORMAT]] + $ext)); - } else { - $this->addFormat(new FHIRUri($data[self::FIELD_FORMAT])); - } - } - if (isset($data[self::FIELD_HASH])) { - $ext = (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) - ? $data[self::FIELD_HASH_EXT] - : null; - if ($data[self::FIELD_HASH] instanceof FHIRString) { - $this->setHash($data[self::FIELD_HASH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HASH])) { - $this->setHash(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HASH]] + $ext)); - } else if (is_array($data[self::FIELD_HASH])) { - $this->setHash(new FHIRString(array_merge($ext, $data[self::FIELD_HASH]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFormat(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_HASH]) || isset($data[self::FIELD_HASH_EXT])) { + if (isset($data[self::FIELD_HASH])) { + $value = $data[self::FIELD_HASH]; } else { - $this->setHash(new FHIRString($data[self::FIELD_HASH])); + $value = null; + } + if (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) { + $ext = $data[self::FIELD_HASH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHash($value); + } else if (is_array($value)) { + $this->setHash(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHash(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHash(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -587,36 +617,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INDEXED])) { - $ext = (isset($data[self::FIELD_INDEXED_EXT]) && is_array($data[self::FIELD_INDEXED_EXT])) - ? $data[self::FIELD_INDEXED_EXT] - : null; - if ($data[self::FIELD_INDEXED] instanceof FHIRInstant) { - $this->setIndexed($data[self::FIELD_INDEXED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INDEXED])) { - $this->setIndexed(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_INDEXED]] + $ext)); - } else if (is_array($data[self::FIELD_INDEXED])) { - $this->setIndexed(new FHIRInstant(array_merge($ext, $data[self::FIELD_INDEXED]))); - } + if (isset($data[self::FIELD_INDEXED]) || isset($data[self::FIELD_INDEXED_EXT])) { + if (isset($data[self::FIELD_INDEXED])) { + $value = $data[self::FIELD_INDEXED]; } else { - $this->setIndexed(new FHIRInstant($data[self::FIELD_INDEXED])); - } - } - if (isset($data[self::FIELD_LOCATION])) { - $ext = (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) - ? $data[self::FIELD_LOCATION_EXT] - : null; - if ($data[self::FIELD_LOCATION] instanceof FHIRUri) { - $this->setLocation($data[self::FIELD_LOCATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOCATION])) { - $this->setLocation(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_LOCATION]] + $ext)); - } else if (is_array($data[self::FIELD_LOCATION])) { - $this->setLocation(new FHIRUri(array_merge($ext, $data[self::FIELD_LOCATION]))); + $value = null; + } + if (isset($data[self::FIELD_INDEXED_EXT]) && is_array($data[self::FIELD_INDEXED_EXT])) { + $ext = $data[self::FIELD_INDEXED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIndexed($value); + } else if (is_array($value)) { + $this->setIndexed(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIndexed(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIndexed(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_LOCATION]) || isset($data[self::FIELD_LOCATION_EXT])) { + if (isset($data[self::FIELD_LOCATION])) { + $value = $data[self::FIELD_LOCATION]; } else { - $this->setLocation(new FHIRUri($data[self::FIELD_LOCATION])); + $value = null; + } + if (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) { + $ext = $data[self::FIELD_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setLocation($value); + } else if (is_array($value)) { + $this->setLocation(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setLocation(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLocation(new FHIRUri($ext)); } } if (isset($data[self::FIELD_MASTER_IDENTIFIER])) { @@ -626,52 +670,73 @@ public function __construct($data = null) $this->setMasterIdentifier(new FHIRIdentifier($data[self::FIELD_MASTER_IDENTIFIER])); } } - if (isset($data[self::FIELD_MIME_TYPE])) { - $ext = (isset($data[self::FIELD_MIME_TYPE_EXT]) && is_array($data[self::FIELD_MIME_TYPE_EXT])) - ? $data[self::FIELD_MIME_TYPE_EXT] - : null; - if ($data[self::FIELD_MIME_TYPE] instanceof FHIRCode) { - $this->setMimeType($data[self::FIELD_MIME_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIME_TYPE])) { - $this->setMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_MIME_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_MIME_TYPE])) { - $this->setMimeType(new FHIRCode(array_merge($ext, $data[self::FIELD_MIME_TYPE]))); - } + if (isset($data[self::FIELD_MIME_TYPE]) || isset($data[self::FIELD_MIME_TYPE_EXT])) { + if (isset($data[self::FIELD_MIME_TYPE])) { + $value = $data[self::FIELD_MIME_TYPE]; } else { - $this->setMimeType(new FHIRCode($data[self::FIELD_MIME_TYPE])); - } - } - if (isset($data[self::FIELD_POLICY_MANAGER])) { - $ext = (isset($data[self::FIELD_POLICY_MANAGER_EXT]) && is_array($data[self::FIELD_POLICY_MANAGER_EXT])) - ? $data[self::FIELD_POLICY_MANAGER_EXT] - : null; - if ($data[self::FIELD_POLICY_MANAGER] instanceof FHIRUri) { - $this->setPolicyManager($data[self::FIELD_POLICY_MANAGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POLICY_MANAGER])) { - $this->setPolicyManager(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_POLICY_MANAGER]] + $ext)); - } else if (is_array($data[self::FIELD_POLICY_MANAGER])) { - $this->setPolicyManager(new FHIRUri(array_merge($ext, $data[self::FIELD_POLICY_MANAGER]))); + $value = null; + } + if (isset($data[self::FIELD_MIME_TYPE_EXT]) && is_array($data[self::FIELD_MIME_TYPE_EXT])) { + $ext = $data[self::FIELD_MIME_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setMimeType($value); + } else if (is_array($value)) { + $this->setMimeType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMimeType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_POLICY_MANAGER]) || isset($data[self::FIELD_POLICY_MANAGER_EXT])) { + if (isset($data[self::FIELD_POLICY_MANAGER])) { + $value = $data[self::FIELD_POLICY_MANAGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POLICY_MANAGER_EXT]) && is_array($data[self::FIELD_POLICY_MANAGER_EXT])) { + $ext = $data[self::FIELD_POLICY_MANAGER_EXT]; } else { - $this->setPolicyManager(new FHIRUri($data[self::FIELD_POLICY_MANAGER])); - } - } - if (isset($data[self::FIELD_PRIMARY_LANGUAGE])) { - $ext = (isset($data[self::FIELD_PRIMARY_LANGUAGE_EXT]) && is_array($data[self::FIELD_PRIMARY_LANGUAGE_EXT])) - ? $data[self::FIELD_PRIMARY_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_PRIMARY_LANGUAGE] instanceof FHIRCode) { - $this->setPrimaryLanguage($data[self::FIELD_PRIMARY_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIMARY_LANGUAGE])) { - $this->setPrimaryLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PRIMARY_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_PRIMARY_LANGUAGE])) { - $this->setPrimaryLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_PRIMARY_LANGUAGE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setPolicyManager($value); + } else if (is_array($value)) { + $this->setPolicyManager(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setPolicyManager(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPolicyManager(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_PRIMARY_LANGUAGE]) || isset($data[self::FIELD_PRIMARY_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_PRIMARY_LANGUAGE])) { + $value = $data[self::FIELD_PRIMARY_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIMARY_LANGUAGE_EXT]) && is_array($data[self::FIELD_PRIMARY_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_PRIMARY_LANGUAGE_EXT]; } else { - $this->setPrimaryLanguage(new FHIRCode($data[self::FIELD_PRIMARY_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setPrimaryLanguage($value); + } else if (is_array($value)) { + $this->setPrimaryLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setPrimaryLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrimaryLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_RELATES_TO])) { @@ -699,36 +764,50 @@ public function __construct($data = null) $this->setService(new FHIRDocumentReferenceService($data[self::FIELD_SERVICE])); } } - if (isset($data[self::FIELD_SIZE])) { - $ext = (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) - ? $data[self::FIELD_SIZE_EXT] - : null; - if ($data[self::FIELD_SIZE] instanceof FHIRInteger) { - $this->setSize($data[self::FIELD_SIZE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SIZE]] + $ext)); - } else if (is_array($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRInteger(array_merge($ext, $data[self::FIELD_SIZE]))); - } + if (isset($data[self::FIELD_SIZE]) || isset($data[self::FIELD_SIZE_EXT])) { + if (isset($data[self::FIELD_SIZE])) { + $value = $data[self::FIELD_SIZE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) { + $ext = $data[self::FIELD_SIZE_EXT]; } else { - $this->setSize(new FHIRInteger($data[self::FIELD_SIZE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDocumentReferenceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setSize($value); + } else if (is_array($value)) { + $this->setSize(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setSize(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSize(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDocumentReferenceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentReferenceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDocumentReferenceStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1723,8 +1802,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2045,21 +2124,35 @@ public function jsonSerialize() $a[self::FIELD_AUTHENTICATOR] = $v; } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v; } if ([] !== ($vs = $this->getConfidentiality())) { - $a[self::FIELD_CONFIDENTIALITY] = $vs; + $a[self::FIELD_CONFIDENTIALITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONFIDENTIALITY][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } @@ -2068,8 +2161,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2078,40 +2173,60 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getFormat())) { $a[self::FIELD_FORMAT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FORMAT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FORMAT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FORMAT_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FORMAT_EXT] = $encs; + } } if (null !== ($v = $this->getHash())) { $a[self::FIELD_HASH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HASH_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIndexed())) { $a[self::FIELD_INDEXED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_INDEXED_EXT] = $enc; } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_LOCATION_EXT] = $enc; } } @@ -2120,42 +2235,58 @@ public function jsonSerialize() } if (null !== ($v = $this->getMimeType())) { $a[self::FIELD_MIME_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_MIME_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getPolicyManager())) { $a[self::FIELD_POLICY_MANAGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_POLICY_MANAGER_EXT] = $enc; } } if (null !== ($v = $this->getPrimaryLanguage())) { $a[self::FIELD_PRIMARY_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_PRIMARY_LANGUAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatesTo())) { - $a[self::FIELD_RELATES_TO] = $vs; + $a[self::FIELD_RELATES_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATES_TO][] = $v; + } } if (null !== ($v = $this->getService())) { $a[self::FIELD_SERVICE] = $v; } if (null !== ($v = $this->getSize())) { $a[self::FIELD_SIZE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_SIZE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentReferenceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentReferenceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2165,6 +2296,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounter.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounter.php index ab88c7b2ed..e55a9cc7ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIREncounter extends FHIRResource implements PHPFHIRContainedTypeInterfac const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Classification of the encounter @@ -291,20 +291,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CLASS])) { - $ext = (isset($data[self::FIELD_CLASS_EXT]) && is_array($data[self::FIELD_CLASS_EXT])) - ? $data[self::FIELD_CLASS_EXT] - : null; - if ($data[self::FIELD_CLASS] instanceof FHIREncounterClass) { - $this->setClass($data[self::FIELD_CLASS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLASS])) { - $this->setClass(new FHIREncounterClass([FHIREncounterClass::FIELD_VALUE => $data[self::FIELD_CLASS]] + $ext)); - } else if (is_array($data[self::FIELD_CLASS])) { - $this->setClass(new FHIREncounterClass(array_merge($ext, $data[self::FIELD_CLASS]))); - } + if (isset($data[self::FIELD_CLASS]) || isset($data[self::FIELD_CLASS_EXT])) { + if (isset($data[self::FIELD_CLASS])) { + $value = $data[self::FIELD_CLASS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CLASS_EXT]) && is_array($data[self::FIELD_CLASS_EXT])) { + $ext = $data[self::FIELD_CLASS_EXT]; } else { - $this->setClass(new FHIREncounterClass($data[self::FIELD_CLASS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterClass) { + $this->setClass($value); + } else if (is_array($value)) { + $this->setClass(new FHIREncounterClass(array_merge($ext, $value))); + } else { + $this->setClass(new FHIREncounterClass([FHIREncounterClass::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setClass(new FHIREncounterClass($ext)); } } if (isset($data[self::FIELD_HOSPITALIZATION])) { @@ -417,20 +424,27 @@ public function __construct($data = null) $this->setServiceProvider(new FHIRResourceReference($data[self::FIELD_SERVICE_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterState) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterState([FHIREncounterState::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterState(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREncounterState($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterState) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterState(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterState([FHIREncounterState::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterState($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1045,8 +1059,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1232,8 +1246,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterClass::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterClass::FIELD_VALUE]); $a[self::FIELD_CLASS_EXT] = $enc; } } @@ -1241,7 +1257,13 @@ public function jsonSerialize() $a[self::FIELD_HOSPITALIZATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIndication())) { $a[self::FIELD_INDICATION] = $v; @@ -1250,13 +1272,25 @@ public function jsonSerialize() $a[self::FIELD_LENGTH] = $v; } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getPartOf())) { $a[self::FIELD_PART_OF] = $v; } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; @@ -1272,8 +1306,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterState::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterState::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1281,7 +1317,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistory.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistory.php index 3ab99d34d3..4456ee5b54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRFamilyHistory extends FHIRResource implements PHPFHIRContainedTypeInte const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -173,20 +173,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NOTE])) { - $ext = (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) - ? $data[self::FIELD_NOTE_EXT] - : null; - if ($data[self::FIELD_NOTE] instanceof FHIRString) { - $this->setNote($data[self::FIELD_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString(array_merge($ext, $data[self::FIELD_NOTE]))); - } + if (isset($data[self::FIELD_NOTE]) || isset($data[self::FIELD_NOTE_EXT])) { + if (isset($data[self::FIELD_NOTE])) { + $value = $data[self::FIELD_NOTE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) { + $ext = $data[self::FIELD_NOTE_EXT]; } else { - $this->setNote(new FHIRString($data[self::FIELD_NOTE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNote($value); + } else if (is_array($value)) { + $this->setNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNote(new FHIRString($ext)); } } if (isset($data[self::FIELD_RELATION])) { @@ -436,8 +443,8 @@ public function setSubject(FHIRResourceReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -550,21 +557,38 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelation())) { - $a[self::FIELD_RELATION] = $vs; + $a[self::FIELD_RELATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATION][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroup.php index fcecfb665e..2c7e72bc8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRGroup extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -208,20 +208,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTUAL])) { - $ext = (isset($data[self::FIELD_ACTUAL_EXT]) && is_array($data[self::FIELD_ACTUAL_EXT])) - ? $data[self::FIELD_ACTUAL_EXT] - : null; - if ($data[self::FIELD_ACTUAL] instanceof FHIRBoolean) { - $this->setActual($data[self::FIELD_ACTUAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTUAL])) { - $this->setActual(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTUAL]] + $ext)); - } else if (is_array($data[self::FIELD_ACTUAL])) { - $this->setActual(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTUAL]))); - } + if (isset($data[self::FIELD_ACTUAL]) || isset($data[self::FIELD_ACTUAL_EXT])) { + if (isset($data[self::FIELD_ACTUAL])) { + $value = $data[self::FIELD_ACTUAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTUAL_EXT]) && is_array($data[self::FIELD_ACTUAL_EXT])) { + $ext = $data[self::FIELD_ACTUAL_EXT]; } else { - $this->setActual(new FHIRBoolean($data[self::FIELD_ACTUAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActual($value); + } else if (is_array($value)) { + $this->setActual(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActual(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActual(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CHARACTERISTIC])) { @@ -274,52 +281,73 @@ public function __construct($data = null) $this->addMember(new FHIRResourceReference($data[self::FIELD_MEMBER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_QUANTITY])) { - $ext = (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) - ? $data[self::FIELD_QUANTITY_EXT] - : null; - if ($data[self::FIELD_QUANTITY] instanceof FHIRInteger) { - $this->setQuantity($data[self::FIELD_QUANTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_QUANTITY]] + $ext)); - } else if (is_array($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRInteger(array_merge($ext, $data[self::FIELD_QUANTITY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_QUANTITY]) || isset($data[self::FIELD_QUANTITY_EXT])) { + if (isset($data[self::FIELD_QUANTITY])) { + $value = $data[self::FIELD_QUANTITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) { + $ext = $data[self::FIELD_QUANTITY_EXT]; } else { - $this->setQuantity(new FHIRInteger($data[self::FIELD_QUANTITY])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRGroupType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGroupType([FHIRGroupType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGroupType(array_merge($ext, $data[self::FIELD_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setQuantity($value); + } else if (is_array($value)) { + $this->setQuantity(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setQuantity(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setQuantity(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRGroupType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGroupType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRGroupType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRGroupType([FHIRGroupType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRGroupType($ext)); } } } @@ -671,8 +699,8 @@ public function setType(FHIRGroupType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -826,13 +854,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActual())) { $a[self::FIELD_ACTUAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTUAL_EXT] = $enc; } } if ([] !== ($vs = $this->getCharacteristic())) { - $a[self::FIELD_CHARACTERISTIC] = $vs; + $a[self::FIELD_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTIC][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -841,29 +877,44 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getMember())) { - $a[self::FIELD_MEMBER] = $vs; + $a[self::FIELD_MEMBER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEMBER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_QUANTITY_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGroupType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGroupType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudy.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudy.php index 1d6f251766..a7d97ef352 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRImagingStudy extends FHIRResource implements PHPFHIRContainedTypeInter const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -331,68 +331,96 @@ public function __construct($data = null) $this->setAccessionNo(new FHIRIdentifier($data[self::FIELD_ACCESSION_NO])); } } - if (isset($data[self::FIELD_AVAILABILITY])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY] instanceof FHIRInstanceAvailability) { - $this->setAvailability($data[self::FIELD_AVAILABILITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $data[self::FIELD_AVAILABILITY]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $data[self::FIELD_AVAILABILITY]))); - } + if (isset($data[self::FIELD_AVAILABILITY]) || isset($data[self::FIELD_AVAILABILITY_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY])) { + $value = $data[self::FIELD_AVAILABILITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXT]; } else { - $this->setAvailability(new FHIRInstanceAvailability($data[self::FIELD_AVAILABILITY])); - } - } - if (isset($data[self::FIELD_CLINICAL_INFORMATION])) { - $ext = (isset($data[self::FIELD_CLINICAL_INFORMATION_EXT]) && is_array($data[self::FIELD_CLINICAL_INFORMATION_EXT])) - ? $data[self::FIELD_CLINICAL_INFORMATION_EXT] - : null; - if ($data[self::FIELD_CLINICAL_INFORMATION] instanceof FHIRString) { - $this->setClinicalInformation($data[self::FIELD_CLINICAL_INFORMATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLINICAL_INFORMATION])) { - $this->setClinicalInformation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CLINICAL_INFORMATION]] + $ext)); - } else if (is_array($data[self::FIELD_CLINICAL_INFORMATION])) { - $this->setClinicalInformation(new FHIRString(array_merge($ext, $data[self::FIELD_CLINICAL_INFORMATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstanceAvailability) { + $this->setAvailability($value); + } else if (is_array($value)) { + $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $value))); + } else { + $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAvailability(new FHIRInstanceAvailability($ext)); + } + } + if (isset($data[self::FIELD_CLINICAL_INFORMATION]) || isset($data[self::FIELD_CLINICAL_INFORMATION_EXT])) { + if (isset($data[self::FIELD_CLINICAL_INFORMATION])) { + $value = $data[self::FIELD_CLINICAL_INFORMATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CLINICAL_INFORMATION_EXT]) && is_array($data[self::FIELD_CLINICAL_INFORMATION_EXT])) { + $ext = $data[self::FIELD_CLINICAL_INFORMATION_EXT]; } else { - $this->setClinicalInformation(new FHIRString($data[self::FIELD_CLINICAL_INFORMATION])); - } - } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setClinicalInformation($value); + } else if (is_array($value)) { + $this->setClinicalInformation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setClinicalInformation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setClinicalInformation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -420,65 +448,88 @@ public function __construct($data = null) $this->setInterpreter(new FHIRResourceReference($data[self::FIELD_INTERPRETER])); } } - if (isset($data[self::FIELD_MODALITY])) { - $ext = (isset($data[self::FIELD_MODALITY_EXT]) && is_array($data[self::FIELD_MODALITY_EXT])) - ? $data[self::FIELD_MODALITY_EXT] - : null; - if (is_array($data[self::FIELD_MODALITY])) { - foreach($data[self::FIELD_MODALITY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRImagingModality) { - $this->addModality($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addModality(new FHIRImagingModality([FHIRImagingModality::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addModality(new FHIRImagingModality(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MODALITY]) || isset($data[self::FIELD_MODALITY_EXT])) { + if (isset($data[self::FIELD_MODALITY])) { + $value = $data[self::FIELD_MODALITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODALITY_EXT]) && is_array($data[self::FIELD_MODALITY_EXT])) { + $ext = $data[self::FIELD_MODALITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRImagingModality) { + $this->addModality($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRImagingModality) { + $this->addModality($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addModality(new FHIRImagingModality(array_merge($v, $iext))); + } else { + $this->addModality(new FHIRImagingModality([FHIRImagingModality::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addModality(new FHIRImagingModality($v)); } + } elseif (is_array($value)) { + $this->addModality(new FHIRImagingModality(array_merge($ext, $value))); + } else { + $this->addModality(new FHIRImagingModality([FHIRImagingModality::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_MODALITY] instanceof FHIRImagingModality) { - $this->addModality($data[self::FIELD_MODALITY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MODALITY])) { - $this->addModality(new FHIRImagingModality([FHIRImagingModality::FIELD_VALUE => $data[self::FIELD_MODALITY]] + $ext)); - } else { - $this->addModality(new FHIRImagingModality($data[self::FIELD_MODALITY])); - } - } - if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) - ? $data[self::FIELD_NUMBER_OF_INSTANCES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_INSTANCES] instanceof FHIRInteger) { - $this->setNumberOfInstances($data[self::FIELD_NUMBER_OF_INSTANCES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_INSTANCES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_INSTANCES]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addModality(new FHIRImagingModality($iext)); } + } + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES]) || isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { + $value = $data[self::FIELD_NUMBER_OF_INSTANCES]; } else { - $this->setNumberOfInstances(new FHIRInteger($data[self::FIELD_NUMBER_OF_INSTANCES])); - } - } - if (isset($data[self::FIELD_NUMBER_OF_SERIES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_SERIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SERIES_EXT])) - ? $data[self::FIELD_NUMBER_OF_SERIES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_SERIES] instanceof FHIRInteger) { - $this->setNumberOfSeries($data[self::FIELD_NUMBER_OF_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_SERIES])) { - $this->setNumberOfSeries(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_SERIES])) { - $this->setNumberOfSeries(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_SERIES]))); + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_INSTANCES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfInstances($value); + } else if (is_array($value)) { + $this->setNumberOfInstances(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfInstances(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumberOfInstances(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_SERIES]) || isset($data[self::FIELD_NUMBER_OF_SERIES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_SERIES])) { + $value = $data[self::FIELD_NUMBER_OF_SERIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_SERIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SERIES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_SERIES_EXT]; } else { - $this->setNumberOfSeries(new FHIRInteger($data[self::FIELD_NUMBER_OF_SERIES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfSeries($value); + } else if (is_array($value)) { + $this->setNumberOfSeries(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfSeries(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfSeries(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_ORDER])) { @@ -549,36 +600,50 @@ public function __construct($data = null) $this->setSubject(new FHIRResourceReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); - } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -1312,8 +1377,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1577,96 +1642,147 @@ public function jsonSerialize() } if (null !== ($v = $this->getAvailability())) { $a[self::FIELD_AVAILABILITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstanceAvailability::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstanceAvailability::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXT] = $enc; } } if (null !== ($v = $this->getClinicalInformation())) { $a[self::FIELD_CLINICAL_INFORMATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CLINICAL_INFORMATION_EXT] = $enc; } } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInterpreter())) { $a[self::FIELD_INTERPRETER] = $v; } if ([] !== ($vs = $this->getModality())) { $a[self::FIELD_MODALITY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MODALITY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MODALITY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRImagingModality::FIELD_VALUE]) || array_key_exists(FHIRImagingModality::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MODALITY_EXT][] = null; + unset($enc[FHIRImagingModality::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MODALITY_EXT] = $encs; + } } if (null !== ($v = $this->getNumberOfInstances())) { $a[self::FIELD_NUMBER_OF_INSTANCES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_INSTANCES_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfSeries())) { $a[self::FIELD_NUMBER_OF_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_SERIES_EXT] = $enc; } } if ([] !== ($vs = $this->getOrder())) { - $a[self::FIELD_ORDER] = $vs; + $a[self::FIELD_ORDER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ORDER][] = $v; + } } if ([] !== ($vs = $this->getProcedure())) { - $a[self::FIELD_PROCEDURE] = $vs; + $a[self::FIELD_PROCEDURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCEDURE][] = $v; + } } if (null !== ($v = $this->getReferrer())) { $a[self::FIELD_REFERRER] = $v; } if ([] !== ($vs = $this->getSeries())) { - $a[self::FIELD_SERIES] = $vs; + $a[self::FIELD_SERIES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERIES][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunization.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunization.php index 64154379f1..de27adf3ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRImmunization extends FHIRResource implements PHPFHIRContainedTypeInter const FIELD_VACCINE_TYPE = 'vaccineType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -332,20 +332,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DOSE_QUANTITY])) { @@ -355,20 +362,27 @@ public function __construct($data = null) $this->setDoseQuantity(new FHIRQuantity($data[self::FIELD_DOSE_QUANTITY])); } } - if (isset($data[self::FIELD_EXPIRATION_DATE])) { - $ext = (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) - ? $data[self::FIELD_EXPIRATION_DATE_EXT] - : null; - if ($data[self::FIELD_EXPIRATION_DATE] instanceof FHIRDate) { - $this->setExpirationDate($data[self::FIELD_EXPIRATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_EXPIRATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDate(array_merge($ext, $data[self::FIELD_EXPIRATION_DATE]))); - } + if (isset($data[self::FIELD_EXPIRATION_DATE]) || isset($data[self::FIELD_EXPIRATION_DATE_EXT])) { + if (isset($data[self::FIELD_EXPIRATION_DATE])) { + $value = $data[self::FIELD_EXPIRATION_DATE]; } else { - $this->setExpirationDate(new FHIRDate($data[self::FIELD_EXPIRATION_DATE])); + $value = null; + } + if (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) { + $ext = $data[self::FIELD_EXPIRATION_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setExpirationDate($value); + } else if (is_array($value)) { + $this->setExpirationDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setExpirationDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpirationDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_EXPLANATION])) { @@ -403,20 +417,27 @@ public function __construct($data = null) $this->setLocation(new FHIRResourceReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); - } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); } } if (isset($data[self::FIELD_MANUFACTURER])) { @@ -451,36 +472,50 @@ public function __construct($data = null) $this->addReaction(new FHIRImmunizationReaction($data[self::FIELD_REACTION])); } } - if (isset($data[self::FIELD_REFUSED_INDICATOR])) { - $ext = (isset($data[self::FIELD_REFUSED_INDICATOR_EXT]) && is_array($data[self::FIELD_REFUSED_INDICATOR_EXT])) - ? $data[self::FIELD_REFUSED_INDICATOR_EXT] - : null; - if ($data[self::FIELD_REFUSED_INDICATOR] instanceof FHIRBoolean) { - $this->setRefusedIndicator($data[self::FIELD_REFUSED_INDICATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFUSED_INDICATOR])) { - $this->setRefusedIndicator(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REFUSED_INDICATOR]] + $ext)); - } else if (is_array($data[self::FIELD_REFUSED_INDICATOR])) { - $this->setRefusedIndicator(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REFUSED_INDICATOR]))); - } + if (isset($data[self::FIELD_REFUSED_INDICATOR]) || isset($data[self::FIELD_REFUSED_INDICATOR_EXT])) { + if (isset($data[self::FIELD_REFUSED_INDICATOR])) { + $value = $data[self::FIELD_REFUSED_INDICATOR]; } else { - $this->setRefusedIndicator(new FHIRBoolean($data[self::FIELD_REFUSED_INDICATOR])); + $value = null; } - } - if (isset($data[self::FIELD_REPORTED])) { - $ext = (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) - ? $data[self::FIELD_REPORTED_EXT] - : null; - if ($data[self::FIELD_REPORTED] instanceof FHIRBoolean) { - $this->setReported($data[self::FIELD_REPORTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPORTED]] + $ext)); - } else if (is_array($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPORTED]))); + if (isset($data[self::FIELD_REFUSED_INDICATOR_EXT]) && is_array($data[self::FIELD_REFUSED_INDICATOR_EXT])) { + $ext = $data[self::FIELD_REFUSED_INDICATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRefusedIndicator($value); + } else if (is_array($value)) { + $this->setRefusedIndicator(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRefusedIndicator(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRefusedIndicator(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_REPORTED]) || isset($data[self::FIELD_REPORTED_EXT])) { + if (isset($data[self::FIELD_REPORTED])) { + $value = $data[self::FIELD_REPORTED]; } else { - $this->setReported(new FHIRBoolean($data[self::FIELD_REPORTED])); + $value = null; + } + if (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) { + $ext = $data[self::FIELD_REPORTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReported($value); + } else if (is_array($value)) { + $this->setReported(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReported(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_REQUESTER])) { @@ -1229,8 +1264,8 @@ public function setVaccineType(FHIRCodeableConcept $vaccineType = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1467,8 +1502,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1477,8 +1514,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExpirationDate())) { $a[self::FIELD_EXPIRATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_EXPIRATION_DATE_EXT] = $enc; } } @@ -1486,15 +1525,23 @@ public function jsonSerialize() $a[self::FIELD_EXPLANATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } @@ -1505,19 +1552,29 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getReaction())) { - $a[self::FIELD_REACTION] = $vs; + $a[self::FIELD_REACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REACTION][] = $v; + } } if (null !== ($v = $this->getRefusedIndicator())) { $a[self::FIELD_REFUSED_INDICATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REFUSED_INDICATOR_EXT] = $enc; } } if (null !== ($v = $this->getReported())) { $a[self::FIELD_REPORTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPORTED_EXT] = $enc; } } @@ -1534,11 +1591,20 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getVaccinationProtocol())) { - $a[self::FIELD_VACCINATION_PROTOCOL] = $vs; + $a[self::FIELD_VACCINATION_PROTOCOL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VACCINATION_PROTOCOL][] = $v; + } } if (null !== ($v = $this->getVaccineType())) { $a[self::FIELD_VACCINE_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendation.php index e7a8c8d3f8..5030f2c896 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRImmunizationRecommendation extends FHIRResource implements PHPFHIRCont const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -359,8 +359,8 @@ public function setSubject(FHIRResourceReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -459,14 +459,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getRecommendation())) { - $a[self::FIELD_RECOMMENDATION] = $vs; + $a[self::FIELD_RECOMMENDATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECOMMENDATION][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRList.php index 8f5b008119..6ccd2941fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRList extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -229,20 +229,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EMPTY_REASON])) { @@ -288,36 +295,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRListMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRListMode($data[self::FIELD_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_ORDERED])) { - $ext = (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) - ? $data[self::FIELD_ORDERED_EXT] - : null; - if ($data[self::FIELD_ORDERED] instanceof FHIRBoolean) { - $this->setOrdered($data[self::FIELD_ORDERED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ORDERED]] + $ext)); - } else if (is_array($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ORDERED]))); + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRListMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRListMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRListMode($ext)); + } + } + if (isset($data[self::FIELD_ORDERED]) || isset($data[self::FIELD_ORDERED_EXT])) { + if (isset($data[self::FIELD_ORDERED])) { + $value = $data[self::FIELD_ORDERED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) { + $ext = $data[self::FIELD_ORDERED_EXT]; } else { - $this->setOrdered(new FHIRBoolean($data[self::FIELD_ORDERED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOrdered($value); + } else if (is_array($value)) { + $this->setOrdered(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOrdered(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -716,8 +737,8 @@ public function setSubject(FHIRResourceReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -872,8 +893,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -881,22 +904,38 @@ public function jsonSerialize() $a[self::FIELD_EMPTY_REASON] = $v; } if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRListMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRListMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getOrdered())) { $a[self::FIELD_ORDERED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ORDERED_EXT] = $enc; } } @@ -906,6 +945,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocation.php index e4434779d6..06588022c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRLocation extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * There is a variety of postal address formats defined around the world. This @@ -271,20 +271,27 @@ public function __construct($data = null) $this->setAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -301,36 +308,50 @@ public function __construct($data = null) $this->setManagingOrganization(new FHIRResourceReference($data[self::FIELD_MANAGING_ORGANIZATION])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRLocationMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRLocationMode([FHIRLocationMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRLocationMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRLocationMode($data[self::FIELD_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLocationMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRLocationMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRLocationMode([FHIRLocationMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRLocationMode($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART_OF])) { @@ -354,20 +375,27 @@ public function __construct($data = null) $this->setPosition(new FHIRLocationPosition($data[self::FIELD_POSITION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRLocationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRLocationStatus([FHIRLocationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRLocationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRLocationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLocationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRLocationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRLocationStatus([FHIRLocationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRLocationStatus($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -847,8 +875,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1014,8 +1042,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1027,15 +1057,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLocationMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLocationMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1050,17 +1084,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLocationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLocationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedia.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedia.php index 13ff97689c..6c87d2cf80 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRMedia extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_WIDTH_EXT = '_width'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -288,68 +288,96 @@ public function __construct($data = null) $this->setContent(new FHIRAttachment($data[self::FIELD_CONTENT])); } } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_DEVICE_NAME])) { - $ext = (isset($data[self::FIELD_DEVICE_NAME_EXT]) && is_array($data[self::FIELD_DEVICE_NAME_EXT])) - ? $data[self::FIELD_DEVICE_NAME_EXT] - : null; - if ($data[self::FIELD_DEVICE_NAME] instanceof FHIRString) { - $this->setDeviceName($data[self::FIELD_DEVICE_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEVICE_NAME])) { - $this->setDeviceName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEVICE_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_DEVICE_NAME])) { - $this->setDeviceName(new FHIRString(array_merge($ext, $data[self::FIELD_DEVICE_NAME]))); - } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; } else { - $this->setDeviceName(new FHIRString($data[self::FIELD_DEVICE_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_FRAMES])) { - $ext = (isset($data[self::FIELD_FRAMES_EXT]) && is_array($data[self::FIELD_FRAMES_EXT])) - ? $data[self::FIELD_FRAMES_EXT] - : null; - if ($data[self::FIELD_FRAMES] instanceof FHIRInteger) { - $this->setFrames($data[self::FIELD_FRAMES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FRAMES])) { - $this->setFrames(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_FRAMES]] + $ext)); - } else if (is_array($data[self::FIELD_FRAMES])) { - $this->setFrames(new FHIRInteger(array_merge($ext, $data[self::FIELD_FRAMES]))); + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DEVICE_NAME]) || isset($data[self::FIELD_DEVICE_NAME_EXT])) { + if (isset($data[self::FIELD_DEVICE_NAME])) { + $value = $data[self::FIELD_DEVICE_NAME]; } else { - $this->setFrames(new FHIRInteger($data[self::FIELD_FRAMES])); + $value = null; + } + if (isset($data[self::FIELD_DEVICE_NAME_EXT]) && is_array($data[self::FIELD_DEVICE_NAME_EXT])) { + $ext = $data[self::FIELD_DEVICE_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeviceName($value); + } else if (is_array($value)) { + $this->setDeviceName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeviceName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeviceName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_HEIGHT])) { - $ext = (isset($data[self::FIELD_HEIGHT_EXT]) && is_array($data[self::FIELD_HEIGHT_EXT])) - ? $data[self::FIELD_HEIGHT_EXT] - : null; - if ($data[self::FIELD_HEIGHT] instanceof FHIRInteger) { - $this->setHeight($data[self::FIELD_HEIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEIGHT])) { - $this->setHeight(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_HEIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_HEIGHT])) { - $this->setHeight(new FHIRInteger(array_merge($ext, $data[self::FIELD_HEIGHT]))); + if (isset($data[self::FIELD_FRAMES]) || isset($data[self::FIELD_FRAMES_EXT])) { + if (isset($data[self::FIELD_FRAMES])) { + $value = $data[self::FIELD_FRAMES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FRAMES_EXT]) && is_array($data[self::FIELD_FRAMES_EXT])) { + $ext = $data[self::FIELD_FRAMES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setFrames($value); + } else if (is_array($value)) { + $this->setFrames(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setFrames(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFrames(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_HEIGHT]) || isset($data[self::FIELD_HEIGHT_EXT])) { + if (isset($data[self::FIELD_HEIGHT])) { + $value = $data[self::FIELD_HEIGHT]; } else { - $this->setHeight(new FHIRInteger($data[self::FIELD_HEIGHT])); + $value = null; + } + if (isset($data[self::FIELD_HEIGHT_EXT]) && is_array($data[self::FIELD_HEIGHT_EXT])) { + $ext = $data[self::FIELD_HEIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setHeight($value); + } else if (is_array($value)) { + $this->setHeight(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setHeight(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHeight(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -370,20 +398,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_LENGTH])) { - $ext = (isset($data[self::FIELD_LENGTH_EXT]) && is_array($data[self::FIELD_LENGTH_EXT])) - ? $data[self::FIELD_LENGTH_EXT] - : null; - if ($data[self::FIELD_LENGTH] instanceof FHIRInteger) { - $this->setLength($data[self::FIELD_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LENGTH])) { - $this->setLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_LENGTH])) { - $this->setLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_LENGTH]))); - } + if (isset($data[self::FIELD_LENGTH]) || isset($data[self::FIELD_LENGTH_EXT])) { + if (isset($data[self::FIELD_LENGTH])) { + $value = $data[self::FIELD_LENGTH]; } else { - $this->setLength(new FHIRInteger($data[self::FIELD_LENGTH])); + $value = null; + } + if (isset($data[self::FIELD_LENGTH_EXT]) && is_array($data[self::FIELD_LENGTH_EXT])) { + $ext = $data[self::FIELD_LENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setLength($value); + } else if (is_array($value)) { + $this->setLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLength(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_OPERATOR])) { @@ -407,20 +442,27 @@ public function __construct($data = null) $this->setSubtype(new FHIRCodeableConcept($data[self::FIELD_SUBTYPE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRMediaType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRMediaType([FHIRMediaType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRMediaType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRMediaType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMediaType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRMediaType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRMediaType([FHIRMediaType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRMediaType($ext)); } } if (isset($data[self::FIELD_VIEW])) { @@ -430,20 +472,27 @@ public function __construct($data = null) $this->setView(new FHIRCodeableConcept($data[self::FIELD_VIEW])); } } - if (isset($data[self::FIELD_WIDTH])) { - $ext = (isset($data[self::FIELD_WIDTH_EXT]) && is_array($data[self::FIELD_WIDTH_EXT])) - ? $data[self::FIELD_WIDTH_EXT] - : null; - if ($data[self::FIELD_WIDTH] instanceof FHIRInteger) { - $this->setWidth($data[self::FIELD_WIDTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WIDTH])) { - $this->setWidth(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_WIDTH]] + $ext)); - } else if (is_array($data[self::FIELD_WIDTH])) { - $this->setWidth(new FHIRInteger(array_merge($ext, $data[self::FIELD_WIDTH]))); - } + if (isset($data[self::FIELD_WIDTH]) || isset($data[self::FIELD_WIDTH_EXT])) { + if (isset($data[self::FIELD_WIDTH])) { + $value = $data[self::FIELD_WIDTH]; } else { - $this->setWidth(new FHIRInteger($data[self::FIELD_WIDTH])); + $value = null; + } + if (isset($data[self::FIELD_WIDTH_EXT]) && is_array($data[self::FIELD_WIDTH_EXT])) { + $ext = $data[self::FIELD_WIDTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setWidth($value); + } else if (is_array($value)) { + $this->setWidth(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setWidth(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWidth(new FHIRInteger($ext)); } } } @@ -967,8 +1016,8 @@ public function setWidth($width = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1172,39 +1221,55 @@ public function jsonSerialize() } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDeviceName())) { $a[self::FIELD_DEVICE_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEVICE_NAME_EXT] = $enc; } } if (null !== ($v = $this->getFrames())) { $a[self::FIELD_FRAMES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_FRAMES_EXT] = $enc; } } if (null !== ($v = $this->getHeight())) { $a[self::FIELD_HEIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_HEIGHT_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLength())) { $a[self::FIELD_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_LENGTH_EXT] = $enc; } } @@ -1219,8 +1284,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMediaType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMediaType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } @@ -1229,11 +1296,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getWidth())) { $a[self::FIELD_WIDTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_WIDTH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedication.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedication.php index e2de3e2fe1..59f6f42f6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMedication extends FHIRResource implements PHPFHIRContainedTypeInterfa const FIELD_PRODUCT = 'product'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -204,36 +204,50 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_IS_BRAND])) { - $ext = (isset($data[self::FIELD_IS_BRAND_EXT]) && is_array($data[self::FIELD_IS_BRAND_EXT])) - ? $data[self::FIELD_IS_BRAND_EXT] - : null; - if ($data[self::FIELD_IS_BRAND] instanceof FHIRBoolean) { - $this->setIsBrand($data[self::FIELD_IS_BRAND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_BRAND])) { - $this->setIsBrand(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_BRAND]] + $ext)); - } else if (is_array($data[self::FIELD_IS_BRAND])) { - $this->setIsBrand(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_BRAND]))); - } + if (isset($data[self::FIELD_IS_BRAND]) || isset($data[self::FIELD_IS_BRAND_EXT])) { + if (isset($data[self::FIELD_IS_BRAND])) { + $value = $data[self::FIELD_IS_BRAND]; } else { - $this->setIsBrand(new FHIRBoolean($data[self::FIELD_IS_BRAND])); + $value = null; } - } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRMedicationKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRMedicationKind([FHIRMedicationKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRMedicationKind(array_merge($ext, $data[self::FIELD_KIND]))); + if (isset($data[self::FIELD_IS_BRAND_EXT]) && is_array($data[self::FIELD_IS_BRAND_EXT])) { + $ext = $data[self::FIELD_IS_BRAND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsBrand($value); + } else if (is_array($value)) { + $this->setIsBrand(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsBrand(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIsBrand(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setKind(new FHIRMedicationKind($data[self::FIELD_KIND])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRMedicationKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRMedicationKind([FHIRMedicationKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRMedicationKind($ext)); } } if (isset($data[self::FIELD_MANUFACTURER])) { @@ -243,20 +257,27 @@ public function __construct($data = null) $this->setManufacturer(new FHIRResourceReference($data[self::FIELD_MANUFACTURER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PACKAGE])) { @@ -540,8 +561,8 @@ public function setProduct(FHIRMedicationProduct $product = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -670,15 +691,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getIsBrand())) { $a[self::FIELD_IS_BRAND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_BRAND_EXT] = $enc; } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } @@ -687,8 +712,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -698,6 +725,9 @@ public function jsonSerialize() if (null !== ($v = $this->getProduct())) { $a[self::FIELD_PRODUCT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministration.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministration.php index 03f1676636..155a1ade93 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRMedicationAdministration extends FHIRResource implements PHPFHIRContai const FIELD_WHEN_GIVEN = 'whenGiven'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -378,36 +378,50 @@ public function __construct($data = null) $this->addReasonNotGiven(new FHIRCodeableConcept($data[self::FIELD_REASON_NOT_GIVEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationAdministrationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationAdministrationStatus([FHIRMedicationAdministrationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationAdministrationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRMedicationAdministrationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_WAS_NOT_GIVEN])) { - $ext = (isset($data[self::FIELD_WAS_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_GIVEN_EXT])) - ? $data[self::FIELD_WAS_NOT_GIVEN_EXT] - : null; - if ($data[self::FIELD_WAS_NOT_GIVEN] instanceof FHIRBoolean) { - $this->setWasNotGiven($data[self::FIELD_WAS_NOT_GIVEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WAS_NOT_GIVEN])) { - $this->setWasNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WAS_NOT_GIVEN]] + $ext)); - } else if (is_array($data[self::FIELD_WAS_NOT_GIVEN])) { - $this->setWasNotGiven(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WAS_NOT_GIVEN]))); + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationAdministrationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationAdministrationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationAdministrationStatus([FHIRMedicationAdministrationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationAdministrationStatus($ext)); + } + } + if (isset($data[self::FIELD_WAS_NOT_GIVEN]) || isset($data[self::FIELD_WAS_NOT_GIVEN_EXT])) { + if (isset($data[self::FIELD_WAS_NOT_GIVEN])) { + $value = $data[self::FIELD_WAS_NOT_GIVEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WAS_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_GIVEN_EXT])) { + $ext = $data[self::FIELD_WAS_NOT_GIVEN_EXT]; } else { - $this->setWasNotGiven(new FHIRBoolean($data[self::FIELD_WAS_NOT_GIVEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWasNotGiven($value); + } else if (is_array($value)) { + $this->setWasNotGiven(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWasNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWasNotGiven(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_WHEN_GIVEN])) { @@ -965,8 +979,8 @@ public function setWhenGiven(FHIRPeriod $whenGiven = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1141,16 +1155,34 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDevice())) { - $a[self::FIELD_DEVICE] = $vs; + $a[self::FIELD_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEVICE][] = $v; + } } if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMedication())) { $a[self::FIELD_MEDICATION] = $v; @@ -1165,25 +1197,38 @@ public function jsonSerialize() $a[self::FIELD_PRESCRIPTION] = $v; } if ([] !== ($vs = $this->getReasonNotGiven())) { - $a[self::FIELD_REASON_NOT_GIVEN] = $vs; + $a[self::FIELD_REASON_NOT_GIVEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_NOT_GIVEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationAdministrationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationAdministrationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getWasNotGiven())) { $a[self::FIELD_WAS_NOT_GIVEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WAS_NOT_GIVEN_EXT] = $enc; } } if (null !== ($v = $this->getWhenGiven())) { $a[self::FIELD_WHEN_GIVEN] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispense.php index b7a294ff87..e708893678 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMedicationDispense extends FHIRResource implements PHPFHIRContainedTyp const FIELD_SUBSTITUTION = 'substitution'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -250,20 +250,27 @@ public function __construct($data = null) $this->setPatient(new FHIRResourceReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationDispenseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationDispenseStatus([FHIRMedicationDispenseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationDispenseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationDispenseStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationDispenseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationDispenseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationDispenseStatus([FHIRMedicationDispenseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationDispenseStatus($ext)); } } if (isset($data[self::FIELD_SUBSTITUTION])) { @@ -576,8 +583,8 @@ public function setSubstitution(FHIRMedicationDispenseSubstitution $substitution */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -700,10 +707,22 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthorizingPrescription())) { - $a[self::FIELD_AUTHORIZING_PRESCRIPTION] = $vs; + $a[self::FIELD_AUTHORIZING_PRESCRIPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHORIZING_PRESCRIPTION][] = $v; + } } if ([] !== ($vs = $this->getDispense())) { - $a[self::FIELD_DISPENSE] = $vs; + $a[self::FIELD_DISPENSE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DISPENSE][] = $v; + } } if (null !== ($v = $this->getDispenser())) { $a[self::FIELD_DISPENSER] = $v; @@ -716,14 +735,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationDispenseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationDispenseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubstitution())) { $a[self::FIELD_SUBSTITUTION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescription.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescription.php index 0f3d5cdc59..9075d1665e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescription.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRMedicationPrescription extends FHIRResource implements PHPFHIRContaine const FIELD_SUBSTITUTION = 'substitution'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -266,20 +266,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE_WRITTEN])) { - $ext = (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) - ? $data[self::FIELD_DATE_WRITTEN_EXT] - : null; - if ($data[self::FIELD_DATE_WRITTEN] instanceof FHIRDateTime) { - $this->setDateWritten($data[self::FIELD_DATE_WRITTEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_WRITTEN]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_WRITTEN]))); - } + if (isset($data[self::FIELD_DATE_WRITTEN]) || isset($data[self::FIELD_DATE_WRITTEN_EXT])) { + if (isset($data[self::FIELD_DATE_WRITTEN])) { + $value = $data[self::FIELD_DATE_WRITTEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) { + $ext = $data[self::FIELD_DATE_WRITTEN_EXT]; } else { - $this->setDateWritten(new FHIRDateTime($data[self::FIELD_DATE_WRITTEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateWritten($value); + } else if (is_array($value)) { + $this->setDateWritten(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateWritten(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DISPENSE])) { @@ -367,20 +374,27 @@ public function __construct($data = null) $this->setReasonResource(new FHIRResourceReference($data[self::FIELD_REASON_RESOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationPrescriptionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationPrescriptionStatus([FHIRMedicationPrescriptionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationPrescriptionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRMedicationPrescriptionStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationPrescriptionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationPrescriptionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationPrescriptionStatus([FHIRMedicationPrescriptionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationPrescriptionStatus($ext)); } } if (isset($data[self::FIELD_SUBSTITUTION])) { @@ -872,8 +886,8 @@ public function setSubstitution(FHIRMedicationPrescriptionSubstitution $substitu */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1035,8 +1049,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDateWritten())) { $a[self::FIELD_DATE_WRITTEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_WRITTEN_EXT] = $enc; } } @@ -1044,13 +1060,25 @@ public function jsonSerialize() $a[self::FIELD_DISPENSE] = $v; } if ([] !== ($vs = $this->getDosageInstruction())) { - $a[self::FIELD_DOSAGE_INSTRUCTION] = $vs; + $a[self::FIELD_DOSAGE_INSTRUCTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE_INSTRUCTION][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMedication())) { $a[self::FIELD_MEDICATION] = $v; @@ -1069,14 +1097,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationPrescriptionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationPrescriptionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubstitution())) { $a[self::FIELD_SUBSTITUTION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatement.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatement.php index 2757811162..3e5b6c964a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicationStatement extends FHIRResource implements PHPFHIRContainedTy const FIELD_WHEN_GIVEN = 'whenGiven'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -300,20 +300,27 @@ public function __construct($data = null) $this->addReasonNotGiven(new FHIRCodeableConcept($data[self::FIELD_REASON_NOT_GIVEN])); } } - if (isset($data[self::FIELD_WAS_NOT_GIVEN])) { - $ext = (isset($data[self::FIELD_WAS_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_GIVEN_EXT])) - ? $data[self::FIELD_WAS_NOT_GIVEN_EXT] - : null; - if ($data[self::FIELD_WAS_NOT_GIVEN] instanceof FHIRBoolean) { - $this->setWasNotGiven($data[self::FIELD_WAS_NOT_GIVEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WAS_NOT_GIVEN])) { - $this->setWasNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WAS_NOT_GIVEN]] + $ext)); - } else if (is_array($data[self::FIELD_WAS_NOT_GIVEN])) { - $this->setWasNotGiven(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WAS_NOT_GIVEN]))); - } + if (isset($data[self::FIELD_WAS_NOT_GIVEN]) || isset($data[self::FIELD_WAS_NOT_GIVEN_EXT])) { + if (isset($data[self::FIELD_WAS_NOT_GIVEN])) { + $value = $data[self::FIELD_WAS_NOT_GIVEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WAS_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_GIVEN_EXT])) { + $ext = $data[self::FIELD_WAS_NOT_GIVEN_EXT]; } else { - $this->setWasNotGiven(new FHIRBoolean($data[self::FIELD_WAS_NOT_GIVEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWasNotGiven($value); + } else if (is_array($value)) { + $this->setWasNotGiven(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWasNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWasNotGiven(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_WHEN_GIVEN])) { @@ -738,8 +745,8 @@ public function setWhenGiven(FHIRPeriod $whenGiven = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -890,13 +897,31 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDevice())) { - $a[self::FIELD_DEVICE] = $vs; + $a[self::FIELD_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEVICE][] = $v; + } } if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMedication())) { $a[self::FIELD_MEDICATION] = $v; @@ -905,18 +930,29 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getReasonNotGiven())) { - $a[self::FIELD_REASON_NOT_GIVEN] = $vs; + $a[self::FIELD_REASON_NOT_GIVEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_NOT_GIVEN][] = $v; + } } if (null !== ($v = $this->getWasNotGiven())) { $a[self::FIELD_WAS_NOT_GIVEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WAS_NOT_GIVEN_EXT] = $enc; } } if (null !== ($v = $this->getWhenGiven())) { $a[self::FIELD_WHEN_GIVEN] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeader.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeader.php index 6eb44b1670..80f23425c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRMessageHeader extends FHIRResource implements PHPFHIRContainedTypeInte const FIELD_TIMESTAMP_EXT = '_timestamp'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -330,20 +330,27 @@ public function __construct($data = null) $this->setEvent(new FHIRCoding($data[self::FIELD_EVENT])); } } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRId) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; } else { - $this->setIdentifier(new FHIRId($data[self::FIELD_IDENTIFIER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRId($ext)); } } if (isset($data[self::FIELD_REASON])) { @@ -381,20 +388,27 @@ public function __construct($data = null) $this->setSource(new FHIRMessageHeaderSource($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_TIMESTAMP])) { - $ext = (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) - ? $data[self::FIELD_TIMESTAMP_EXT] - : null; - if ($data[self::FIELD_TIMESTAMP] instanceof FHIRInstant) { - $this->setTimestamp($data[self::FIELD_TIMESTAMP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_TIMESTAMP]] + $ext)); - } else if (is_array($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant(array_merge($ext, $data[self::FIELD_TIMESTAMP]))); - } + if (isset($data[self::FIELD_TIMESTAMP]) || isset($data[self::FIELD_TIMESTAMP_EXT])) { + if (isset($data[self::FIELD_TIMESTAMP])) { + $value = $data[self::FIELD_TIMESTAMP]; } else { - $this->setTimestamp(new FHIRInstant($data[self::FIELD_TIMESTAMP])); + $value = null; + } + if (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) { + $ext = $data[self::FIELD_TIMESTAMP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setTimestamp($value); + } else if (is_array($value)) { + $this->setTimestamp(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimestamp(new FHIRInstant($ext)); } } } @@ -896,8 +910,8 @@ public function setTimestamp($timestamp = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1069,10 +1083,22 @@ public function jsonSerialize() $a[self::FIELD_AUTHOR] = $v; } if ([] !== ($vs = $this->getData())) { - $a[self::FIELD_DATA] = $vs; + $a[self::FIELD_DATA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA][] = $v; + } } if ([] !== ($vs = $this->getDestination())) { - $a[self::FIELD_DESTINATION] = $vs; + $a[self::FIELD_DESTINATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESTINATION][] = $v; + } } if (null !== ($v = $this->getEnterer())) { $a[self::FIELD_ENTERER] = $v; @@ -1082,8 +1108,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } @@ -1104,11 +1132,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimestamp())) { $a[self::FIELD_TIMESTAMP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_TIMESTAMP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservation.php index 3d48da5930..6e12816c87 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRObservation extends FHIRResource implements PHPFHIRContainedTypeInterf const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -422,20 +422,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPLIES_DATE_TIME])) { - $ext = (isset($data[self::FIELD_APPLIES_DATE_TIME_EXT]) && is_array($data[self::FIELD_APPLIES_DATE_TIME_EXT])) - ? $data[self::FIELD_APPLIES_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_APPLIES_DATE_TIME] instanceof FHIRDateTime) { - $this->setAppliesDateTime($data[self::FIELD_APPLIES_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPLIES_DATE_TIME])) { - $this->setAppliesDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_APPLIES_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_APPLIES_DATE_TIME])) { - $this->setAppliesDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_APPLIES_DATE_TIME]))); - } + if (isset($data[self::FIELD_APPLIES_DATE_TIME]) || isset($data[self::FIELD_APPLIES_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_APPLIES_DATE_TIME])) { + $value = $data[self::FIELD_APPLIES_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPLIES_DATE_TIME_EXT]) && is_array($data[self::FIELD_APPLIES_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_APPLIES_DATE_TIME_EXT]; } else { - $this->setAppliesDateTime(new FHIRDateTime($data[self::FIELD_APPLIES_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAppliesDateTime($value); + } else if (is_array($value)) { + $this->setAppliesDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAppliesDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAppliesDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_APPLIES_PERIOD])) { @@ -452,20 +459,27 @@ public function __construct($data = null) $this->setBodySite(new FHIRCodeableConcept($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_COMMENTS])) { - $ext = (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) - ? $data[self::FIELD_COMMENTS_EXT] - : null; - if ($data[self::FIELD_COMMENTS] instanceof FHIRString) { - $this->setComments($data[self::FIELD_COMMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENTS]))); - } + if (isset($data[self::FIELD_COMMENTS]) || isset($data[self::FIELD_COMMENTS_EXT])) { + if (isset($data[self::FIELD_COMMENTS])) { + $value = $data[self::FIELD_COMMENTS]; } else { - $this->setComments(new FHIRString($data[self::FIELD_COMMENTS])); + $value = null; + } + if (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) { + $ext = $data[self::FIELD_COMMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComments($value); + } else if (is_array($value)) { + $this->setComments(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComments(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -482,20 +496,27 @@ public function __construct($data = null) $this->setInterpretation(new FHIRCodeableConcept($data[self::FIELD_INTERPRETATION])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRInstant) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; } else { - $this->setIssued(new FHIRInstant($data[self::FIELD_ISSUED])); + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_METHOD])) { @@ -566,20 +587,27 @@ public function __construct($data = null) $this->addRelated(new FHIRObservationRelated($data[self::FIELD_RELATED])); } } - if (isset($data[self::FIELD_RELIABILITY])) { - $ext = (isset($data[self::FIELD_RELIABILITY_EXT]) && is_array($data[self::FIELD_RELIABILITY_EXT])) - ? $data[self::FIELD_RELIABILITY_EXT] - : null; - if ($data[self::FIELD_RELIABILITY] instanceof FHIRObservationReliability) { - $this->setReliability($data[self::FIELD_RELIABILITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELIABILITY])) { - $this->setReliability(new FHIRObservationReliability([FHIRObservationReliability::FIELD_VALUE => $data[self::FIELD_RELIABILITY]] + $ext)); - } else if (is_array($data[self::FIELD_RELIABILITY])) { - $this->setReliability(new FHIRObservationReliability(array_merge($ext, $data[self::FIELD_RELIABILITY]))); - } + if (isset($data[self::FIELD_RELIABILITY]) || isset($data[self::FIELD_RELIABILITY_EXT])) { + if (isset($data[self::FIELD_RELIABILITY])) { + $value = $data[self::FIELD_RELIABILITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELIABILITY_EXT]) && is_array($data[self::FIELD_RELIABILITY_EXT])) { + $ext = $data[self::FIELD_RELIABILITY_EXT]; } else { - $this->setReliability(new FHIRObservationReliability($data[self::FIELD_RELIABILITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationReliability) { + $this->setReliability($value); + } else if (is_array($value)) { + $this->setReliability(new FHIRObservationReliability(array_merge($ext, $value))); + } else { + $this->setReliability(new FHIRObservationReliability([FHIRObservationReliability::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReliability(new FHIRObservationReliability($ext)); } } if (isset($data[self::FIELD_SPECIMEN])) { @@ -589,20 +617,27 @@ public function __construct($data = null) $this->setSpecimen(new FHIRResourceReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRObservationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRObservationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRObservationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRObservationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -654,20 +689,27 @@ public function __construct($data = null) $this->setValueSampledData(new FHIRSampledData($data[self::FIELD_VALUE_SAMPLED_DATA])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -1555,8 +1597,8 @@ public function setValueString($valueString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1815,8 +1857,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAppliesDateTime())) { $a[self::FIELD_APPLIES_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_APPLIES_DATE_TIME_EXT] = $enc; } } @@ -1828,8 +1872,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getComments())) { $a[self::FIELD_COMMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENTS_EXT] = $enc; } } @@ -1841,8 +1887,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } @@ -1853,18 +1901,38 @@ public function jsonSerialize() $a[self::FIELD_NAME] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getReferenceRange())) { - $a[self::FIELD_REFERENCE_RANGE] = $vs; + $a[self::FIELD_REFERENCE_RANGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_RANGE][] = $v; + } } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getReliability())) { $a[self::FIELD_RELIABILITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationReliability::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationReliability::FIELD_VALUE]); $a[self::FIELD_RELIABILITY_EXT] = $enc; } } @@ -1873,8 +1941,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1901,11 +1971,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcome.php index 8bccbab9e9..ae8f4f0bea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIROperationOutcome extends FHIRResource implements PHPFHIRContainedTypeI const FIELD_ISSUE = 'issue'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A collection of error, warning or information messages that result from a system @@ -222,8 +222,8 @@ public function setIssue(array $issue = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -303,7 +303,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIssue())) { - $a[self::FIELD_ISSUE] = $vs; + $a[self::FIELD_ISSUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ISSUE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrder.php index 5283ee6d10..e7549ae111 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIROrder extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_WHEN = 'when'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -237,20 +237,27 @@ public function __construct($data = null) $this->setAuthority(new FHIRResourceReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -728,8 +735,8 @@ public function setWhen(FHIROrderWhen $when = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -882,16 +889,30 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getReasonCodeableConcept())) { $a[self::FIELD_REASON_CODEABLE_CONCEPT] = $v; @@ -911,6 +932,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhen())) { $a[self::FIELD_WHEN] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponse.php index 8ac724c61d..58f0b19e51 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIROrderResponse extends FHIRResource implements PHPFHIRContainedTypeInte const FIELD_WHO = 'who'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -238,52 +238,73 @@ public function __construct($data = null) $this->setAuthorityResource(new FHIRResourceReference($data[self::FIELD_AUTHORITY_RESOURCE])); } } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIROrderOutcomeStatus) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIROrderOutcomeStatus([FHIROrderOutcomeStatus::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIROrderOutcomeStatus(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIROrderOutcomeStatus($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROrderOutcomeStatus) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIROrderOutcomeStatus(array_merge($ext, $value))); + } else { + $this->setCode(new FHIROrderOutcomeStatus([FHIROrderOutcomeStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIROrderOutcomeStatus($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_FULFILLMENT])) { @@ -729,8 +750,8 @@ public function setWho(FHIRResourceReference $who = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -888,30 +909,48 @@ public function jsonSerialize() } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROrderOutcomeStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIROrderOutcomeStatus::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getFulfillment())) { - $a[self::FIELD_FULFILLMENT] = $vs; + $a[self::FIELD_FULFILLMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FULFILLMENT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -919,6 +958,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWho())) { $a[self::FIELD_WHO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganization.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganization.php index 677356eec2..7ae4979b3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIROrganization extends FHIRResource implements PHPFHIRContainedTypeInter const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -223,20 +223,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -311,20 +318,27 @@ public function __construct($data = null) $this->addLocation(new FHIRResourceReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART_OF])) { @@ -820,8 +834,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -994,27 +1008,55 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1022,11 +1064,20 @@ public function jsonSerialize() $a[self::FIELD_PART_OF] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROther.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROther.php index 22cd783cca..27c285654d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROther.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROther.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIROther extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -184,20 +184,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDate) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDate(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDate($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -455,8 +462,8 @@ public function setSubject(FHIRResourceReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -575,17 +582,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatient.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatient.php index fa29202355..ae9e10cb7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRPatient extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -354,20 +354,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -395,20 +402,27 @@ public function __construct($data = null) $this->setAnimal(new FHIRPatientAnimal($data[self::FIELD_ANIMAL])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDateTime) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; } else { - $this->setBirthDate(new FHIRDateTime($data[self::FIELD_BIRTH_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_CARE_PROVIDER])) { @@ -465,36 +479,50 @@ public function __construct($data = null) $this->addContact(new FHIRPatientContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) - ? $data[self::FIELD_DECEASED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DECEASED_BOOLEAN] instanceof FHIRBoolean) { - $this->setDeceasedBoolean($data[self::FIELD_DECEASED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DECEASED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DECEASED_BOOLEAN]))); - } + if (isset($data[self::FIELD_DECEASED_BOOLEAN]) || isset($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { + $value = $data[self::FIELD_DECEASED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DECEASED_BOOLEAN_EXT]; } else { - $this->setDeceasedBoolean(new FHIRBoolean($data[self::FIELD_DECEASED_BOOLEAN])); - } - } - if (isset($data[self::FIELD_DECEASED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DECEASED_DATE_TIME_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_TIME_EXT])) - ? $data[self::FIELD_DECEASED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DECEASED_DATE_TIME] instanceof FHIRDateTime) { - $this->setDeceasedDateTime($data[self::FIELD_DECEASED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_DATE_TIME])) { - $this->setDeceasedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DECEASED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_DATE_TIME])) { - $this->setDeceasedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DECEASED_DATE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeceasedBoolean($value); + } else if (is_array($value)) { + $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DECEASED_DATE_TIME]) || isset($data[self::FIELD_DECEASED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DECEASED_DATE_TIME])) { + $value = $data[self::FIELD_DECEASED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DECEASED_DATE_TIME_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DECEASED_DATE_TIME_EXT]; } else { - $this->setDeceasedDateTime(new FHIRDateTime($data[self::FIELD_DECEASED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDeceasedDateTime($value); + } else if (is_array($value)) { + $this->setDeceasedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDeceasedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeceasedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_GENDER])) { @@ -554,36 +582,50 @@ public function __construct($data = null) $this->setMaritalStatus(new FHIRCodeableConcept($data[self::FIELD_MARITAL_STATUS])); } } - if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $ext = (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) - ? $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] instanceof FHIRBoolean) { - $this->setMultipleBirthBoolean($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $this->setMultipleBirthBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $this->setMultipleBirthBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]))); - } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]) || isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $value = $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]; } else { - $this->setMultipleBirthBoolean(new FHIRBoolean($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])); - } - } - if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $ext = (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) - ? $data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_BIRTH_INTEGER] instanceof FHIRInteger) { - $this->setMultipleBirthInteger($data[self::FIELD_MULTIPLE_BIRTH_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $this->setMultipleBirthInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $this->setMultipleBirthInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]))); + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMultipleBirthBoolean($value); + } else if (is_array($value)) { + $this->setMultipleBirthBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMultipleBirthBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMultipleBirthBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER]) || isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $value = $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]; } else { - $this->setMultipleBirthInteger(new FHIRInteger($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMultipleBirthInteger($value); + } else if (is_array($value)) { + $this->setMultipleBirthInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMultipleBirthInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMultipleBirthInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_NAME])) { @@ -1544,8 +1586,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1838,44 +1880,76 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getAnimal())) { $a[self::FIELD_ANIMAL] = $v; } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCareProvider())) { - $a[self::FIELD_CARE_PROVIDER] = $vs; + $a[self::FIELD_CARE_PROVIDER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CARE_PROVIDER][] = $v; + } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDeceasedBoolean())) { $a[self::FIELD_DECEASED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DECEASED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDeceasedDateTime())) { $a[self::FIELD_DECEASED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DECEASED_DATE_TIME_EXT] = $enc; } } @@ -1883,10 +1957,22 @@ public function jsonSerialize() $a[self::FIELD_GENDER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; @@ -1896,26 +1982,51 @@ public function jsonSerialize() } if (null !== ($v = $this->getMultipleBirthBoolean())) { $a[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getMultipleBirthInteger())) { $a[self::FIELD_MULTIPLE_BIRTH_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT] = $enc; } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitioner.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitioner.php index 53e8cc123c..f8d1b4fcbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRPractitioner extends FHIRResource implements PHPFHIRContainedTypeInter const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * There is a variety of postal address formats defined around the world. This @@ -297,20 +297,27 @@ public function __construct($data = null) $this->setAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDateTime) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; } else { - $this->setBirthDate(new FHIRDateTime($data[self::FIELD_BIRTH_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_COMMUNICATION])) { @@ -1182,8 +1189,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1402,22 +1409,42 @@ public function jsonSerialize() } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v; @@ -1429,19 +1456,52 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if ([] !== ($vs = $this->getQualification())) { - $a[self::FIELD_QUALIFICATION] = $vs; + $a[self::FIELD_QUALIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUALIFICATION][] = $v; + } } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedure.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedure.php index 0053b7b56b..4447a65350 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRProcedure extends FHIRResource implements PHPFHIRContainedTypeInterfac const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -343,20 +343,27 @@ public function __construct($data = null) $this->setEncounter(new FHIRResourceReference($data[self::FIELD_ENCOUNTER])); } } - if (isset($data[self::FIELD_FOLLOW_UP])) { - $ext = (isset($data[self::FIELD_FOLLOW_UP_EXT]) && is_array($data[self::FIELD_FOLLOW_UP_EXT])) - ? $data[self::FIELD_FOLLOW_UP_EXT] - : null; - if ($data[self::FIELD_FOLLOW_UP] instanceof FHIRString) { - $this->setFollowUp($data[self::FIELD_FOLLOW_UP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOLLOW_UP])) { - $this->setFollowUp(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FOLLOW_UP]] + $ext)); - } else if (is_array($data[self::FIELD_FOLLOW_UP])) { - $this->setFollowUp(new FHIRString(array_merge($ext, $data[self::FIELD_FOLLOW_UP]))); - } + if (isset($data[self::FIELD_FOLLOW_UP]) || isset($data[self::FIELD_FOLLOW_UP_EXT])) { + if (isset($data[self::FIELD_FOLLOW_UP])) { + $value = $data[self::FIELD_FOLLOW_UP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FOLLOW_UP_EXT]) && is_array($data[self::FIELD_FOLLOW_UP_EXT])) { + $ext = $data[self::FIELD_FOLLOW_UP_EXT]; } else { - $this->setFollowUp(new FHIRString($data[self::FIELD_FOLLOW_UP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setFollowUp($value); + } else if (is_array($value)) { + $this->setFollowUp(new FHIRString(array_merge($ext, $value))); + } else { + $this->setFollowUp(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFollowUp(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -395,36 +402,50 @@ public function __construct($data = null) $this->addIndication(new FHIRCodeableConcept($data[self::FIELD_INDICATION])); } } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->setNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else if (is_array($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString(array_merge($ext, $data[self::FIELD_NOTES]))); - } + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; } else { - $this->setNotes(new FHIRString($data[self::FIELD_NOTES])); + $value = null; } - } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRString) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRString(array_merge($ext, $data[self::FIELD_OUTCOME]))); + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNotes($value); + } else if (is_array($value)) { + $this->setNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNotes(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; } else { - $this->setOutcome(new FHIRString($data[self::FIELD_OUTCOME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRString($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -1197,8 +1218,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1422,10 +1443,22 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if ([] !== ($vs = $this->getComplication())) { - $a[self::FIELD_COMPLICATION] = $vs; + $a[self::FIELD_COMPLICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPLICATION][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v; @@ -1435,39 +1468,75 @@ public function jsonSerialize() } if (null !== ($v = $this->getFollowUp())) { $a[self::FIELD_FOLLOW_UP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FOLLOW_UP_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIndication())) { - $a[self::FIELD_INDICATION] = $vs; + $a[self::FIELD_INDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INDICATION][] = $v; + } } if (null !== ($v = $this->getNotes())) { $a[self::FIELD_NOTES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTES_EXT] = $enc; } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getRelatedItem())) { - $a[self::FIELD_RELATED_ITEM] = $vs; + $a[self::FIELD_RELATED_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ITEM][] = $v; + } } if ([] !== ($vs = $this->getReport())) { - $a[self::FIELD_REPORT] = $vs; + $a[self::FIELD_REPORT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPORT][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; @@ -1475,6 +1544,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfile.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfile.php index f1e0d452a7..5301b68744 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfile.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfile.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRProfile extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -339,52 +339,73 @@ public function __construct($data = null) $this->addCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_EXTENSION_DEFN])) { @@ -405,36 +426,50 @@ public function __construct($data = null) $this->addExtensionDefn(new FHIRProfileExtensionDefn($data[self::FIELD_EXTENSION_DEFN])); } } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRId) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); - } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; } else { - $this->setFhirVersion(new FHIRId($data[self::FIELD_FHIR_VERSION])); - } - } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRString) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; } else { - $this->setIdentifier(new FHIRString($data[self::FIELD_IDENTIFIER])); + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRString($ext)); } } if (isset($data[self::FIELD_MAPPING])) { @@ -455,36 +490,50 @@ public function __construct($data = null) $this->addMapping(new FHIRProfileMapping($data[self::FIELD_MAPPING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } if (isset($data[self::FIELD_QUERY])) { @@ -505,36 +554,50 @@ public function __construct($data = null) $this->addQuery(new FHIRProfileQuery($data[self::FIELD_QUERY])); } } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); - } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRResourceProfileStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResourceProfileStatus([FHIRResourceProfileStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResourceProfileStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRResourceProfileStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceProfileStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRResourceProfileStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRResourceProfileStatus([FHIRResourceProfileStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRResourceProfileStatus($ext)); } } if (isset($data[self::FIELD_STRUCTURE])) { @@ -573,20 +636,27 @@ public function __construct($data = null) $this->addTelecom(new FHIRContact($data[self::FIELD_TELECOM])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1349,8 +1419,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1627,93 +1697,152 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getExtensionDefn())) { - $a[self::FIELD_EXTENSION_DEFN] = $vs; + $a[self::FIELD_EXTENSION_DEFN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXTENSION_DEFN][] = $v; + } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if ([] !== ($vs = $this->getQuery())) { - $a[self::FIELD_QUERY] = $vs; + $a[self::FIELD_QUERY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUERY][] = $v; + } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceProfileStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceProfileStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStructure())) { - $a[self::FIELD_STRUCTURE] = $vs; + $a[self::FIELD_STRUCTURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRUCTURE][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenance.php index 4462c4c099..bff794814b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRProvenance extends FHIRResource implements PHPFHIRContainedTypeInterfa const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Provenance information that describes the activity that led to the creation of a @@ -275,20 +275,27 @@ public function __construct($data = null) $this->addEntity(new FHIRProvenanceEntity($data[self::FIELD_ENTITY])); } } - if (isset($data[self::FIELD_INTEGRITY_SIGNATURE])) { - $ext = (isset($data[self::FIELD_INTEGRITY_SIGNATURE_EXT]) && is_array($data[self::FIELD_INTEGRITY_SIGNATURE_EXT])) - ? $data[self::FIELD_INTEGRITY_SIGNATURE_EXT] - : null; - if ($data[self::FIELD_INTEGRITY_SIGNATURE] instanceof FHIRString) { - $this->setIntegritySignature($data[self::FIELD_INTEGRITY_SIGNATURE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTEGRITY_SIGNATURE])) { - $this->setIntegritySignature(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INTEGRITY_SIGNATURE]] + $ext)); - } else if (is_array($data[self::FIELD_INTEGRITY_SIGNATURE])) { - $this->setIntegritySignature(new FHIRString(array_merge($ext, $data[self::FIELD_INTEGRITY_SIGNATURE]))); - } + if (isset($data[self::FIELD_INTEGRITY_SIGNATURE]) || isset($data[self::FIELD_INTEGRITY_SIGNATURE_EXT])) { + if (isset($data[self::FIELD_INTEGRITY_SIGNATURE])) { + $value = $data[self::FIELD_INTEGRITY_SIGNATURE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INTEGRITY_SIGNATURE_EXT]) && is_array($data[self::FIELD_INTEGRITY_SIGNATURE_EXT])) { + $ext = $data[self::FIELD_INTEGRITY_SIGNATURE_EXT]; } else { - $this->setIntegritySignature(new FHIRString($data[self::FIELD_INTEGRITY_SIGNATURE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIntegritySignature($value); + } else if (is_array($value)) { + $this->setIntegritySignature(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIntegritySignature(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntegritySignature(new FHIRString($ext)); } } if (isset($data[self::FIELD_LOCATION])) { @@ -305,33 +312,42 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_POLICY])) { - $ext = (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) - ? $data[self::FIELD_POLICY_EXT] - : null; - if (is_array($data[self::FIELD_POLICY])) { - foreach($data[self::FIELD_POLICY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addPolicy($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPolicy(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_POLICY]) || isset($data[self::FIELD_POLICY_EXT])) { + if (isset($data[self::FIELD_POLICY])) { + $value = $data[self::FIELD_POLICY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) { + $ext = $data[self::FIELD_POLICY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addPolicy($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addPolicy($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPolicy(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPolicy(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addPolicy(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPolicy(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_POLICY] instanceof FHIRUri) { - $this->addPolicy($data[self::FIELD_POLICY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_POLICY])) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_POLICY]] + $ext)); - } else { - $this->addPolicy(new FHIRUri($data[self::FIELD_POLICY])); } } if (isset($data[self::FIELD_REASON])) { @@ -341,20 +357,27 @@ public function __construct($data = null) $this->setReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_RECORDED])) { - $ext = (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) - ? $data[self::FIELD_RECORDED_EXT] - : null; - if ($data[self::FIELD_RECORDED] instanceof FHIRInstant) { - $this->setRecorded($data[self::FIELD_RECORDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_RECORDED]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant(array_merge($ext, $data[self::FIELD_RECORDED]))); - } + if (isset($data[self::FIELD_RECORDED]) || isset($data[self::FIELD_RECORDED_EXT])) { + if (isset($data[self::FIELD_RECORDED])) { + $value = $data[self::FIELD_RECORDED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) { + $ext = $data[self::FIELD_RECORDED_EXT]; } else { - $this->setRecorded(new FHIRInstant($data[self::FIELD_RECORDED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setRecorded($value); + } else if (is_array($value)) { + $this->setRecorded(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecorded(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -844,8 +867,8 @@ public function setTarget(array $target = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1010,15 +1033,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if ([] !== ($vs = $this->getEntity())) { - $a[self::FIELD_ENTITY] = $vs; + $a[self::FIELD_ENTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTITY][] = $v; + } } if (null !== ($v = $this->getIntegritySignature())) { $a[self::FIELD_INTEGRITY_SIGNATURE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INTEGRITY_SIGNATURE_EXT] = $enc; } } @@ -1030,31 +1067,50 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPolicy())) { $a[self::FIELD_POLICY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_POLICY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_POLICY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_POLICY_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_POLICY_EXT] = $encs; + } } if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v; } if (null !== ($v = $this->getRecorded())) { $a[self::FIELD_RECORDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_RECORDED_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuery.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuery.php index 2862a970ff..1d8b59f2b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuery.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRQuery extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_RESPONSE = 'response'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -140,20 +140,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRUri) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; } else { - $this->setIdentifier(new FHIRUri($data[self::FIELD_IDENTIFIER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRUri($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -334,8 +341,8 @@ public function setResponse(FHIRQueryResponse $response = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -436,17 +443,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getResponse())) { $a[self::FIELD_RESPONSE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaire.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaire.php index 947acdc48a..4e63f8fc00 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaire.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaire.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRQuestionnaire extends FHIRResource implements PHPFHIRContainedTypeInte const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -238,20 +238,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRResourceReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_AUTHORED])) { - $ext = (isset($data[self::FIELD_AUTHORED_EXT]) && is_array($data[self::FIELD_AUTHORED_EXT])) - ? $data[self::FIELD_AUTHORED_EXT] - : null; - if ($data[self::FIELD_AUTHORED] instanceof FHIRDateTime) { - $this->setAuthored($data[self::FIELD_AUTHORED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED])) { - $this->setAuthored(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED])) { - $this->setAuthored(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED]))); - } + if (isset($data[self::FIELD_AUTHORED]) || isset($data[self::FIELD_AUTHORED_EXT])) { + if (isset($data[self::FIELD_AUTHORED])) { + $value = $data[self::FIELD_AUTHORED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_EXT]) && is_array($data[self::FIELD_AUTHORED_EXT])) { + $ext = $data[self::FIELD_AUTHORED_EXT]; } else { - $this->setAuthored(new FHIRDateTime($data[self::FIELD_AUTHORED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthored($value); + } else if (is_array($value)) { + $this->setAuthored(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthored(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthored(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -300,20 +307,27 @@ public function __construct($data = null) $this->setSource(new FHIRResourceReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRQuestionnaireStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireStatus([FHIRQuestionnaireStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRQuestionnaireStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuestionnaireStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRQuestionnaireStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRQuestionnaireStatus([FHIRQuestionnaireStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRQuestionnaireStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -691,8 +705,8 @@ public function setSubject(FHIRResourceReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -832,8 +846,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthored())) { $a[self::FIELD_AUTHORED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_EXT] = $enc; } } @@ -844,7 +860,13 @@ public function jsonSerialize() $a[self::FIELD_GROUP] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v; @@ -854,14 +876,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuestionnaireStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuestionnaireStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPerson.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPerson.php index dd67967eef..e037a5f0dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRRelatedPerson extends FHIRResource implements PHPFHIRContainedTypeInte const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * There is a variety of postal address formats defined around the world. This @@ -662,8 +662,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -805,7 +805,13 @@ public function jsonSerialize() $a[self::FIELD_GENDER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v; @@ -814,13 +820,28 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEvent.php index 657b8874ed..6c1edcb788 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSecurityEvent extends FHIRResource implements PHPFHIRContainedTypeInte const FIELD_SOURCE = 'source'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A record of an event made for purposes of maintaining a security log. Typical @@ -414,8 +414,8 @@ public function setSource(FHIRSecurityEventSource $source = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -523,14 +523,29 @@ public function jsonSerialize() $a[self::FIELD_EVENT] = $v; } if ([] !== ($vs = $this->getObject())) { - $a[self::FIELD_OBJECT] = $vs; + $a[self::FIELD_OBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OBJECT][] = $v; + } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimen.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimen.php index 7041868a95..15ca66c8da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSpecimen extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -265,20 +265,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_RECEIVED_TIME])) { - $ext = (isset($data[self::FIELD_RECEIVED_TIME_EXT]) && is_array($data[self::FIELD_RECEIVED_TIME_EXT])) - ? $data[self::FIELD_RECEIVED_TIME_EXT] - : null; - if ($data[self::FIELD_RECEIVED_TIME] instanceof FHIRDateTime) { - $this->setReceivedTime($data[self::FIELD_RECEIVED_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECEIVED_TIME])) { - $this->setReceivedTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECEIVED_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_RECEIVED_TIME])) { - $this->setReceivedTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECEIVED_TIME]))); - } + if (isset($data[self::FIELD_RECEIVED_TIME]) || isset($data[self::FIELD_RECEIVED_TIME_EXT])) { + if (isset($data[self::FIELD_RECEIVED_TIME])) { + $value = $data[self::FIELD_RECEIVED_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECEIVED_TIME_EXT]) && is_array($data[self::FIELD_RECEIVED_TIME_EXT])) { + $ext = $data[self::FIELD_RECEIVED_TIME_EXT]; } else { - $this->setReceivedTime(new FHIRDateTime($data[self::FIELD_RECEIVED_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReceivedTime($value); + } else if (is_array($value)) { + $this->setReceivedTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReceivedTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReceivedTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -741,8 +748,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -905,30 +912,59 @@ public function jsonSerialize() $a[self::FIELD_COLLECTION] = $v; } if ([] !== ($vs = $this->getContainer())) { - $a[self::FIELD_CONTAINER] = $vs; + $a[self::FIELD_CONTAINER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getReceivedTime())) { $a[self::FIELD_RECEIVED_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECEIVED_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getTreatment())) { - $a[self::FIELD_TREATMENT] = $vs; + $a[self::FIELD_TREATMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TREATMENT][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstance.php index baa098c90c..e055400edc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSubstance extends FHIRResource implements PHPFHIRContainedTypeInterfac const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -150,20 +150,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_INGREDIENT])) { @@ -381,8 +388,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -489,13 +496,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } } if (null !== ($v = $this->getInstance())) { $a[self::FIELD_INSTANCE] = $v; @@ -503,6 +518,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupply.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupply.php index d6c0af7151..cba1c3bffd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupply.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupply.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSupply extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A supply - a request for something, and provision of what is supplied. @@ -223,20 +223,27 @@ public function __construct($data = null) $this->setPatient(new FHIRResourceReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSupplyStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyStatus([FHIRSupplyStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSupplyStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSupplyStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSupplyStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSupplyStatus([FHIRSupplyStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSupplyStatus($ext)); } } } @@ -479,8 +486,8 @@ public function setStatus(FHIRSupplyStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -590,7 +597,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDispense())) { - $a[self::FIELD_DISPENSE] = $vs; + $a[self::FIELD_DISPENSE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DISPENSE][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; @@ -606,11 +619,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSupplyStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSupplyStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSet.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSet.php index 737b274655..5ca0184f2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSet.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRValueSet extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -288,36 +288,50 @@ public function __construct($data = null) $this->setCompose(new FHIRValueSetCompose($data[self::FIELD_COMPOSE])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRString) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRString($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DEFINE])) { @@ -327,20 +341,27 @@ public function __construct($data = null) $this->setDefine(new FHIRValueSetDefine($data[self::FIELD_DEFINE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_EXPANSION])) { @@ -350,100 +371,142 @@ public function __construct($data = null) $this->setExpansion(new FHIRValueSetExpansion($data[self::FIELD_EXPANSION])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; } - } - if (isset($data[self::FIELD_EXTENSIBLE])) { - $ext = (isset($data[self::FIELD_EXTENSIBLE_EXT]) && is_array($data[self::FIELD_EXTENSIBLE_EXT])) - ? $data[self::FIELD_EXTENSIBLE_EXT] - : null; - if ($data[self::FIELD_EXTENSIBLE] instanceof FHIRBoolean) { - $this->setExtensible($data[self::FIELD_EXTENSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXTENSIBLE])) { - $this->setExtensible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXTENSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_EXTENSIBLE])) { - $this->setExtensible(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXTENSIBLE]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExtensible(new FHIRBoolean($data[self::FIELD_EXTENSIBLE])); + $ext = []; } - } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRString) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setIdentifier(new FHIRString($data[self::FIELD_IDENTIFIER])); + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_EXTENSIBLE]) || isset($data[self::FIELD_EXTENSIBLE_EXT])) { + if (isset($data[self::FIELD_EXTENSIBLE])) { + $value = $data[self::FIELD_EXTENSIBLE]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_EXTENSIBLE_EXT]) && is_array($data[self::FIELD_EXTENSIBLE_EXT])) { + $ext = $data[self::FIELD_EXTENSIBLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExtensible($value); + } else if (is_array($value)) { + $this->setExtensible(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExtensible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExtensible(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRValueSetStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRValueSetStatus([FHIRValueSetStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRValueSetStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRValueSetStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRValueSetStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRValueSetStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRValueSetStatus([FHIRValueSetStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRValueSetStatus($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -464,20 +527,27 @@ public function __construct($data = null) $this->addTelecom(new FHIRContact($data[self::FIELD_TELECOM])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1027,8 +1097,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1262,15 +1332,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1279,8 +1353,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1289,56 +1365,79 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getExtensible())) { $a[self::FIELD_EXTENSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXTENSIBLE_EXT] = $enc; } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRValueSetStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRValueSetStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetail.php index dd2a8f461a..f80d744430 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRSecurityEventDetail extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -125,36 +125,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRBase64Binary) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRBase64Binary($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRBase64Binary($ext)); } } } @@ -256,8 +270,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -354,18 +368,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEvent.php index afcc04f3f9..0a80973507 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRSecurityEventEvent extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Indicator for type of action performed during the event that generated the @@ -180,68 +180,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION])) { - $ext = (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) - ? $data[self::FIELD_ACTION_EXT] - : null; - if ($data[self::FIELD_ACTION] instanceof FHIRSecurityEventAction) { - $this->setAction($data[self::FIELD_ACTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRSecurityEventAction([FHIRSecurityEventAction::FIELD_VALUE => $data[self::FIELD_ACTION]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRSecurityEventAction(array_merge($ext, $data[self::FIELD_ACTION]))); - } + if (isset($data[self::FIELD_ACTION]) || isset($data[self::FIELD_ACTION_EXT])) { + if (isset($data[self::FIELD_ACTION])) { + $value = $data[self::FIELD_ACTION]; } else { - $this->setAction(new FHIRSecurityEventAction($data[self::FIELD_ACTION])); + $value = null; } - } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRInstant) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRInstant(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) { + $ext = $data[self::FIELD_ACTION_EXT]; } else { - $this->setDateTime(new FHIRInstant($data[self::FIELD_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRSecurityEventOutcome) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRSecurityEventOutcome([FHIRSecurityEventOutcome::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRSecurityEventOutcome(array_merge($ext, $data[self::FIELD_OUTCOME]))); + if (null !== $value) { + if ($value instanceof FHIRSecurityEventAction) { + $this->setAction($value); + } else if (is_array($value)) { + $this->setAction(new FHIRSecurityEventAction(array_merge($ext, $value))); + } else { + $this->setAction(new FHIRSecurityEventAction([FHIRSecurityEventAction::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAction(new FHIRSecurityEventAction($ext)); + } + } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; } else { - $this->setOutcome(new FHIRSecurityEventOutcome($data[self::FIELD_OUTCOME])); + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_OUTCOME_DESC])) { - $ext = (isset($data[self::FIELD_OUTCOME_DESC_EXT]) && is_array($data[self::FIELD_OUTCOME_DESC_EXT])) - ? $data[self::FIELD_OUTCOME_DESC_EXT] - : null; - if ($data[self::FIELD_OUTCOME_DESC] instanceof FHIRString) { - $this->setOutcomeDesc($data[self::FIELD_OUTCOME_DESC]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME_DESC])) { - $this->setOutcomeDesc(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OUTCOME_DESC]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME_DESC])) { - $this->setOutcomeDesc(new FHIRString(array_merge($ext, $data[self::FIELD_OUTCOME_DESC]))); + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSecurityEventOutcome) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRSecurityEventOutcome(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRSecurityEventOutcome([FHIRSecurityEventOutcome::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRSecurityEventOutcome($ext)); + } + } + if (isset($data[self::FIELD_OUTCOME_DESC]) || isset($data[self::FIELD_OUTCOME_DESC_EXT])) { + if (isset($data[self::FIELD_OUTCOME_DESC])) { + $value = $data[self::FIELD_OUTCOME_DESC]; } else { - $this->setOutcomeDesc(new FHIRString($data[self::FIELD_OUTCOME_DESC])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_DESC_EXT]) && is_array($data[self::FIELD_OUTCOME_DESC_EXT])) { + $ext = $data[self::FIELD_OUTCOME_DESC_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOutcomeDesc($value); + } else if (is_array($value)) { + $this->setOutcomeDesc(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOutcomeDesc(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcomeDesc(new FHIRString($ext)); } } if (isset($data[self::FIELD_SUBTYPE])) { @@ -519,8 +547,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -647,38 +675,55 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAction())) { $a[self::FIELD_ACTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSecurityEventAction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSecurityEventAction::FIELD_VALUE]); $a[self::FIELD_ACTION_EXT] = $enc; } } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSecurityEventOutcome::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSecurityEventOutcome::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } if (null !== ($v = $this->getOutcomeDesc())) { $a[self::FIELD_OUTCOME_DESC] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OUTCOME_DESC_EXT] = $enc; } } if ([] !== ($vs = $this->getSubtype())) { - $a[self::FIELD_SUBTYPE] = $vs; + $a[self::FIELD_SUBTYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBTYPE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetwork.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetwork.php index feb8dd290a..d02bec3a10 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetwork.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetwork.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRSecurityEventNetwork extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -127,36 +127,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRString) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; } else { - $this->setIdentifier(new FHIRString($data[self::FIELD_IDENTIFIER])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSecurityEventParticipantNetworkType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSecurityEventParticipantNetworkType([FHIRSecurityEventParticipantNetworkType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSecurityEventParticipantNetworkType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRSecurityEventParticipantNetworkType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSecurityEventParticipantNetworkType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSecurityEventParticipantNetworkType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSecurityEventParticipantNetworkType([FHIRSecurityEventParticipantNetworkType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRSecurityEventParticipantNetworkType($ext)); } } } @@ -254,8 +268,8 @@ public function setType(FHIRSecurityEventParticipantNetworkType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -343,18 +357,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSecurityEventParticipantNetworkType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSecurityEventParticipantNetworkType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObject.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObject.php index 3ed8f82d7d..0867b9a2d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObject.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRSecurityEventObject extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -234,20 +234,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -275,52 +282,73 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_LIFECYCLE])) { - $ext = (isset($data[self::FIELD_LIFECYCLE_EXT]) && is_array($data[self::FIELD_LIFECYCLE_EXT])) - ? $data[self::FIELD_LIFECYCLE_EXT] - : null; - if ($data[self::FIELD_LIFECYCLE] instanceof FHIRSecurityEventObjectLifecycle) { - $this->setLifecycle($data[self::FIELD_LIFECYCLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LIFECYCLE])) { - $this->setLifecycle(new FHIRSecurityEventObjectLifecycle([FHIRSecurityEventObjectLifecycle::FIELD_VALUE => $data[self::FIELD_LIFECYCLE]] + $ext)); - } else if (is_array($data[self::FIELD_LIFECYCLE])) { - $this->setLifecycle(new FHIRSecurityEventObjectLifecycle(array_merge($ext, $data[self::FIELD_LIFECYCLE]))); - } + if (isset($data[self::FIELD_LIFECYCLE]) || isset($data[self::FIELD_LIFECYCLE_EXT])) { + if (isset($data[self::FIELD_LIFECYCLE])) { + $value = $data[self::FIELD_LIFECYCLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIFECYCLE_EXT]) && is_array($data[self::FIELD_LIFECYCLE_EXT])) { + $ext = $data[self::FIELD_LIFECYCLE_EXT]; } else { - $this->setLifecycle(new FHIRSecurityEventObjectLifecycle($data[self::FIELD_LIFECYCLE])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSecurityEventObjectLifecycle) { + $this->setLifecycle($value); + } else if (is_array($value)) { + $this->setLifecycle(new FHIRSecurityEventObjectLifecycle(array_merge($ext, $value))); + } else { + $this->setLifecycle(new FHIRSecurityEventObjectLifecycle([FHIRSecurityEventObjectLifecycle::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLifecycle(new FHIRSecurityEventObjectLifecycle($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_QUERY])) { - $ext = (isset($data[self::FIELD_QUERY_EXT]) && is_array($data[self::FIELD_QUERY_EXT])) - ? $data[self::FIELD_QUERY_EXT] - : null; - if ($data[self::FIELD_QUERY] instanceof FHIRBase64Binary) { - $this->setQuery($data[self::FIELD_QUERY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUERY])) { - $this->setQuery(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_QUERY]] + $ext)); - } else if (is_array($data[self::FIELD_QUERY])) { - $this->setQuery(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_QUERY]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_QUERY]) || isset($data[self::FIELD_QUERY_EXT])) { + if (isset($data[self::FIELD_QUERY])) { + $value = $data[self::FIELD_QUERY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUERY_EXT]) && is_array($data[self::FIELD_QUERY_EXT])) { + $ext = $data[self::FIELD_QUERY_EXT]; } else { - $this->setQuery(new FHIRBase64Binary($data[self::FIELD_QUERY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setQuery($value); + } else if (is_array($value)) { + $this->setQuery(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setQuery(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQuery(new FHIRBase64Binary($ext)); } } if (isset($data[self::FIELD_REFERENCE])) { @@ -330,20 +358,27 @@ public function __construct($data = null) $this->setReference(new FHIRResourceReference($data[self::FIELD_REFERENCE])); } } - if (isset($data[self::FIELD_ROLE])) { - $ext = (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) - ? $data[self::FIELD_ROLE_EXT] - : null; - if ($data[self::FIELD_ROLE] instanceof FHIRSecurityEventObjectRole) { - $this->setRole($data[self::FIELD_ROLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRSecurityEventObjectRole([FHIRSecurityEventObjectRole::FIELD_VALUE => $data[self::FIELD_ROLE]] + $ext)); - } else if (is_array($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRSecurityEventObjectRole(array_merge($ext, $data[self::FIELD_ROLE]))); - } + if (isset($data[self::FIELD_ROLE]) || isset($data[self::FIELD_ROLE_EXT])) { + if (isset($data[self::FIELD_ROLE])) { + $value = $data[self::FIELD_ROLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) { + $ext = $data[self::FIELD_ROLE_EXT]; } else { - $this->setRole(new FHIRSecurityEventObjectRole($data[self::FIELD_ROLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSecurityEventObjectRole) { + $this->setRole($value); + } else if (is_array($value)) { + $this->setRole(new FHIRSecurityEventObjectRole(array_merge($ext, $value))); + } else { + $this->setRole(new FHIRSecurityEventObjectRole([FHIRSecurityEventObjectRole::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRole(new FHIRSecurityEventObjectRole($ext)); } } if (isset($data[self::FIELD_SENSITIVITY])) { @@ -353,20 +388,27 @@ public function __construct($data = null) $this->setSensitivity(new FHIRCodeableConcept($data[self::FIELD_SENSITIVITY])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSecurityEventObjectType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSecurityEventObjectType([FHIRSecurityEventObjectType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSecurityEventObjectType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRSecurityEventObjectType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSecurityEventObjectType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSecurityEventObjectType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSecurityEventObjectType([FHIRSecurityEventObjectType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRSecurityEventObjectType($ext)); } } } @@ -748,8 +790,8 @@ public function setType(FHIRSecurityEventObjectType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -908,35 +950,49 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if (null !== ($v = $this->getLifecycle())) { $a[self::FIELD_LIFECYCLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSecurityEventObjectLifecycle::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSecurityEventObjectLifecycle::FIELD_VALUE]); $a[self::FIELD_LIFECYCLE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getQuery())) { $a[self::FIELD_QUERY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_QUERY_EXT] = $enc; } } @@ -945,8 +1001,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSecurityEventObjectRole::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSecurityEventObjectRole::FIELD_VALUE]); $a[self::FIELD_ROLE_EXT] = $enc; } } @@ -955,11 +1013,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSecurityEventObjectType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSecurityEventObjectType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipant.php index 8af23f5afd..fc7a862161 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSecurityEventParticipant extends FHIRBackboneElement const FIELD_USER_ID_EXT = '_userId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -208,20 +208,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALT_ID])) { - $ext = (isset($data[self::FIELD_ALT_ID_EXT]) && is_array($data[self::FIELD_ALT_ID_EXT])) - ? $data[self::FIELD_ALT_ID_EXT] - : null; - if ($data[self::FIELD_ALT_ID] instanceof FHIRString) { - $this->setAltId($data[self::FIELD_ALT_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALT_ID])) { - $this->setAltId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALT_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ALT_ID])) { - $this->setAltId(new FHIRString(array_merge($ext, $data[self::FIELD_ALT_ID]))); - } + if (isset($data[self::FIELD_ALT_ID]) || isset($data[self::FIELD_ALT_ID_EXT])) { + if (isset($data[self::FIELD_ALT_ID])) { + $value = $data[self::FIELD_ALT_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALT_ID_EXT]) && is_array($data[self::FIELD_ALT_ID_EXT])) { + $ext = $data[self::FIELD_ALT_ID_EXT]; } else { - $this->setAltId(new FHIRString($data[self::FIELD_ALT_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAltId($value); + } else if (is_array($value)) { + $this->setAltId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAltId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAltId(new FHIRString($ext)); } } if (isset($data[self::FIELD_MEDIA])) { @@ -231,20 +238,27 @@ public function __construct($data = null) $this->setMedia(new FHIRCoding($data[self::FIELD_MEDIA])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NETWORK])) { @@ -261,20 +275,27 @@ public function __construct($data = null) $this->setReference(new FHIRResourceReference($data[self::FIELD_REFERENCE])); } } - if (isset($data[self::FIELD_REQUESTOR])) { - $ext = (isset($data[self::FIELD_REQUESTOR_EXT]) && is_array($data[self::FIELD_REQUESTOR_EXT])) - ? $data[self::FIELD_REQUESTOR_EXT] - : null; - if ($data[self::FIELD_REQUESTOR] instanceof FHIRBoolean) { - $this->setRequestor($data[self::FIELD_REQUESTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUESTOR])) { - $this->setRequestor(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUESTOR]] + $ext)); - } else if (is_array($data[self::FIELD_REQUESTOR])) { - $this->setRequestor(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUESTOR]))); - } + if (isset($data[self::FIELD_REQUESTOR]) || isset($data[self::FIELD_REQUESTOR_EXT])) { + if (isset($data[self::FIELD_REQUESTOR])) { + $value = $data[self::FIELD_REQUESTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUESTOR_EXT]) && is_array($data[self::FIELD_REQUESTOR_EXT])) { + $ext = $data[self::FIELD_REQUESTOR_EXT]; } else { - $this->setRequestor(new FHIRBoolean($data[self::FIELD_REQUESTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequestor($value); + } else if (is_array($value)) { + $this->setRequestor(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequestor(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequestor(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -295,20 +316,27 @@ public function __construct($data = null) $this->addRole(new FHIRCodeableConcept($data[self::FIELD_ROLE])); } } - if (isset($data[self::FIELD_USER_ID])) { - $ext = (isset($data[self::FIELD_USER_ID_EXT]) && is_array($data[self::FIELD_USER_ID_EXT])) - ? $data[self::FIELD_USER_ID_EXT] - : null; - if ($data[self::FIELD_USER_ID] instanceof FHIRString) { - $this->setUserId($data[self::FIELD_USER_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USER_ID])) { - $this->setUserId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USER_ID]] + $ext)); - } else if (is_array($data[self::FIELD_USER_ID])) { - $this->setUserId(new FHIRString(array_merge($ext, $data[self::FIELD_USER_ID]))); - } + if (isset($data[self::FIELD_USER_ID]) || isset($data[self::FIELD_USER_ID_EXT])) { + if (isset($data[self::FIELD_USER_ID])) { + $value = $data[self::FIELD_USER_ID]; } else { - $this->setUserId(new FHIRString($data[self::FIELD_USER_ID])); + $value = null; + } + if (isset($data[self::FIELD_USER_ID_EXT]) && is_array($data[self::FIELD_USER_ID_EXT])) { + $ext = $data[self::FIELD_USER_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUserId($value); + } else if (is_array($value)) { + $this->setUserId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUserId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUserId(new FHIRString($ext)); } } } @@ -647,8 +675,8 @@ public function setUserId($userId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -803,8 +831,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAltId())) { $a[self::FIELD_ALT_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALT_ID_EXT] = $enc; } } @@ -813,8 +843,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -826,21 +858,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getRequestor())) { $a[self::FIELD_REQUESTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUESTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } } if (null !== ($v = $this->getUserId())) { $a[self::FIELD_USER_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USER_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSource.php index 72758a3f3c..994b904487 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSecurityEventSource extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -137,36 +137,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRString) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; } else { - $this->setIdentifier(new FHIRString($data[self::FIELD_IDENTIFIER])); + $value = null; } - } - if (isset($data[self::FIELD_SITE])) { - $ext = (isset($data[self::FIELD_SITE_EXT]) && is_array($data[self::FIELD_SITE_EXT])) - ? $data[self::FIELD_SITE_EXT] - : null; - if ($data[self::FIELD_SITE] instanceof FHIRString) { - $this->setSite($data[self::FIELD_SITE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SITE])) { - $this->setSite(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SITE]] + $ext)); - } else if (is_array($data[self::FIELD_SITE])) { - $this->setSite(new FHIRString(array_merge($ext, $data[self::FIELD_SITE]))); + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SITE]) || isset($data[self::FIELD_SITE_EXT])) { + if (isset($data[self::FIELD_SITE])) { + $value = $data[self::FIELD_SITE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SITE_EXT]) && is_array($data[self::FIELD_SITE_EXT])) { + $ext = $data[self::FIELD_SITE_EXT]; } else { - $this->setSite(new FHIRString($data[self::FIELD_SITE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSite($value); + } else if (is_array($value)) { + $this->setSite(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSite(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSite(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -342,8 +356,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -452,20 +466,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getSite())) { $a[self::FIELD_SITE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SITE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php index e5c02289a8..1fec509441 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRSpecimenCollection extends FHIRBackboneElement const FIELD_SOURCE_SITE = 'sourceSite'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -199,20 +199,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) - ? $data[self::FIELD_COLLECTED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_COLLECTED_DATE_TIME] instanceof FHIRDateTime) { - $this->setCollectedDateTime($data[self::FIELD_COLLECTED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_COLLECTED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_COLLECTED_DATE_TIME]))); - } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME]) || isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { + $value = $data[self::FIELD_COLLECTED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_COLLECTED_DATE_TIME_EXT]; } else { - $this->setCollectedDateTime(new FHIRDateTime($data[self::FIELD_COLLECTED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCollectedDateTime($value); + } else if (is_array($value)) { + $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCollectedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_COLLECTED_PERIOD])) { @@ -229,33 +236,42 @@ public function __construct($data = null) $this->setCollector(new FHIRResourceReference($data[self::FIELD_COLLECTOR])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if (is_array($data[self::FIELD_COMMENT])) { - foreach($data[self::FIELD_COMMENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addComment($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addComment(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addComment($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addComment($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addComment(new FHIRString(array_merge($v, $iext))); + } else { + $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addComment(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addComment(new FHIRString($iext)); } - } elseif ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->addComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COMMENT])) { - $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else { - $this->addComment(new FHIRString($data[self::FIELD_COMMENT])); } } if (isset($data[self::FIELD_METHOD])) { @@ -578,8 +594,8 @@ public function setSourceSite(FHIRCodeableConcept $sourceSite = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -704,8 +720,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCollectedDateTime())) { $a[self::FIELD_COLLECTED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_COLLECTED_DATE_TIME_EXT] = $enc; } } @@ -717,18 +735,26 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getComment())) { $a[self::FIELD_COMMENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COMMENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COMMENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COMMENT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COMMENT_EXT] = $encs; + } } if (null !== ($v = $this->getMethod())) { $a[self::FIELD_METHOD] = $v; @@ -739,6 +765,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSourceSite())) { $a[self::FIELD_SOURCE_SITE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php index 780c69f810..78d09e5015 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSpecimenContainer extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -196,20 +196,27 @@ public function __construct($data = null) $this->setCapacity(new FHIRQuantity($data[self::FIELD_CAPACITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -501,8 +508,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -627,13 +634,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getSpecimenQuantity())) { $a[self::FIELD_SPECIMEN_QUANTITY] = $v; @@ -641,6 +656,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSource.php index 7c1fcba180..76d85640b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRSpecimenSource extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Type indicating if this is a parent or child relationship @@ -123,20 +123,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_RELATIONSHIP])) { - $ext = (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) - ? $data[self::FIELD_RELATIONSHIP_EXT] - : null; - if ($data[self::FIELD_RELATIONSHIP] instanceof FHIRHierarchicalRelationshipType) { - $this->setRelationship($data[self::FIELD_RELATIONSHIP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRHierarchicalRelationshipType([FHIRHierarchicalRelationshipType::FIELD_VALUE => $data[self::FIELD_RELATIONSHIP]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRHierarchicalRelationshipType(array_merge($ext, $data[self::FIELD_RELATIONSHIP]))); - } + if (isset($data[self::FIELD_RELATIONSHIP]) || isset($data[self::FIELD_RELATIONSHIP_EXT])) { + if (isset($data[self::FIELD_RELATIONSHIP])) { + $value = $data[self::FIELD_RELATIONSHIP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) { + $ext = $data[self::FIELD_RELATIONSHIP_EXT]; } else { - $this->setRelationship(new FHIRHierarchicalRelationshipType($data[self::FIELD_RELATIONSHIP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRHierarchicalRelationshipType) { + $this->setRelationship($value); + } else if (is_array($value)) { + $this->setRelationship(new FHIRHierarchicalRelationshipType(array_merge($ext, $value))); + } else { + $this->setRelationship(new FHIRHierarchicalRelationshipType([FHIRHierarchicalRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelationship(new FHIRHierarchicalRelationshipType($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -268,8 +275,8 @@ public function setTarget(array $target = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -356,13 +363,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRHierarchicalRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRHierarchicalRelationshipType::FIELD_VALUE]); $a[self::FIELD_RELATIONSHIP_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php index 0000030cad..ac3781d7ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRSpecimenTreatment extends FHIRBackboneElement const FIELD_PROCEDURE = 'procedure'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -155,20 +155,27 @@ public function __construct($data = null) $this->addAdditive(new FHIRResourceReference($data[self::FIELD_ADDITIVE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROCEDURE])) { @@ -329,8 +336,8 @@ public function setProcedure(FHIRCodeableConcept $procedure = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -430,18 +437,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdditive())) { - $a[self::FIELD_ADDITIVE] = $vs; + $a[self::FIELD_ADDITIVE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIVE][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getProcedure())) { $a[self::FIELD_PROCEDURE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php index a698bcffad..cc0067ca45 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRSubstanceIngredient extends FHIRBackboneElement const FIELD_SUBSTANCE = 'substance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A relationship of two Quantity values - expressed as a numerator and a @@ -227,8 +227,8 @@ public function setSubstance(FHIRResourceReference $substance = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -312,6 +312,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubstance())) { $a[self::FIELD_SUBSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php index 32816e9789..517705e20e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRSubstanceInstance extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -143,20 +143,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPIRY])) { - $ext = (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) - ? $data[self::FIELD_EXPIRY_EXT] - : null; - if ($data[self::FIELD_EXPIRY] instanceof FHIRDateTime) { - $this->setExpiry($data[self::FIELD_EXPIRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRY]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRY]))); - } + if (isset($data[self::FIELD_EXPIRY]) || isset($data[self::FIELD_EXPIRY_EXT])) { + if (isset($data[self::FIELD_EXPIRY])) { + $value = $data[self::FIELD_EXPIRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) { + $ext = $data[self::FIELD_EXPIRY_EXT]; } else { - $this->setExpiry(new FHIRDateTime($data[self::FIELD_EXPIRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpiry($value); + } else if (is_array($value)) { + $this->setExpiry(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpiry(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -310,8 +317,8 @@ public function setQuantity(FHIRQuantity $quantity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -405,8 +412,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpiry())) { $a[self::FIELD_EXPIRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRY_EXT] = $enc; } } @@ -416,6 +425,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispense.php index a0dfa94f63..eefb6d8c2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRSupplyDispense extends FHIRBackboneElement const FIELD_WHEN_PREPARED = 'whenPrepared'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -270,20 +270,27 @@ public function __construct($data = null) $this->addReceiver(new FHIRResourceReference($data[self::FIELD_RECEIVER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSupplyDispenseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyDispenseStatus([FHIRSupplyDispenseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyDispenseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSupplyDispenseStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSupplyDispenseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSupplyDispenseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSupplyDispenseStatus([FHIRSupplyDispenseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSupplyDispenseStatus($ext)); } } if (isset($data[self::FIELD_SUPPLIED_ITEM])) { @@ -688,8 +695,8 @@ public function setWhenPrepared(FHIRPeriod $whenPrepared = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -832,12 +839,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReceiver())) { - $a[self::FIELD_RECEIVER] = $vs; + $a[self::FIELD_RECEIVER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECEIVER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSupplyDispenseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSupplyDispenseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -856,6 +871,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhenPrepared())) { $a[self::FIELD_WHEN_PREPARED] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php index 26b0981589..1b51661a6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRValueSetCompose extends FHIRBackboneElement const FIELD_INCLUDE = 'include'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -149,33 +149,42 @@ public function __construct($data = null) $this->addExclude(new FHIRValueSetInclude($data[self::FIELD_EXCLUDE])); } } - if (isset($data[self::FIELD_IMPORT])) { - $ext = (isset($data[self::FIELD_IMPORT_EXT]) && is_array($data[self::FIELD_IMPORT_EXT])) - ? $data[self::FIELD_IMPORT_EXT] - : null; - if (is_array($data[self::FIELD_IMPORT])) { - foreach($data[self::FIELD_IMPORT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addImport($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addImport(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_IMPORT]) || isset($data[self::FIELD_IMPORT_EXT])) { + if (isset($data[self::FIELD_IMPORT])) { + $value = $data[self::FIELD_IMPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPORT_EXT]) && is_array($data[self::FIELD_IMPORT_EXT])) { + $ext = $data[self::FIELD_IMPORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addImport($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addImport($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addImport(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addImport(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addImport(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addImport(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_IMPORT] instanceof FHIRUri) { - $this->addImport($data[self::FIELD_IMPORT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_IMPORT])) { - $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IMPORT]] + $ext)); - } else { - $this->addImport(new FHIRUri($data[self::FIELD_IMPORT])); } } if (isset($data[self::FIELD_INCLUDE])) { @@ -387,8 +396,8 @@ public function setInclude(array $include = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -494,25 +503,48 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getExclude())) { - $a[self::FIELD_EXCLUDE] = $vs; + $a[self::FIELD_EXCLUDE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCLUDE][] = $v; + } } if ([] !== ($vs = $this->getImport())) { $a[self::FIELD_IMPORT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_IMPORT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_IMPORT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_IMPORT_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_IMPORT_EXT] = $encs; + } } if ([] !== ($vs = $this->getInclude())) { - $a[self::FIELD_INCLUDE] = $vs; + $a[self::FIELD_INCLUDE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INCLUDE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php index 88fa54820e..7528b70227 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRValueSetConcept extends FHIRBackboneElement const FIELD_DISPLAY_EXT = '_display'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -163,36 +163,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ABSTRACT])) { - $ext = (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) - ? $data[self::FIELD_ABSTRACT_EXT] - : null; - if ($data[self::FIELD_ABSTRACT] instanceof FHIRBoolean) { - $this->setAbstract($data[self::FIELD_ABSTRACT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABSTRACT]] + $ext)); - } else if (is_array($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABSTRACT]))); - } + if (isset($data[self::FIELD_ABSTRACT]) || isset($data[self::FIELD_ABSTRACT_EXT])) { + if (isset($data[self::FIELD_ABSTRACT])) { + $value = $data[self::FIELD_ABSTRACT]; } else { - $this->setAbstract(new FHIRBoolean($data[self::FIELD_ABSTRACT])); + $value = null; } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); + if (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) { + $ext = $data[self::FIELD_ABSTRACT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbstract($value); + } else if (is_array($value)) { + $this->setAbstract(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbstract(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONCEPT])) { @@ -213,36 +227,50 @@ public function __construct($data = null) $this->addConcept(new FHIRValueSetConcept($data[self::FIELD_CONCEPT])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRString) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRString(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; } else { - $this->setDefinition(new FHIRString($data[self::FIELD_DEFINITION])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } } @@ -476,8 +504,8 @@ public function setDisplay($display = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -614,35 +642,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAbstract())) { $a[self::FIELD_ABSTRACT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABSTRACT_EXT] = $enc; } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php index 3eff9c3b05..b874d4b8c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRValueSetContains extends FHIRBackboneElement const FIELD_SYSTEM_EXT = '_system'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -148,20 +148,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONTAINS])) { @@ -182,36 +189,50 @@ public function __construct($data = null) $this->addContains(new FHIRValueSetContains($data[self::FIELD_CONTAINS])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } } @@ -403,8 +424,8 @@ public function setSystem($system = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -527,28 +548,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getContains())) { - $a[self::FIELD_CONTAINS] = $vs; + $a[self::FIELD_CONTAINS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINS][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefine.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefine.php index 8d04c6215b..438ba20540 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefine.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefine.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRValueSetDefine extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -151,20 +151,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CASE_SENSITIVE])) { - $ext = (isset($data[self::FIELD_CASE_SENSITIVE_EXT]) && is_array($data[self::FIELD_CASE_SENSITIVE_EXT])) - ? $data[self::FIELD_CASE_SENSITIVE_EXT] - : null; - if ($data[self::FIELD_CASE_SENSITIVE] instanceof FHIRBoolean) { - $this->setCaseSensitive($data[self::FIELD_CASE_SENSITIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CASE_SENSITIVE])) { - $this->setCaseSensitive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CASE_SENSITIVE]] + $ext)); - } else if (is_array($data[self::FIELD_CASE_SENSITIVE])) { - $this->setCaseSensitive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CASE_SENSITIVE]))); - } + if (isset($data[self::FIELD_CASE_SENSITIVE]) || isset($data[self::FIELD_CASE_SENSITIVE_EXT])) { + if (isset($data[self::FIELD_CASE_SENSITIVE])) { + $value = $data[self::FIELD_CASE_SENSITIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CASE_SENSITIVE_EXT]) && is_array($data[self::FIELD_CASE_SENSITIVE_EXT])) { + $ext = $data[self::FIELD_CASE_SENSITIVE_EXT]; } else { - $this->setCaseSensitive(new FHIRBoolean($data[self::FIELD_CASE_SENSITIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCaseSensitive($value); + } else if (is_array($value)) { + $this->setCaseSensitive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCaseSensitive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCaseSensitive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CONCEPT])) { @@ -185,36 +192,50 @@ public function __construct($data = null) $this->addConcept(new FHIRValueSetConcept($data[self::FIELD_CONCEPT])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -412,8 +433,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -536,28 +557,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCaseSensitive())) { $a[self::FIELD_CASE_SENSITIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CASE_SENSITIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php index f8159896ea..afda2be5f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRValueSetExpansion extends FHIRBackboneElement const FIELD_TIMESTAMP_EXT = '_timestamp'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -160,20 +160,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_TIMESTAMP])) { - $ext = (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) - ? $data[self::FIELD_TIMESTAMP_EXT] - : null; - if ($data[self::FIELD_TIMESTAMP] instanceof FHIRInstant) { - $this->setTimestamp($data[self::FIELD_TIMESTAMP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_TIMESTAMP]] + $ext)); - } else if (is_array($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant(array_merge($ext, $data[self::FIELD_TIMESTAMP]))); - } + if (isset($data[self::FIELD_TIMESTAMP]) || isset($data[self::FIELD_TIMESTAMP_EXT])) { + if (isset($data[self::FIELD_TIMESTAMP])) { + $value = $data[self::FIELD_TIMESTAMP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) { + $ext = $data[self::FIELD_TIMESTAMP_EXT]; } else { - $this->setTimestamp(new FHIRInstant($data[self::FIELD_TIMESTAMP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setTimestamp($value); + } else if (is_array($value)) { + $this->setTimestamp(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimestamp(new FHIRInstant($ext)); } } } @@ -323,8 +330,8 @@ public function setTimestamp($timestamp = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -424,18 +431,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContains())) { - $a[self::FIELD_CONTAINS] = $vs; + $a[self::FIELD_CONTAINS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINS][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if (null !== ($v = $this->getTimestamp())) { $a[self::FIELD_TIMESTAMP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_TIMESTAMP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php index 5950dfadee..38cb5049ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRValueSetFilter extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of operation to perform as a part of a property based filter @@ -140,52 +140,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_OP])) { - $ext = (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) - ? $data[self::FIELD_OP_EXT] - : null; - if ($data[self::FIELD_OP] instanceof FHIRFilterOperator) { - $this->setOp($data[self::FIELD_OP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OP])) { - $this->setOp(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $data[self::FIELD_OP]] + $ext)); - } else if (is_array($data[self::FIELD_OP])) { - $this->setOp(new FHIRFilterOperator(array_merge($ext, $data[self::FIELD_OP]))); - } + if (isset($data[self::FIELD_OP]) || isset($data[self::FIELD_OP_EXT])) { + if (isset($data[self::FIELD_OP])) { + $value = $data[self::FIELD_OP]; } else { - $this->setOp(new FHIRFilterOperator($data[self::FIELD_OP])); + $value = null; } - } - if (isset($data[self::FIELD_PROPERTY])) { - $ext = (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) - ? $data[self::FIELD_PROPERTY_EXT] - : null; - if ($data[self::FIELD_PROPERTY] instanceof FHIRCode) { - $this->setProperty($data[self::FIELD_PROPERTY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PROPERTY]] + $ext)); - } else if (is_array($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRCode(array_merge($ext, $data[self::FIELD_PROPERTY]))); - } + if (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) { + $ext = $data[self::FIELD_OP_EXT]; } else { - $this->setProperty(new FHIRCode($data[self::FIELD_PROPERTY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFilterOperator) { + $this->setOp($value); + } else if (is_array($value)) { + $this->setOp(new FHIRFilterOperator(array_merge($ext, $value))); + } else { + $this->setOp(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOp(new FHIRFilterOperator($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRCode) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_PROPERTY]) || isset($data[self::FIELD_PROPERTY_EXT])) { + if (isset($data[self::FIELD_PROPERTY])) { + $value = $data[self::FIELD_PROPERTY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) { + $ext = $data[self::FIELD_PROPERTY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setProperty($value); + } else if (is_array($value)) { + $this->setProperty(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProperty(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRCode($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRCode($ext)); } } } @@ -325,8 +346,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -429,25 +450,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getOp())) { $a[self::FIELD_OP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFilterOperator::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFilterOperator::FIELD_VALUE]); $a[self::FIELD_OP_EXT] = $enc; } } if (null !== ($v = $this->getProperty())) { $a[self::FIELD_PROPERTY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_PROPERTY_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php index fbcd0286a7..c630c15d08 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRValueSetInclude extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -151,33 +151,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if (is_array($data[self::FIELD_CODE])) { - foreach($data[self::FIELD_CODE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addCode($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCode(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCode(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addCode($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addCode($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCode(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addCode(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCode(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCode(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->addCode($data[self::FIELD_CODE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CODE])) { - $this->addCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else { - $this->addCode(new FHIRCode($data[self::FIELD_CODE])); } } if (isset($data[self::FIELD_FILTER])) { @@ -198,36 +207,50 @@ public function __construct($data = null) $this->addFilter(new FHIRValueSetFilter($data[self::FIELD_FILTER])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -455,8 +478,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -578,36 +601,57 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { $a[self::FIELD_CODE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CODE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CODE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CODE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CODE_EXT] = $encs; + } } if ([] !== ($vs = $this->getFilter())) { - $a[self::FIELD_FILTER] = $vs; + $a[self::FIELD_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FILTER][] = $v; + } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBase64Binary.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBase64Binary.php index 57991debd1..6a1353e63e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBase64Binary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBase64Binary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRBase64Binary extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BASE_64BINARY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRBase64BinaryPrimitive @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBindingConformance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBindingConformance.php index 3ffb7abc1d..c205b35254 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBindingConformance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBindingConformance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRBindingConformance extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINDING_CONFORMANCE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRBindingConformanceList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBoolean.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBoolean.php index 85733cff77..c099cb2bcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBoolean.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRBoolean.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRBoolean extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BOOLEAN; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRBooleanPrimitive @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityCategory.php index 922a96270c..ced2ad024c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRCarePlanActivityCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRCarePlanActivityCategoryList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityStatus.php index 6c6fab7293..fa5e831640 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanActivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRCarePlanActivityStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRCarePlanActivityStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanGoalStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanGoalStatus.php index 8702d0471f..77a5315562 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanGoalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanGoalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRCarePlanGoalStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_GOAL_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRCarePlanGoalStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanStatus.php index d973ff205b..abe8569df2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCarePlanStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIRCarePlanStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRCarePlanStatusList @@ -167,8 +166,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -251,6 +250,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCausalityExpectation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCausalityExpectation.php index fd53910334..722255a5f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCausalityExpectation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCausalityExpectation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRCausalityExpectation extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CAUSALITY_EXPECTATION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRCausalityExpectationList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCode.php index bf81c5b6f5..3ba849fc54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,10 +76,9 @@ class FHIRCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRCodePrimitive @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCodeableConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCodeableConcept.php index 7767b5a02c..80ce24512a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCodeableConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCodeableConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRCodeableConcept extends FHIRElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -144,20 +144,27 @@ public function __construct($data = null) $this->addCoding(new FHIRCoding($data[self::FIELD_CODING])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -283,8 +290,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -378,15 +385,26 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCoding())) { - $a[self::FIELD_CODING] = $vs; + $a[self::FIELD_CODING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODING][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCoding.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCoding.php index c1fae3414a..82c4a7cc16 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCoding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCoding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCoding extends FHIRElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -181,68 +181,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; } - } - if (isset($data[self::FIELD_PRIMARY])) { - $ext = (isset($data[self::FIELD_PRIMARY_EXT]) && is_array($data[self::FIELD_PRIMARY_EXT])) - ? $data[self::FIELD_PRIMARY_EXT] - : null; - if ($data[self::FIELD_PRIMARY] instanceof FHIRBoolean) { - $this->setPrimary($data[self::FIELD_PRIMARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIMARY])) { - $this->setPrimary(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PRIMARY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIMARY])) { - $this->setPrimary(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PRIMARY]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setPrimary(new FHIRBoolean($data[self::FIELD_PRIMARY])); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (isset($data[self::FIELD_PRIMARY]) || isset($data[self::FIELD_PRIMARY_EXT])) { + if (isset($data[self::FIELD_PRIMARY])) { + $value = $data[self::FIELD_PRIMARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIMARY_EXT]) && is_array($data[self::FIELD_PRIMARY_EXT])) { + $ext = $data[self::FIELD_PRIMARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPrimary($value); + } else if (is_array($value)) { + $this->setPrimary(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPrimary(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPrimary(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } if (isset($data[self::FIELD_VALUE_SET])) { @@ -252,20 +280,27 @@ public function __construct($data = null) $this->setValueSet(new FHIRResourceReference($data[self::FIELD_VALUE_SET])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -525,8 +560,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -670,29 +705,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getPrimary())) { $a[self::FIELD_PRIMARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PRIMARY_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } @@ -701,11 +744,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionAttestationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionAttestationMode.php index ec91d1970d..42dd81be80 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionAttestationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionAttestationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRCompositionAttestationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRCompositionAttestationModeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionStatus.php index 0be83ae3ca..3a251ef216 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCompositionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRCompositionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRCompositionStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConceptMapEquivalence.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConceptMapEquivalence.php index a6d094ba3c..85cbde79f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConceptMapEquivalence.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConceptMapEquivalence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRConceptMapEquivalence extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRConceptMapEquivalenceList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionRelationshipType.php index 926f65d7a9..b9adaa1575 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRConditionRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRConditionRelationshipTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionStatus.php index 2c7e55cd8c..eb0589cc5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConditionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRConditionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRConditionStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceEventMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceEventMode.php index e4fb27a4d2..dd4a0a7e22 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceEventMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceEventMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRConformanceEventMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_EVENT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRConformanceEventModeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceStatementStatus.php index addebc58a9..53eee6ad3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConformanceStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRConformanceStatementStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_STATEMENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRConformanceStatementStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConstraintSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConstraintSeverity.php index c11566faae..e65f8fa237 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConstraintSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRConstraintSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRConstraintSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRConstraintSeverityList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContact.php index 2aca98f632..920898a351 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContact extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -157,52 +157,73 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRContactSystem) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRContactSystem([FHIRContactSystem::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRContactSystem(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRContactSystem($data[self::FIELD_SYSTEM])); + $value = null; } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRContactUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRContactUse([FHIRContactUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRContactUse(array_merge($ext, $data[self::FIELD_USE]))); - } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setUse(new FHIRContactUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContactSystem) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRContactSystem(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRContactSystem([FHIRContactSystem::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRContactSystem($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContactUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRContactUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRContactUse([FHIRContactUse::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUse(new FHIRContactUse($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -358,8 +379,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -463,25 +484,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContactSystem::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContactSystem::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContactUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContactUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactSystem.php index 6590222dde..c90aceb0f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRContactSystem extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_SYSTEM; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRContactSystemList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactUse.php index d12728bf8e..af67855e30 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRContactUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRContactUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRContactUseList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCriticality.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCriticality.php index 067762fa34..649f0cfd8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCriticality.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRCriticality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRCriticality extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CRITICALITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRCriticalityList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDate.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDate.php index a35a312560..8bd03953d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDate.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,10 +76,9 @@ class FHIRDate extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRDatePrimitive @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDateTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDateTime.php index 773696c13f..c4aba1927e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDateTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDateTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -77,10 +77,9 @@ class FHIRDateTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRDateTimePrimitive @@ -173,8 +172,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -257,6 +256,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal.php index 9bf1f11c82..7bc68b4e33 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRDecimal extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DECIMAL; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRDecimalPrimitive @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal/FHIRScore.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal/FHIRScore.php index fbaa780c78..01b507511b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal/FHIRScore.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDecimal/FHIRScore.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRScore extends FHIRDecimal const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SCORE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type score @@ -135,8 +135,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderPriority.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderPriority.php index 7220e62e96..1436665d46 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRDiagnosticOrderPriority extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_PRIORITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRDiagnosticOrderPriorityList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderStatus.php index 11c1b9e016..edc0dc8af4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRDiagnosticOrderStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRDiagnosticOrderStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticReportStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticReportStatus.php index 9965149d2d..0f60bde0c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDiagnosticReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRDiagnosticReportStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRDiagnosticReportStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentMode.php index 6d8bb62343..092bfedef8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRDocumentMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRDocumentModeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentReferenceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentReferenceStatus.php index d89ce5d54c..7161fd7549 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentReferenceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentReferenceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,10 +73,9 @@ class FHIRDocumentReferenceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRDocumentReferenceStatusList @@ -165,8 +164,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -249,6 +248,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentRelationshipType.php index 2c113a6a4c..4e95a8c895 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRDocumentRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRDocumentRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRDocumentRelationshipTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterClass.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterClass.php index 335235bb97..5861c4144e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterClass.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterClass.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIREncounterClass extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_CLASS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIREncounterClassList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterState.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterState.php index 11a2eb3fcc..a5d690be56 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterState.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREncounterState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIREncounterState extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIREncounterStateList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREventTiming.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREventTiming.php index 309264db01..37c4b40d9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREventTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIREventTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIREventTiming extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_TIMING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIREventTimingList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExposureType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExposureType.php index a67cf03609..b43f5f1c51 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExposureType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExposureType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRExposureType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPOSURE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRExposureTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtension.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtension.php index 24cdbd2f5b..e2f3d8e80f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtension.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtension.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,7 +75,6 @@ class FHIRExtension extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION; const FIELD_URL = 'url'; - const FIELD_URL_EXT = '_url'; const FIELD_VALUE_ADDRESS = 'valueAddress'; const FIELD_VALUE_ATTACHMENT = 'valueAttachment'; const FIELD_VALUE_BASE_64BINARY = 'valueBase64Binary'; @@ -112,7 +111,7 @@ class FHIRExtension extends FHIRElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRUriPrimitive @@ -451,52 +450,73 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -520,52 +540,73 @@ public function __construct($data = null) $this->setValueContact(new FHIRContact($data[self::FIELD_VALUE_CONTACT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); - } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_HUMAN_NAME])) { @@ -582,36 +623,50 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -663,36 +718,50 @@ public function __construct($data = null) $this->setValueSchedule(new FHIRSchedule($data[self::FIELD_VALUE_SCHEDULE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -1606,8 +1675,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1922,22 +1991,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -1952,22 +2027,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -1979,15 +2060,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } @@ -2014,18 +2099,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtensionContext.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtensionContext.php index b0ae1bf655..f8d5728164 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtensionContext.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRExtensionContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRExtensionContext extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRExtensionContextList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRFilterOperator.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRFilterOperator.php index 04506c8729..bc9c8c2cf5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRFilterOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRFilterOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRFilterOperator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRFilterOperatorList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRGroupType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRGroupType.php index 2bfb4e4675..077307de61 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRGroupType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRGroupType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRGroupType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRGroupTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHierarchicalRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHierarchicalRelationshipType.php index 23bc8e71d1..3a213ca54e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHierarchicalRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHierarchicalRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRHierarchicalRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_HIERARCHICAL_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRHierarchicalRelationshipTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHumanName.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHumanName.php index 4e1aa4b078..460b682c66 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHumanName.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRHumanName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRHumanName extends FHIRElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -186,62 +186,80 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FAMILY])) { - $ext = (isset($data[self::FIELD_FAMILY_EXT]) && is_array($data[self::FIELD_FAMILY_EXT])) - ? $data[self::FIELD_FAMILY_EXT] - : null; - if (is_array($data[self::FIELD_FAMILY])) { - foreach($data[self::FIELD_FAMILY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addFamily($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFamily(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFamily(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FAMILY]) || isset($data[self::FIELD_FAMILY_EXT])) { + if (isset($data[self::FIELD_FAMILY])) { + $value = $data[self::FIELD_FAMILY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FAMILY_EXT]) && is_array($data[self::FIELD_FAMILY_EXT])) { + $ext = $data[self::FIELD_FAMILY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addFamily($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addFamily($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFamily(new FHIRString(array_merge($v, $iext))); + } else { + $this->addFamily(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFamily(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addFamily(new FHIRString(array_merge($ext, $value))); + } else { + $this->addFamily(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFamily(new FHIRString($iext)); } - } elseif ($data[self::FIELD_FAMILY] instanceof FHIRString) { - $this->addFamily($data[self::FIELD_FAMILY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FAMILY])) { - $this->addFamily(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FAMILY]] + $ext)); - } else { - $this->addFamily(new FHIRString($data[self::FIELD_FAMILY])); } } - if (isset($data[self::FIELD_GIVEN])) { - $ext = (isset($data[self::FIELD_GIVEN_EXT]) && is_array($data[self::FIELD_GIVEN_EXT])) - ? $data[self::FIELD_GIVEN_EXT] - : null; - if (is_array($data[self::FIELD_GIVEN])) { - foreach($data[self::FIELD_GIVEN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addGiven($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addGiven(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_GIVEN]) || isset($data[self::FIELD_GIVEN_EXT])) { + if (isset($data[self::FIELD_GIVEN])) { + $value = $data[self::FIELD_GIVEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GIVEN_EXT]) && is_array($data[self::FIELD_GIVEN_EXT])) { + $ext = $data[self::FIELD_GIVEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addGiven($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addGiven($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addGiven(new FHIRString(array_merge($v, $iext))); + } else { + $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addGiven(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addGiven(new FHIRString(array_merge($ext, $value))); + } else { + $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addGiven(new FHIRString($iext)); } - } elseif ($data[self::FIELD_GIVEN] instanceof FHIRString) { - $this->addGiven($data[self::FIELD_GIVEN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_GIVEN])) { - $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GIVEN]] + $ext)); - } else { - $this->addGiven(new FHIRString($data[self::FIELD_GIVEN])); } } if (isset($data[self::FIELD_PERIOD])) { @@ -251,94 +269,126 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_PREFIX])) { - $ext = (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) - ? $data[self::FIELD_PREFIX_EXT] - : null; - if (is_array($data[self::FIELD_PREFIX])) { - foreach($data[self::FIELD_PREFIX] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPrefix($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPrefix(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PREFIX]) || isset($data[self::FIELD_PREFIX_EXT])) { + if (isset($data[self::FIELD_PREFIX])) { + $value = $data[self::FIELD_PREFIX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) { + $ext = $data[self::FIELD_PREFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPrefix($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPrefix($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPrefix(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPrefix(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPrefix(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPrefix(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PREFIX] instanceof FHIRString) { - $this->addPrefix($data[self::FIELD_PREFIX]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PREFIX])) { - $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREFIX]] + $ext)); - } else { - $this->addPrefix(new FHIRString($data[self::FIELD_PREFIX])); } } - if (isset($data[self::FIELD_SUFFIX])) { - $ext = (isset($data[self::FIELD_SUFFIX_EXT]) && is_array($data[self::FIELD_SUFFIX_EXT])) - ? $data[self::FIELD_SUFFIX_EXT] - : null; - if (is_array($data[self::FIELD_SUFFIX])) { - foreach($data[self::FIELD_SUFFIX] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSuffix($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSuffix(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUFFIX]) || isset($data[self::FIELD_SUFFIX_EXT])) { + if (isset($data[self::FIELD_SUFFIX])) { + $value = $data[self::FIELD_SUFFIX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUFFIX_EXT]) && is_array($data[self::FIELD_SUFFIX_EXT])) { + $ext = $data[self::FIELD_SUFFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSuffix($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSuffix($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSuffix(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSuffix(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSuffix(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_SUFFIX] instanceof FHIRString) { - $this->addSuffix($data[self::FIELD_SUFFIX]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUFFIX])) { - $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUFFIX]] + $ext)); - } else { - $this->addSuffix(new FHIRString($data[self::FIELD_SUFFIX])); - } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSuffix(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRNameUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRNameUse([FHIRNameUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRNameUse(array_merge($ext, $data[self::FIELD_USE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIRNameUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNameUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRNameUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRNameUse([FHIRNameUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRNameUse($ext)); } } } @@ -715,8 +765,8 @@ public function setUse(FHIRNameUse $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -862,81 +912,120 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getFamily())) { $a[self::FIELD_FAMILY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FAMILY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FAMILY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FAMILY_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FAMILY_EXT] = $encs; + } } if ([] !== ($vs = $this->getGiven())) { $a[self::FIELD_GIVEN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_GIVEN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_GIVEN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_GIVEN_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_GIVEN_EXT] = $encs; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPrefix())) { $a[self::FIELD_PREFIX] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PREFIX][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PREFIX_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PREFIX_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PREFIX_EXT] = $encs; + } } if ([] !== ($vs = $this->getSuffix())) { $a[self::FIELD_SUFFIX] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUFFIX][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUFFIX_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUFFIX_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUFFIX_EXT] = $encs; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNameUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNameUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRId.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRId.php index 4d41dd62d5..afe8eca017 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRId.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -77,10 +77,9 @@ class FHIRId extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRIdPrimitive @@ -173,8 +172,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -257,6 +256,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifier.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifier.php index c2674ab885..68a2515f85 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRIdentifier extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -180,20 +180,27 @@ public function __construct($data = null) $this->setAssigner(new FHIRResourceReference($data[self::FIELD_ASSIGNER])); } } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); - } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -203,52 +210,73 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRIdentifierUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRIdentifierUse([FHIRIdentifierUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRIdentifierUse(array_merge($ext, $data[self::FIELD_USE]))); - } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setUse(new FHIRIdentifierUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIdentifierUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRIdentifierUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRIdentifierUse([FHIRIdentifierUse::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUse(new FHIRIdentifierUse($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -478,8 +506,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -611,8 +639,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } @@ -621,25 +651,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIdentifierUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIdentifierUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifierUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifierUse.php index 59c6d76b63..0c320ee571 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifierUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIdentifierUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRIdentifierUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRIdentifierUseList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRImagingModality.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRImagingModality.php index d8837a1909..9e73d5e29d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRImagingModality.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRImagingModality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRImagingModality extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMAGING_MODALITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRImagingModalityList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstanceAvailability.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstanceAvailability.php index 58cd707cb0..0c0ad8fe29 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstanceAvailability.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstanceAvailability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRInstanceAvailability extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANCE_AVAILABILITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRInstanceAvailabilityList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstant.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstant.php index 61f8bca94f..c849e57795 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInstant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRInstant extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRInstantPrimitive @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger.php index 507d7620a8..30712847e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRInteger extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INTEGER; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRIntegerPrimitive @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger/FHIRTotalResults.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger/FHIRTotalResults.php index 163ae853a3..1d16ae0560 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger/FHIRTotalResults.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRInteger/FHIRTotalResults.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,7 +74,7 @@ class FHIRTotalResults extends FHIRInteger const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TOTAL_RESULTS; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type totalResults @@ -129,8 +129,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIssueSeverity.php index 794091d378..d0a9ac3d19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRIssueSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRIssueSeverityList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLinkType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLinkType.php index 25beff7c1f..5350b41111 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLinkType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLinkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRLinkType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINK_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRLinkTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRListMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRListMode.php index c3e74ca89c..33095fb05c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRListMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRListModeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationMode.php index f260d6b9eb..20302a1e3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIRLocationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRLocationModeList @@ -167,8 +166,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -251,6 +250,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationStatus.php index 4139a66e41..d5e5bb8a2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRLocationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRLocationStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMediaType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMediaType.php index 17a43e1e9f..9714dcefcf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMediaType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMediaType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRMediaType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDIA_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRMediaTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationAdministrationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationAdministrationStatus.php index d5ba2538f2..a58e88a03e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationAdministrationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationAdministrationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRMedicationAdministrationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRMedicationAdministrationStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationDispenseStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationDispenseStatus.php index e5377b5ba1..7df0f02709 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationDispenseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationDispenseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRMedicationDispenseStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRMedicationDispenseStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationKind.php index da6f420ed5..7e672e980c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRMedicationKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRMedicationKindList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationPrescriptionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationPrescriptionStatus.php index dccc142dcb..a4b0bdb55e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationPrescriptionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMedicationPrescriptionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIRMedicationPrescriptionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRMedicationPrescriptionStatusList @@ -167,8 +166,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -251,6 +250,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMessageSignificanceCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMessageSignificanceCategory.php index 773913e1dd..1f9f94a83d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMessageSignificanceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRMessageSignificanceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRMessageSignificanceCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRMessageSignificanceCategoryList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRModality.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRModality.php index f7fa89870e..a1662533fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRModality.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRModality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRModality extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MODALITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRModalityList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNameUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNameUse.php index c57f0d311d..f88fa555b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNameUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNameUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRNameUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAME_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRNameUseList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrative.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrative.php index d976e798c6..dcbee56afa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrative.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,12 +75,11 @@ class FHIRNarrative extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE; const FIELD_DIV = 'div'; - const FIELD_DIV_EXT = '_div'; const FIELD_STATUS = 'status'; const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The actual narrative content, a stripped down version of XHTML. @@ -126,20 +125,27 @@ public function __construct($data = null) if (isset($data[self::FIELD_DIV])) { $this->setDiv($data[self::FIELD_DIV]); } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRNarrativeStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNarrativeStatus([FHIRNarrativeStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNarrativeStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRNarrativeStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNarrativeStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRNarrativeStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRNarrativeStatus([FHIRNarrativeStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRNarrativeStatus($ext)); } } } @@ -231,8 +237,8 @@ public function setStatus(FHIRNarrativeStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -323,11 +329,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNarrativeStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNarrativeStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrativeStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrativeStatus.php index c6649fbc62..3d40897a4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrativeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRNarrativeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRNarrativeStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRNarrativeStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationRelationshipType.php index 1d2fc8c108..edda5a429a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRObservationRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRObservationRelationshipTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationReliability.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationReliability.php index bbf59406f6..4491825f2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationReliability.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationReliability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIRObservationReliability extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELIABILITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRObservationReliabilityList @@ -167,8 +166,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -251,6 +250,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationStatus.php index 62785f121c..e56d94607c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRObservationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRObservationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRObservationStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROid.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROid.php index 71647b6cf3..f75b35f116 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROid.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIROid extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIROidPrimitive @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROrderOutcomeStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROrderOutcomeStatus.php index 1ac60ba211..c7bbfc9753 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROrderOutcomeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIROrderOutcomeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIROrderOutcomeStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ORDER_OUTCOME_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIROrderOutcomeStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPeriod.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPeriod.php index c824e270d0..ad22a655d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRPeriod extends FHIRElement const FIELD_START_EXT = '_start'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -130,36 +130,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRDateTime) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRDateTime($data[self::FIELD_END])); + $value = null; } - } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRDateTime) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRDateTime(array_merge($ext, $data[self::FIELD_START]))); + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRDateTime($data[self::FIELD_START])); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRDateTime($ext)); } } } @@ -275,8 +289,8 @@ public function setStart($start = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -372,18 +386,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProcedureRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProcedureRelationshipType.php index 1d4041b217..0c36b25337 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProcedureRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProcedureRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRProcedureRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROCEDURE_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRProcedureRelationshipTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPropertyRepresentation.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPropertyRepresentation.php index de6fbc710d..dbd32651c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPropertyRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRPropertyRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRPropertyRepresentation extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRPropertyRepresentationList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProvenanceEntityRole.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProvenanceEntityRole.php index bdd9f27c6c..47e67417da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProvenanceEntityRole.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRProvenanceEntityRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRProvenanceEntityRole extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRProvenanceEntityRoleList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity.php index 25eff3cc38..e0167fec15 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRQuantity extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -166,84 +166,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_COMPARATOR])) { - $ext = (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) - ? $data[self::FIELD_COMPARATOR_EXT] - : null; - if ($data[self::FIELD_COMPARATOR] instanceof FHIRQuantityCompararator) { - $this->setComparator($data[self::FIELD_COMPARATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARATOR])) { - $this->setComparator(new FHIRQuantityCompararator([FHIRQuantityCompararator::FIELD_VALUE => $data[self::FIELD_COMPARATOR]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARATOR])) { - $this->setComparator(new FHIRQuantityCompararator(array_merge($ext, $data[self::FIELD_COMPARATOR]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setComparator(new FHIRQuantityCompararator($data[self::FIELD_COMPARATOR])); + $ext = []; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_UNITS])) { - $ext = (isset($data[self::FIELD_UNITS_EXT]) && is_array($data[self::FIELD_UNITS_EXT])) - ? $data[self::FIELD_UNITS_EXT] - : null; - if ($data[self::FIELD_UNITS] instanceof FHIRString) { - $this->setUnits($data[self::FIELD_UNITS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UNITS])) { - $this->setUnits(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_UNITS]] + $ext)); - } else if (is_array($data[self::FIELD_UNITS])) { - $this->setUnits(new FHIRString(array_merge($ext, $data[self::FIELD_UNITS]))); + if (isset($data[self::FIELD_COMPARATOR]) || isset($data[self::FIELD_COMPARATOR_EXT])) { + if (isset($data[self::FIELD_COMPARATOR])) { + $value = $data[self::FIELD_COMPARATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) { + $ext = $data[self::FIELD_COMPARATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuantityCompararator) { + $this->setComparator($value); + } else if (is_array($value)) { + $this->setComparator(new FHIRQuantityCompararator(array_merge($ext, $value))); + } else { + $this->setComparator(new FHIRQuantityCompararator([FHIRQuantityCompararator::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComparator(new FHIRQuantityCompararator($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setUnits(new FHIRString($data[self::FIELD_UNITS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_UNITS]) || isset($data[self::FIELD_UNITS_EXT])) { + if (isset($data[self::FIELD_UNITS])) { + $value = $data[self::FIELD_UNITS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UNITS_EXT]) && is_array($data[self::FIELD_UNITS_EXT])) { + $ext = $data[self::FIELD_UNITS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUnits($value); + } else if (is_array($value)) { + $this->setUnits(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUnits(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUnits(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -455,8 +490,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -587,39 +622,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getComparator())) { $a[self::FIELD_COMPARATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuantityCompararator::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuantityCompararator::FIELD_VALUE]); $a[self::FIELD_COMPARATOR_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUnits())) { $a[self::FIELD_UNITS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_UNITS_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRAge.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRAge.php index f4e12dfe13..fdc506d0d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRAge.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRAge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRAge extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Age @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRCount.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRCount.php index 31849f1229..f63c5e1147 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRCount.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRCount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRCount extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COUNT; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Count @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDistance.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDistance.php index eaba310997..2b053ccb06 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDistance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDistance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRDistance extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DISTANCE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Distance @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDuration.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDuration.php index 8c963355d1..ff6e172cd3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDuration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRDuration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRDuration extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DURATION; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Duration @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRMoney.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRMoney.php index 1477a3ca78..94c404e4b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRMoney.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantity/FHIRMoney.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRMoney extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MONEY; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Money @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantityCompararator.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantityCompararator.php index ea9efca21b..6bd1bb7403 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantityCompararator.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuantityCompararator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRQuantityCompararator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARARATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRQuantityCompararatorList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQueryOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQueryOutcome.php index 9db22172a6..677b9999c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQueryOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQueryOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRQueryOutcome extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUERY_OUTCOME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRQueryOutcomeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuestionnaireStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuestionnaireStatus.php index b1b202c174..5aea21e7e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuestionnaireStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRQuestionnaireStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRQuestionnaireStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRQuestionnaireStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRange.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRange.php index ebbd2fc7c9..049df6744b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRange.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -77,7 +77,7 @@ class FHIRRange extends FHIRElement const FIELD_LOW = 'low'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -236,8 +236,8 @@ public function setLow(FHIRQuantity $low = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getLow())) { $a[self::FIELD_LOW] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRatio.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRatio.php index 76597fbcbc..4421bb17e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRatio.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRatio.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,7 +78,7 @@ class FHIRRatio extends FHIRElement const FIELD_NUMERATOR = 'numerator'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -237,8 +237,8 @@ public function setNumerator(FHIRQuantity $numerator = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -322,6 +322,9 @@ public function jsonSerialize() if (null !== ($v = $this->getNumerator())) { $a[self::FIELD_NUMERATOR] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRReactionSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRReactionSeverity.php index 921af4a3dc..7c207a3dcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRReactionSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRReactionSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRReactionSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REACTION_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRReactionSeverityList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceProfileStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceProfileStatus.php index 9df5b10d96..49c31682bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceProfileStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceProfileStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRResourceProfileStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_PROFILE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRResourceProfileStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceReference.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceReference.php index 8d83fd10a7..270c3a45c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceReference.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResourceReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRResourceReference extends FHIRElement const FIELD_REFERENCE_EXT = '_reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -129,36 +129,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRString) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE]))); + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRString($data[self::FIELD_REFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRString($ext)); } } } @@ -272,8 +286,8 @@ public function setReference($reference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -369,18 +383,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResponseType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResponseType.php index f98d7959d2..9587de7ffa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResponseType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRResponseType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRResponseType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRResponseTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulConformanceMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulConformanceMode.php index 15f02ff443..5f65715e1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulConformanceMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulConformanceMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRRestfulConformanceMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_CONFORMANCE_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRRestfulConformanceModeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationSystem.php index cf18cd5b5e..86586fae24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRRestfulOperationSystem extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_OPERATION_SYSTEM; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRRestfulOperationSystemList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationType.php index ad462752ad..7d623cb9c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRRestfulOperationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRRestfulOperationType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_OPERATION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRRestfulOperationTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledData.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledData.php index 8e5b9a1e60..08d65038cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledData.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRSampledData extends FHIRElement const FIELD_UPPER_LIMIT_EXT = '_upperLimit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A series of data points which are decimal values separated by a single space @@ -191,68 +191,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRSampledDataDataType) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRSampledDataDataType([FHIRSampledDataDataType::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRSampledDataDataType(array_merge($ext, $data[self::FIELD_DATA]))); - } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; } else { - $this->setData(new FHIRSampledDataDataType($data[self::FIELD_DATA])); - } - } - if (isset($data[self::FIELD_DIMENSIONS])) { - $ext = (isset($data[self::FIELD_DIMENSIONS_EXT]) && is_array($data[self::FIELD_DIMENSIONS_EXT])) - ? $data[self::FIELD_DIMENSIONS_EXT] - : null; - if ($data[self::FIELD_DIMENSIONS] instanceof FHIRInteger) { - $this->setDimensions($data[self::FIELD_DIMENSIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIMENSIONS])) { - $this->setDimensions(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DIMENSIONS]] + $ext)); - } else if (is_array($data[self::FIELD_DIMENSIONS])) { - $this->setDimensions(new FHIRInteger(array_merge($ext, $data[self::FIELD_DIMENSIONS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSampledDataDataType) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRSampledDataDataType(array_merge($ext, $value))); + } else { + $this->setData(new FHIRSampledDataDataType([FHIRSampledDataDataType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setData(new FHIRSampledDataDataType($ext)); + } + } + if (isset($data[self::FIELD_DIMENSIONS]) || isset($data[self::FIELD_DIMENSIONS_EXT])) { + if (isset($data[self::FIELD_DIMENSIONS])) { + $value = $data[self::FIELD_DIMENSIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIMENSIONS_EXT]) && is_array($data[self::FIELD_DIMENSIONS_EXT])) { + $ext = $data[self::FIELD_DIMENSIONS_EXT]; } else { - $this->setDimensions(new FHIRInteger($data[self::FIELD_DIMENSIONS])); - } - } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDimensions($value); + } else if (is_array($value)) { + $this->setDimensions(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDimensions(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDimensions(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); - } - } - if (isset($data[self::FIELD_LOWER_LIMIT])) { - $ext = (isset($data[self::FIELD_LOWER_LIMIT_EXT]) && is_array($data[self::FIELD_LOWER_LIMIT_EXT])) - ? $data[self::FIELD_LOWER_LIMIT_EXT] - : null; - if ($data[self::FIELD_LOWER_LIMIT] instanceof FHIRDecimal) { - $this->setLowerLimit($data[self::FIELD_LOWER_LIMIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOWER_LIMIT])) { - $this->setLowerLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LOWER_LIMIT]] + $ext)); - } else if (is_array($data[self::FIELD_LOWER_LIMIT])) { - $this->setLowerLimit(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LOWER_LIMIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_LOWER_LIMIT]) || isset($data[self::FIELD_LOWER_LIMIT_EXT])) { + if (isset($data[self::FIELD_LOWER_LIMIT])) { + $value = $data[self::FIELD_LOWER_LIMIT]; } else { - $this->setLowerLimit(new FHIRDecimal($data[self::FIELD_LOWER_LIMIT])); + $value = null; + } + if (isset($data[self::FIELD_LOWER_LIMIT_EXT]) && is_array($data[self::FIELD_LOWER_LIMIT_EXT])) { + $ext = $data[self::FIELD_LOWER_LIMIT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLowerLimit($value); + } else if (is_array($value)) { + $this->setLowerLimit(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLowerLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLowerLimit(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_ORIGIN])) { @@ -262,36 +290,50 @@ public function __construct($data = null) $this->setOrigin(new FHIRQuantity($data[self::FIELD_ORIGIN])); } } - if (isset($data[self::FIELD_PERIOD])) { - $ext = (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) - ? $data[self::FIELD_PERIOD_EXT] - : null; - if ($data[self::FIELD_PERIOD] instanceof FHIRDecimal) { - $this->setPeriod($data[self::FIELD_PERIOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD]))); - } + if (isset($data[self::FIELD_PERIOD]) || isset($data[self::FIELD_PERIOD_EXT])) { + if (isset($data[self::FIELD_PERIOD])) { + $value = $data[self::FIELD_PERIOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) { + $ext = $data[self::FIELD_PERIOD_EXT]; } else { - $this->setPeriod(new FHIRDecimal($data[self::FIELD_PERIOD])); - } - } - if (isset($data[self::FIELD_UPPER_LIMIT])) { - $ext = (isset($data[self::FIELD_UPPER_LIMIT_EXT]) && is_array($data[self::FIELD_UPPER_LIMIT_EXT])) - ? $data[self::FIELD_UPPER_LIMIT_EXT] - : null; - if ($data[self::FIELD_UPPER_LIMIT] instanceof FHIRDecimal) { - $this->setUpperLimit($data[self::FIELD_UPPER_LIMIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UPPER_LIMIT])) { - $this->setUpperLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_UPPER_LIMIT]] + $ext)); - } else if (is_array($data[self::FIELD_UPPER_LIMIT])) { - $this->setUpperLimit(new FHIRDecimal(array_merge($ext, $data[self::FIELD_UPPER_LIMIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriod($value); + } else if (is_array($value)) { + $this->setPeriod(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriod(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_UPPER_LIMIT]) || isset($data[self::FIELD_UPPER_LIMIT_EXT])) { + if (isset($data[self::FIELD_UPPER_LIMIT])) { + $value = $data[self::FIELD_UPPER_LIMIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UPPER_LIMIT_EXT]) && is_array($data[self::FIELD_UPPER_LIMIT_EXT])) { + $ext = $data[self::FIELD_UPPER_LIMIT_EXT]; } else { - $this->setUpperLimit(new FHIRDecimal($data[self::FIELD_UPPER_LIMIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setUpperLimit($value); + } else if (is_array($value)) { + $this->setUpperLimit(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setUpperLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUpperLimit(new FHIRDecimal($ext)); } } } @@ -581,8 +623,8 @@ public function setUpperLimit($upperLimit = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -740,29 +782,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSampledDataDataType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSampledDataDataType::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } if (null !== ($v = $this->getDimensions())) { $a[self::FIELD_DIMENSIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DIMENSIONS_EXT] = $enc; } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if (null !== ($v = $this->getLowerLimit())) { $a[self::FIELD_LOWER_LIMIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LOWER_LIMIT_EXT] = $enc; } } @@ -771,18 +821,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_EXT] = $enc; } } if (null !== ($v = $this->getUpperLimit())) { $a[self::FIELD_UPPER_LIMIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_UPPER_LIMIT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledDataDataType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledDataDataType.php index 8e52ba8d6e..d50abd182f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledDataDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSampledDataDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,10 +71,9 @@ class FHIRSampledDataDataType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRSampledDataDataTypePrimitive @@ -167,8 +166,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -251,6 +250,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule.php index 588d0427c7..1e9135a639 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRSchedule extends FHIRElement const FIELD_REPEAT = 'repeat'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -266,8 +266,8 @@ public function setRepeat(FHIRScheduleRepeat $repeat = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -353,11 +353,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getRepeat())) { $a[self::FIELD_REPEAT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule/FHIRScheduleRepeat.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule/FHIRScheduleRepeat.php index 3da12ee179..4d0d365c78 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule/FHIRScheduleRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSchedule/FHIRScheduleRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRScheduleRepeat extends FHIRElement const FIELD_WHEN_EXT = '_when'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -180,100 +180,142 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRInteger) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; } else { - $this->setCount(new FHIRInteger($data[self::FIELD_COUNT])); + $value = null; } - } - if (isset($data[self::FIELD_DURATION])) { - $ext = (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) - ? $data[self::FIELD_DURATION_EXT] - : null; - if ($data[self::FIELD_DURATION] instanceof FHIRDecimal) { - $this->setDuration($data[self::FIELD_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DURATION]))); - } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; } else { - $this->setDuration(new FHIRDecimal($data[self::FIELD_DURATION])); + $ext = []; } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRDateTime) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime(array_merge($ext, $data[self::FIELD_END]))); + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setEnd(new FHIRDateTime($data[self::FIELD_END])); + } else if ([] !== $ext) { + $this->setCount(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_FREQUENCY])) { - $ext = (isset($data[self::FIELD_FREQUENCY_EXT]) && is_array($data[self::FIELD_FREQUENCY_EXT])) - ? $data[self::FIELD_FREQUENCY_EXT] - : null; - if ($data[self::FIELD_FREQUENCY] instanceof FHIRInteger) { - $this->setFrequency($data[self::FIELD_FREQUENCY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FREQUENCY])) { - $this->setFrequency(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_FREQUENCY]] + $ext)); - } else if (is_array($data[self::FIELD_FREQUENCY])) { - $this->setFrequency(new FHIRInteger(array_merge($ext, $data[self::FIELD_FREQUENCY]))); - } + if (isset($data[self::FIELD_DURATION]) || isset($data[self::FIELD_DURATION_EXT])) { + if (isset($data[self::FIELD_DURATION])) { + $value = $data[self::FIELD_DURATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) { + $ext = $data[self::FIELD_DURATION_EXT]; } else { - $this->setFrequency(new FHIRInteger($data[self::FIELD_FREQUENCY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDuration($value); + } else if (is_array($value)) { + $this->setDuration(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDuration(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_UNITS])) { - $ext = (isset($data[self::FIELD_UNITS_EXT]) && is_array($data[self::FIELD_UNITS_EXT])) - ? $data[self::FIELD_UNITS_EXT] - : null; - if ($data[self::FIELD_UNITS] instanceof FHIRUnitsOfTime) { - $this->setUnits($data[self::FIELD_UNITS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UNITS])) { - $this->setUnits(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $data[self::FIELD_UNITS]] + $ext)); - } else if (is_array($data[self::FIELD_UNITS])) { - $this->setUnits(new FHIRUnitsOfTime(array_merge($ext, $data[self::FIELD_UNITS]))); + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_FREQUENCY]) || isset($data[self::FIELD_FREQUENCY_EXT])) { + if (isset($data[self::FIELD_FREQUENCY])) { + $value = $data[self::FIELD_FREQUENCY]; } else { - $this->setUnits(new FHIRUnitsOfTime($data[self::FIELD_UNITS])); + $value = null; + } + if (isset($data[self::FIELD_FREQUENCY_EXT]) && is_array($data[self::FIELD_FREQUENCY_EXT])) { + $ext = $data[self::FIELD_FREQUENCY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setFrequency($value); + } else if (is_array($value)) { + $this->setFrequency(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setFrequency(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFrequency(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_WHEN])) { - $ext = (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) - ? $data[self::FIELD_WHEN_EXT] - : null; - if ($data[self::FIELD_WHEN] instanceof FHIREventTiming) { - $this->setWhen($data[self::FIELD_WHEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $data[self::FIELD_WHEN]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIREventTiming(array_merge($ext, $data[self::FIELD_WHEN]))); + if (isset($data[self::FIELD_UNITS]) || isset($data[self::FIELD_UNITS_EXT])) { + if (isset($data[self::FIELD_UNITS])) { + $value = $data[self::FIELD_UNITS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UNITS_EXT]) && is_array($data[self::FIELD_UNITS_EXT])) { + $ext = $data[self::FIELD_UNITS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnitsOfTime) { + $this->setUnits($value); + } else if (is_array($value)) { + $this->setUnits(new FHIRUnitsOfTime(array_merge($ext, $value))); + } else { + $this->setUnits(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUnits(new FHIRUnitsOfTime($ext)); + } + } + if (isset($data[self::FIELD_WHEN]) || isset($data[self::FIELD_WHEN_EXT])) { + if (isset($data[self::FIELD_WHEN])) { + $value = $data[self::FIELD_WHEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) { + $ext = $data[self::FIELD_WHEN_EXT]; } else { - $this->setWhen(new FHIREventTiming($data[self::FIELD_WHEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventTiming) { + $this->setWhen($value); + } else if (is_array($value)) { + $this->setWhen(new FHIREventTiming(array_merge($ext, $value))); + } else { + $this->setWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhen(new FHIREventTiming($ext)); } } } @@ -509,8 +551,8 @@ public function setWhen(FHIREventTiming $when = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -646,46 +688,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } if (null !== ($v = $this->getDuration())) { $a[self::FIELD_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DURATION_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getFrequency())) { $a[self::FIELD_FREQUENCY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_FREQUENCY_EXT] = $enc; } } if (null !== ($v = $this->getUnits())) { $a[self::FIELD_UNITS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnitsOfTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnitsOfTime::FIELD_VALUE]); $a[self::FIELD_UNITS_EXT] = $enc; } } if (null !== ($v = $this->getWhen())) { $a[self::FIELD_WHEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventTiming::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventTiming::FIELD_VALUE]); $a[self::FIELD_WHEN_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSearchParamType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSearchParamType.php index b4e42551f7..56b2ec766a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSearchParamType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSearchParamType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,10 +73,9 @@ class FHIRSearchParamType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSearchParamTypeList @@ -165,8 +164,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -249,6 +248,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventAction.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventAction.php index 129d827f84..20ff3637ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventAction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIRSecurityEventAction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_ACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSecurityEventActionList @@ -167,8 +166,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -251,6 +250,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectLifecycle.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectLifecycle.php index c9655cc24e..8062bd2046 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectLifecycle.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectLifecycle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRSecurityEventObjectLifecycle extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OBJECT_LIFECYCLE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSecurityEventObjectLifecycleList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectRole.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectRole.php index 9e16311c67..5dc2f9410f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectRole.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIRSecurityEventObjectRole extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OBJECT_ROLE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSecurityEventObjectRoleList @@ -167,8 +166,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -251,6 +250,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectType.php index 4c70b75b6c..8a1d9e0081 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventObjectType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRSecurityEventObjectType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OBJECT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSecurityEventObjectTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventOutcome.php index 36a552deef..84b18ceed4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRSecurityEventOutcome extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OUTCOME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSecurityEventOutcomeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventParticipantNetworkType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventParticipantNetworkType.php index 4062a16e61..c5b9969c3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventParticipantNetworkType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSecurityEventParticipantNetworkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRSecurityEventParticipantNetworkType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_PARTICIPANT_NETWORK_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSecurityEventParticipantNetworkTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityStatus.php index c996d724fc..ea67c6d2f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRSensitivityStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SENSITIVITY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSensitivityStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityType.php index fe8f56b276..c3c8a536d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSensitivityType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRSensitivityType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SENSITIVITY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSensitivityTypeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSlicingRules.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSlicingRules.php index f0ad89fbc5..7ae1d258c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSlicingRules.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSlicingRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRSlicingRules extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLICING_RULES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSlicingRulesList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRString.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRString.php index ebded5cba1..cadbdd8bef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRString.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRString.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRString extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyDispenseStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyDispenseStatus.php index 6e5602c01f..115fc6ddd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyDispenseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyDispenseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRSupplyDispenseStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_DISPENSE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSupplyDispenseStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyStatus.php index 4d8b493443..822cc1e7b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRSupplyStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRSupplyStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRSupplyStatusList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUnitsOfTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUnitsOfTime.php index f1af02bfdf..45450e3e1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUnitsOfTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUnitsOfTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRUnitsOfTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRUnitsOfTimeList @@ -166,8 +165,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -250,6 +249,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUri.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUri.php index 9f9eced7ef..fa47b498f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUri.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUri.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -74,10 +74,9 @@ class FHIRUri extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URI; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRUriPrimitive @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUuid.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUuid.php index f456480246..9758089770 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUuid.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRUuid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -75,10 +75,9 @@ class FHIRUuid extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UUID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRUuidPrimitive @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRValueSetStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRValueSetStatus.php index b3c9c0b135..d2d1726ff2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRValueSetStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRElement/FHIRValueSetStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,10 +73,9 @@ class FHIRValueSetStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VALUE_SET_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRStringPrimitive\FHIRValueSetStatusList @@ -165,8 +164,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -249,6 +248,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive.php index 8842000ac0..677b2559a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRIdPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -168,8 +168,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive/FHIRXmlIdRef.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive/FHIRXmlIdRef.php index b981623caa..f2683d670d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive/FHIRXmlIdRef.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIdPrimitive/FHIRXmlIdRef.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRXmlIdRef extends FHIRIdPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_XML_ID_REF; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type xmlIdRef @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRInstantPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRInstantPrimitive.php index eb1e6ee2a9..f1beaa6224 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRInstantPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRInstantPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRInstantPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -183,8 +183,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIntegerPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIntegerPrimitive.php index e328950261..68ce281997 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIntegerPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRIntegerPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|integer @@ -176,8 +176,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIROidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIROidPrimitive.php index 0a1708b5df..c51155f2a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIROidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIROidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIROidPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -168,8 +168,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRResourceInline.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRResourceInline.php index 74659c2508..1333d7648b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRResourceInline.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRResourceInline.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -168,7 +168,7 @@ class FHIRResourceInline implements PHPFHIRCommentContainerInterface, PHPFHIRTyp const FIELD_VALUE_SET = 'ValueSet'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Records an unexpected reaction suspected to be related to the exposure of the @@ -658,7 +658,6 @@ public function __construct($data = null) } else { $this->setAdverseReaction(new FHIRAdverseReaction($data[self::FIELD_ADVERSE_REACTION])); } - return; } if (isset($data[self::FIELD_ALERT])) { if ($data[self::FIELD_ALERT] instanceof FHIRAlert) { @@ -666,7 +665,6 @@ public function __construct($data = null) } else { $this->setAlert(new FHIRAlert($data[self::FIELD_ALERT])); } - return; } if (isset($data[self::FIELD_ALLERGY_INTOLERANCE])) { if ($data[self::FIELD_ALLERGY_INTOLERANCE] instanceof FHIRAllergyIntolerance) { @@ -674,7 +672,6 @@ public function __construct($data = null) } else { $this->setAllergyIntolerance(new FHIRAllergyIntolerance($data[self::FIELD_ALLERGY_INTOLERANCE])); } - return; } if (isset($data[self::FIELD_BINARY])) { if ($data[self::FIELD_BINARY] instanceof FHIRBinary) { @@ -682,7 +679,6 @@ public function __construct($data = null) } else { $this->setBinary(new FHIRBinary($data[self::FIELD_BINARY])); } - return; } if (isset($data[self::FIELD_CARE_PLAN])) { if ($data[self::FIELD_CARE_PLAN] instanceof FHIRCarePlan) { @@ -690,7 +686,6 @@ public function __construct($data = null) } else { $this->setCarePlan(new FHIRCarePlan($data[self::FIELD_CARE_PLAN])); } - return; } if (isset($data[self::FIELD_COMPOSITION])) { if ($data[self::FIELD_COMPOSITION] instanceof FHIRComposition) { @@ -698,7 +693,6 @@ public function __construct($data = null) } else { $this->setComposition(new FHIRComposition($data[self::FIELD_COMPOSITION])); } - return; } if (isset($data[self::FIELD_CONCEPT_MAP])) { if ($data[self::FIELD_CONCEPT_MAP] instanceof FHIRConceptMap) { @@ -706,7 +700,6 @@ public function __construct($data = null) } else { $this->setConceptMap(new FHIRConceptMap($data[self::FIELD_CONCEPT_MAP])); } - return; } if (isset($data[self::FIELD_CONDITION])) { if ($data[self::FIELD_CONDITION] instanceof FHIRCondition) { @@ -714,7 +707,6 @@ public function __construct($data = null) } else { $this->setCondition(new FHIRCondition($data[self::FIELD_CONDITION])); } - return; } if (isset($data[self::FIELD_CONFORMANCE])) { if ($data[self::FIELD_CONFORMANCE] instanceof FHIRConformance) { @@ -722,7 +714,6 @@ public function __construct($data = null) } else { $this->setConformance(new FHIRConformance($data[self::FIELD_CONFORMANCE])); } - return; } if (isset($data[self::FIELD_DEVICE])) { if ($data[self::FIELD_DEVICE] instanceof FHIRDevice) { @@ -730,7 +721,6 @@ public function __construct($data = null) } else { $this->setDevice(new FHIRDevice($data[self::FIELD_DEVICE])); } - return; } if (isset($data[self::FIELD_DEVICE_OBSERVATION_REPORT])) { if ($data[self::FIELD_DEVICE_OBSERVATION_REPORT] instanceof FHIRDeviceObservationReport) { @@ -738,7 +728,6 @@ public function __construct($data = null) } else { $this->setDeviceObservationReport(new FHIRDeviceObservationReport($data[self::FIELD_DEVICE_OBSERVATION_REPORT])); } - return; } if (isset($data[self::FIELD_DIAGNOSTIC_ORDER])) { if ($data[self::FIELD_DIAGNOSTIC_ORDER] instanceof FHIRDiagnosticOrder) { @@ -746,7 +735,6 @@ public function __construct($data = null) } else { $this->setDiagnosticOrder(new FHIRDiagnosticOrder($data[self::FIELD_DIAGNOSTIC_ORDER])); } - return; } if (isset($data[self::FIELD_DIAGNOSTIC_REPORT])) { if ($data[self::FIELD_DIAGNOSTIC_REPORT] instanceof FHIRDiagnosticReport) { @@ -754,7 +742,6 @@ public function __construct($data = null) } else { $this->setDiagnosticReport(new FHIRDiagnosticReport($data[self::FIELD_DIAGNOSTIC_REPORT])); } - return; } if (isset($data[self::FIELD_DOCUMENT_MANIFEST])) { if ($data[self::FIELD_DOCUMENT_MANIFEST] instanceof FHIRDocumentManifest) { @@ -762,7 +749,6 @@ public function __construct($data = null) } else { $this->setDocumentManifest(new FHIRDocumentManifest($data[self::FIELD_DOCUMENT_MANIFEST])); } - return; } if (isset($data[self::FIELD_DOCUMENT_REFERENCE])) { if ($data[self::FIELD_DOCUMENT_REFERENCE] instanceof FHIRDocumentReference) { @@ -770,7 +756,6 @@ public function __construct($data = null) } else { $this->setDocumentReference(new FHIRDocumentReference($data[self::FIELD_DOCUMENT_REFERENCE])); } - return; } if (isset($data[self::FIELD_ENCOUNTER])) { if ($data[self::FIELD_ENCOUNTER] instanceof FHIREncounter) { @@ -778,7 +763,6 @@ public function __construct($data = null) } else { $this->setEncounter(new FHIREncounter($data[self::FIELD_ENCOUNTER])); } - return; } if (isset($data[self::FIELD_FAMILY_HISTORY])) { if ($data[self::FIELD_FAMILY_HISTORY] instanceof FHIRFamilyHistory) { @@ -786,7 +770,6 @@ public function __construct($data = null) } else { $this->setFamilyHistory(new FHIRFamilyHistory($data[self::FIELD_FAMILY_HISTORY])); } - return; } if (isset($data[self::FIELD_GROUP])) { if ($data[self::FIELD_GROUP] instanceof FHIRGroup) { @@ -794,7 +777,6 @@ public function __construct($data = null) } else { $this->setGroup(new FHIRGroup($data[self::FIELD_GROUP])); } - return; } if (isset($data[self::FIELD_IMAGING_STUDY])) { if ($data[self::FIELD_IMAGING_STUDY] instanceof FHIRImagingStudy) { @@ -802,7 +784,6 @@ public function __construct($data = null) } else { $this->setImagingStudy(new FHIRImagingStudy($data[self::FIELD_IMAGING_STUDY])); } - return; } if (isset($data[self::FIELD_IMMUNIZATION])) { if ($data[self::FIELD_IMMUNIZATION] instanceof FHIRImmunization) { @@ -810,7 +791,6 @@ public function __construct($data = null) } else { $this->setImmunization(new FHIRImmunization($data[self::FIELD_IMMUNIZATION])); } - return; } if (isset($data[self::FIELD_IMMUNIZATION_RECOMMENDATION])) { if ($data[self::FIELD_IMMUNIZATION_RECOMMENDATION] instanceof FHIRImmunizationRecommendation) { @@ -818,7 +798,6 @@ public function __construct($data = null) } else { $this->setImmunizationRecommendation(new FHIRImmunizationRecommendation($data[self::FIELD_IMMUNIZATION_RECOMMENDATION])); } - return; } if (isset($data[self::FIELD_LIST])) { if ($data[self::FIELD_LIST] instanceof FHIRList) { @@ -826,7 +805,6 @@ public function __construct($data = null) } else { $this->setList(new FHIRList($data[self::FIELD_LIST])); } - return; } if (isset($data[self::FIELD_LOCATION])) { if ($data[self::FIELD_LOCATION] instanceof FHIRLocation) { @@ -834,7 +812,6 @@ public function __construct($data = null) } else { $this->setLocation(new FHIRLocation($data[self::FIELD_LOCATION])); } - return; } if (isset($data[self::FIELD_MEDIA])) { if ($data[self::FIELD_MEDIA] instanceof FHIRMedia) { @@ -842,7 +819,6 @@ public function __construct($data = null) } else { $this->setMedia(new FHIRMedia($data[self::FIELD_MEDIA])); } - return; } if (isset($data[self::FIELD_MEDICATION])) { if ($data[self::FIELD_MEDICATION] instanceof FHIRMedication) { @@ -850,7 +826,6 @@ public function __construct($data = null) } else { $this->setMedication(new FHIRMedication($data[self::FIELD_MEDICATION])); } - return; } if (isset($data[self::FIELD_MEDICATION_ADMINISTRATION])) { if ($data[self::FIELD_MEDICATION_ADMINISTRATION] instanceof FHIRMedicationAdministration) { @@ -858,7 +833,6 @@ public function __construct($data = null) } else { $this->setMedicationAdministration(new FHIRMedicationAdministration($data[self::FIELD_MEDICATION_ADMINISTRATION])); } - return; } if (isset($data[self::FIELD_MEDICATION_DISPENSE])) { if ($data[self::FIELD_MEDICATION_DISPENSE] instanceof FHIRMedicationDispense) { @@ -866,7 +840,6 @@ public function __construct($data = null) } else { $this->setMedicationDispense(new FHIRMedicationDispense($data[self::FIELD_MEDICATION_DISPENSE])); } - return; } if (isset($data[self::FIELD_MEDICATION_PRESCRIPTION])) { if ($data[self::FIELD_MEDICATION_PRESCRIPTION] instanceof FHIRMedicationPrescription) { @@ -874,7 +847,6 @@ public function __construct($data = null) } else { $this->setMedicationPrescription(new FHIRMedicationPrescription($data[self::FIELD_MEDICATION_PRESCRIPTION])); } - return; } if (isset($data[self::FIELD_MEDICATION_STATEMENT])) { if ($data[self::FIELD_MEDICATION_STATEMENT] instanceof FHIRMedicationStatement) { @@ -882,7 +854,6 @@ public function __construct($data = null) } else { $this->setMedicationStatement(new FHIRMedicationStatement($data[self::FIELD_MEDICATION_STATEMENT])); } - return; } if (isset($data[self::FIELD_MESSAGE_HEADER])) { if ($data[self::FIELD_MESSAGE_HEADER] instanceof FHIRMessageHeader) { @@ -890,7 +861,6 @@ public function __construct($data = null) } else { $this->setMessageHeader(new FHIRMessageHeader($data[self::FIELD_MESSAGE_HEADER])); } - return; } if (isset($data[self::FIELD_OBSERVATION])) { if ($data[self::FIELD_OBSERVATION] instanceof FHIRObservation) { @@ -898,7 +868,6 @@ public function __construct($data = null) } else { $this->setObservation(new FHIRObservation($data[self::FIELD_OBSERVATION])); } - return; } if (isset($data[self::FIELD_OPERATION_OUTCOME])) { if ($data[self::FIELD_OPERATION_OUTCOME] instanceof FHIROperationOutcome) { @@ -906,7 +875,6 @@ public function __construct($data = null) } else { $this->setOperationOutcome(new FHIROperationOutcome($data[self::FIELD_OPERATION_OUTCOME])); } - return; } if (isset($data[self::FIELD_ORDER])) { if ($data[self::FIELD_ORDER] instanceof FHIROrder) { @@ -914,7 +882,6 @@ public function __construct($data = null) } else { $this->setOrder(new FHIROrder($data[self::FIELD_ORDER])); } - return; } if (isset($data[self::FIELD_ORDER_RESPONSE])) { if ($data[self::FIELD_ORDER_RESPONSE] instanceof FHIROrderResponse) { @@ -922,7 +889,6 @@ public function __construct($data = null) } else { $this->setOrderResponse(new FHIROrderResponse($data[self::FIELD_ORDER_RESPONSE])); } - return; } if (isset($data[self::FIELD_ORGANIZATION])) { if ($data[self::FIELD_ORGANIZATION] instanceof FHIROrganization) { @@ -930,7 +896,6 @@ public function __construct($data = null) } else { $this->setOrganization(new FHIROrganization($data[self::FIELD_ORGANIZATION])); } - return; } if (isset($data[self::FIELD_OTHER])) { if ($data[self::FIELD_OTHER] instanceof FHIROther) { @@ -938,7 +903,6 @@ public function __construct($data = null) } else { $this->setOther(new FHIROther($data[self::FIELD_OTHER])); } - return; } if (isset($data[self::FIELD_PATIENT])) { if ($data[self::FIELD_PATIENT] instanceof FHIRPatient) { @@ -946,7 +910,6 @@ public function __construct($data = null) } else { $this->setPatient(new FHIRPatient($data[self::FIELD_PATIENT])); } - return; } if (isset($data[self::FIELD_PRACTITIONER])) { if ($data[self::FIELD_PRACTITIONER] instanceof FHIRPractitioner) { @@ -954,7 +917,6 @@ public function __construct($data = null) } else { $this->setPractitioner(new FHIRPractitioner($data[self::FIELD_PRACTITIONER])); } - return; } if (isset($data[self::FIELD_PROCEDURE])) { if ($data[self::FIELD_PROCEDURE] instanceof FHIRProcedure) { @@ -962,7 +924,6 @@ public function __construct($data = null) } else { $this->setProcedure(new FHIRProcedure($data[self::FIELD_PROCEDURE])); } - return; } if (isset($data[self::FIELD_PROFILE])) { if ($data[self::FIELD_PROFILE] instanceof FHIRProfile) { @@ -970,7 +931,6 @@ public function __construct($data = null) } else { $this->setProfile(new FHIRProfile($data[self::FIELD_PROFILE])); } - return; } if (isset($data[self::FIELD_PROVENANCE])) { if ($data[self::FIELD_PROVENANCE] instanceof FHIRProvenance) { @@ -978,7 +938,6 @@ public function __construct($data = null) } else { $this->setProvenance(new FHIRProvenance($data[self::FIELD_PROVENANCE])); } - return; } if (isset($data[self::FIELD_QUERY])) { if ($data[self::FIELD_QUERY] instanceof FHIRQuery) { @@ -986,7 +945,6 @@ public function __construct($data = null) } else { $this->setQuery(new FHIRQuery($data[self::FIELD_QUERY])); } - return; } if (isset($data[self::FIELD_QUESTIONNAIRE])) { if ($data[self::FIELD_QUESTIONNAIRE] instanceof FHIRQuestionnaire) { @@ -994,7 +952,6 @@ public function __construct($data = null) } else { $this->setQuestionnaire(new FHIRQuestionnaire($data[self::FIELD_QUESTIONNAIRE])); } - return; } if (isset($data[self::FIELD_RELATED_PERSON])) { if ($data[self::FIELD_RELATED_PERSON] instanceof FHIRRelatedPerson) { @@ -1002,7 +959,6 @@ public function __construct($data = null) } else { $this->setRelatedPerson(new FHIRRelatedPerson($data[self::FIELD_RELATED_PERSON])); } - return; } if (isset($data[self::FIELD_SECURITY_EVENT])) { if ($data[self::FIELD_SECURITY_EVENT] instanceof FHIRSecurityEvent) { @@ -1010,7 +966,6 @@ public function __construct($data = null) } else { $this->setSecurityEvent(new FHIRSecurityEvent($data[self::FIELD_SECURITY_EVENT])); } - return; } if (isset($data[self::FIELD_SPECIMEN])) { if ($data[self::FIELD_SPECIMEN] instanceof FHIRSpecimen) { @@ -1018,7 +973,6 @@ public function __construct($data = null) } else { $this->setSpecimen(new FHIRSpecimen($data[self::FIELD_SPECIMEN])); } - return; } if (isset($data[self::FIELD_SUBSTANCE])) { if ($data[self::FIELD_SUBSTANCE] instanceof FHIRSubstance) { @@ -1026,7 +980,6 @@ public function __construct($data = null) } else { $this->setSubstance(new FHIRSubstance($data[self::FIELD_SUBSTANCE])); } - return; } if (isset($data[self::FIELD_SUPPLY])) { if ($data[self::FIELD_SUPPLY] instanceof FHIRSupply) { @@ -1034,7 +987,6 @@ public function __construct($data = null) } else { $this->setSupply(new FHIRSupply($data[self::FIELD_SUPPLY])); } - return; } if (isset($data[self::FIELD_VALUE_SET])) { if ($data[self::FIELD_VALUE_SET] instanceof FHIRValueSet) { @@ -1042,7 +994,6 @@ public function __construct($data = null) } else { $this->setValueSet(new FHIRValueSet($data[self::FIELD_VALUE_SET])); } - return; } } @@ -2395,8 +2346,8 @@ public function setValueSet(FHIRValueSet $ValueSet = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRSampledDataDataTypePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRSampledDataDataTypePrimitive.php index 83077c7b90..d396d41dcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRSampledDataDataTypePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRSampledDataDataTypePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -167,8 +167,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive.php index 5368956648..4184956b66 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRStringPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -167,8 +167,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAddressUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAddressUseList.php index 5f343d960d..6e65c77df6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAddressUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAddressUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRAddressUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AddressUse-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAggregationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAggregationModeList.php index 50bb032d75..7b6b5fab30 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAggregationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAggregationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRAggregationModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AggregationMode-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAlertStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAlertStatusList.php index 5523290b14..e7a8a04b42 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAlertStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRAlertStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRAlertStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALERT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AlertStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRBindingConformanceList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRBindingConformanceList.php index 6e7723eb42..a33fc90098 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRBindingConformanceList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRBindingConformanceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRBindingConformanceList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINDING_CONFORMANCE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BindingConformance-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityCategoryList.php index a88e0725b9..276106a33a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRCarePlanActivityCategoryList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanActivityCategory-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php index a64a8ec4db..b7efd8b7ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRCarePlanActivityStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanActivityStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanGoalStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanGoalStatusList.php index 6c711aa724..ff947cd4c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanGoalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanGoalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRCarePlanGoalStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_GOAL_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanGoalStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanStatusList.php index 4bc86cbbb1..6d3482881b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCarePlanStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRCarePlanStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCausalityExpectationList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCausalityExpectationList.php index a6e74ab20d..3b70a473c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCausalityExpectationList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCausalityExpectationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRCausalityExpectationList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CAUSALITY_EXPECTATION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CausalityExpectation-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php index 47ba670533..ba7fff1473 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRCompositionAttestationModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompositionAttestationMode-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionStatusList.php index 9de8f769bc..1faa5b2997 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCompositionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRCompositionStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompositionStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php index 588f74e177..cc32725e6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRConceptMapEquivalenceList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConceptMapEquivalence-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionRelationshipTypeList.php index 93bbbe790b..12e524a2b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRConditionRelationshipTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionRelationshipType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionStatusList.php index b73c47988e..0081101eed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConditionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRConditionStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceEventModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceEventModeList.php index cdd2b97d92..c23b510538 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceEventModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceEventModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRConformanceEventModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_EVENT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConformanceEventMode-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceStatementStatusList.php index 8d2595f251..f3447f414a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConformanceStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRConformanceStatementStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_STATEMENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConformanceStatementStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConstraintSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConstraintSeverityList.php index 38630ee1f6..10ea734e03 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConstraintSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRConstraintSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRConstraintSeverityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConstraintSeverity-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactSystemList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactSystemList.php index e95c823c28..8a893c6d1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRContactSystemList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_SYSTEM_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContactSystem-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactUseList.php index 1ff28c4f4b..c3e20de810 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRContactUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRContactUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContactUse-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCriticalityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCriticalityList.php index 0c0621ec5e..5910c9fd6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCriticalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRCriticalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRCriticalityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CRITICALITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Criticality-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php index 4aa1184600..32c677c73e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRDiagnosticOrderPriorityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_PRIORITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiagnosticOrderPriority-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php index 42405622b9..fadaddf576 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRDiagnosticOrderStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiagnosticOrderStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php index 432c1b788d..f7d1b82be5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRDiagnosticReportStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiagnosticReportStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentModeList.php index ad2da1ffe6..d0b4b2c8f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRDocumentModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentMode-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php index c2d5a600c2..5401f953f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRDocumentReferenceStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentReferenceStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php index 07ed9ac309..d7c42a18fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRDocumentRelationshipTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentRelationshipType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterClassList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterClassList.php index 10b4d42800..b504353be4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterClassList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterClassList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIREncounterClassList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_CLASS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EncounterClass-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterStateList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterStateList.php index 9d2ab03386..4608ae156a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREncounterStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIREncounterStateList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EncounterState-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREventTimingList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREventTimingList.php index f2e667ba0d..ef5ef48334 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREventTimingList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIREventTimingList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIREventTimingList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_TIMING_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EventTiming-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExposureTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExposureTypeList.php index 0dcce2e7ec..7192cceccf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExposureTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExposureTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRExposureTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPOSURE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExposureType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExtensionContextList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExtensionContextList.php index 9a2aad1bd0..2af1bfc724 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExtensionContextList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRExtensionContextList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRExtensionContextList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExtensionContext-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRFilterOperatorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRFilterOperatorList.php index 25460c7344..17f79e91b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRFilterOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRFilterOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRFilterOperatorList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FilterOperator-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRGroupTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRGroupTypeList.php index d89c3973e1..e724cdb749 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRGroupTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRGroupTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRGroupTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GroupType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeList.php index 760b6142ac..1ec353a2a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRHierarchicalRelationshipTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_HIERARCHICAL_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type HierarchicalRelationshipType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIdentifierUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIdentifierUseList.php index f84882e78b..6984b7a0a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIdentifierUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIdentifierUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRIdentifierUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IdentifierUse-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRImagingModalityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRImagingModalityList.php index d23baa5167..2598f2fab2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRImagingModalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRImagingModalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRImagingModalityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMAGING_MODALITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ImagingModality-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php index 97b76e1337..56e357772f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRInstanceAvailabilityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANCE_AVAILABILITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type InstanceAvailability-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIssueSeverityList.php index e002939312..4d119b96d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRIssueSeverityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IssueSeverity-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLinkTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLinkTypeList.php index f3c2f4f4ac..f7384329d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLinkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLinkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRLinkTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINK_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LinkType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRListModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRListModeList.php index 99c776ce2d..92e04b671a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRListModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ListMode-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationModeList.php index 46ac2b1c17..cd6378c4b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRLocationModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LocationMode-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationStatusList.php index f7c73cb865..711b9ace1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRLocationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LocationStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMediaTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMediaTypeList.php index 4084ecd518..0015fe0bc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMediaTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMediaTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRMediaTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDIA_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MediaType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php index 056971998d..1c30b87377 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRMedicationAdministrationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationAdministrationStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php index 0996d9d407..25905f96e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRMedicationDispenseStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationDispenseStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationKindList.php index 2b80f96301..7e9a6f0049 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRMedicationKindList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationKind-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusList.php index 9c4ffc16c5..4c9fda17ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRMedicationPrescriptionStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_PRESCRIPTION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationPrescriptionStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php index c1e47d996f..31bd8a1b36 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRMessageSignificanceCategoryList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MessageSignificanceCategory-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRModalityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRModalityList.php index 1eebf88e55..5a83c341ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRModalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRModalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRModalityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MODALITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Modality-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNameUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNameUseList.php index caacb37259..742712bc96 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNameUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNameUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRNameUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAME_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NameUse-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNarrativeStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNarrativeStatusList.php index c46e2a4b67..073a6240f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNarrativeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRNarrativeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRNarrativeStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NarrativeStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php index 7fe97c1bd5..0ae92961af 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRObservationRelationshipTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationRelationshipType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationReliabilityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationReliabilityList.php index 633878c8cc..59273a513a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationReliabilityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationReliabilityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRObservationReliabilityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELIABILITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationReliability-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationStatusList.php index 6448e75beb..94d361716b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRObservationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRObservationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIROrderOutcomeStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIROrderOutcomeStatusList.php index 880311ff01..af65cb3c62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIROrderOutcomeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIROrderOutcomeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIROrderOutcomeStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ORDER_OUTCOME_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type OrderOutcomeStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProcedureRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProcedureRelationshipTypeList.php index 9779421d2b..9481ce0e43 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProcedureRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProcedureRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRProcedureRelationshipTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROCEDURE_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ProcedureRelationshipType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRPropertyRepresentationList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRPropertyRepresentationList.php index bc3b13b9ab..212a81a406 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRPropertyRepresentationList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRPropertyRepresentationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRPropertyRepresentationList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type PropertyRepresentation-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php index 81b766c8f5..b299938ca1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRProvenanceEntityRoleList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ProvenanceEntityRole-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuantityCompararatorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuantityCompararatorList.php index f5267b1eb4..fb16e28871 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuantityCompararatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuantityCompararatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRQuantityCompararatorList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARARATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuantityCompararator-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQueryOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQueryOutcomeList.php index b109a02efa..ddbef8eb54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQueryOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQueryOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRQueryOutcomeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUERY_OUTCOME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QueryOutcome-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php index 001f9602b2..b4cc04d50a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRQuestionnaireStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuestionnaireStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRReactionSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRReactionSeverityList.php index 93f9a85b6e..e1e27c113f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRReactionSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRReactionSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRReactionSeverityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REACTION_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ReactionSeverity-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceProfileStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceProfileStatusList.php index 17067d3dc2..6d43b4d4f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceProfileStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceProfileStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRResourceProfileStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_PROFILE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResourceProfileStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType.php index 2cded14fd3..5eb4044cef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRResourceType extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_TYPE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResourceType @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinary.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinary.php index 872e62384e..4abd3f6544 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -72,7 +72,7 @@ class FHIRResourceNamesPlusBinary extends FHIRResourceType const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_NAMES_PLUS_BINARY; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResourceNamesPlusBinary @@ -118,8 +118,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResponseTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResponseTypeList.php index cb112124b1..3a180c6386 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResponseTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRResponseTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRResponseTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResponseType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php index cd4ccada5d..be71074c8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRRestfulConformanceModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_CONFORMANCE_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RestfulConformanceMode-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationSystemList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationSystemList.php index 6ee4801853..a3bc693d32 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRRestfulOperationSystemList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_OPERATION_SYSTEM_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RestfulOperationSystem-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationTypeList.php index 1aa79d0f0d..34311e42a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRRestfulOperationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRRestfulOperationTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_OPERATION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RestfulOperationType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSearchParamTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSearchParamTypeList.php index 76fe0a38c3..2a4141a081 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSearchParamTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSearchParamTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSearchParamTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchParamType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventActionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventActionList.php index 2060b2a764..4659cbe6d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSecurityEventActionList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_ACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SecurityEventAction-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleList.php index d7527e8ab7..1645e31410 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSecurityEventObjectLifecycleList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OBJECT_LIFECYCLE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SecurityEventObjectLifecycle-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectRoleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectRoleList.php index 58d4154c56..8ca011c2cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSecurityEventObjectRoleList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OBJECT_ROLE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SecurityEventObjectRole-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectTypeList.php index 94afeb90d3..bd6c624410 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventObjectTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSecurityEventObjectTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OBJECT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SecurityEventObjectType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventOutcomeList.php index aaddd21f10..e505ebec5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSecurityEventOutcomeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_OUTCOME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SecurityEventOutcome-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeList.php index be1ab497e7..5a40d7025b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSecurityEventParticipantNetworkTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SECURITY_EVENT_PARTICIPANT_NETWORK_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SecurityEventParticipantNetworkType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityStatusList.php index e343a50021..3765fd5777 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSensitivityStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SENSITIVITY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SensitivityStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityTypeList.php index a169d886bd..fb72c08812 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSensitivityTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSensitivityTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SENSITIVITY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SensitivityType-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSlicingRulesList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSlicingRulesList.php index 2dd10a1fab..6a19a6cfb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSlicingRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSlicingRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSlicingRulesList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLICING_RULES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SlicingRules-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyDispenseStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyDispenseStatusList.php index fc3a0581b2..3155dee8b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyDispenseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyDispenseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSupplyDispenseStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_DISPENSE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SupplyDispenseStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyStatusList.php index ae194ed316..e1ebbdeca5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRSupplyStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRSupplyStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SupplyStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRUnitsOfTimeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRUnitsOfTimeList.php index 38ace029bc..f44a97b00b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRUnitsOfTimeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRUnitsOfTimeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRUnitsOfTimeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type UnitsOfTime-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRValueSetStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRValueSetStatusList.php index 9e6af16444..c0846a0869 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRValueSetStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRStringPrimitive/FHIRValueSetStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -71,7 +71,7 @@ class FHIRValueSetStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VALUE_SET_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ValueSetStatus-list @@ -117,8 +117,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUriPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUriPrimitive.php index f6765ae77d..f82bb75bab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUriPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUriPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRUriPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -163,8 +163,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUuidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUuidPrimitive.php index 6e1d95ca5d..46b1fb866e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUuidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRUuidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ class FHIRUuidPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -168,8 +168,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRAutoloader.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRAutoloader.php index 91aaf39767..a152a265af 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRAutoloader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRAutoloader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerInterface.php index eab411b581..eed398cd6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerTrait.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerTrait.php index 7b1506b6c8..68c6544332 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerTrait.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRCommentContainerTrait.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -64,7 +64,7 @@ trait PHPFHIRCommentContainerTrait { /** @var array */ - protected $_fhirComments = []; + private $_fhirComments = []; /** * Arbitrary comments of a hopefully useful nature diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRConstants.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRConstants.php index 03b47751da..39474c012d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRConstants.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRConstants.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -68,7 +68,7 @@ abstract class PHPFHIRConstants const SOURCE_GENERATION_DATE = 'Tue, Sep 30, 2014 18:08+1000'; // PHPFHIR - const CODE_GENERATION_DATE = 'November 30th, 2019 23:37+0000'; + const CODE_GENERATION_DATE = 'December 7th, 2019 16:36+0000'; // Common const JSON_FIELD_RESOURCE_TYPE = 'resourceType'; diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRContainedTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRContainedTypeInterface.php index f16e2d458f..16714dfe2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRContainedTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRContainedTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParser.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParser.php index fbc90eacaa..0fc0116250 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParser.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParser.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParserConfig.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParserConfig.php index 30a9292b06..e0565b7d0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParserConfig.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRResponseParserConfig.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php index 37f51e1699..72329c09b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBinaryTest.php index 6bf38eedab..f1f030b4a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBooleanPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBooleanPrimitiveTest.php index db66428a01..b8e69ed746 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBooleanPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRBooleanPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRCodePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRCodePrimitiveTest.php index f964f9ed25..02b74e2a50 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRCodePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRCodePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDatePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDatePrimitiveTest.php index b1f3d96b9f..0e4c19bee6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDatePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDatePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDateTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDateTimePrimitiveTest.php index 18722f6d41..648c40bde6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDateTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDateTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDecimalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDecimalPrimitiveTest.php index 1f5a278417..0e7f32a0dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDecimalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRDecimalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressTest.php index 887e0c1c77..685fa1e995 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php index 4711a065f9..a17a5d7818 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php index ada5a176cc..d4a7307e6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAlertStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAlertStatusTest.php index 1bc1aeea18..5d05d3aff7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAlertStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAlertStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php index 94f3300e53..b99bd46122 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposureTest.php index 6a4cfdbc77..0e49637ca9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionExposureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptomTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptomTest.php index 79fb64e7c8..8cc386fbf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptomTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseReaction/FHIRAdverseReactionSymptomTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php index 233ee5a3bc..72c704dda1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoalTest.php index a11bc2e9ba..6bb47615b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php index cd4523db38..76e0a7214a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimpleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimpleTest.php index 57563971dc..f29cdbcc64 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimpleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanSimpleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php index 75e67aaafe..e1329b8d1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php index 1e10bce3ab..b1682ddac7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php index 95ef3427b6..4af014370d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConceptTest.php index f1d78768a9..499c9ce1a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php index 7aa57af74c..e727f97156 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMapTest.php index 292a4087a5..a98fb476b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php index eb2f981b52..c3685ea3f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocationTest.php index 20126a7737..c2e81e7920 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItemTest.php index f43254d63d..d77e9c004f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionRelatedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php index a098f9fb9d..8e9c43db30 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php index 8ae1fc62ba..9adb78709b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php index d792d89ee4..9ede82ee14 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php index b159828fba..4ef9646983 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php index 1bb0ef29e1..aed027acd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php index df86a95918..1fcbb3e4c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1Test.php index 5e7c7e5a1e..7282dbdb2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php index 5d16b18414..7c2afecc2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQueryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQueryTest.php index 605454594a..67860fc645 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQueryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceQueryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php index 24714a5fa8..45fa50faef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php index 9c0f435973..17f3858157 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php index f50e4ddfbc..814e63b431 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php index d44757546f..73f4cac171 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php index b0443353f6..8826e600e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannelTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannelTest.php index 09ed18ca61..138efbb22a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportChannelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetricTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetricTest.php index f330fe008d..2542fe0919 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetricTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportMetricTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDeviceTest.php index 3c5ce99c82..3e2cb3afce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceObservationReport/FHIRDeviceObservationReportVirtualDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php index ef8f536317..3b4a398e1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php index 42f822ce07..70edf6b69d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php index 4dde15b8ef..5bb1d963e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php index 90b4079a51..1bcc6cac5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameterTest.php index a6cdad3243..f7a31ca61a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php index fe9e431640..7163b0bce2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceServiceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceServiceTest.php index 0354ef94c6..8c85641615 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceServiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceServiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodationTest.php index 8e9535e42f..bd83643ca8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterAccomodationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php index 742715822b..d878527e44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php index ded6c888ce..4865e251d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php index 2f3815191c..9c8b874381 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryConditionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryConditionTest.php index 8f3e0209cc..1784b0e2a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelationTest.php index 453e166592..974f66d7f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyHistory/FHIRFamilyHistoryRelationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php index 0638e6860b..903547a3de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php index c4f6368050..3270fed4bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php index cb6ead5e5e..f98292f3ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php index ad1573aadd..80115bfd95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php index 43ae95cbf4..915d920c30 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php index ddd5d0c171..3f46c4872d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php index adf553aabf..f05feb919d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php index 68b3005bbd..b11ee68353 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php index 00e0f6c608..fa02fb8a82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php index 4c79428ea1..0a56098e0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php index 02b79bb858..834182935e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php index db00fabc6f..67db66c836 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php index 28affcaebb..8b1d82e9de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php index bb4a4c0350..95e4708c56 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php index 9e5c5446d9..0d0eb2342d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php index fa3bd5cfed..da6c428fdf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispenseTest.php index 8cf50f6af0..4a2827b0fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageTest.php index 44a3c4e657..3902381d93 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php index 3f8b4da5ce..fa1245e6d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispenseTest.php index e5da39173f..9f6eae0bc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstructionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstructionTest.php index 3fd02885a9..2275d29b5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstructionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionDosageInstructionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitutionTest.php index cf6fd98f3d..91ff15226b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationPrescription/FHIRMedicationPrescriptionSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php index 555dbc18bd..5975a5e741 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php index d818232ac7..239713caf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php index dd1dee8c91..24bcd46100 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php index fadbc8ffe0..c34327afa5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php index dea2ab88c3..6acdcb5c2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php index bf25b5cfc2..de2fa09ff2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php index ed397a5d2d..16df8489cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php index 9f90c591a0..b0bfebcd2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php index 168425732b..ffc5e3b622 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php index dd617a26a2..64a0ad19c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php index 48c2161330..1111d8c5bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php index 345a0220ec..ee52a7c9f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php index 294c45ec0c..c565d58044 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php index 5af0e1679b..080acc2479 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItemTest.php index 01a8e19e0c..3581152026 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureRelatedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBindingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBindingTest.php index a021d445c6..ea02087a1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraintTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraintTest.php index 4d1a7376d2..22f3de8adc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraintTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileConstraintTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinitionTest.php index 8cc3427b51..791088d211 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElementTest.php index 6329e10cd4..171d709c42 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefnTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefnTest.php index 2a2ccb0f56..a342532dc2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileExtensionDefnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1Test.php index 9899f10ba8..c2587c9dd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMapping1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMappingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMappingTest.php index b999f95d2e..4d49c8da33 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQueryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQueryTest.php index d072aca361..8c2e23114d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQueryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileQueryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParamTest.php index 50e002258d..afcb7cc2e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicingTest.php index 8527898c4c..28bb3271a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileSlicingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructureTest.php index 9c73152f6d..44b562a634 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileTypeTest.php index 627531f1ac..03cea82a30 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProfile/FHIRProfileTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php index abe97f5666..95ae1261cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php index 877bc315ef..87337f696a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponseTest.php index 95e2a93612..5a56551af2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuery/FHIRQueryResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php index 91c972123f..0bea5f512e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php index 2757a9517c..4a79da952c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReactionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReactionTest.php index 674d67a24a..c5af915252 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAdverseReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlertTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlertTest.php index 4a40621cf0..aac8598bb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAlertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntoleranceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntoleranceTest.php index 0cfc66ab60..3d36560ff6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntoleranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRAllergyIntoleranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlanTest.php index 8a0a7227ab..98b15e3caa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCarePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCompositionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCompositionTest.php index f2bcc04e3c..e589f13841 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCompositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRCompositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMapTest.php index 1075208189..c73279ebbe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConceptMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConditionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConditionTest.php index 0843970f76..d9f0f25fc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformanceTest.php index 1bb3c84d7a..c32be1a182 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRConformanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReportTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReportTest.php index c877bb704a..fa93ab41ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceObservationReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceTest.php index a14020ec70..56d3ad8195 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrderTest.php index e430ccac7d..9a474d8d9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReportTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReportTest.php index 942558a9fd..ba5e026dee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDiagnosticReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifestTest.php index b135048e1e..9b7686ab8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReferenceTest.php index 931e51dc8e..f030925445 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRDocumentReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounterTest.php index 22b0662832..507f527ce5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIREncounterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistoryTest.php index 077008e752..1816bfa8e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRFamilyHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroupTest.php index 443acde5e7..e58b475842 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudyTest.php index d463458d1a..cb0e41c2d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImagingStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendationTest.php index 361b79c561..eb5c56e3fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationTest.php index 641fa5ffae..1a96daf8d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRImmunizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRListTest.php index 65ee2c33c1..57a1fc8ceb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocationTest.php index 7f3ee63599..1d31554909 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMediaTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMediaTest.php index 249191810b..c31cbe9a4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministrationTest.php index 9fdef69a0d..1fd417459a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispenseTest.php index 165695f8c4..83670881e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescriptionTest.php index 2db46cbf15..d67b04c582 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationPrescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatementTest.php index 40e1690bf9..37191cd771 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationTest.php index 0a199442ef..9af9b18b26 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMedicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeaderTest.php index c7ec7250d2..5e590ce05d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRMessageHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservationTest.php index 8985e1cc35..ed03db2d55 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRObservationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcomeTest.php index c863eb55c0..4f4d7fc841 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROperationOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponseTest.php index c47effcb14..9dc70bdaa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderTest.php index 73137776bb..46d19a0feb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganizationTest.php index 2a7be0bd44..3ae20888a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROrganizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROtherTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROtherTest.php index bf6182655a..c1296d0e09 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROtherTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIROtherTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatientTest.php index 4a5f275270..c1ea41d737 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPatientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitionerTest.php index 03a866a712..7c51e9b438 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedureTest.php index 409202a640..7edcdbd81e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfileTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfileTest.php index c2280103b8..730488f048 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfileTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProfileTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenanceTest.php index bd12030805..0fc337b7a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRProvenanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQueryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQueryTest.php index a64812e846..5199c646dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQueryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQueryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaireTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaireTest.php index 555c463846..260ff65e13 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaireTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRQuestionnaireTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPersonTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPersonTest.php index 1d9a5805d1..ee8bd3a087 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRRelatedPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEventTest.php index 824937ceeb..c570b2117a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSecurityEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimenTest.php index 3daf6f9860..06ba93e366 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSpecimenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstanceTest.php index b82e83a5ff..fc0cafeb5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupplyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupplyTest.php index f713604983..40c684610d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupplyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRSupplyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSetTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSetTest.php index 715e03cb15..0013ea643b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResource/FHIRValueSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResourceTest.php index 566ef6f94b..f990ed74c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetailTest.php index 8e0cd7266d..a940ceace7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEventTest.php index 7456620cf4..20cc3c5605 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetworkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetworkTest.php index c3a958c7c5..dcb1ddd55d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetworkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventNetworkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObjectTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObjectTest.php index cfc3fc3fe6..7163e2eb6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventObjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipantTest.php index 78903a676e..a62b3e233f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSourceTest.php index 5d113adabe..2c2a8ed1cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSecurityEvent/FHIRSecurityEventSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php index 128a101fc3..198f07e157 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php index c1461640c6..654a6fa317 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSourceTest.php index 39fafa0a9f..bd4b22163a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php index cf3f1f9790..59840182e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php index 65bc1e3623..51eacefb99 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php index 6ed8b81c26..b419a14893 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispenseTest.php index 66faacdef5..b058386be6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupply/FHIRSupplyDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php index d989f22ac8..1ee8358116 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php index 99844c3a1f..c40b2b1a99 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php index dbf8c91c19..c87c383b18 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefineTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefineTest.php index ac27f8fb40..0418151691 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefineTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDefineTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php index 22ec51106b..65831556fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php index e4c679f6e4..7bde1e042c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php index 9c6072831b..6e35a59600 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php index 9a581ba9e9..23b26529a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php index b05f6a2e82..7470d3f284 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBindingConformanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBindingConformanceTest.php index 24e49df235..03353eaa13 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBindingConformanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBindingConformanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php index 08e71dd8e1..f02ee68e8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityCategoryTest.php index 1bc6270e37..6524687262 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php index 9b8142302f..452dc344c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanGoalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanGoalStatusTest.php index c86d664c85..e0b171f1e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanGoalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanGoalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php index 9ecb39d50e..6cfcfc3190 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCausalityExpectationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCausalityExpectationTest.php index 13b92a458a..5fea45fc59 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCausalityExpectationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCausalityExpectationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeTest.php index e3cfa8aaf7..a22a2dfc11 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php index 7620f56033..a952724c95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodingTest.php index 50afe012e2..713f8891f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCodingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php index 2508d0f3be..b69a16e2ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php index a70b8284bb..625eccebe3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php index cbef23dce9..692c972900 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionRelationshipTypeTest.php index 4e0e313876..af301058dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionStatusTest.php index 3f76dfded2..c47d74dd63 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConditionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php index 8bfa756b2a..08f2b30cde 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceStatementStatusTest.php index 50182f94d8..861adb9d34 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConformanceStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php index 14a1574f9e..57d2453dc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactSystemTest.php index ebb1d050ad..bb5117898a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactTest.php index ebaabd1008..5f02d44ab3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactUseTest.php index c7f211e50b..d9571f8fb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRContactUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCriticalityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCriticalityTest.php index bc9f528b76..bcd5655dff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCriticalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRCriticalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTest.php index 318575c14d..34d050077c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php index c165d192c5..10b2624628 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimal/FHIRScoreTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimal/FHIRScoreTest.php index 38e4bb5341..3cb70c6daf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimal/FHIRScoreTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimal/FHIRScoreTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php index a73d02925d..64d9d02f93 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php index 6a29ead995..c8f31223fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php index 06f6d08419..f87f34eaa6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php index 94099a3240..bb73af4f9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php index f483067c6b..4ed67ab8eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php index f60ea101db..0c2ab4a8ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php index 660a3b6c96..aebf0a7e6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php index 2bd7521ff9..40cfddbf53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php index a7ed3592c9..1ffa4f489c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php index 2071552435..5064ea00a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExposureTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExposureTypeTest.php index 021fcf8a0a..a435bef43e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExposureTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExposureTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php index 8a0dc75005..cacee5e7c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php index 12bfae55f8..041f6e4745 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php index 7e6a0baf32..f047815cad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php index 1ff9fa2888..0f99e05f54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHierarchicalRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHierarchicalRelationshipTypeTest.php index 01f92eeac8..44fcee8e2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHierarchicalRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHierarchicalRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php index a6b652edc6..5cf60f0ed1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdTest.php index ccb4ccb6c4..37fce48d63 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php index e3f4a68a74..6a94caf06a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php index 97e0b28e98..eb4485cb51 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRImagingModalityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRImagingModalityTest.php index e80f4317e3..a775a6516b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRImagingModalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRImagingModalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php index c5586fc888..e56c3909e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstantTest.php index 86d69e4bf7..a6d0e77815 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInstantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInteger/FHIRTotalResultsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInteger/FHIRTotalResultsTest.php index fc661fe056..c5ae93ea3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInteger/FHIRTotalResultsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRInteger/FHIRTotalResultsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php index ecfebc6267..17552a98c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php index f0d21ed0b0..7c0800d498 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php index 2f9aec1d10..b051408d62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRListModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRListModeTest.php index 1c7b8b7019..d9fe1599e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php index 80461eddd6..53dcfd8841 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php index 810808ff08..977a676f01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMediaTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMediaTypeTest.php index 41fb76300f..24b4c2f968 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMediaTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMediaTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php index 56b152a88c..2e1eff2c01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php index 5da9e50aeb..a1a7a20510 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationKindTest.php index 24e179bcf4..132bfcc8ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationPrescriptionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationPrescriptionStatusTest.php index ddf5b066b4..363ba579c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationPrescriptionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMedicationPrescriptionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php index d3d4febbd8..bb8e67ca7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRModalityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRModalityTest.php index fb61a66b3a..0605d89483 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRModalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRModalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php index ab71b07917..dcc634b7fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php index cd27ae4922..8d80be7c06 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php index 5a9c5c8785..6a548fbec6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php index ea014c378b..1fba4eac0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationReliabilityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationReliabilityTest.php index 44f8abcc6a..03126bc3bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationReliabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationReliabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php index 4441aa10b6..8d449f917c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROidTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROidTest.php index 082df4e258..551c7447be 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROrderOutcomeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROrderOutcomeStatusTest.php index f71638c9f7..4d6a13ec2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROrderOutcomeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIROrderOutcomeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php index a84bebd5a5..ad33e3d766 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProcedureRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProcedureRelationshipTypeTest.php index 0b25a1fafd..057623b471 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProcedureRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProcedureRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php index b9941a7ed3..c492342784 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php index 0cb5c3e81c..0cc99b2986 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php index 64022ddb9b..fcd369c7fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php index ce6c4225d1..feb632096c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php index 945afafa0d..8988c43c0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php index 85d5e549fd..5088af9737 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php index 35f815cb2a..e43bc913cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityCompararatorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityCompararatorTest.php index 5e7117be27..ca5d1fc5af 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityCompararatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityCompararatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php index 816a936989..710f85bd8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQueryOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQueryOutcomeTest.php index 5cd2459c33..fb4a5fc454 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQueryOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQueryOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php index eb985c217d..194d32f1f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRangeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRangeTest.php index 3c871a7fc0..bd4a40b5ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRatioTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRatioTest.php index 27d4866874..98b4457a13 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRatioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRatioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRReactionSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRReactionSeverityTest.php index 9e560a4de1..1aca898a84 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRReactionSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRReactionSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceProfileStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceProfileStatusTest.php index cd673a3f01..3fa973ef12 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceProfileStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceProfileStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceReferenceTest.php index a1fd78941a..78cef15198 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResourceReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php index 4b77eaa2b2..72e3448ec9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php index 4b50d69c94..c4c440b3dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationSystemTest.php index 4fd0604404..d0422b0b2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationTypeTest.php index 1d7d95a054..373142a98c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRRestfulOperationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php index 1e8c923752..f816fbc3dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php index e3374cd32f..e07596f63a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSchedule/FHIRScheduleRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSchedule/FHIRScheduleRepeatTest.php index 83dfa545e4..1394f08667 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSchedule/FHIRScheduleRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSchedule/FHIRScheduleRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRScheduleTest.php index a45e252a13..f5374405ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php index bf1ca83073..3ab8a67e65 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventActionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventActionTest.php index fd63c0d532..9ddea1c4c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectLifecycleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectLifecycleTest.php index 617241e09f..65519fb282 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectLifecycleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectLifecycleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectRoleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectRoleTest.php index e21c80d01b..f49cb8bd43 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectTypeTest.php index c3f6ed18f2..86cb51265d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventObjectTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventOutcomeTest.php index 2914b0cff0..412ff1bee0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventParticipantNetworkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventParticipantNetworkTypeTest.php index 6e4eccc09e..848a05cf4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventParticipantNetworkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSecurityEventParticipantNetworkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityStatusTest.php index b931339b08..63c7a735ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityTypeTest.php index c4afb906af..0872e75522 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSensitivityTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php index 263e20d642..a99f85b3e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRStringTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRStringTest.php index d7e20eac24..094795c3bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRStringTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRStringTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyDispenseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyDispenseStatusTest.php index 16e1886fd2..99b64afa49 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyDispenseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyDispenseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyStatusTest.php index d3154ab0ae..7579bc9ff3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRSupplyStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php index 1344e6f873..b7f6f56e3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUriTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUriTest.php index cfba37759c..ed1df1bd88 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUriTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUriTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUuidTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUuidTest.php index bb5099a395..f305124e9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUuidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRUuidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRValueSetStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRValueSetStatusTest.php index 43d56d1596..fc03e3af74 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRValueSetStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElement/FHIRValueSetStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElementTest.php index 4ba77cd774..551ffd12c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitive/FHIRXmlIdRefTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitive/FHIRXmlIdRefTest.php index b7c54f7fa1..f10cacb80c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitive/FHIRXmlIdRefTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitive/FHIRXmlIdRefTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitiveTest.php index 0b00f7e0ae..73d73391c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIdPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRInstantPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRInstantPrimitiveTest.php index 95cafcfa68..059ce8506e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRInstantPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRInstantPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIntegerPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIntegerPrimitiveTest.php index 487a31b897..1b9b9b1c8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIntegerPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRIntegerPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIROidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIROidPrimitiveTest.php index 24e40b2a4e..636ec4520e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIROidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIROidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRResourceInlineTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRResourceInlineTest.php index 04b9b88eb3..2b7453f920 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRResourceInlineTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRResourceInlineTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php index e643eb2f5b..e6595158de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php index 6e4ff6a4a4..05f017b911 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php index bf46cc1437..b9345f3c1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAlertStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAlertStatusListTest.php index 81f9603dda..5ceb3ac9f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAlertStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRAlertStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingConformanceListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingConformanceListTest.php index cf39f0c5d2..286a173b24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingConformanceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingConformanceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityCategoryListTest.php index d62140f32f..1e6e95fd2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php index 803fe21120..d3bf2648c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanGoalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanGoalStatusListTest.php index 5a5cbb0d60..bdf1c974e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanGoalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanGoalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php index a4aaa9e319..47b9b24d94 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCausalityExpectationListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCausalityExpectationListTest.php index aa865ab470..b802a5b36f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCausalityExpectationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCausalityExpectationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php index 1741ba1e45..fc5c609811 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php index 355a8f9f4f..c2e1cea911 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php index 45926ac2bc..39aeb7a2d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionRelationshipTypeListTest.php index 80c291f3bf..e4d0aa52ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionStatusListTest.php index 30bd93e37e..4a3ef9d531 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php index 418ea9e869..edb734d333 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementStatusListTest.php index 9136fbcbc7..91a4e3ca56 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php index 8f115b0791..401199b476 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactSystemListTest.php index d89ba96a60..5e402d4bc2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactUseListTest.php index 886e8a0c5f..19e80c839a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRContactUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCriticalityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCriticalityListTest.php index be7cef2675..5085443db2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCriticalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRCriticalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php index b2ffe6e6ca..d6e9ffc632 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php index d6f1a197d0..f3f19a55db 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php index da5445332c..1070509a2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php index eaf25e140b..63b7364a36 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php index 17a9372dab..4ada51c388 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php index d5d81cb0f1..1fc94e0b9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php index d1f8177069..0e6a895605 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php index 6e0853c66e..c9267a342d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php index ab1f5ed4ad..caef72aceb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExposureTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExposureTypeListTest.php index 6fb16cb743..d7701a7edf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExposureTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExposureTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php index d06e6c1f8c..545f5be3c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php index 60a81c1f22..23c351df28 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php index 09d45e5f9e..87e7a4405c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeListTest.php index 7a72850d08..1368e41ad8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRHierarchicalRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php index 06efb9affa..412bf09b59 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRImagingModalityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRImagingModalityListTest.php index 2fb44824f4..2396eed7e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRImagingModalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRImagingModalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php index d6418e21ac..62d8be41a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php index 0c274b8f4d..4ecf7b9e5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php index c37df243b1..143a6a997a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php index fa99c549a9..9076a73812 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php index 8986ae4415..08041391b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php index f5090c8788..74b59eef4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMediaTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMediaTypeListTest.php index 22dc4eee95..315ad46bcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMediaTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMediaTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php index 85bff9f691..998a572e07 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php index e9ede930f2..6dc5d03147 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationKindListTest.php index 2fd2bf6e1a..00e8e0f490 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusListTest.php index c39c25c590..34cee68265 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationPrescriptionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php index cd16ea7ca3..96bbcba3c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRModalityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRModalityListTest.php index 1bfaedfa95..049f0ffb3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRModalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRModalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php index bb790dcb7c..5ca58cbc2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php index c453e7d749..cc2a259f24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php index b4d2f85a64..473ee2265f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationReliabilityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationReliabilityListTest.php index b6592a532d..dd30f690f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationReliabilityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationReliabilityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php index 4c1f3c2259..767ad503cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIROrderOutcomeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIROrderOutcomeStatusListTest.php index 243f7b914b..429ddc9192 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIROrderOutcomeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIROrderOutcomeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRelationshipTypeListTest.php index ab04edb108..534ef9b8ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php index d59e577b8f..487d5ee9b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php index 9776922b7e..6c8c86a6b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityCompararatorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityCompararatorListTest.php index c43a420816..c8c8b687ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityCompararatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityCompararatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQueryOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQueryOutcomeListTest.php index 74cb5955b9..0f799dd692 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQueryOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQueryOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php index 6b93594e6a..1f2bf59628 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRReactionSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRReactionSeverityListTest.php index ad1f0eafc7..c489b9c101 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRReactionSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRReactionSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceProfileStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceProfileStatusListTest.php index 8889d74ed1..611a0e0eeb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceProfileStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceProfileStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinaryTest.php index be49f988db..12bd25785a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceType/FHIRResourceNamesPlusBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceTypeTest.php index 507674e0c6..76dc2a2fc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php index 2991a7421c..892d7b1899 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php index e5192ed864..a25425c4d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationSystemListTest.php index a1e34374e6..c23746039e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationTypeListTest.php index 93fc8e3608..fa018b5aa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulOperationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php index d32c88454a..0c38054f89 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventActionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventActionListTest.php index 5894a3740f..9536e1fb47 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleListTest.php index 2450502fa9..49559a01e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectLifecycleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectRoleListTest.php index 6143fa22f1..24e393302e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectTypeListTest.php index 1304367211..2ef8d62c4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventObjectTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventOutcomeListTest.php index 451aeabfe0..7a30b1a07d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeListTest.php index 57368aaaea..9466c7d616 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSecurityEventParticipantNetworkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityStatusListTest.php index 14a7892aae..e2a20e799c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityTypeListTest.php index db79738c9d..8ea5cdc240 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSensitivityTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php index 8656426bd4..e2844fcaa9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDispenseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDispenseStatusListTest.php index d93efbd0cb..1a73554950 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDispenseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDispenseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyStatusListTest.php index c2c4813057..2053078045 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php index 7bd4b5c979..1a15be09d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRValueSetStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRValueSetStatusListTest.php index dc3b2bc561..e35286c353 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRValueSetStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitive/FHIRValueSetStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitiveTest.php index 836c044686..05ae88eb55 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRStringPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUriPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUriPrimitiveTest.php index 8cbb62f20e..c075837351 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUriPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUriPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUuidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUuidPrimitiveTest.php index 4cb50ae32e..b5fe8abb0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUuidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/FHIRUuidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRConstantsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRConstantsTest.php index f708780ce0..da8c2f4209 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRConstantsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRConstantsTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRTypeMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRTypeMapTest.php index 6649a12c91..cc711f2b43 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRTypeMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTests/PHPFHIRTypeMapTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeInterface.php index c8356a1a73..0dd91d7f24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeMap.php index f335115a86..df81717471 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU1/PHPFHIRTypeMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBase64BinaryPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBase64BinaryPrimitive.php index ae7c0220cd..8869c758ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBase64BinaryPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBase64BinaryPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -182,8 +182,8 @@ public function _writeToFile($fileHandle) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBooleanPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBooleanPrimitive.php index 79e67d77b2..ada5ee3838 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBooleanPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRBooleanPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|boolean @@ -168,8 +168,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRCodePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRCodePrimitive.php index 553a15b40f..1244b4afdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRCodePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRCodePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRCodePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -173,8 +173,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDatePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDatePrimitive.php index 89f8460d01..5d2214fdb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDatePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDatePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRDatePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -201,8 +201,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDateTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDateTimePrimitive.php index c0f2db37ad..6c199247b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDateTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDateTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -202,8 +202,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDecimalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDecimalPrimitive.php index e07753b86e..a041498a7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDecimalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRDecimalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|double @@ -172,8 +172,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement.php index 1f6bfcc011..f3ed089964 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterf const FIELD_EXTENSION = 'extension'; const FIELD_ID = 'id'; - const FIELD_ID_EXT = '_id'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Optional Extensions Element - found in all resources. @@ -304,8 +303,8 @@ public function setId($id = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** @@ -400,11 +399,18 @@ public function jsonSerialize() $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } if ([] !== ($vs = $this->getExtension())) { - $a[self::FIELD_EXTENSION] = $vs; + $a[self::FIELD_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXTENSION][] = $v; + } } if (null !== ($v = $this->getId())) { $a[self::FIELD_ID] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAccountStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAccountStatus.php index e72d5167c6..8d58e4f25f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAccountStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAccountStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAccountStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACCOUNT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAccountStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRActionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRActionList.php index 25c23d758d..c4e7dcd9e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionList extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_LIST; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRActionListList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddress.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddress.php index a49567a45c..c1c0c484de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddress.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddress.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRAddress extends FHIRElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -235,81 +235,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CITY])) { - $ext = (isset($data[self::FIELD_CITY_EXT]) && is_array($data[self::FIELD_CITY_EXT])) - ? $data[self::FIELD_CITY_EXT] - : null; - if ($data[self::FIELD_CITY] instanceof FHIRString) { - $this->setCity($data[self::FIELD_CITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CITY])) { - $this->setCity(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CITY]] + $ext)); - } else if (is_array($data[self::FIELD_CITY])) { - $this->setCity(new FHIRString(array_merge($ext, $data[self::FIELD_CITY]))); - } + if (isset($data[self::FIELD_CITY]) || isset($data[self::FIELD_CITY_EXT])) { + if (isset($data[self::FIELD_CITY])) { + $value = $data[self::FIELD_CITY]; } else { - $this->setCity(new FHIRString($data[self::FIELD_CITY])); + $value = null; } - } - if (isset($data[self::FIELD_COUNTRY])) { - $ext = (isset($data[self::FIELD_COUNTRY_EXT]) && is_array($data[self::FIELD_COUNTRY_EXT])) - ? $data[self::FIELD_COUNTRY_EXT] - : null; - if ($data[self::FIELD_COUNTRY] instanceof FHIRString) { - $this->setCountry($data[self::FIELD_COUNTRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNTRY])) { - $this->setCountry(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COUNTRY]] + $ext)); - } else if (is_array($data[self::FIELD_COUNTRY])) { - $this->setCountry(new FHIRString(array_merge($ext, $data[self::FIELD_COUNTRY]))); - } + if (isset($data[self::FIELD_CITY_EXT]) && is_array($data[self::FIELD_CITY_EXT])) { + $ext = $data[self::FIELD_CITY_EXT]; } else { - $this->setCountry(new FHIRString($data[self::FIELD_COUNTRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCity($value); + } else if (is_array($value)) { + $this->setCity(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCity(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCity(new FHIRString($ext)); } } - if (isset($data[self::FIELD_DISTRICT])) { - $ext = (isset($data[self::FIELD_DISTRICT_EXT]) && is_array($data[self::FIELD_DISTRICT_EXT])) - ? $data[self::FIELD_DISTRICT_EXT] - : null; - if ($data[self::FIELD_DISTRICT] instanceof FHIRString) { - $this->setDistrict($data[self::FIELD_DISTRICT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISTRICT])) { - $this->setDistrict(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISTRICT]] + $ext)); - } else if (is_array($data[self::FIELD_DISTRICT])) { - $this->setDistrict(new FHIRString(array_merge($ext, $data[self::FIELD_DISTRICT]))); + if (isset($data[self::FIELD_COUNTRY]) || isset($data[self::FIELD_COUNTRY_EXT])) { + if (isset($data[self::FIELD_COUNTRY])) { + $value = $data[self::FIELD_COUNTRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNTRY_EXT]) && is_array($data[self::FIELD_COUNTRY_EXT])) { + $ext = $data[self::FIELD_COUNTRY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCountry($value); + } else if (is_array($value)) { + $this->setCountry(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCountry(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCountry(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DISTRICT]) || isset($data[self::FIELD_DISTRICT_EXT])) { + if (isset($data[self::FIELD_DISTRICT])) { + $value = $data[self::FIELD_DISTRICT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISTRICT_EXT]) && is_array($data[self::FIELD_DISTRICT_EXT])) { + $ext = $data[self::FIELD_DISTRICT_EXT]; } else { - $this->setDistrict(new FHIRString($data[self::FIELD_DISTRICT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDistrict($value); + } else if (is_array($value)) { + $this->setDistrict(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDistrict(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDistrict(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LINE])) { - $ext = (isset($data[self::FIELD_LINE_EXT]) && is_array($data[self::FIELD_LINE_EXT])) - ? $data[self::FIELD_LINE_EXT] - : null; - if (is_array($data[self::FIELD_LINE])) { - foreach($data[self::FIELD_LINE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLine($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLine(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINE]) || isset($data[self::FIELD_LINE_EXT])) { + if (isset($data[self::FIELD_LINE])) { + $value = $data[self::FIELD_LINE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINE_EXT]) && is_array($data[self::FIELD_LINE_EXT])) { + $ext = $data[self::FIELD_LINE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLine($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLine($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLine(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLine(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLine(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLine(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LINE] instanceof FHIRString) { - $this->addLine($data[self::FIELD_LINE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINE])) { - $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINE]] + $ext)); - } else { - $this->addLine(new FHIRString($data[self::FIELD_LINE])); } } if (isset($data[self::FIELD_PERIOD])) { @@ -319,84 +349,119 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_POSTAL_CODE])) { - $ext = (isset($data[self::FIELD_POSTAL_CODE_EXT]) && is_array($data[self::FIELD_POSTAL_CODE_EXT])) - ? $data[self::FIELD_POSTAL_CODE_EXT] - : null; - if ($data[self::FIELD_POSTAL_CODE] instanceof FHIRString) { - $this->setPostalCode($data[self::FIELD_POSTAL_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POSTAL_CODE])) { - $this->setPostalCode(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_POSTAL_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_POSTAL_CODE])) { - $this->setPostalCode(new FHIRString(array_merge($ext, $data[self::FIELD_POSTAL_CODE]))); - } + if (isset($data[self::FIELD_POSTAL_CODE]) || isset($data[self::FIELD_POSTAL_CODE_EXT])) { + if (isset($data[self::FIELD_POSTAL_CODE])) { + $value = $data[self::FIELD_POSTAL_CODE]; } else { - $this->setPostalCode(new FHIRString($data[self::FIELD_POSTAL_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_STATE])) { - $ext = (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) - ? $data[self::FIELD_STATE_EXT] - : null; - if ($data[self::FIELD_STATE] instanceof FHIRString) { - $this->setState($data[self::FIELD_STATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATE])) { - $this->setState(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATE])) { - $this->setState(new FHIRString(array_merge($ext, $data[self::FIELD_STATE]))); - } + if (isset($data[self::FIELD_POSTAL_CODE_EXT]) && is_array($data[self::FIELD_POSTAL_CODE_EXT])) { + $ext = $data[self::FIELD_POSTAL_CODE_EXT]; } else { - $this->setState(new FHIRString($data[self::FIELD_STATE])); + $ext = []; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPostalCode($value); + } else if (is_array($value)) { + $this->setPostalCode(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPostalCode(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + } else if ([] !== $ext) { + $this->setPostalCode(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAddressType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAddressType([FHIRAddressType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAddressType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_STATE]) || isset($data[self::FIELD_STATE_EXT])) { + if (isset($data[self::FIELD_STATE])) { + $value = $data[self::FIELD_STATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) { + $ext = $data[self::FIELD_STATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setState($value); + } else if (is_array($value)) { + $this->setState(new FHIRString(array_merge($ext, $value))); + } else { + $this->setState(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setState(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setType(new FHIRAddressType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRAddressUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRAddressUse([FHIRAddressUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRAddressUse(array_merge($ext, $data[self::FIELD_USE]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAddressType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAddressType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAddressType([FHIRAddressType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRAddressType($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRAddressUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAddressUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRAddressUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRAddressUse([FHIRAddressUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRAddressUse($ext)); } } } @@ -811,8 +876,8 @@ public function setUse(FHIRAddressUse $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -995,78 +1060,105 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCity())) { $a[self::FIELD_CITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CITY_EXT] = $enc; } } if (null !== ($v = $this->getCountry())) { $a[self::FIELD_COUNTRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COUNTRY_EXT] = $enc; } } if (null !== ($v = $this->getDistrict())) { $a[self::FIELD_DISTRICT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISTRICT_EXT] = $enc; } } if ([] !== ($vs = $this->getLine())) { $a[self::FIELD_LINE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINE_EXT] = $encs; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if (null !== ($v = $this->getPostalCode())) { $a[self::FIELD_POSTAL_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_POSTAL_CODE_EXT] = $enc; } } if (null !== ($v = $this->getState())) { $a[self::FIELD_STATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATE_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAddressType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAddressType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAddressUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAddressUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressType.php index 727bc92be4..066219f887 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAddressType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAddressTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressUse.php index 4a07fe4f08..28f656a6bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAddressUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAddressUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAddressUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAdministrativeGender.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAdministrativeGender.php index 2a279079d4..7269feb53a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAdministrativeGender.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAdministrativeGender.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRAdministrativeGender extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADMINISTRATIVE_GENDER; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAdministrativeGenderList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAggregationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAggregationMode.php index c76018427a..bcd1e61d9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAggregationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAggregationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAggregationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAggregationModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCategory.php index 1c0241edd9..7e26c35198 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAllergyIntoleranceCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAllergyIntoleranceCategoryList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCertainty.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCertainty.php index 5efefb70bc..5046fc1f9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCertainty.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCertainty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAllergyIntoleranceCertainty extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CERTAINTY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAllergyIntoleranceCertaintyList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCriticality.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCriticality.php index fcd783fd4e..802062f939 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCriticality.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceCriticality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAllergyIntoleranceCriticality extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CRITICALITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAllergyIntoleranceCriticalityList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceSeverity.php index dbdb7d164d..055f66fe3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAllergyIntoleranceSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAllergyIntoleranceSeverityList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceStatus.php index e925141457..59e7e3d74a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAllergyIntoleranceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAllergyIntoleranceStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceType.php index 5717b55291..f6da2dd765 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAllergyIntoleranceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAllergyIntoleranceType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAllergyIntoleranceTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnnotation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnnotation.php index ae26e624ce..c5e958157e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnnotation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnnotation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRAnnotation extends FHIRElement const FIELD_TIME_EXT = '_time'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -166,52 +166,73 @@ public function __construct($data = null) $this->setAuthorReference(new FHIRReference($data[self::FIELD_AUTHOR_REFERENCE])); } } - if (isset($data[self::FIELD_AUTHOR_STRING])) { - $ext = (isset($data[self::FIELD_AUTHOR_STRING_EXT]) && is_array($data[self::FIELD_AUTHOR_STRING_EXT])) - ? $data[self::FIELD_AUTHOR_STRING_EXT] - : null; - if ($data[self::FIELD_AUTHOR_STRING] instanceof FHIRString) { - $this->setAuthorString($data[self::FIELD_AUTHOR_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHOR_STRING])) { - $this->setAuthorString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AUTHOR_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHOR_STRING])) { - $this->setAuthorString(new FHIRString(array_merge($ext, $data[self::FIELD_AUTHOR_STRING]))); - } + if (isset($data[self::FIELD_AUTHOR_STRING]) || isset($data[self::FIELD_AUTHOR_STRING_EXT])) { + if (isset($data[self::FIELD_AUTHOR_STRING])) { + $value = $data[self::FIELD_AUTHOR_STRING]; } else { - $this->setAuthorString(new FHIRString($data[self::FIELD_AUTHOR_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_AUTHOR_STRING_EXT]) && is_array($data[self::FIELD_AUTHOR_STRING_EXT])) { + $ext = $data[self::FIELD_AUTHOR_STRING_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAuthorString($value); + } else if (is_array($value)) { + $this->setAuthorString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAuthorString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthorString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRDateTime) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME]))); + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; } else { - $this->setTime(new FHIRDateTime($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTime(new FHIRDateTime($ext)); } } } @@ -391,8 +412,8 @@ public function setTime($time = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -511,25 +532,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthorString())) { $a[self::FIELD_AUTHOR_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AUTHOR_STRING_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnswerFormat.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnswerFormat.php index 4f6c668b9c..18bbc035f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnswerFormat.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAnswerFormat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAnswerFormat extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ANSWER_FORMAT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAnswerFormatList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAppointmentStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAppointmentStatus.php index df9d391bf2..19fb357784 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAppointmentStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAppointmentStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAppointmentStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_APPOINTMENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAppointmentStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionDirectionType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionDirectionType.php index 88fcc8cba2..08329b5dd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionDirectionType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionDirectionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAssertionDirectionType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_DIRECTION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAssertionDirectionTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionOperatorType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionOperatorType.php index 4f0991e45e..907422fa56 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionOperatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionOperatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAssertionOperatorType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_OPERATOR_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAssertionOperatorTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionResponseTypes.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionResponseTypes.php index b21e4919a1..7383539177 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionResponseTypes.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAssertionResponseTypes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAssertionResponseTypes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_RESPONSE_TYPES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAssertionResponseTypesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAttachment.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAttachment.php index 67cdeb9a54..e224122607 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAttachment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAttachment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRAttachment extends FHIRElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -217,132 +217,188 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); - } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_CREATION])) { - $ext = (isset($data[self::FIELD_CREATION_EXT]) && is_array($data[self::FIELD_CREATION_EXT])) - ? $data[self::FIELD_CREATION_EXT] - : null; - if ($data[self::FIELD_CREATION] instanceof FHIRDateTime) { - $this->setCreation($data[self::FIELD_CREATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATION])) { - $this->setCreation(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATION]] + $ext)); - } else if (is_array($data[self::FIELD_CREATION])) { - $this->setCreation(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_CREATION]) || isset($data[self::FIELD_CREATION_EXT])) { + if (isset($data[self::FIELD_CREATION])) { + $value = $data[self::FIELD_CREATION]; } else { - $this->setCreation(new FHIRDateTime($data[self::FIELD_CREATION])); - } - } - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRBase64Binary) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DATA]))); + $value = null; + } + if (isset($data[self::FIELD_CREATION_EXT]) && is_array($data[self::FIELD_CREATION_EXT])) { + $ext = $data[self::FIELD_CREATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreation($value); + } else if (is_array($value)) { + $this->setCreation(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreation(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreation(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; } else { - $this->setData(new FHIRBase64Binary($data[self::FIELD_DATA])); - } - } - if (isset($data[self::FIELD_HASH])) { - $ext = (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) - ? $data[self::FIELD_HASH_EXT] - : null; - if ($data[self::FIELD_HASH] instanceof FHIRBase64Binary) { - $this->setHash($data[self::FIELD_HASH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HASH])) { - $this->setHash(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_HASH]] + $ext)); - } else if (is_array($data[self::FIELD_HASH])) { - $this->setHash(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_HASH]))); + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setData(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_HASH]) || isset($data[self::FIELD_HASH_EXT])) { + if (isset($data[self::FIELD_HASH])) { + $value = $data[self::FIELD_HASH]; } else { - $this->setHash(new FHIRBase64Binary($data[self::FIELD_HASH])); - } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + $value = null; + } + if (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) { + $ext = $data[self::FIELD_HASH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setHash($value); + } else if (is_array($value)) { + $this->setHash(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setHash(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHash(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); - } - } - if (isset($data[self::FIELD_SIZE])) { - $ext = (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) - ? $data[self::FIELD_SIZE_EXT] - : null; - if ($data[self::FIELD_SIZE] instanceof FHIRUnsignedInt) { - $this->setSize($data[self::FIELD_SIZE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_SIZE]] + $ext)); - } else if (is_array($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_SIZE]))); + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_SIZE]) || isset($data[self::FIELD_SIZE_EXT])) { + if (isset($data[self::FIELD_SIZE])) { + $value = $data[self::FIELD_SIZE]; } else { - $this->setSize(new FHIRUnsignedInt($data[self::FIELD_SIZE])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) { + $ext = $data[self::FIELD_SIZE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setSize($value); + } else if (is_array($value)) { + $this->setSize(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setSize(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSize(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -694,8 +750,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -875,60 +931,79 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getCreation())) { $a[self::FIELD_CREATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATION_EXT] = $enc; } } if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } if (null !== ($v = $this->getHash())) { $a[self::FIELD_HASH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_HASH_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getSize())) { $a[self::FIELD_SIZE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_SIZE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventAction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventAction.php index 847c9d7745..1e2b1c85e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventAction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAuditEventAction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_ACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAuditEventActionList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventOutcome.php index 1ca050bee5..a243de7e0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAuditEventOutcome extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_OUTCOME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAuditEventOutcomeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventParticipantNetworkType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventParticipantNetworkType.php index e33772131a..3f1c2f5895 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventParticipantNetworkType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRAuditEventParticipantNetworkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAuditEventParticipantNetworkType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_PARTICIPANT_NETWORK_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRAuditEventParticipantNetworkTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement.php index e4a15b144d..ce25f09aec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBackboneElement extends FHIRElement const FIELD_MODIFIER_EXTENSION = 'modifierExtension'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Optional Extensions Element - found in all resources. @@ -246,8 +246,8 @@ public function setModifierExtension(array $modifierExtension = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -327,7 +327,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getModifierExtension())) { - $a[self::FIELD_MODIFIER_EXTENSION] = $vs; + $a[self::FIELD_MODIFIER_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER_EXTENSION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php index a770ce8ed3..eda2ba041c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRAllergyIntoleranceReaction extends FHIRBackboneElement const FIELD_SUBSTANCE = 'substance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Statement about the degree of clinical certainty that a Specific Substance was @@ -230,36 +230,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CERTAINTY])) { - $ext = (isset($data[self::FIELD_CERTAINTY_EXT]) && is_array($data[self::FIELD_CERTAINTY_EXT])) - ? $data[self::FIELD_CERTAINTY_EXT] - : null; - if ($data[self::FIELD_CERTAINTY] instanceof FHIRAllergyIntoleranceCertainty) { - $this->setCertainty($data[self::FIELD_CERTAINTY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CERTAINTY])) { - $this->setCertainty(new FHIRAllergyIntoleranceCertainty([FHIRAllergyIntoleranceCertainty::FIELD_VALUE => $data[self::FIELD_CERTAINTY]] + $ext)); - } else if (is_array($data[self::FIELD_CERTAINTY])) { - $this->setCertainty(new FHIRAllergyIntoleranceCertainty(array_merge($ext, $data[self::FIELD_CERTAINTY]))); - } + if (isset($data[self::FIELD_CERTAINTY]) || isset($data[self::FIELD_CERTAINTY_EXT])) { + if (isset($data[self::FIELD_CERTAINTY])) { + $value = $data[self::FIELD_CERTAINTY]; } else { - $this->setCertainty(new FHIRAllergyIntoleranceCertainty($data[self::FIELD_CERTAINTY])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CERTAINTY_EXT]) && is_array($data[self::FIELD_CERTAINTY_EXT])) { + $ext = $data[self::FIELD_CERTAINTY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceCertainty) { + $this->setCertainty($value); + } else if (is_array($value)) { + $this->setCertainty(new FHIRAllergyIntoleranceCertainty(array_merge($ext, $value))); + } else { + $this->setCertainty(new FHIRAllergyIntoleranceCertainty([FHIRAllergyIntoleranceCertainty::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCertainty(new FHIRAllergyIntoleranceCertainty($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_EXPOSURE_ROUTE])) { @@ -294,36 +308,50 @@ public function __construct($data = null) $this->setNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_ONSET])) { - $ext = (isset($data[self::FIELD_ONSET_EXT]) && is_array($data[self::FIELD_ONSET_EXT])) - ? $data[self::FIELD_ONSET_EXT] - : null; - if ($data[self::FIELD_ONSET] instanceof FHIRDateTime) { - $this->setOnset($data[self::FIELD_ONSET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET])) { - $this->setOnset(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ONSET]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET])) { - $this->setOnset(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ONSET]))); - } + if (isset($data[self::FIELD_ONSET]) || isset($data[self::FIELD_ONSET_EXT])) { + if (isset($data[self::FIELD_ONSET])) { + $value = $data[self::FIELD_ONSET]; } else { - $this->setOnset(new FHIRDateTime($data[self::FIELD_ONSET])); + $value = null; } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRAllergyIntoleranceSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRAllergyIntoleranceSeverity([FHIRAllergyIntoleranceSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRAllergyIntoleranceSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + if (isset($data[self::FIELD_ONSET_EXT]) && is_array($data[self::FIELD_ONSET_EXT])) { + $ext = $data[self::FIELD_ONSET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOnset($value); + } else if (is_array($value)) { + $this->setOnset(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOnset(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOnset(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; } else { - $this->setSeverity(new FHIRAllergyIntoleranceSeverity($data[self::FIELD_SEVERITY])); + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRAllergyIntoleranceSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRAllergyIntoleranceSeverity([FHIRAllergyIntoleranceSeverity::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRAllergyIntoleranceSeverity($ext)); } } if (isset($data[self::FIELD_SUBSTANCE])) { @@ -678,8 +706,8 @@ public function setSubstance(FHIRCodeableConcept $substance = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -818,15 +846,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCertainty())) { $a[self::FIELD_CERTAINTY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceCertainty::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceCertainty::FIELD_VALUE]); $a[self::FIELD_CERTAINTY_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -834,28 +866,41 @@ public function jsonSerialize() $a[self::FIELD_EXPOSURE_ROUTE] = $v; } if ([] !== ($vs = $this->getManifestation())) { - $a[self::FIELD_MANIFESTATION] = $vs; + $a[self::FIELD_MANIFESTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANIFESTATION][] = $v; + } } if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v; } if (null !== ($v = $this->getOnset())) { $a[self::FIELD_ONSET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ONSET_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getSubstance())) { $a[self::FIELD_SUBSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php index ab3c039d97..f25a21da05 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRAppointmentParticipant extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -167,36 +167,50 @@ public function __construct($data = null) $this->setActor(new FHIRReference($data[self::FIELD_ACTOR])); } } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRParticipantRequired) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRParticipantRequired([FHIRParticipantRequired::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRParticipantRequired(array_merge($ext, $data[self::FIELD_REQUIRED]))); - } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; } else { - $this->setRequired(new FHIRParticipantRequired($data[self::FIELD_REQUIRED])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRParticipationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRParticipationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRParticipantRequired) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRParticipantRequired(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRParticipantRequired([FHIRParticipantRequired::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRParticipantRequired($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRParticipationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRParticipationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRParticipationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRParticipationStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -395,8 +409,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -498,20 +512,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRParticipantRequired::FIELD_VALUE, $enc)))) { + unset($enc[FHIRParticipantRequired::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRParticipationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRParticipationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php index e12de52270..08b54d16ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRAuditEventDetail extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRBase64Binary) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRBase64Binary($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRBase64Binary($ext)); } } } @@ -267,8 +281,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -365,18 +379,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEvent.php index b3b2c1c05b..2b9cca16e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRAuditEventEvent extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Indicator for type of action performed during the event that generated the @@ -201,68 +201,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION])) { - $ext = (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) - ? $data[self::FIELD_ACTION_EXT] - : null; - if ($data[self::FIELD_ACTION] instanceof FHIRAuditEventAction) { - $this->setAction($data[self::FIELD_ACTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRAuditEventAction([FHIRAuditEventAction::FIELD_VALUE => $data[self::FIELD_ACTION]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRAuditEventAction(array_merge($ext, $data[self::FIELD_ACTION]))); - } + if (isset($data[self::FIELD_ACTION]) || isset($data[self::FIELD_ACTION_EXT])) { + if (isset($data[self::FIELD_ACTION])) { + $value = $data[self::FIELD_ACTION]; } else { - $this->setAction(new FHIRAuditEventAction($data[self::FIELD_ACTION])); + $value = null; } - } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRInstant) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRInstant(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) { + $ext = $data[self::FIELD_ACTION_EXT]; } else { - $this->setDateTime(new FHIRInstant($data[self::FIELD_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRAuditEventOutcome) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRAuditEventOutcome([FHIRAuditEventOutcome::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRAuditEventOutcome(array_merge($ext, $data[self::FIELD_OUTCOME]))); + if (null !== $value) { + if ($value instanceof FHIRAuditEventAction) { + $this->setAction($value); + } else if (is_array($value)) { + $this->setAction(new FHIRAuditEventAction(array_merge($ext, $value))); + } else { + $this->setAction(new FHIRAuditEventAction([FHIRAuditEventAction::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAction(new FHIRAuditEventAction($ext)); + } + } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; } else { - $this->setOutcome(new FHIRAuditEventOutcome($data[self::FIELD_OUTCOME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_OUTCOME_DESC])) { - $ext = (isset($data[self::FIELD_OUTCOME_DESC_EXT]) && is_array($data[self::FIELD_OUTCOME_DESC_EXT])) - ? $data[self::FIELD_OUTCOME_DESC_EXT] - : null; - if ($data[self::FIELD_OUTCOME_DESC] instanceof FHIRString) { - $this->setOutcomeDesc($data[self::FIELD_OUTCOME_DESC]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME_DESC])) { - $this->setOutcomeDesc(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OUTCOME_DESC]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME_DESC])) { - $this->setOutcomeDesc(new FHIRString(array_merge($ext, $data[self::FIELD_OUTCOME_DESC]))); + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAuditEventOutcome) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRAuditEventOutcome(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRAuditEventOutcome([FHIRAuditEventOutcome::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRAuditEventOutcome($ext)); + } + } + if (isset($data[self::FIELD_OUTCOME_DESC]) || isset($data[self::FIELD_OUTCOME_DESC_EXT])) { + if (isset($data[self::FIELD_OUTCOME_DESC])) { + $value = $data[self::FIELD_OUTCOME_DESC]; } else { - $this->setOutcomeDesc(new FHIRString($data[self::FIELD_OUTCOME_DESC])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_DESC_EXT]) && is_array($data[self::FIELD_OUTCOME_DESC_EXT])) { + $ext = $data[self::FIELD_OUTCOME_DESC_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOutcomeDesc($value); + } else if (is_array($value)) { + $this->setOutcomeDesc(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOutcomeDesc(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcomeDesc(new FHIRString($ext)); } } if (isset($data[self::FIELD_PURPOSE_OF_EVENT])) { @@ -621,8 +649,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -762,41 +790,64 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAction())) { $a[self::FIELD_ACTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAuditEventAction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAuditEventAction::FIELD_VALUE]); $a[self::FIELD_ACTION_EXT] = $enc; } } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAuditEventOutcome::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAuditEventOutcome::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } if (null !== ($v = $this->getOutcomeDesc())) { $a[self::FIELD_OUTCOME_DESC] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OUTCOME_DESC_EXT] = $enc; } } if ([] !== ($vs = $this->getPurposeOfEvent())) { - $a[self::FIELD_PURPOSE_OF_EVENT] = $vs; + $a[self::FIELD_PURPOSE_OF_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PURPOSE_OF_EVENT][] = $v; + } } if ([] !== ($vs = $this->getSubtype())) { - $a[self::FIELD_SUBTYPE] = $vs; + $a[self::FIELD_SUBTYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBTYPE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php index 793a5305cb..63c32fa973 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRAuditEventNetwork extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDRESS])) { - $ext = (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) - ? $data[self::FIELD_ADDRESS_EXT] - : null; - if ($data[self::FIELD_ADDRESS] instanceof FHIRString) { - $this->setAddress($data[self::FIELD_ADDRESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADDRESS]] + $ext)); - } else if (is_array($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRString(array_merge($ext, $data[self::FIELD_ADDRESS]))); - } + if (isset($data[self::FIELD_ADDRESS]) || isset($data[self::FIELD_ADDRESS_EXT])) { + if (isset($data[self::FIELD_ADDRESS])) { + $value = $data[self::FIELD_ADDRESS]; } else { - $this->setAddress(new FHIRString($data[self::FIELD_ADDRESS])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAuditEventParticipantNetworkType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAuditEventParticipantNetworkType([FHIRAuditEventParticipantNetworkType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAuditEventParticipantNetworkType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) { + $ext = $data[self::FIELD_ADDRESS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAddress($value); + } else if (is_array($value)) { + $this->setAddress(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAddress(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAddress(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRAuditEventParticipantNetworkType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAuditEventParticipantNetworkType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAuditEventParticipantNetworkType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAuditEventParticipantNetworkType([FHIRAuditEventParticipantNetworkType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRAuditEventParticipantNetworkType($ext)); } } } @@ -262,8 +276,8 @@ public function setType(FHIRAuditEventParticipantNetworkType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -351,18 +365,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAddress())) { $a[self::FIELD_ADDRESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADDRESS_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAuditEventParticipantNetworkType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAuditEventParticipantNetworkType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObject.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObject.php index 4d3841f304..6ac7157a4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObject.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRAuditEventObject extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -236,20 +236,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -284,36 +291,50 @@ public function __construct($data = null) $this->setLifecycle(new FHIRCoding($data[self::FIELD_LIFECYCLE])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_QUERY])) { - $ext = (isset($data[self::FIELD_QUERY_EXT]) && is_array($data[self::FIELD_QUERY_EXT])) - ? $data[self::FIELD_QUERY_EXT] - : null; - if ($data[self::FIELD_QUERY] instanceof FHIRBase64Binary) { - $this->setQuery($data[self::FIELD_QUERY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUERY])) { - $this->setQuery(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_QUERY]] + $ext)); - } else if (is_array($data[self::FIELD_QUERY])) { - $this->setQuery(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_QUERY]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_QUERY]) || isset($data[self::FIELD_QUERY_EXT])) { + if (isset($data[self::FIELD_QUERY])) { + $value = $data[self::FIELD_QUERY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUERY_EXT]) && is_array($data[self::FIELD_QUERY_EXT])) { + $ext = $data[self::FIELD_QUERY_EXT]; } else { - $this->setQuery(new FHIRBase64Binary($data[self::FIELD_QUERY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setQuery($value); + } else if (is_array($value)) { + $this->setQuery(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setQuery(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQuery(new FHIRBase64Binary($ext)); } } if (isset($data[self::FIELD_REFERENCE])) { @@ -766,8 +787,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -933,13 +954,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; @@ -949,15 +978,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getQuery())) { $a[self::FIELD_QUERY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_QUERY_EXT] = $enc; } } @@ -968,11 +1001,20 @@ public function jsonSerialize() $a[self::FIELD_ROLE] = $v; } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipant.php index 4ab23918cf..10f14ea02c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRAuditEventParticipant extends FHIRBackboneElement const FIELD_USER_ID = 'userId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -257,20 +257,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALT_ID])) { - $ext = (isset($data[self::FIELD_ALT_ID_EXT]) && is_array($data[self::FIELD_ALT_ID_EXT])) - ? $data[self::FIELD_ALT_ID_EXT] - : null; - if ($data[self::FIELD_ALT_ID] instanceof FHIRString) { - $this->setAltId($data[self::FIELD_ALT_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALT_ID])) { - $this->setAltId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALT_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ALT_ID])) { - $this->setAltId(new FHIRString(array_merge($ext, $data[self::FIELD_ALT_ID]))); - } + if (isset($data[self::FIELD_ALT_ID]) || isset($data[self::FIELD_ALT_ID_EXT])) { + if (isset($data[self::FIELD_ALT_ID])) { + $value = $data[self::FIELD_ALT_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALT_ID_EXT]) && is_array($data[self::FIELD_ALT_ID_EXT])) { + $ext = $data[self::FIELD_ALT_ID_EXT]; } else { - $this->setAltId(new FHIRString($data[self::FIELD_ALT_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAltId($value); + } else if (is_array($value)) { + $this->setAltId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAltId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAltId(new FHIRString($ext)); } } if (isset($data[self::FIELD_LOCATION])) { @@ -287,20 +294,27 @@ public function __construct($data = null) $this->setMedia(new FHIRCoding($data[self::FIELD_MEDIA])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NETWORK])) { @@ -310,33 +324,42 @@ public function __construct($data = null) $this->setNetwork(new FHIRAuditEventNetwork($data[self::FIELD_NETWORK])); } } - if (isset($data[self::FIELD_POLICY])) { - $ext = (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) - ? $data[self::FIELD_POLICY_EXT] - : null; - if (is_array($data[self::FIELD_POLICY])) { - foreach($data[self::FIELD_POLICY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addPolicy($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPolicy(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_POLICY]) || isset($data[self::FIELD_POLICY_EXT])) { + if (isset($data[self::FIELD_POLICY])) { + $value = $data[self::FIELD_POLICY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) { + $ext = $data[self::FIELD_POLICY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addPolicy($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addPolicy($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPolicy(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPolicy(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addPolicy(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPolicy(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_POLICY] instanceof FHIRUri) { - $this->addPolicy($data[self::FIELD_POLICY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_POLICY])) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_POLICY]] + $ext)); - } else { - $this->addPolicy(new FHIRUri($data[self::FIELD_POLICY])); } } if (isset($data[self::FIELD_PURPOSE_OF_USE])) { @@ -364,20 +387,27 @@ public function __construct($data = null) $this->setReference(new FHIRReference($data[self::FIELD_REFERENCE])); } } - if (isset($data[self::FIELD_REQUESTOR])) { - $ext = (isset($data[self::FIELD_REQUESTOR_EXT]) && is_array($data[self::FIELD_REQUESTOR_EXT])) - ? $data[self::FIELD_REQUESTOR_EXT] - : null; - if ($data[self::FIELD_REQUESTOR] instanceof FHIRBoolean) { - $this->setRequestor($data[self::FIELD_REQUESTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUESTOR])) { - $this->setRequestor(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUESTOR]] + $ext)); - } else if (is_array($data[self::FIELD_REQUESTOR])) { - $this->setRequestor(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUESTOR]))); - } + if (isset($data[self::FIELD_REQUESTOR]) || isset($data[self::FIELD_REQUESTOR_EXT])) { + if (isset($data[self::FIELD_REQUESTOR])) { + $value = $data[self::FIELD_REQUESTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUESTOR_EXT]) && is_array($data[self::FIELD_REQUESTOR_EXT])) { + $ext = $data[self::FIELD_REQUESTOR_EXT]; } else { - $this->setRequestor(new FHIRBoolean($data[self::FIELD_REQUESTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequestor($value); + } else if (is_array($value)) { + $this->setRequestor(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequestor(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequestor(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -898,8 +928,8 @@ public function setUserId(FHIRIdentifier $userId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1078,8 +1108,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAltId())) { $a[self::FIELD_ALT_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALT_ID_EXT] = $enc; } } @@ -1091,8 +1123,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1101,38 +1135,63 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPolicy())) { $a[self::FIELD_POLICY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_POLICY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_POLICY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_POLICY_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_POLICY_EXT] = $encs; + } } if ([] !== ($vs = $this->getPurposeOfUse())) { - $a[self::FIELD_PURPOSE_OF_USE] = $vs; + $a[self::FIELD_PURPOSE_OF_USE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PURPOSE_OF_USE][] = $v; + } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } if (null !== ($v = $this->getRequestor())) { $a[self::FIELD_REQUESTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUESTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } } if (null !== ($v = $this->getUserId())) { $a[self::FIELD_USER_ID] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php index c3f0d33e31..7985fce112 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRAuditEventSource extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -152,20 +152,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_SITE])) { - $ext = (isset($data[self::FIELD_SITE_EXT]) && is_array($data[self::FIELD_SITE_EXT])) - ? $data[self::FIELD_SITE_EXT] - : null; - if ($data[self::FIELD_SITE] instanceof FHIRString) { - $this->setSite($data[self::FIELD_SITE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SITE])) { - $this->setSite(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SITE]] + $ext)); - } else if (is_array($data[self::FIELD_SITE])) { - $this->setSite(new FHIRString(array_merge($ext, $data[self::FIELD_SITE]))); - } + if (isset($data[self::FIELD_SITE]) || isset($data[self::FIELD_SITE_EXT])) { + if (isset($data[self::FIELD_SITE])) { + $value = $data[self::FIELD_SITE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SITE_EXT]) && is_array($data[self::FIELD_SITE_EXT])) { + $ext = $data[self::FIELD_SITE_EXT]; } else { - $this->setSite(new FHIRString($data[self::FIELD_SITE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSite($value); + } else if (is_array($value)) { + $this->setSite(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSite(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSite(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -339,8 +346,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -444,13 +451,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getSite())) { $a[self::FIELD_SITE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SITE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php index 510b0edab4..328805a9f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRBundleEntry extends FHIRBackboneElement const FIELD_SEARCH = 'search'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -170,20 +170,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FULL_URL])) { - $ext = (isset($data[self::FIELD_FULL_URL_EXT]) && is_array($data[self::FIELD_FULL_URL_EXT])) - ? $data[self::FIELD_FULL_URL_EXT] - : null; - if ($data[self::FIELD_FULL_URL] instanceof FHIRUri) { - $this->setFullUrl($data[self::FIELD_FULL_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FULL_URL])) { - $this->setFullUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_FULL_URL]] + $ext)); - } else if (is_array($data[self::FIELD_FULL_URL])) { - $this->setFullUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_FULL_URL]))); - } + if (isset($data[self::FIELD_FULL_URL]) || isset($data[self::FIELD_FULL_URL_EXT])) { + if (isset($data[self::FIELD_FULL_URL])) { + $value = $data[self::FIELD_FULL_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FULL_URL_EXT]) && is_array($data[self::FIELD_FULL_URL_EXT])) { + $ext = $data[self::FIELD_FULL_URL_EXT]; } else { - $this->setFullUrl(new FHIRUri($data[self::FIELD_FULL_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setFullUrl($value); + } else if (is_array($value)) { + $this->setFullUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setFullUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFullUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_LINK])) { @@ -474,8 +481,8 @@ public function setSearch(FHIRBundleSearch $search = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -600,13 +607,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFullUrl())) { $a[self::FIELD_FULL_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_FULL_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -620,6 +635,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSearch())) { $a[self::FIELD_SEARCH] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php index ef4f09304e..a3e4eca42c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRBundleLink extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_RELATION])) { - $ext = (isset($data[self::FIELD_RELATION_EXT]) && is_array($data[self::FIELD_RELATION_EXT])) - ? $data[self::FIELD_RELATION_EXT] - : null; - if ($data[self::FIELD_RELATION] instanceof FHIRString) { - $this->setRelation($data[self::FIELD_RELATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATION])) { - $this->setRelation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RELATION]] + $ext)); - } else if (is_array($data[self::FIELD_RELATION])) { - $this->setRelation(new FHIRString(array_merge($ext, $data[self::FIELD_RELATION]))); - } + if (isset($data[self::FIELD_RELATION]) || isset($data[self::FIELD_RELATION_EXT])) { + if (isset($data[self::FIELD_RELATION])) { + $value = $data[self::FIELD_RELATION]; } else { - $this->setRelation(new FHIRString($data[self::FIELD_RELATION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_RELATION_EXT]) && is_array($data[self::FIELD_RELATION_EXT])) { + $ext = $data[self::FIELD_RELATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRelation($value); + } else if (is_array($value)) { + $this->setRelation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRelation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRelation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -268,8 +282,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -365,18 +379,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getRelation())) { $a[self::FIELD_RELATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RELATION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php index 44f20eca5e..6c08fec47e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRBundleRequest extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -193,100 +193,142 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IF_MATCH])) { - $ext = (isset($data[self::FIELD_IF_MATCH_EXT]) && is_array($data[self::FIELD_IF_MATCH_EXT])) - ? $data[self::FIELD_IF_MATCH_EXT] - : null; - if ($data[self::FIELD_IF_MATCH] instanceof FHIRString) { - $this->setIfMatch($data[self::FIELD_IF_MATCH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_MATCH])) { - $this->setIfMatch(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IF_MATCH]] + $ext)); - } else if (is_array($data[self::FIELD_IF_MATCH])) { - $this->setIfMatch(new FHIRString(array_merge($ext, $data[self::FIELD_IF_MATCH]))); - } + if (isset($data[self::FIELD_IF_MATCH]) || isset($data[self::FIELD_IF_MATCH_EXT])) { + if (isset($data[self::FIELD_IF_MATCH])) { + $value = $data[self::FIELD_IF_MATCH]; } else { - $this->setIfMatch(new FHIRString($data[self::FIELD_IF_MATCH])); + $value = null; } - } - if (isset($data[self::FIELD_IF_MODIFIED_SINCE])) { - $ext = (isset($data[self::FIELD_IF_MODIFIED_SINCE_EXT]) && is_array($data[self::FIELD_IF_MODIFIED_SINCE_EXT])) - ? $data[self::FIELD_IF_MODIFIED_SINCE_EXT] - : null; - if ($data[self::FIELD_IF_MODIFIED_SINCE] instanceof FHIRInstant) { - $this->setIfModifiedSince($data[self::FIELD_IF_MODIFIED_SINCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_MODIFIED_SINCE])) { - $this->setIfModifiedSince(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_IF_MODIFIED_SINCE]] + $ext)); - } else if (is_array($data[self::FIELD_IF_MODIFIED_SINCE])) { - $this->setIfModifiedSince(new FHIRInstant(array_merge($ext, $data[self::FIELD_IF_MODIFIED_SINCE]))); - } + if (isset($data[self::FIELD_IF_MATCH_EXT]) && is_array($data[self::FIELD_IF_MATCH_EXT])) { + $ext = $data[self::FIELD_IF_MATCH_EXT]; } else { - $this->setIfModifiedSince(new FHIRInstant($data[self::FIELD_IF_MODIFIED_SINCE])); + $ext = []; } - } - if (isset($data[self::FIELD_IF_NONE_EXIST])) { - $ext = (isset($data[self::FIELD_IF_NONE_EXIST_EXT]) && is_array($data[self::FIELD_IF_NONE_EXIST_EXT])) - ? $data[self::FIELD_IF_NONE_EXIST_EXT] - : null; - if ($data[self::FIELD_IF_NONE_EXIST] instanceof FHIRString) { - $this->setIfNoneExist($data[self::FIELD_IF_NONE_EXIST]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_NONE_EXIST])) { - $this->setIfNoneExist(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IF_NONE_EXIST]] + $ext)); - } else if (is_array($data[self::FIELD_IF_NONE_EXIST])) { - $this->setIfNoneExist(new FHIRString(array_merge($ext, $data[self::FIELD_IF_NONE_EXIST]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIfMatch($value); + } else if (is_array($value)) { + $this->setIfMatch(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIfMatch(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setIfNoneExist(new FHIRString($data[self::FIELD_IF_NONE_EXIST])); + } else if ([] !== $ext) { + $this->setIfMatch(new FHIRString($ext)); } } - if (isset($data[self::FIELD_IF_NONE_MATCH])) { - $ext = (isset($data[self::FIELD_IF_NONE_MATCH_EXT]) && is_array($data[self::FIELD_IF_NONE_MATCH_EXT])) - ? $data[self::FIELD_IF_NONE_MATCH_EXT] - : null; - if ($data[self::FIELD_IF_NONE_MATCH] instanceof FHIRString) { - $this->setIfNoneMatch($data[self::FIELD_IF_NONE_MATCH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_NONE_MATCH])) { - $this->setIfNoneMatch(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IF_NONE_MATCH]] + $ext)); - } else if (is_array($data[self::FIELD_IF_NONE_MATCH])) { - $this->setIfNoneMatch(new FHIRString(array_merge($ext, $data[self::FIELD_IF_NONE_MATCH]))); - } + if (isset($data[self::FIELD_IF_MODIFIED_SINCE]) || isset($data[self::FIELD_IF_MODIFIED_SINCE_EXT])) { + if (isset($data[self::FIELD_IF_MODIFIED_SINCE])) { + $value = $data[self::FIELD_IF_MODIFIED_SINCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IF_MODIFIED_SINCE_EXT]) && is_array($data[self::FIELD_IF_MODIFIED_SINCE_EXT])) { + $ext = $data[self::FIELD_IF_MODIFIED_SINCE_EXT]; } else { - $this->setIfNoneMatch(new FHIRString($data[self::FIELD_IF_NONE_MATCH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIfModifiedSince($value); + } else if (is_array($value)) { + $this->setIfModifiedSince(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIfModifiedSince(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIfModifiedSince(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_METHOD])) { - $ext = (isset($data[self::FIELD_METHOD_EXT]) && is_array($data[self::FIELD_METHOD_EXT])) - ? $data[self::FIELD_METHOD_EXT] - : null; - if ($data[self::FIELD_METHOD] instanceof FHIRHTTPVerb) { - $this->setMethod($data[self::FIELD_METHOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_METHOD])) { - $this->setMethod(new FHIRHTTPVerb([FHIRHTTPVerb::FIELD_VALUE => $data[self::FIELD_METHOD]] + $ext)); - } else if (is_array($data[self::FIELD_METHOD])) { - $this->setMethod(new FHIRHTTPVerb(array_merge($ext, $data[self::FIELD_METHOD]))); + if (isset($data[self::FIELD_IF_NONE_EXIST]) || isset($data[self::FIELD_IF_NONE_EXIST_EXT])) { + if (isset($data[self::FIELD_IF_NONE_EXIST])) { + $value = $data[self::FIELD_IF_NONE_EXIST]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IF_NONE_EXIST_EXT]) && is_array($data[self::FIELD_IF_NONE_EXIST_EXT])) { + $ext = $data[self::FIELD_IF_NONE_EXIST_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIfNoneExist($value); + } else if (is_array($value)) { + $this->setIfNoneExist(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIfNoneExist(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIfNoneExist(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IF_NONE_MATCH]) || isset($data[self::FIELD_IF_NONE_MATCH_EXT])) { + if (isset($data[self::FIELD_IF_NONE_MATCH])) { + $value = $data[self::FIELD_IF_NONE_MATCH]; } else { - $this->setMethod(new FHIRHTTPVerb($data[self::FIELD_METHOD])); + $value = null; + } + if (isset($data[self::FIELD_IF_NONE_MATCH_EXT]) && is_array($data[self::FIELD_IF_NONE_MATCH_EXT])) { + $ext = $data[self::FIELD_IF_NONE_MATCH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIfNoneMatch($value); + } else if (is_array($value)) { + $this->setIfNoneMatch(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIfNoneMatch(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIfNoneMatch(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_METHOD]) || isset($data[self::FIELD_METHOD_EXT])) { + if (isset($data[self::FIELD_METHOD])) { + $value = $data[self::FIELD_METHOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_METHOD_EXT]) && is_array($data[self::FIELD_METHOD_EXT])) { + $ext = $data[self::FIELD_METHOD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRHTTPVerb) { + $this->setMethod($value); + } else if (is_array($value)) { + $this->setMethod(new FHIRHTTPVerb(array_merge($ext, $value))); + } else { + $this->setMethod(new FHIRHTTPVerb([FHIRHTTPVerb::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMethod(new FHIRHTTPVerb($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -554,8 +596,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -699,46 +741,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIfMatch())) { $a[self::FIELD_IF_MATCH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IF_MATCH_EXT] = $enc; } } if (null !== ($v = $this->getIfModifiedSince())) { $a[self::FIELD_IF_MODIFIED_SINCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_IF_MODIFIED_SINCE_EXT] = $enc; } } if (null !== ($v = $this->getIfNoneExist())) { $a[self::FIELD_IF_NONE_EXIST] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IF_NONE_EXIST_EXT] = $enc; } } if (null !== ($v = $this->getIfNoneMatch())) { $a[self::FIELD_IF_NONE_MATCH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IF_NONE_MATCH_EXT] = $enc; } } if (null !== ($v = $this->getMethod())) { $a[self::FIELD_METHOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRHTTPVerb::FIELD_VALUE, $enc)))) { + unset($enc[FHIRHTTPVerb::FIELD_VALUE]); $a[self::FIELD_METHOD_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php index f347ee226a..e5decdc8f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRBundleResponse extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -160,68 +160,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ETAG])) { - $ext = (isset($data[self::FIELD_ETAG_EXT]) && is_array($data[self::FIELD_ETAG_EXT])) - ? $data[self::FIELD_ETAG_EXT] - : null; - if ($data[self::FIELD_ETAG] instanceof FHIRString) { - $this->setEtag($data[self::FIELD_ETAG]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ETAG])) { - $this->setEtag(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ETAG]] + $ext)); - } else if (is_array($data[self::FIELD_ETAG])) { - $this->setEtag(new FHIRString(array_merge($ext, $data[self::FIELD_ETAG]))); - } + if (isset($data[self::FIELD_ETAG]) || isset($data[self::FIELD_ETAG_EXT])) { + if (isset($data[self::FIELD_ETAG])) { + $value = $data[self::FIELD_ETAG]; } else { - $this->setEtag(new FHIRString($data[self::FIELD_ETAG])); + $value = null; } - } - if (isset($data[self::FIELD_LAST_MODIFIED])) { - $ext = (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) - ? $data[self::FIELD_LAST_MODIFIED_EXT] - : null; - if ($data[self::FIELD_LAST_MODIFIED] instanceof FHIRInstant) { - $this->setLastModified($data[self::FIELD_LAST_MODIFIED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_LAST_MODIFIED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRInstant(array_merge($ext, $data[self::FIELD_LAST_MODIFIED]))); - } + if (isset($data[self::FIELD_ETAG_EXT]) && is_array($data[self::FIELD_ETAG_EXT])) { + $ext = $data[self::FIELD_ETAG_EXT]; } else { - $this->setLastModified(new FHIRInstant($data[self::FIELD_LAST_MODIFIED])); + $ext = []; } - } - if (isset($data[self::FIELD_LOCATION])) { - $ext = (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) - ? $data[self::FIELD_LOCATION_EXT] - : null; - if ($data[self::FIELD_LOCATION] instanceof FHIRUri) { - $this->setLocation($data[self::FIELD_LOCATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOCATION])) { - $this->setLocation(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_LOCATION]] + $ext)); - } else if (is_array($data[self::FIELD_LOCATION])) { - $this->setLocation(new FHIRUri(array_merge($ext, $data[self::FIELD_LOCATION]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setEtag($value); + } else if (is_array($value)) { + $this->setEtag(new FHIRString(array_merge($ext, $value))); + } else { + $this->setEtag(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEtag(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_LAST_MODIFIED]) || isset($data[self::FIELD_LAST_MODIFIED_EXT])) { + if (isset($data[self::FIELD_LAST_MODIFIED])) { + $value = $data[self::FIELD_LAST_MODIFIED]; } else { - $this->setLocation(new FHIRUri($data[self::FIELD_LOCATION])); + $value = null; + } + if (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) { + $ext = $data[self::FIELD_LAST_MODIFIED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setLastModified($value); + } else if (is_array($value)) { + $this->setLastModified(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setLastModified(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastModified(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRString) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRString(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_LOCATION]) || isset($data[self::FIELD_LOCATION_EXT])) { + if (isset($data[self::FIELD_LOCATION])) { + $value = $data[self::FIELD_LOCATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) { + $ext = $data[self::FIELD_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setLocation($value); + } else if (is_array($value)) { + $this->setLocation(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setLocation(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLocation(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRString($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRString(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRString($ext)); } } } @@ -409,8 +437,8 @@ public function setStatus($status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -534,32 +562,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEtag())) { $a[self::FIELD_ETAG] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ETAG_EXT] = $enc; } } if (null !== ($v = $this->getLastModified())) { $a[self::FIELD_LAST_MODIFIED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_LAST_MODIFIED_EXT] = $enc; } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_LOCATION_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php index 2ea236db97..b23508ce3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRBundleSearch extends FHIRBackboneElement const FIELD_SCORE_EXT = '_score'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Why an entry is in the result set - whether it's included as a match or because @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRSearchEntryMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRSearchEntryMode([FHIRSearchEntryMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRSearchEntryMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRSearchEntryMode($data[self::FIELD_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_SCORE])) { - $ext = (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) - ? $data[self::FIELD_SCORE_EXT] - : null; - if ($data[self::FIELD_SCORE] instanceof FHIRDecimal) { - $this->setScore($data[self::FIELD_SCORE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_SCORE]] + $ext)); - } else if (is_array($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal(array_merge($ext, $data[self::FIELD_SCORE]))); + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchEntryMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRSearchEntryMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRSearchEntryMode([FHIRSearchEntryMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRSearchEntryMode($ext)); + } + } + if (isset($data[self::FIELD_SCORE]) || isset($data[self::FIELD_SCORE_EXT])) { + if (isset($data[self::FIELD_SCORE])) { + $value = $data[self::FIELD_SCORE]; } else { - $this->setScore(new FHIRDecimal($data[self::FIELD_SCORE])); + $value = null; + } + if (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) { + $ext = $data[self::FIELD_SCORE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setScore($value); + } else if (is_array($value)) { + $this->setScore(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScore(new FHIRDecimal($ext)); } } } @@ -263,8 +277,8 @@ public function setScore($score = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -352,18 +366,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchEntryMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchEntryMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getScore())) { $a[self::FIELD_SCORE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_SCORE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php index 540d37b661..a51cd792a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCarePlanActivity extends FHIRBackboneElement const FIELD_REFERENCE = 'reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -417,8 +417,8 @@ public function setReference(FHIRReference $reference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -523,17 +523,32 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getActionResulting())) { - $a[self::FIELD_ACTION_RESULTING] = $vs; + $a[self::FIELD_ACTION_RESULTING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION_RESULTING][] = $v; + } } if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v; } if ([] !== ($vs = $this->getProgress())) { - $a[self::FIELD_PROGRESS] = $vs; + $a[self::FIELD_PROGRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRESS][] = $v; + } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php index 1825e89b60..ebbdb083b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRCarePlanDetail extends FHIRBackboneElement const FIELD_STATUS_REASON = 'statusReason'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -364,20 +364,27 @@ public function __construct($data = null) $this->setDailyAmount(new FHIRSimpleQuantity($data[self::FIELD_DAILY_AMOUNT])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_GOAL])) { @@ -437,20 +444,27 @@ public function __construct($data = null) $this->setProductReference(new FHIRReference($data[self::FIELD_PRODUCT_REFERENCE])); } } - if (isset($data[self::FIELD_PROHIBITED])) { - $ext = (isset($data[self::FIELD_PROHIBITED_EXT]) && is_array($data[self::FIELD_PROHIBITED_EXT])) - ? $data[self::FIELD_PROHIBITED_EXT] - : null; - if ($data[self::FIELD_PROHIBITED] instanceof FHIRBoolean) { - $this->setProhibited($data[self::FIELD_PROHIBITED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROHIBITED])) { - $this->setProhibited(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PROHIBITED]] + $ext)); - } else if (is_array($data[self::FIELD_PROHIBITED])) { - $this->setProhibited(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PROHIBITED]))); - } + if (isset($data[self::FIELD_PROHIBITED]) || isset($data[self::FIELD_PROHIBITED_EXT])) { + if (isset($data[self::FIELD_PROHIBITED])) { + $value = $data[self::FIELD_PROHIBITED]; } else { - $this->setProhibited(new FHIRBoolean($data[self::FIELD_PROHIBITED])); + $value = null; + } + if (isset($data[self::FIELD_PROHIBITED_EXT]) && is_array($data[self::FIELD_PROHIBITED_EXT])) { + $ext = $data[self::FIELD_PROHIBITED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setProhibited($value); + } else if (is_array($value)) { + $this->setProhibited(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setProhibited(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProhibited(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -503,20 +517,27 @@ public function __construct($data = null) $this->setScheduledPeriod(new FHIRPeriod($data[self::FIELD_SCHEDULED_PERIOD])); } } - if (isset($data[self::FIELD_SCHEDULED_STRING])) { - $ext = (isset($data[self::FIELD_SCHEDULED_STRING_EXT]) && is_array($data[self::FIELD_SCHEDULED_STRING_EXT])) - ? $data[self::FIELD_SCHEDULED_STRING_EXT] - : null; - if ($data[self::FIELD_SCHEDULED_STRING] instanceof FHIRString) { - $this->setScheduledString($data[self::FIELD_SCHEDULED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCHEDULED_STRING])) { - $this->setScheduledString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SCHEDULED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_SCHEDULED_STRING])) { - $this->setScheduledString(new FHIRString(array_merge($ext, $data[self::FIELD_SCHEDULED_STRING]))); - } + if (isset($data[self::FIELD_SCHEDULED_STRING]) || isset($data[self::FIELD_SCHEDULED_STRING_EXT])) { + if (isset($data[self::FIELD_SCHEDULED_STRING])) { + $value = $data[self::FIELD_SCHEDULED_STRING]; } else { - $this->setScheduledString(new FHIRString($data[self::FIELD_SCHEDULED_STRING])); + $value = null; + } + if (isset($data[self::FIELD_SCHEDULED_STRING_EXT]) && is_array($data[self::FIELD_SCHEDULED_STRING_EXT])) { + $ext = $data[self::FIELD_SCHEDULED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setScheduledString($value); + } else if (is_array($value)) { + $this->setScheduledString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setScheduledString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScheduledString(new FHIRString($ext)); } } if (isset($data[self::FIELD_SCHEDULED_TIMING])) { @@ -526,20 +547,27 @@ public function __construct($data = null) $this->setScheduledTiming(new FHIRTiming($data[self::FIELD_SCHEDULED_TIMING])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCarePlanActivityStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanActivityStatus([FHIRCarePlanActivityStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanActivityStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCarePlanActivityStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanActivityStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCarePlanActivityStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCarePlanActivityStatus([FHIRCarePlanActivityStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCarePlanActivityStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -1270,8 +1298,8 @@ public function setStatusReason(FHIRCodeableConcept $statusReason = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1508,19 +1536,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getGoal())) { - $a[self::FIELD_GOAL] = $vs; + $a[self::FIELD_GOAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GOAL][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getProductCodeableConcept())) { $a[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $v; @@ -1530,8 +1572,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getProhibited())) { $a[self::FIELD_PROHIBITED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PROHIBITED_EXT] = $enc; } } @@ -1539,18 +1583,32 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getScheduledPeriod())) { $a[self::FIELD_SCHEDULED_PERIOD] = $v; } if (null !== ($v = $this->getScheduledString())) { $a[self::FIELD_SCHEDULED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SCHEDULED_STRING_EXT] = $enc; } } @@ -1559,14 +1617,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanActivityStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanActivityStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStatusReason())) { $a[self::FIELD_STATUS_REASON] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php index a328f4d6fa..af2221d49d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRCarePlanParticipant extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -240,8 +240,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -325,6 +325,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlan.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlan.php index c33221984e..7f1bf6f923 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlan.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRCarePlanRelatedPlan extends FHIRBackboneElement const FIELD_PLAN = 'plan'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Codes identifying the types of relationships between two plans. @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCarePlanRelationship) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCarePlanRelationship([FHIRCarePlanRelationship::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCarePlanRelationship(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCarePlanRelationship($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanRelationship) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCarePlanRelationship(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCarePlanRelationship([FHIRCarePlanRelationship::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCarePlanRelationship($ext)); } } if (isset($data[self::FIELD_PLAN])) { @@ -238,8 +245,8 @@ public function setPlan(FHIRReference $plan = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -319,14 +326,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanRelationship::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanRelationship::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getPlan())) { $a[self::FIELD_PLAN] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverage.php index a4cba641ba..0bb3fc5c62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRClaimCoverage extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -210,20 +210,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $ext = (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) - ? $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT] - : null; - if ($data[self::FIELD_BUSINESS_ARRANGEMENT] instanceof FHIRString) { - $this->setBusinessArrangement($data[self::FIELD_BUSINESS_ARRANGEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BUSINESS_ARRANGEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString(array_merge($ext, $data[self::FIELD_BUSINESS_ARRANGEMENT]))); - } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT]) || isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { + $value = $data[self::FIELD_BUSINESS_ARRANGEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + $ext = $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]; } else { - $this->setBusinessArrangement(new FHIRString($data[self::FIELD_BUSINESS_ARRANGEMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBusinessArrangement($value); + } else if (is_array($value)) { + $this->setBusinessArrangement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBusinessArrangement(new FHIRString($ext)); } } if (isset($data[self::FIELD_CLAIM_RESPONSE])) { @@ -240,20 +247,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_FOCAL])) { - $ext = (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) - ? $data[self::FIELD_FOCAL_EXT] - : null; - if ($data[self::FIELD_FOCAL] instanceof FHIRBoolean) { - $this->setFocal($data[self::FIELD_FOCAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FOCAL]] + $ext)); - } else if (is_array($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FOCAL]))); - } + if (isset($data[self::FIELD_FOCAL]) || isset($data[self::FIELD_FOCAL_EXT])) { + if (isset($data[self::FIELD_FOCAL])) { + $value = $data[self::FIELD_FOCAL]; } else { - $this->setFocal(new FHIRBoolean($data[self::FIELD_FOCAL])); + $value = null; + } + if (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) { + $ext = $data[self::FIELD_FOCAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFocal($value); + } else if (is_array($value)) { + $this->setFocal(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFocal(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ORIGINAL_RULESET])) { @@ -263,33 +277,42 @@ public function __construct($data = null) $this->setOriginalRuleset(new FHIRCoding($data[self::FIELD_ORIGINAL_RULESET])); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - foreach($data[self::FIELD_PRE_AUTH_REF] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPreAuthRef($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPreAuthRef(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPreAuthRef($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPreAuthRef($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPreAuthRef(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPreAuthRef(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPreAuthRef(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->addPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else { - $this->addPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); } } if (isset($data[self::FIELD_RELATIONSHIP])) { @@ -299,20 +322,27 @@ public function __construct($data = null) $this->setRelationship(new FHIRCoding($data[self::FIELD_RELATIONSHIP])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -644,8 +674,8 @@ public function setSequence($sequence = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -792,8 +822,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBusinessArrangement())) { $a[self::FIELD_BUSINESS_ARRANGEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BUSINESS_ARRANGEMENT_EXT] = $enc; } } @@ -805,8 +837,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFocal())) { $a[self::FIELD_FOCAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FOCAL_EXT] = $enc; } } @@ -815,29 +849,42 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PRE_AUTH_REF][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PRE_AUTH_REF_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PRE_AUTH_REF_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PRE_AUTH_REF_EXT] = $encs; + } } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php index 4b179125ac..6d75e38a27 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRClaimDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -230,20 +230,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_NET])) { @@ -253,20 +260,27 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_POINTS])) { - $ext = (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) - ? $data[self::FIELD_POINTS_EXT] - : null; - if ($data[self::FIELD_POINTS] instanceof FHIRDecimal) { - $this->setPoints($data[self::FIELD_POINTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POINTS]] + $ext)); - } else if (is_array($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POINTS]))); - } + if (isset($data[self::FIELD_POINTS]) || isset($data[self::FIELD_POINTS_EXT])) { + if (isset($data[self::FIELD_POINTS])) { + $value = $data[self::FIELD_POINTS]; } else { - $this->setPoints(new FHIRDecimal($data[self::FIELD_POINTS])); + $value = null; + } + if (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) { + $ext = $data[self::FIELD_POINTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPoints($value); + } else if (is_array($value)) { + $this->setPoints(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPoints(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -276,20 +290,27 @@ public function __construct($data = null) $this->setQuantity(new FHIRSimpleQuantity($data[self::FIELD_QUANTITY])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -712,8 +733,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -872,8 +893,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } @@ -882,8 +905,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPoints())) { $a[self::FIELD_POINTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POINTS_EXT] = $enc; } } @@ -892,8 +917,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -901,7 +928,13 @@ public function jsonSerialize() $a[self::FIELD_SERVICE] = $v; } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; @@ -912,6 +945,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php index 591044c313..9514a7dfc1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRClaimDiagnosis extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -137,20 +137,27 @@ public function __construct($data = null) $this->setDiagnosis(new FHIRCoding($data[self::FIELD_DIAGNOSIS])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -248,8 +255,8 @@ public function setSequence($sequence = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -340,11 +347,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php index d52cba73f6..109a687856 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRClaimItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -344,49 +344,65 @@ public function __construct($data = null) $this->addDetail(new FHIRClaimDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID])) { - $ext = (isset($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT])) - ? $data[self::FIELD_DIAGNOSIS_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_DIAGNOSIS_LINK_ID])) { - foreach($data[self::FIELD_DIAGNOSIS_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addDiagnosisLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDiagnosisLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID]) || isset($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT])) { + if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID])) { + $value = $data[self::FIELD_DIAGNOSIS_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT])) { + $ext = $data[self::FIELD_DIAGNOSIS_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addDiagnosisLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addDiagnosisLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDiagnosisLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDiagnosisLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addDiagnosisLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDiagnosisLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_DIAGNOSIS_LINK_ID] instanceof FHIRPositiveInt) { - $this->addDiagnosisLinkId($data[self::FIELD_DIAGNOSIS_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DIAGNOSIS_LINK_ID])) { - $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DIAGNOSIS_LINK_ID]] + $ext)); - } else { - $this->addDiagnosisLinkId(new FHIRPositiveInt($data[self::FIELD_DIAGNOSIS_LINK_ID])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -414,20 +430,27 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_POINTS])) { - $ext = (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) - ? $data[self::FIELD_POINTS_EXT] - : null; - if ($data[self::FIELD_POINTS] instanceof FHIRDecimal) { - $this->setPoints($data[self::FIELD_POINTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POINTS]] + $ext)); - } else if (is_array($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POINTS]))); - } + if (isset($data[self::FIELD_POINTS]) || isset($data[self::FIELD_POINTS_EXT])) { + if (isset($data[self::FIELD_POINTS])) { + $value = $data[self::FIELD_POINTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) { + $ext = $data[self::FIELD_POINTS_EXT]; } else { - $this->setPoints(new FHIRDecimal($data[self::FIELD_POINTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPoints($value); + } else if (is_array($value)) { + $this->setPoints(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPoints(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PROSTHESIS])) { @@ -451,20 +474,27 @@ public function __construct($data = null) $this->setQuantity(new FHIRSimpleQuantity($data[self::FIELD_QUANTITY])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -474,20 +504,27 @@ public function __construct($data = null) $this->setService(new FHIRCoding($data[self::FIELD_SERVICE])); } } - if (isset($data[self::FIELD_SERVICE_DATE])) { - $ext = (isset($data[self::FIELD_SERVICE_DATE_EXT]) && is_array($data[self::FIELD_SERVICE_DATE_EXT])) - ? $data[self::FIELD_SERVICE_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICE_DATE] instanceof FHIRDate) { - $this->setServiceDate($data[self::FIELD_SERVICE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICE_DATE])) { - $this->setServiceDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICE_DATE])) { - $this->setServiceDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICE_DATE]))); - } + if (isset($data[self::FIELD_SERVICE_DATE]) || isset($data[self::FIELD_SERVICE_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICE_DATE])) { + $value = $data[self::FIELD_SERVICE_DATE]; } else { - $this->setServiceDate(new FHIRDate($data[self::FIELD_SERVICE_DATE])); + $value = null; + } + if (isset($data[self::FIELD_SERVICE_DATE_EXT]) && is_array($data[self::FIELD_SERVICE_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServiceDate($value); + } else if (is_array($value)) { + $this->setServiceDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServiceDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServiceDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SUB_SITE])) { @@ -1210,8 +1247,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1443,40 +1480,64 @@ public function jsonSerialize() $a[self::FIELD_BODY_SITE] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getDiagnosisLinkId())) { $a[self::FIELD_DIAGNOSIS_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DIAGNOSIS_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DIAGNOSIS_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DIAGNOSIS_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DIAGNOSIS_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if (null !== ($v = $this->getPoints())) { $a[self::FIELD_POINTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POINTS_EXT] = $enc; } } @@ -1491,8 +1552,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -1501,13 +1564,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getServiceDate())) { $a[self::FIELD_SERVICE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICE_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getSubSite())) { - $a[self::FIELD_SUB_SITE] = $vs; + $a[self::FIELD_SUB_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_SITE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; @@ -1518,6 +1589,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeeth.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeeth.php index d669ce601c..5bfa88130c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeeth.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeeth.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRClaimMissingTeeth extends FHIRBackboneElement const FIELD_TOOTH = 'tooth'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -144,20 +144,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXTRACTION_DATE])) { - $ext = (isset($data[self::FIELD_EXTRACTION_DATE_EXT]) && is_array($data[self::FIELD_EXTRACTION_DATE_EXT])) - ? $data[self::FIELD_EXTRACTION_DATE_EXT] - : null; - if ($data[self::FIELD_EXTRACTION_DATE] instanceof FHIRDate) { - $this->setExtractionDate($data[self::FIELD_EXTRACTION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXTRACTION_DATE])) { - $this->setExtractionDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_EXTRACTION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXTRACTION_DATE])) { - $this->setExtractionDate(new FHIRDate(array_merge($ext, $data[self::FIELD_EXTRACTION_DATE]))); - } + if (isset($data[self::FIELD_EXTRACTION_DATE]) || isset($data[self::FIELD_EXTRACTION_DATE_EXT])) { + if (isset($data[self::FIELD_EXTRACTION_DATE])) { + $value = $data[self::FIELD_EXTRACTION_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXTRACTION_DATE_EXT]) && is_array($data[self::FIELD_EXTRACTION_DATE_EXT])) { + $ext = $data[self::FIELD_EXTRACTION_DATE_EXT]; } else { - $this->setExtractionDate(new FHIRDate($data[self::FIELD_EXTRACTION_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setExtractionDate($value); + } else if (is_array($value)) { + $this->setExtractionDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setExtractionDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExtractionDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_REASON])) { @@ -303,8 +310,8 @@ public function setTooth(FHIRCoding $tooth = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -398,8 +405,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExtractionDate())) { $a[self::FIELD_EXTRACTION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_EXTRACTION_DATE_EXT] = $enc; } } @@ -409,6 +418,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTooth())) { $a[self::FIELD_TOOTH] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php index bc007e985c..41c2c102e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRClaimPayee extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -337,8 +337,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -440,6 +440,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesis.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesis.php index 17542de6be..ce7d9c8d2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesis.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRClaimProsthesis extends FHIRBackboneElement const FIELD_PRIOR_MATERIAL = 'priorMaterial'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -144,36 +144,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INITIAL])) { - $ext = (isset($data[self::FIELD_INITIAL_EXT]) && is_array($data[self::FIELD_INITIAL_EXT])) - ? $data[self::FIELD_INITIAL_EXT] - : null; - if ($data[self::FIELD_INITIAL] instanceof FHIRBoolean) { - $this->setInitial($data[self::FIELD_INITIAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL])) { - $this->setInitial(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INITIAL]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL])) { - $this->setInitial(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INITIAL]))); - } + if (isset($data[self::FIELD_INITIAL]) || isset($data[self::FIELD_INITIAL_EXT])) { + if (isset($data[self::FIELD_INITIAL])) { + $value = $data[self::FIELD_INITIAL]; } else { - $this->setInitial(new FHIRBoolean($data[self::FIELD_INITIAL])); + $value = null; } - } - if (isset($data[self::FIELD_PRIOR_DATE])) { - $ext = (isset($data[self::FIELD_PRIOR_DATE_EXT]) && is_array($data[self::FIELD_PRIOR_DATE_EXT])) - ? $data[self::FIELD_PRIOR_DATE_EXT] - : null; - if ($data[self::FIELD_PRIOR_DATE] instanceof FHIRDate) { - $this->setPriorDate($data[self::FIELD_PRIOR_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIOR_DATE])) { - $this->setPriorDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_PRIOR_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PRIOR_DATE])) { - $this->setPriorDate(new FHIRDate(array_merge($ext, $data[self::FIELD_PRIOR_DATE]))); + if (isset($data[self::FIELD_INITIAL_EXT]) && is_array($data[self::FIELD_INITIAL_EXT])) { + $ext = $data[self::FIELD_INITIAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInitial($value); + } else if (is_array($value)) { + $this->setInitial(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInitial(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInitial(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_PRIOR_DATE]) || isset($data[self::FIELD_PRIOR_DATE_EXT])) { + if (isset($data[self::FIELD_PRIOR_DATE])) { + $value = $data[self::FIELD_PRIOR_DATE]; } else { - $this->setPriorDate(new FHIRDate($data[self::FIELD_PRIOR_DATE])); + $value = null; + } + if (isset($data[self::FIELD_PRIOR_DATE_EXT]) && is_array($data[self::FIELD_PRIOR_DATE_EXT])) { + $ext = $data[self::FIELD_PRIOR_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setPriorDate($value); + } else if (is_array($value)) { + $this->setPriorDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setPriorDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriorDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_PRIOR_MATERIAL])) { @@ -316,8 +330,8 @@ public function setPriorMaterial(FHIRCoding $priorMaterial = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -419,21 +433,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getInitial())) { $a[self::FIELD_INITIAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INITIAL_EXT] = $enc; } } if (null !== ($v = $this->getPriorDate())) { $a[self::FIELD_PRIOR_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_PRIOR_DATE_EXT] = $enc; } } if (null !== ($v = $this->getPriorMaterial())) { $a[self::FIELD_PRIOR_MATERIAL] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php index f804ca30aa..b84ef0d591 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRClaimSubDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -217,20 +217,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_NET])) { @@ -240,20 +247,27 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_POINTS])) { - $ext = (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) - ? $data[self::FIELD_POINTS_EXT] - : null; - if ($data[self::FIELD_POINTS] instanceof FHIRDecimal) { - $this->setPoints($data[self::FIELD_POINTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POINTS]] + $ext)); - } else if (is_array($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POINTS]))); - } + if (isset($data[self::FIELD_POINTS]) || isset($data[self::FIELD_POINTS_EXT])) { + if (isset($data[self::FIELD_POINTS])) { + $value = $data[self::FIELD_POINTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) { + $ext = $data[self::FIELD_POINTS_EXT]; } else { - $this->setPoints(new FHIRDecimal($data[self::FIELD_POINTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPoints($value); + } else if (is_array($value)) { + $this->setPoints(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPoints(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -263,20 +277,27 @@ public function __construct($data = null) $this->setQuantity(new FHIRSimpleQuantity($data[self::FIELD_QUANTITY])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -624,8 +645,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -771,8 +792,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } @@ -781,8 +804,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPoints())) { $a[self::FIELD_POINTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POINTS_EXT] = $enc; } } @@ -791,8 +816,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -808,6 +835,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php index dca72adeac..0378992c1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRClaimResponseAddItem extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -217,62 +217,80 @@ public function __construct($data = null) $this->setFee(new FHIRMoney($data[self::FIELD_FEE])); } } - if (isset($data[self::FIELD_NOTE_NUMBER_LINK_ID])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_LINK_ID_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_LINK_ID_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER_LINK_ID])) { - foreach($data[self::FIELD_NOTE_NUMBER_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumberLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumberLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumberLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER_LINK_ID]) || isset($data[self::FIELD_NOTE_NUMBER_LINK_ID_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER_LINK_ID])) { + $value = $data[self::FIELD_NOTE_NUMBER_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_LINK_ID_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_LINK_ID_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumberLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumberLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumberLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumberLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumberLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumberLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumberLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumberLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER_LINK_ID] instanceof FHIRPositiveInt) { - $this->addNoteNumberLinkId($data[self::FIELD_NOTE_NUMBER_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER_LINK_ID])) { - $this->addNoteNumberLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER_LINK_ID]] + $ext)); - } else { - $this->addNoteNumberLinkId(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER_LINK_ID])); } } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - foreach($data[self::FIELD_SEQUENCE_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addSequenceLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSequenceLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addSequenceLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addSequenceLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSequenceLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSequenceLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSequenceLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->addSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else { - $this->addSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); } } if (isset($data[self::FIELD_SERVICE])) { @@ -595,8 +613,8 @@ public function setService(FHIRCoding $service = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -727,47 +745,78 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getFee())) { $a[self::FIELD_FEE] = $v; } if ([] !== ($vs = $this->getNoteNumberLinkId())) { $a[self::FIELD_NOTE_NUMBER_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEQUENCE_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEQUENCE_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEQUENCE_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getService())) { $a[self::FIELD_SERVICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php index fb09730d9d..7aea4e317f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseAdjudication extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Monetary amount associated with the code. @@ -155,20 +155,27 @@ public function __construct($data = null) $this->setCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -292,8 +299,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -394,11 +401,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1.php index 45e52f2461..3c8bb5ecc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseAdjudication1 extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Monetary amount associated with the code. @@ -155,20 +155,27 @@ public function __construct($data = null) $this->setCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -292,8 +299,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -394,11 +401,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2.php index 8d4c9140cb..ff3c74b647 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseAdjudication2 extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Monetary amount associated with the code. @@ -155,20 +155,27 @@ public function __construct($data = null) $this->setCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -292,8 +299,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -394,11 +401,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3.php index 152e83f82a..73b5292c7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseAdjudication3 extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Monetary amount associated with the code. @@ -155,20 +155,27 @@ public function __construct($data = null) $this->setCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -292,8 +299,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -394,11 +401,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4.php index 38ce5f126a..66addaa48a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseAdjudication4 extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Monetary amount associated with the code. @@ -155,20 +155,27 @@ public function __construct($data = null) $this->setCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -292,8 +299,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -394,11 +401,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverage.php index 2b733ccfd7..09f544bd9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRClaimResponseCoverage extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -210,20 +210,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $ext = (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) - ? $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT] - : null; - if ($data[self::FIELD_BUSINESS_ARRANGEMENT] instanceof FHIRString) { - $this->setBusinessArrangement($data[self::FIELD_BUSINESS_ARRANGEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BUSINESS_ARRANGEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString(array_merge($ext, $data[self::FIELD_BUSINESS_ARRANGEMENT]))); - } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT]) || isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { + $value = $data[self::FIELD_BUSINESS_ARRANGEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + $ext = $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]; } else { - $this->setBusinessArrangement(new FHIRString($data[self::FIELD_BUSINESS_ARRANGEMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBusinessArrangement($value); + } else if (is_array($value)) { + $this->setBusinessArrangement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBusinessArrangement(new FHIRString($ext)); } } if (isset($data[self::FIELD_CLAIM_RESPONSE])) { @@ -240,20 +247,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_FOCAL])) { - $ext = (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) - ? $data[self::FIELD_FOCAL_EXT] - : null; - if ($data[self::FIELD_FOCAL] instanceof FHIRBoolean) { - $this->setFocal($data[self::FIELD_FOCAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FOCAL]] + $ext)); - } else if (is_array($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FOCAL]))); - } + if (isset($data[self::FIELD_FOCAL]) || isset($data[self::FIELD_FOCAL_EXT])) { + if (isset($data[self::FIELD_FOCAL])) { + $value = $data[self::FIELD_FOCAL]; } else { - $this->setFocal(new FHIRBoolean($data[self::FIELD_FOCAL])); + $value = null; + } + if (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) { + $ext = $data[self::FIELD_FOCAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFocal($value); + } else if (is_array($value)) { + $this->setFocal(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFocal(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ORIGINAL_RULESET])) { @@ -263,33 +277,42 @@ public function __construct($data = null) $this->setOriginalRuleset(new FHIRCoding($data[self::FIELD_ORIGINAL_RULESET])); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - foreach($data[self::FIELD_PRE_AUTH_REF] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPreAuthRef($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPreAuthRef(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPreAuthRef($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPreAuthRef($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPreAuthRef(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPreAuthRef(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPreAuthRef(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->addPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else { - $this->addPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); } } if (isset($data[self::FIELD_RELATIONSHIP])) { @@ -299,20 +322,27 @@ public function __construct($data = null) $this->setRelationship(new FHIRCoding($data[self::FIELD_RELATIONSHIP])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -644,8 +674,8 @@ public function setSequence($sequence = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -792,8 +822,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBusinessArrangement())) { $a[self::FIELD_BUSINESS_ARRANGEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BUSINESS_ARRANGEMENT_EXT] = $enc; } } @@ -805,8 +837,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFocal())) { $a[self::FIELD_FOCAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FOCAL_EXT] = $enc; } } @@ -815,29 +849,42 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PRE_AUTH_REF][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PRE_AUTH_REF_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PRE_AUTH_REF_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PRE_AUTH_REF_EXT] = $encs; + } } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php index f66b9f4238..373828b2a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRClaimResponseDetail extends FHIRBackboneElement const FIELD_SUB_DETAIL = 'subDetail'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -157,20 +157,27 @@ public function __construct($data = null) $this->addAdjudication(new FHIRClaimResponseAdjudication1($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; } else { - $this->setSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SUB_DETAIL])) { @@ -362,8 +369,8 @@ public function setSubDetail(array $subDetail = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -470,17 +477,34 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php index 73b7608ccb..337b508de6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRClaimResponseDetail1 extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -300,8 +300,8 @@ public function setService(FHIRCoding $service = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -393,7 +393,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getFee())) { $a[self::FIELD_FEE] = $v; @@ -401,6 +407,9 @@ public function jsonSerialize() if (null !== ($v = $this->getService())) { $a[self::FIELD_SERVICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php index f6dcbc6309..748ba93497 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRClaimResponseError extends FHIRBackboneElement const FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT = '_subdetailSequenceLinkId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -169,52 +169,73 @@ public function __construct($data = null) $this->setCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setDetailSequenceLinkId($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { - $this->setDetailSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { - $this->setDetailSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]; } else { - $this->setDetailSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])); + $value = null; } - } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT]; } else { - $this->setSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDetailSequenceLinkId($value); + } else if (is_array($value)) { + $this->setDetailSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDetailSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetailSequenceLinkId(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSubdetailSequenceLinkId($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { - $this->setSubdetailSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { - $this->setSubdetailSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]))); + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT]; } else { - $this->setSubdetailSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSubdetailSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSubdetailSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSubdetailSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubdetailSequenceLinkId(new FHIRPositiveInt($ext)); } } } @@ -400,8 +421,8 @@ public function setSubdetailSequenceLinkId($subdetailSequenceLinkId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -520,25 +541,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getDetailSequenceLinkId())) { $a[self::FIELD_DETAIL_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT] = $enc; } } if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } if (null !== ($v = $this->getSubdetailSequenceLinkId())) { $a[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php index 69924f9d7d..e341650919 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseItem extends FHIRBackboneElement const FIELD_SEQUENCE_LINK_ID_EXT = '_sequenceLinkId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -188,49 +188,65 @@ public function __construct($data = null) $this->addDetail(new FHIRClaimResponseDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; } else { - $this->setSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRPositiveInt($ext)); } } } @@ -468,8 +484,8 @@ public function setSequenceLinkId($sequenceLinkId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -589,33 +605,58 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNote.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNote.php index beb4861fda..2b79fa6af2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNote.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRClaimResponseNote extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An integer with a value that is positive (e.g. >0) @@ -145,36 +145,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRPositiveInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setNumber(new FHIRPositiveInt($data[self::FIELD_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumber(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -319,8 +333,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -422,21 +436,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php index f8316f0a63..d93725f5c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRClaimResponseSubDetail extends FHIRBackboneElement const FIELD_SEQUENCE_LINK_ID_EXT = '_sequenceLinkId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -146,20 +146,27 @@ public function __construct($data = null) $this->addAdjudication(new FHIRClaimResponseAdjudication2($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; } else { - $this->setSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRPositiveInt($ext)); } } } @@ -280,8 +287,8 @@ public function setSequenceLinkId($sequenceLinkId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -375,15 +382,26 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php index 970c8cd8a3..83cd314ec3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRClinicalImpressionFinding extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -136,20 +136,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CAUSE])) { - $ext = (isset($data[self::FIELD_CAUSE_EXT]) && is_array($data[self::FIELD_CAUSE_EXT])) - ? $data[self::FIELD_CAUSE_EXT] - : null; - if ($data[self::FIELD_CAUSE] instanceof FHIRString) { - $this->setCause($data[self::FIELD_CAUSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CAUSE])) { - $this->setCause(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CAUSE]] + $ext)); - } else if (is_array($data[self::FIELD_CAUSE])) { - $this->setCause(new FHIRString(array_merge($ext, $data[self::FIELD_CAUSE]))); - } + if (isset($data[self::FIELD_CAUSE]) || isset($data[self::FIELD_CAUSE_EXT])) { + if (isset($data[self::FIELD_CAUSE])) { + $value = $data[self::FIELD_CAUSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CAUSE_EXT]) && is_array($data[self::FIELD_CAUSE_EXT])) { + $ext = $data[self::FIELD_CAUSE_EXT]; } else { - $this->setCause(new FHIRString($data[self::FIELD_CAUSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCause($value); + } else if (is_array($value)) { + $this->setCause(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCause(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCause(new FHIRString($ext)); } } if (isset($data[self::FIELD_ITEM])) { @@ -256,8 +263,8 @@ public function setItem(FHIRCodeableConcept $item = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -345,14 +352,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCause())) { $a[self::FIELD_CAUSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CAUSE_EXT] = $enc; } } if (null !== ($v = $this->getItem())) { $a[self::FIELD_ITEM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigations.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigations.php index a013a6944b..f6ffbee74a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigations.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigations.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRClinicalImpressionInvestigations extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -284,8 +284,8 @@ public function setItem(array $item = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -374,7 +374,16 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOut.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOut.php index 12b801554b..0172fdffcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOut.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOut.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRClinicalImpressionRuledOut extends FHIRBackboneElement const FIELD_REASON_EXT = '_reason'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -143,20 +143,27 @@ public function __construct($data = null) $this->setItem(new FHIRCodeableConcept($data[self::FIELD_ITEM])); } } - if (isset($data[self::FIELD_REASON])) { - $ext = (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) - ? $data[self::FIELD_REASON_EXT] - : null; - if ($data[self::FIELD_REASON] instanceof FHIRString) { - $this->setReason($data[self::FIELD_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REASON])) { - $this->setReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_REASON])) { - $this->setReason(new FHIRString(array_merge($ext, $data[self::FIELD_REASON]))); - } + if (isset($data[self::FIELD_REASON]) || isset($data[self::FIELD_REASON_EXT])) { + if (isset($data[self::FIELD_REASON])) { + $value = $data[self::FIELD_REASON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) { + $ext = $data[self::FIELD_REASON_EXT]; } else { - $this->setReason(new FHIRString($data[self::FIELD_REASON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReason($value); + } else if (is_array($value)) { + $this->setReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReason(new FHIRString($ext)); } } } @@ -256,8 +263,8 @@ public function setReason($reason = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -348,11 +355,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REASON_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php index 5b8a711d8c..b2595d817a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCommunicationPayload extends FHIRBackboneElement const FIELD_CONTENT_STRING_EXT = '_contentString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -161,20 +161,27 @@ public function __construct($data = null) $this->setContentReference(new FHIRReference($data[self::FIELD_CONTENT_REFERENCE])); } } - if (isset($data[self::FIELD_CONTENT_STRING])) { - $ext = (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) - ? $data[self::FIELD_CONTENT_STRING_EXT] - : null; - if ($data[self::FIELD_CONTENT_STRING] instanceof FHIRString) { - $this->setContentString($data[self::FIELD_CONTENT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTENT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString(array_merge($ext, $data[self::FIELD_CONTENT_STRING]))); - } + if (isset($data[self::FIELD_CONTENT_STRING]) || isset($data[self::FIELD_CONTENT_STRING_EXT])) { + if (isset($data[self::FIELD_CONTENT_STRING])) { + $value = $data[self::FIELD_CONTENT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) { + $ext = $data[self::FIELD_CONTENT_STRING_EXT]; } else { - $this->setContentString(new FHIRString($data[self::FIELD_CONTENT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setContentString($value); + } else if (is_array($value)) { + $this->setContentString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentString(new FHIRString($ext)); } } } @@ -308,8 +315,8 @@ public function setContentString($contentString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -409,11 +416,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getContentString())) { $a[self::FIELD_CONTENT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONTENT_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php index 686cf73653..83f9b72f14 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCommunicationRequestPayload extends FHIRBackboneElement const FIELD_CONTENT_STRING_EXT = '_contentString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -161,20 +161,27 @@ public function __construct($data = null) $this->setContentReference(new FHIRReference($data[self::FIELD_CONTENT_REFERENCE])); } } - if (isset($data[self::FIELD_CONTENT_STRING])) { - $ext = (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) - ? $data[self::FIELD_CONTENT_STRING_EXT] - : null; - if ($data[self::FIELD_CONTENT_STRING] instanceof FHIRString) { - $this->setContentString($data[self::FIELD_CONTENT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTENT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString(array_merge($ext, $data[self::FIELD_CONTENT_STRING]))); - } + if (isset($data[self::FIELD_CONTENT_STRING]) || isset($data[self::FIELD_CONTENT_STRING_EXT])) { + if (isset($data[self::FIELD_CONTENT_STRING])) { + $value = $data[self::FIELD_CONTENT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) { + $ext = $data[self::FIELD_CONTENT_STRING_EXT]; } else { - $this->setContentString(new FHIRString($data[self::FIELD_CONTENT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setContentString($value); + } else if (is_array($value)) { + $this->setContentString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentString(new FHIRString($ext)); } } } @@ -308,8 +315,8 @@ public function setContentString($contentString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -409,11 +416,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getContentString())) { $a[self::FIELD_CONTENT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONTENT_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php index 9ed5b1be17..18442d7f00 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRCompositionAttester extends FHIRBackboneElement const FIELD_TIME_EXT = '_time'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The way in which a person authenticated a composition. @@ -154,33 +154,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if (is_array($data[self::FIELD_MODE])) { - foreach($data[self::FIELD_MODE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCompositionAttestationMode) { - $this->addMode($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addMode(new FHIRCompositionAttestationMode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionAttestationMode) { + $this->addMode($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCompositionAttestationMode) { + $this->addMode($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addMode(new FHIRCompositionAttestationMode(array_merge($v, $iext))); + } else { + $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addMode(new FHIRCompositionAttestationMode($v)); } + } elseif (is_array($value)) { + $this->addMode(new FHIRCompositionAttestationMode(array_merge($ext, $value))); + } else { + $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addMode(new FHIRCompositionAttestationMode($iext)); } - } elseif ($data[self::FIELD_MODE] instanceof FHIRCompositionAttestationMode) { - $this->addMode($data[self::FIELD_MODE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MODE])) { - $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else { - $this->addMode(new FHIRCompositionAttestationMode($data[self::FIELD_MODE])); } } if (isset($data[self::FIELD_PARTY])) { @@ -190,20 +199,27 @@ public function __construct($data = null) $this->setParty(new FHIRReference($data[self::FIELD_PARTY])); } } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRDateTime) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME]))); - } + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; } else { - $this->setTime(new FHIRDateTime($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTime(new FHIRDateTime($ext)); } } } @@ -360,8 +376,8 @@ public function setTime($time = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -462,29 +478,42 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getMode())) { $a[self::FIELD_MODE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MODE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MODE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCompositionAttestationMode::FIELD_VALUE]) || array_key_exists(FHIRCompositionAttestationMode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MODE_EXT][] = null; + unset($enc[FHIRCompositionAttestationMode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MODE_EXT] = $encs; + } } if (null !== ($v = $this->getParty())) { $a[self::FIELD_PARTY] = $v; } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php index d05147fbaf..14585fe1f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRCompositionEvent extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -384,8 +384,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -484,14 +484,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php index fc093d94bf..c4f3c03bf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRCompositionSection extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -259,20 +259,27 @@ public function __construct($data = null) $this->addEntry(new FHIRReference($data[self::FIELD_ENTRY])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRCode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRCode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIRCode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_ORDERED_BY])) { @@ -307,20 +314,27 @@ public function __construct($data = null) $this->setText(new FHIRNarrative($data[self::FIELD_TEXT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -696,8 +710,8 @@ public function setTitle($title = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -848,12 +862,20 @@ public function jsonSerialize() $a[self::FIELD_EMPTY_REASON] = $v; } if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } @@ -861,18 +883,29 @@ public function jsonSerialize() $a[self::FIELD_ORDERED_BY] = $v; } if ([] !== ($vs = $this->getSection())) { - $a[self::FIELD_SECTION] = $vs; + $a[self::FIELD_SECTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECTION][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v; } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContact.php index 353b86d720..a6fe7167ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRConceptMapContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -289,8 +296,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -385,13 +392,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php index 807b3a0b8e..2df7d92015 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRConceptMapDependsOn extends FHIRBackboneElement const FIELD_ELEMENT_EXT = '_element'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -149,52 +149,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRString) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRString(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRString($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_CODE_SYSTEM])) { - $ext = (isset($data[self::FIELD_CODE_SYSTEM_EXT]) && is_array($data[self::FIELD_CODE_SYSTEM_EXT])) - ? $data[self::FIELD_CODE_SYSTEM_EXT] - : null; - if ($data[self::FIELD_CODE_SYSTEM] instanceof FHIRUri) { - $this->setCodeSystem($data[self::FIELD_CODE_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE_SYSTEM])) { - $this->setCodeSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_CODE_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_CODE_SYSTEM])) { - $this->setCodeSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_CODE_SYSTEM]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCodeSystem(new FHIRUri($data[self::FIELD_CODE_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRString($ext)); } } - if (isset($data[self::FIELD_ELEMENT])) { - $ext = (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) - ? $data[self::FIELD_ELEMENT_EXT] - : null; - if ($data[self::FIELD_ELEMENT] instanceof FHIRUri) { - $this->setElement($data[self::FIELD_ELEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ELEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRUri(array_merge($ext, $data[self::FIELD_ELEMENT]))); + if (isset($data[self::FIELD_CODE_SYSTEM]) || isset($data[self::FIELD_CODE_SYSTEM_EXT])) { + if (isset($data[self::FIELD_CODE_SYSTEM])) { + $value = $data[self::FIELD_CODE_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_SYSTEM_EXT]) && is_array($data[self::FIELD_CODE_SYSTEM_EXT])) { + $ext = $data[self::FIELD_CODE_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setCodeSystem($value); + } else if (is_array($value)) { + $this->setCodeSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setCodeSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCodeSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_ELEMENT]) || isset($data[self::FIELD_ELEMENT_EXT])) { + if (isset($data[self::FIELD_ELEMENT])) { + $value = $data[self::FIELD_ELEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) { + $ext = $data[self::FIELD_ELEMENT_EXT]; } else { - $this->setElement(new FHIRUri($data[self::FIELD_ELEMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setElement($value); + } else if (is_array($value)) { + $this->setElement(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setElement(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setElement(new FHIRUri($ext)); } } } @@ -348,8 +369,8 @@ public function setElement($element = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -459,25 +480,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getCodeSystem())) { $a[self::FIELD_CODE_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_CODE_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getElement())) { $a[self::FIELD_ELEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ELEMENT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php index 5205a8c122..05354d1555 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRConceptMapElement extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -144,36 +144,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_CODE_SYSTEM])) { - $ext = (isset($data[self::FIELD_CODE_SYSTEM_EXT]) && is_array($data[self::FIELD_CODE_SYSTEM_EXT])) - ? $data[self::FIELD_CODE_SYSTEM_EXT] - : null; - if ($data[self::FIELD_CODE_SYSTEM] instanceof FHIRUri) { - $this->setCodeSystem($data[self::FIELD_CODE_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE_SYSTEM])) { - $this->setCodeSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_CODE_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_CODE_SYSTEM])) { - $this->setCodeSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_CODE_SYSTEM]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_CODE_SYSTEM]) || isset($data[self::FIELD_CODE_SYSTEM_EXT])) { + if (isset($data[self::FIELD_CODE_SYSTEM])) { + $value = $data[self::FIELD_CODE_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_SYSTEM_EXT]) && is_array($data[self::FIELD_CODE_SYSTEM_EXT])) { + $ext = $data[self::FIELD_CODE_SYSTEM_EXT]; } else { - $this->setCodeSystem(new FHIRUri($data[self::FIELD_CODE_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setCodeSystem($value); + } else if (is_array($value)) { + $this->setCodeSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setCodeSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCodeSystem(new FHIRUri($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -354,8 +368,8 @@ public function setTarget(array $target = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -464,20 +478,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getCodeSystem())) { $a[self::FIELD_CODE_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_CODE_SYSTEM_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php index 89bf63f5f6..4f74c67c54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConceptMapTarget extends FHIRBackboneElement const FIELD_PRODUCT = 'product'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -191,52 +191,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); - } - } - if (isset($data[self::FIELD_CODE_SYSTEM])) { - $ext = (isset($data[self::FIELD_CODE_SYSTEM_EXT]) && is_array($data[self::FIELD_CODE_SYSTEM_EXT])) - ? $data[self::FIELD_CODE_SYSTEM_EXT] - : null; - if ($data[self::FIELD_CODE_SYSTEM] instanceof FHIRUri) { - $this->setCodeSystem($data[self::FIELD_CODE_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE_SYSTEM])) { - $this->setCodeSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_CODE_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_CODE_SYSTEM])) { - $this->setCodeSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_CODE_SYSTEM]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_CODE_SYSTEM]) || isset($data[self::FIELD_CODE_SYSTEM_EXT])) { + if (isset($data[self::FIELD_CODE_SYSTEM])) { + $value = $data[self::FIELD_CODE_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_SYSTEM_EXT]) && is_array($data[self::FIELD_CODE_SYSTEM_EXT])) { + $ext = $data[self::FIELD_CODE_SYSTEM_EXT]; } else { - $this->setCodeSystem(new FHIRUri($data[self::FIELD_CODE_SYSTEM])); - } - } - if (isset($data[self::FIELD_COMMENTS])) { - $ext = (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) - ? $data[self::FIELD_COMMENTS_EXT] - : null; - if ($data[self::FIELD_COMMENTS] instanceof FHIRString) { - $this->setComments($data[self::FIELD_COMMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENTS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setCodeSystem($value); + } else if (is_array($value)) { + $this->setCodeSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setCodeSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCodeSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_COMMENTS]) || isset($data[self::FIELD_COMMENTS_EXT])) { + if (isset($data[self::FIELD_COMMENTS])) { + $value = $data[self::FIELD_COMMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) { + $ext = $data[self::FIELD_COMMENTS_EXT]; } else { - $this->setComments(new FHIRString($data[self::FIELD_COMMENTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComments($value); + } else if (is_array($value)) { + $this->setComments(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComments(new FHIRString($ext)); } } if (isset($data[self::FIELD_DEPENDS_ON])) { @@ -257,20 +278,27 @@ public function __construct($data = null) $this->addDependsOn(new FHIRConceptMapDependsOn($data[self::FIELD_DEPENDS_ON])); } } - if (isset($data[self::FIELD_EQUIVALENCE])) { - $ext = (isset($data[self::FIELD_EQUIVALENCE_EXT]) && is_array($data[self::FIELD_EQUIVALENCE_EXT])) - ? $data[self::FIELD_EQUIVALENCE_EXT] - : null; - if ($data[self::FIELD_EQUIVALENCE] instanceof FHIRCode) { - $this->setEquivalence($data[self::FIELD_EQUIVALENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EQUIVALENCE])) { - $this->setEquivalence(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_EQUIVALENCE]] + $ext)); - } else if (is_array($data[self::FIELD_EQUIVALENCE])) { - $this->setEquivalence(new FHIRCode(array_merge($ext, $data[self::FIELD_EQUIVALENCE]))); - } + if (isset($data[self::FIELD_EQUIVALENCE]) || isset($data[self::FIELD_EQUIVALENCE_EXT])) { + if (isset($data[self::FIELD_EQUIVALENCE])) { + $value = $data[self::FIELD_EQUIVALENCE]; } else { - $this->setEquivalence(new FHIRCode($data[self::FIELD_EQUIVALENCE])); + $value = null; + } + if (isset($data[self::FIELD_EQUIVALENCE_EXT]) && is_array($data[self::FIELD_EQUIVALENCE_EXT])) { + $ext = $data[self::FIELD_EQUIVALENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setEquivalence($value); + } else if (is_array($value)) { + $this->setEquivalence(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setEquivalence(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEquivalence(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PRODUCT])) { @@ -603,8 +631,8 @@ public function setProduct(array $product = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -754,37 +782,60 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getCodeSystem())) { $a[self::FIELD_CODE_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_CODE_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getComments())) { $a[self::FIELD_COMMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENTS_EXT] = $enc; } } if ([] !== ($vs = $this->getDependsOn())) { - $a[self::FIELD_DEPENDS_ON] = $vs; + $a[self::FIELD_DEPENDS_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEPENDS_ON][] = $v; + } } if (null !== ($v = $this->getEquivalence())) { $a[self::FIELD_EQUIVALENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_EQUIVALENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getProduct())) { - $a[self::FIELD_PRODUCT] = $vs; + $a[self::FIELD_PRODUCT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRODUCT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php index e57f9382b9..d94bfaa103 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConditionEvidence extends FHIRBackboneElement const FIELD_DETAIL = 'detail'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -272,8 +272,8 @@ public function setDetail(array $detail = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -362,7 +362,16 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php index a08060f0f7..3d6b1778fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConditionStage extends FHIRBackboneElement const FIELD_SUMMARY = 'summary'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -279,8 +279,8 @@ public function setSummary(FHIRCodeableConcept $summary = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -366,11 +366,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAssessment())) { - $a[self::FIELD_ASSESSMENT] = $vs; + $a[self::FIELD_ASSESSMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ASSESSMENT][] = $v; + } } if (null !== ($v = $this->getSummary())) { $a[self::FIELD_SUMMARY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php index 221e96b2f3..e22e1c2367 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRConformanceCertificate extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BLOB])) { - $ext = (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) - ? $data[self::FIELD_BLOB_EXT] - : null; - if ($data[self::FIELD_BLOB] instanceof FHIRBase64Binary) { - $this->setBlob($data[self::FIELD_BLOB]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_BLOB]] + $ext)); - } else if (is_array($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_BLOB]))); - } + if (isset($data[self::FIELD_BLOB]) || isset($data[self::FIELD_BLOB_EXT])) { + if (isset($data[self::FIELD_BLOB])) { + $value = $data[self::FIELD_BLOB]; } else { - $this->setBlob(new FHIRBase64Binary($data[self::FIELD_BLOB])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) { + $ext = $data[self::FIELD_BLOB_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setBlob($value); + } else if (is_array($value)) { + $this->setBlob(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBlob(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -270,8 +284,8 @@ public function setType($type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -367,18 +381,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBlob())) { $a[self::FIELD_BLOB] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_BLOB_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContact.php index 1709bdc8c6..0c39e5f94a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConformanceContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,20 +132,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -290,8 +297,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,13 +393,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php index 932dafc7af..9eba3159e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocument.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRConformanceDocument extends FHIRBackboneElement const FIELD_PROFILE = 'profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -146,36 +146,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRDocumentMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRDocumentMode([FHIRDocumentMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRDocumentMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRDocumentMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRDocumentMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRDocumentMode([FHIRDocumentMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRDocumentMode($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -312,8 +326,8 @@ public function setProfile(FHIRReference $profile = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -407,21 +421,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpoint.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpoint.php index 5ec604bb10..9226e9447f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConformanceEndpoint extends FHIRBackboneElement const FIELD_PROTOCOL = 'protocol'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -133,20 +133,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDRESS])) { - $ext = (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) - ? $data[self::FIELD_ADDRESS_EXT] - : null; - if ($data[self::FIELD_ADDRESS] instanceof FHIRUri) { - $this->setAddress($data[self::FIELD_ADDRESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ADDRESS]] + $ext)); - } else if (is_array($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUri(array_merge($ext, $data[self::FIELD_ADDRESS]))); - } + if (isset($data[self::FIELD_ADDRESS]) || isset($data[self::FIELD_ADDRESS_EXT])) { + if (isset($data[self::FIELD_ADDRESS])) { + $value = $data[self::FIELD_ADDRESS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) { + $ext = $data[self::FIELD_ADDRESS_EXT]; } else { - $this->setAddress(new FHIRUri($data[self::FIELD_ADDRESS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setAddress($value); + } else if (is_array($value)) { + $this->setAddress(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setAddress(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAddress(new FHIRUri($ext)); } } if (isset($data[self::FIELD_PROTOCOL])) { @@ -255,8 +262,8 @@ public function setProtocol(FHIRCoding $protocol = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -344,14 +351,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAddress())) { $a[self::FIELD_ADDRESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ADDRESS_EXT] = $enc; } } if (null !== ($v = $this->getProtocol())) { $a[self::FIELD_PROTOCOL] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php index c5ecd8b333..62c70e827e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRConformanceEvent extends FHIRBackboneElement const FIELD_RESPONSE = 'response'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The impact of the content of a message. @@ -199,20 +199,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRMessageSignificanceCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; } else { - $this->setCategory(new FHIRMessageSignificanceCategory($data[self::FIELD_CATEGORY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMessageSignificanceCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCategory(new FHIRMessageSignificanceCategory($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -222,52 +229,73 @@ public function __construct($data = null) $this->setCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_FOCUS])) { - $ext = (isset($data[self::FIELD_FOCUS_EXT]) && is_array($data[self::FIELD_FOCUS_EXT])) - ? $data[self::FIELD_FOCUS_EXT] - : null; - if ($data[self::FIELD_FOCUS] instanceof FHIRCode) { - $this->setFocus($data[self::FIELD_FOCUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCUS])) { - $this->setFocus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FOCUS]] + $ext)); - } else if (is_array($data[self::FIELD_FOCUS])) { - $this->setFocus(new FHIRCode(array_merge($ext, $data[self::FIELD_FOCUS]))); - } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setFocus(new FHIRCode($data[self::FIELD_FOCUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRConformanceEventMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRConformanceEventMode([FHIRConformanceEventMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRConformanceEventMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (isset($data[self::FIELD_FOCUS]) || isset($data[self::FIELD_FOCUS_EXT])) { + if (isset($data[self::FIELD_FOCUS])) { + $value = $data[self::FIELD_FOCUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FOCUS_EXT]) && is_array($data[self::FIELD_FOCUS_EXT])) { + $ext = $data[self::FIELD_FOCUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setFocus($value); + } else if (is_array($value)) { + $this->setFocus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setFocus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFocus(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRConformanceEventMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConformanceEventMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRConformanceEventMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRConformanceEventMode([FHIRConformanceEventMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRConformanceEventMode($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -539,8 +567,8 @@ public function setResponse(FHIRReference $response = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -666,8 +694,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMessageSignificanceCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMessageSignificanceCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } @@ -676,22 +706,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getFocus())) { $a[self::FIELD_FOCUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_FOCUS_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConformanceEventMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConformanceEventMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } @@ -701,6 +737,9 @@ public function jsonSerialize() if (null !== ($v = $this->getResponse())) { $a[self::FIELD_RESPONSE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php index 89ad6eac17..5c38e71cb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRConformanceImplementation extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -273,8 +287,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -370,18 +384,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction.php index 40df967c07..ad79895aba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRConformanceInteraction extends FHIRBackboneElement const FIELD_DOCUMENTATION_EXT = '_documentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Operations supported by REST at the type or instance level. @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRTypeRestfulInteraction) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRTypeRestfulInteraction([FHIRTypeRestfulInteraction::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRTypeRestfulInteraction(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRTypeRestfulInteraction($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTypeRestfulInteraction) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRTypeRestfulInteraction(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRTypeRestfulInteraction([FHIRTypeRestfulInteraction::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRTypeRestfulInteraction($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } } @@ -262,8 +276,8 @@ public function setDocumentation($documentation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -351,18 +365,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTypeRestfulInteraction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTypeRestfulInteraction::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1.php index df58496fcc..9d8e47cfb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRConformanceInteraction1 extends FHIRBackboneElement const FIELD_DOCUMENTATION_EXT = '_documentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Operations supported by REST at the system level. @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRSystemRestfulInteraction) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRSystemRestfulInteraction([FHIRSystemRestfulInteraction::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRSystemRestfulInteraction(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRSystemRestfulInteraction($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSystemRestfulInteraction) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRSystemRestfulInteraction(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRSystemRestfulInteraction([FHIRSystemRestfulInteraction::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRSystemRestfulInteraction($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } } @@ -262,8 +276,8 @@ public function setDocumentation($documentation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -351,18 +365,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSystemRestfulInteraction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSystemRestfulInteraction::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php index 5a8dd338e1..932d1d9db0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRConformanceMessaging extends FHIRBackboneElement const FIELD_RELIABLE_CACHE_EXT = '_reliableCache'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -164,20 +164,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENDPOINT])) { @@ -216,20 +223,27 @@ public function __construct($data = null) $this->addEvent(new FHIRConformanceEvent($data[self::FIELD_EVENT])); } } - if (isset($data[self::FIELD_RELIABLE_CACHE])) { - $ext = (isset($data[self::FIELD_RELIABLE_CACHE_EXT]) && is_array($data[self::FIELD_RELIABLE_CACHE_EXT])) - ? $data[self::FIELD_RELIABLE_CACHE_EXT] - : null; - if ($data[self::FIELD_RELIABLE_CACHE] instanceof FHIRUnsignedInt) { - $this->setReliableCache($data[self::FIELD_RELIABLE_CACHE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELIABLE_CACHE])) { - $this->setReliableCache(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_RELIABLE_CACHE]] + $ext)); - } else if (is_array($data[self::FIELD_RELIABLE_CACHE])) { - $this->setReliableCache(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_RELIABLE_CACHE]))); - } + if (isset($data[self::FIELD_RELIABLE_CACHE]) || isset($data[self::FIELD_RELIABLE_CACHE_EXT])) { + if (isset($data[self::FIELD_RELIABLE_CACHE])) { + $value = $data[self::FIELD_RELIABLE_CACHE]; } else { - $this->setReliableCache(new FHIRUnsignedInt($data[self::FIELD_RELIABLE_CACHE])); + $value = null; + } + if (isset($data[self::FIELD_RELIABLE_CACHE_EXT]) && is_array($data[self::FIELD_RELIABLE_CACHE_EXT])) { + $ext = $data[self::FIELD_RELIABLE_CACHE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setReliableCache($value); + } else if (is_array($value)) { + $this->setReliableCache(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setReliableCache(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReliableCache(new FHIRUnsignedInt($ext)); } } } @@ -456,8 +470,8 @@ public function setReliableCache($reliableCache = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -579,24 +593,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getReliableCache())) { $a[self::FIELD_RELIABLE_CACHE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_RELIABLE_CACHE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php index ce717b7e78..3bcb1d3c31 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConformanceOperation extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -139,20 +139,27 @@ public function __construct($data = null) $this->setDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -252,8 +259,8 @@ public function setName($name = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -344,11 +351,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php index f36047bbe5..690f39e3ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRConformanceResource extends FHIRBackboneElement const FIELD_VERSIONING_EXT = '_versioning'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -276,52 +276,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONDITIONAL_CREATE])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_CREATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_CREATE_EXT])) - ? $data[self::FIELD_CONDITIONAL_CREATE_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_CREATE] instanceof FHIRBoolean) { - $this->setConditionalCreate($data[self::FIELD_CONDITIONAL_CREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_CREATE])) { - $this->setConditionalCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_CREATE]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_CREATE])) { - $this->setConditionalCreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CONDITIONAL_CREATE]))); - } + if (isset($data[self::FIELD_CONDITIONAL_CREATE]) || isset($data[self::FIELD_CONDITIONAL_CREATE_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_CREATE])) { + $value = $data[self::FIELD_CONDITIONAL_CREATE]; } else { - $this->setConditionalCreate(new FHIRBoolean($data[self::FIELD_CONDITIONAL_CREATE])); + $value = null; } - } - if (isset($data[self::FIELD_CONDITIONAL_DELETE])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_DELETE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_DELETE_EXT])) - ? $data[self::FIELD_CONDITIONAL_DELETE_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_DELETE] instanceof FHIRConditionalDeleteStatus) { - $this->setConditionalDelete($data[self::FIELD_CONDITIONAL_DELETE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_DELETE])) { - $this->setConditionalDelete(new FHIRConditionalDeleteStatus([FHIRConditionalDeleteStatus::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_DELETE]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_DELETE])) { - $this->setConditionalDelete(new FHIRConditionalDeleteStatus(array_merge($ext, $data[self::FIELD_CONDITIONAL_DELETE]))); - } + if (isset($data[self::FIELD_CONDITIONAL_CREATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_CREATE_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_CREATE_EXT]; } else { - $this->setConditionalDelete(new FHIRConditionalDeleteStatus($data[self::FIELD_CONDITIONAL_DELETE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setConditionalCreate($value); + } else if (is_array($value)) { + $this->setConditionalCreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setConditionalCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConditionalCreate(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_CONDITIONAL_UPDATE])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_UPDATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_UPDATE_EXT])) - ? $data[self::FIELD_CONDITIONAL_UPDATE_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_UPDATE] instanceof FHIRBoolean) { - $this->setConditionalUpdate($data[self::FIELD_CONDITIONAL_UPDATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_UPDATE])) { - $this->setConditionalUpdate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_UPDATE]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_UPDATE])) { - $this->setConditionalUpdate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CONDITIONAL_UPDATE]))); + if (isset($data[self::FIELD_CONDITIONAL_DELETE]) || isset($data[self::FIELD_CONDITIONAL_DELETE_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_DELETE])) { + $value = $data[self::FIELD_CONDITIONAL_DELETE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_DELETE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_DELETE_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_DELETE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionalDeleteStatus) { + $this->setConditionalDelete($value); + } else if (is_array($value)) { + $this->setConditionalDelete(new FHIRConditionalDeleteStatus(array_merge($ext, $value))); + } else { + $this->setConditionalDelete(new FHIRConditionalDeleteStatus([FHIRConditionalDeleteStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConditionalDelete(new FHIRConditionalDeleteStatus($ext)); + } + } + if (isset($data[self::FIELD_CONDITIONAL_UPDATE]) || isset($data[self::FIELD_CONDITIONAL_UPDATE_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_UPDATE])) { + $value = $data[self::FIELD_CONDITIONAL_UPDATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_UPDATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_UPDATE_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_UPDATE_EXT]; } else { - $this->setConditionalUpdate(new FHIRBoolean($data[self::FIELD_CONDITIONAL_UPDATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setConditionalUpdate($value); + } else if (is_array($value)) { + $this->setConditionalUpdate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setConditionalUpdate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConditionalUpdate(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_INTERACTION])) { @@ -349,49 +370,65 @@ public function __construct($data = null) $this->setProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_READ_HISTORY])) { - $ext = (isset($data[self::FIELD_READ_HISTORY_EXT]) && is_array($data[self::FIELD_READ_HISTORY_EXT])) - ? $data[self::FIELD_READ_HISTORY_EXT] - : null; - if ($data[self::FIELD_READ_HISTORY] instanceof FHIRBoolean) { - $this->setReadHistory($data[self::FIELD_READ_HISTORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READ_HISTORY])) { - $this->setReadHistory(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_READ_HISTORY]] + $ext)); - } else if (is_array($data[self::FIELD_READ_HISTORY])) { - $this->setReadHistory(new FHIRBoolean(array_merge($ext, $data[self::FIELD_READ_HISTORY]))); - } + if (isset($data[self::FIELD_READ_HISTORY]) || isset($data[self::FIELD_READ_HISTORY_EXT])) { + if (isset($data[self::FIELD_READ_HISTORY])) { + $value = $data[self::FIELD_READ_HISTORY]; } else { - $this->setReadHistory(new FHIRBoolean($data[self::FIELD_READ_HISTORY])); + $value = null; + } + if (isset($data[self::FIELD_READ_HISTORY_EXT]) && is_array($data[self::FIELD_READ_HISTORY_EXT])) { + $ext = $data[self::FIELD_READ_HISTORY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReadHistory($value); + } else if (is_array($value)) { + $this->setReadHistory(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReadHistory(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReadHistory(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_SEARCH_INCLUDE])) { - $ext = (isset($data[self::FIELD_SEARCH_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_INCLUDE_EXT])) - ? $data[self::FIELD_SEARCH_INCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_SEARCH_INCLUDE])) { - foreach($data[self::FIELD_SEARCH_INCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSearchInclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSearchInclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEARCH_INCLUDE]) || isset($data[self::FIELD_SEARCH_INCLUDE_EXT])) { + if (isset($data[self::FIELD_SEARCH_INCLUDE])) { + $value = $data[self::FIELD_SEARCH_INCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_INCLUDE_EXT])) { + $ext = $data[self::FIELD_SEARCH_INCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSearchInclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSearchInclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSearchInclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSearchInclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSearchInclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSearchInclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_SEARCH_INCLUDE] instanceof FHIRString) { - $this->addSearchInclude($data[self::FIELD_SEARCH_INCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEARCH_INCLUDE])) { - $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEARCH_INCLUDE]] + $ext)); - } else { - $this->addSearchInclude(new FHIRString($data[self::FIELD_SEARCH_INCLUDE])); } } if (isset($data[self::FIELD_SEARCH_PARAM])) { @@ -412,81 +449,111 @@ public function __construct($data = null) $this->addSearchParam(new FHIRConformanceSearchParam($data[self::FIELD_SEARCH_PARAM])); } } - if (isset($data[self::FIELD_SEARCH_REV_INCLUDE])) { - $ext = (isset($data[self::FIELD_SEARCH_REV_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_REV_INCLUDE_EXT])) - ? $data[self::FIELD_SEARCH_REV_INCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_SEARCH_REV_INCLUDE])) { - foreach($data[self::FIELD_SEARCH_REV_INCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSearchRevInclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSearchRevInclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEARCH_REV_INCLUDE]) || isset($data[self::FIELD_SEARCH_REV_INCLUDE_EXT])) { + if (isset($data[self::FIELD_SEARCH_REV_INCLUDE])) { + $value = $data[self::FIELD_SEARCH_REV_INCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_REV_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_REV_INCLUDE_EXT])) { + $ext = $data[self::FIELD_SEARCH_REV_INCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSearchRevInclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSearchRevInclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSearchRevInclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSearchRevInclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSearchRevInclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSearchRevInclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_SEARCH_REV_INCLUDE] instanceof FHIRString) { - $this->addSearchRevInclude($data[self::FIELD_SEARCH_REV_INCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEARCH_REV_INCLUDE])) { - $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEARCH_REV_INCLUDE]] + $ext)); - } else { - $this->addSearchRevInclude(new FHIRString($data[self::FIELD_SEARCH_REV_INCLUDE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_UPDATE_CREATE])) { - $ext = (isset($data[self::FIELD_UPDATE_CREATE_EXT]) && is_array($data[self::FIELD_UPDATE_CREATE_EXT])) - ? $data[self::FIELD_UPDATE_CREATE_EXT] - : null; - if ($data[self::FIELD_UPDATE_CREATE] instanceof FHIRBoolean) { - $this->setUpdateCreate($data[self::FIELD_UPDATE_CREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UPDATE_CREATE])) { - $this->setUpdateCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_UPDATE_CREATE]] + $ext)); - } else if (is_array($data[self::FIELD_UPDATE_CREATE])) { - $this->setUpdateCreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_UPDATE_CREATE]))); - } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setUpdateCreate(new FHIRBoolean($data[self::FIELD_UPDATE_CREATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_VERSIONING])) { - $ext = (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) - ? $data[self::FIELD_VERSIONING_EXT] - : null; - if ($data[self::FIELD_VERSIONING] instanceof FHIRResourceVersionPolicy) { - $this->setVersioning($data[self::FIELD_VERSIONING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRResourceVersionPolicy([FHIRResourceVersionPolicy::FIELD_VALUE => $data[self::FIELD_VERSIONING]] + $ext)); - } else if (is_array($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRResourceVersionPolicy(array_merge($ext, $data[self::FIELD_VERSIONING]))); + if (isset($data[self::FIELD_UPDATE_CREATE]) || isset($data[self::FIELD_UPDATE_CREATE_EXT])) { + if (isset($data[self::FIELD_UPDATE_CREATE])) { + $value = $data[self::FIELD_UPDATE_CREATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UPDATE_CREATE_EXT]) && is_array($data[self::FIELD_UPDATE_CREATE_EXT])) { + $ext = $data[self::FIELD_UPDATE_CREATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setUpdateCreate($value); + } else if (is_array($value)) { + $this->setUpdateCreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setUpdateCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUpdateCreate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VERSIONING]) || isset($data[self::FIELD_VERSIONING_EXT])) { + if (isset($data[self::FIELD_VERSIONING])) { + $value = $data[self::FIELD_VERSIONING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) { + $ext = $data[self::FIELD_VERSIONING_EXT]; } else { - $this->setVersioning(new FHIRResourceVersionPolicy($data[self::FIELD_VERSIONING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceVersionPolicy) { + $this->setVersioning($value); + } else if (is_array($value)) { + $this->setVersioning(new FHIRResourceVersionPolicy(array_merge($ext, $value))); + } else { + $this->setVersioning(new FHIRResourceVersionPolicy([FHIRResourceVersionPolicy::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersioning(new FHIRResourceVersionPolicy($ext)); } } } @@ -1056,8 +1123,8 @@ public function setVersioning(FHIRResourceVersionPolicy $versioning = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1265,92 +1332,137 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getConditionalCreate())) { $a[self::FIELD_CONDITIONAL_CREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_CREATE_EXT] = $enc; } } if (null !== ($v = $this->getConditionalDelete())) { $a[self::FIELD_CONDITIONAL_DELETE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionalDeleteStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionalDeleteStatus::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_DELETE_EXT] = $enc; } } if (null !== ($v = $this->getConditionalUpdate())) { $a[self::FIELD_CONDITIONAL_UPDATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_UPDATE_EXT] = $enc; } } if ([] !== ($vs = $this->getInteraction())) { - $a[self::FIELD_INTERACTION] = $vs; + $a[self::FIELD_INTERACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERACTION][] = $v; + } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } if (null !== ($v = $this->getReadHistory())) { $a[self::FIELD_READ_HISTORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_READ_HISTORY_EXT] = $enc; } } if ([] !== ($vs = $this->getSearchInclude())) { $a[self::FIELD_SEARCH_INCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEARCH_INCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEARCH_INCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEARCH_INCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEARCH_INCLUDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSearchParam())) { - $a[self::FIELD_SEARCH_PARAM] = $vs; + $a[self::FIELD_SEARCH_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SEARCH_PARAM][] = $v; + } } if ([] !== ($vs = $this->getSearchRevInclude())) { $a[self::FIELD_SEARCH_REV_INCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEARCH_REV_INCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEARCH_REV_INCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEARCH_REV_INCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEARCH_REV_INCLUDE_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUpdateCreate())) { $a[self::FIELD_UPDATE_CREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_UPDATE_CREATE_EXT] = $enc; } } if (null !== ($v = $this->getVersioning())) { $a[self::FIELD_VERSIONING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceVersionPolicy::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceVersionPolicy::FIELD_VALUE]); $a[self::FIELD_VERSIONING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php index 5381a30a92..17c0387e2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRConformanceRest extends FHIRBackboneElement const FIELD_TRANSACTION_MODE_EXT = '_transactionMode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -231,49 +231,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMPARTMENT])) { - $ext = (isset($data[self::FIELD_COMPARTMENT_EXT]) && is_array($data[self::FIELD_COMPARTMENT_EXT])) - ? $data[self::FIELD_COMPARTMENT_EXT] - : null; - if (is_array($data[self::FIELD_COMPARTMENT])) { - foreach($data[self::FIELD_COMPARTMENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addCompartment($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCompartment(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCompartment(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMPARTMENT]) || isset($data[self::FIELD_COMPARTMENT_EXT])) { + if (isset($data[self::FIELD_COMPARTMENT])) { + $value = $data[self::FIELD_COMPARTMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARTMENT_EXT]) && is_array($data[self::FIELD_COMPARTMENT_EXT])) { + $ext = $data[self::FIELD_COMPARTMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addCompartment($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addCompartment($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCompartment(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addCompartment(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCompartment(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addCompartment(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addCompartment(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCompartment(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_COMPARTMENT] instanceof FHIRUri) { - $this->addCompartment($data[self::FIELD_COMPARTMENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COMPARTMENT])) { - $this->addCompartment(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_COMPARTMENT]] + $ext)); - } else { - $this->addCompartment(new FHIRUri($data[self::FIELD_COMPARTMENT])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } if (isset($data[self::FIELD_INTERACTION])) { @@ -294,20 +310,27 @@ public function __construct($data = null) $this->addInteraction(new FHIRConformanceInteraction1($data[self::FIELD_INTERACTION])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRRestfulConformanceMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRRestfulConformanceMode([FHIRRestfulConformanceMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRRestfulConformanceMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIRRestfulConformanceMode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRestfulConformanceMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRRestfulConformanceMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRRestfulConformanceMode([FHIRRestfulConformanceMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRRestfulConformanceMode($ext)); } } if (isset($data[self::FIELD_OPERATION])) { @@ -371,20 +394,27 @@ public function __construct($data = null) $this->setSecurity(new FHIRConformanceSecurity($data[self::FIELD_SECURITY])); } } - if (isset($data[self::FIELD_TRANSACTION_MODE])) { - $ext = (isset($data[self::FIELD_TRANSACTION_MODE_EXT]) && is_array($data[self::FIELD_TRANSACTION_MODE_EXT])) - ? $data[self::FIELD_TRANSACTION_MODE_EXT] - : null; - if ($data[self::FIELD_TRANSACTION_MODE] instanceof FHIRTransactionMode) { - $this->setTransactionMode($data[self::FIELD_TRANSACTION_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRANSACTION_MODE])) { - $this->setTransactionMode(new FHIRTransactionMode([FHIRTransactionMode::FIELD_VALUE => $data[self::FIELD_TRANSACTION_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_TRANSACTION_MODE])) { - $this->setTransactionMode(new FHIRTransactionMode(array_merge($ext, $data[self::FIELD_TRANSACTION_MODE]))); - } + if (isset($data[self::FIELD_TRANSACTION_MODE]) || isset($data[self::FIELD_TRANSACTION_MODE_EXT])) { + if (isset($data[self::FIELD_TRANSACTION_MODE])) { + $value = $data[self::FIELD_TRANSACTION_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRANSACTION_MODE_EXT]) && is_array($data[self::FIELD_TRANSACTION_MODE_EXT])) { + $ext = $data[self::FIELD_TRANSACTION_MODE_EXT]; } else { - $this->setTransactionMode(new FHIRTransactionMode($data[self::FIELD_TRANSACTION_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTransactionMode) { + $this->setTransactionMode($value); + } else if (is_array($value)) { + $this->setTransactionMode(new FHIRTransactionMode(array_merge($ext, $value))); + } else { + $this->setTransactionMode(new FHIRTransactionMode([FHIRTransactionMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTransactionMode(new FHIRTransactionMode($ext)); } } } @@ -850,8 +880,8 @@ public function setTransactionMode(FHIRTransactionMode $transactionMode = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1016,55 +1046,96 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCompartment())) { $a[self::FIELD_COMPARTMENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COMPARTMENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COMPARTMENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COMPARTMENT_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COMPARTMENT_EXT] = $encs; + } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getInteraction())) { - $a[self::FIELD_INTERACTION] = $vs; + $a[self::FIELD_INTERACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERACTION][] = $v; + } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRestfulConformanceMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRestfulConformanceMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if ([] !== ($vs = $this->getOperation())) { - $a[self::FIELD_OPERATION] = $vs; + $a[self::FIELD_OPERATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPERATION][] = $v; + } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } } if ([] !== ($vs = $this->getSearchParam())) { - $a[self::FIELD_SEARCH_PARAM] = $vs; + $a[self::FIELD_SEARCH_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SEARCH_PARAM][] = $v; + } } if (null !== ($v = $this->getSecurity())) { $a[self::FIELD_SECURITY] = $v; } if (null !== ($v = $this->getTransactionMode())) { $a[self::FIELD_TRANSACTION_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTransactionMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTransactionMode::FIELD_VALUE]); $a[self::FIELD_TRANSACTION_MODE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php index 9481211ca5..f329612f2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRConformanceSearchParam extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -209,155 +209,210 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CHAIN])) { - $ext = (isset($data[self::FIELD_CHAIN_EXT]) && is_array($data[self::FIELD_CHAIN_EXT])) - ? $data[self::FIELD_CHAIN_EXT] - : null; - if (is_array($data[self::FIELD_CHAIN])) { - foreach($data[self::FIELD_CHAIN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addChain($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addChain(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CHAIN]) || isset($data[self::FIELD_CHAIN_EXT])) { + if (isset($data[self::FIELD_CHAIN])) { + $value = $data[self::FIELD_CHAIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CHAIN_EXT]) && is_array($data[self::FIELD_CHAIN_EXT])) { + $ext = $data[self::FIELD_CHAIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addChain($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addChain($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addChain(new FHIRString(array_merge($v, $iext))); + } else { + $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addChain(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addChain(new FHIRString(array_merge($ext, $value))); + } else { + $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_CHAIN] instanceof FHIRString) { - $this->addChain($data[self::FIELD_CHAIN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CHAIN])) { - $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CHAIN]] + $ext)); - } else { - $this->addChain(new FHIRString($data[self::FIELD_CHAIN])); - } - } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRUri) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addChain(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRUri($data[self::FIELD_DEFINITION])); - } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } - if (isset($data[self::FIELD_MODIFIER])) { - $ext = (isset($data[self::FIELD_MODIFIER_EXT]) && is_array($data[self::FIELD_MODIFIER_EXT])) - ? $data[self::FIELD_MODIFIER_EXT] - : null; - if (is_array($data[self::FIELD_MODIFIER])) { - foreach($data[self::FIELD_MODIFIER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRSearchModifierCode) { - $this->addModifier($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addModifier(new FHIRSearchModifierCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MODIFIER]) || isset($data[self::FIELD_MODIFIER_EXT])) { + if (isset($data[self::FIELD_MODIFIER])) { + $value = $data[self::FIELD_MODIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODIFIER_EXT]) && is_array($data[self::FIELD_MODIFIER_EXT])) { + $ext = $data[self::FIELD_MODIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchModifierCode) { + $this->addModifier($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRSearchModifierCode) { + $this->addModifier($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addModifier(new FHIRSearchModifierCode(array_merge($v, $iext))); + } else { + $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addModifier(new FHIRSearchModifierCode($v)); } + } elseif (is_array($value)) { + $this->addModifier(new FHIRSearchModifierCode(array_merge($ext, $value))); + } else { + $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_MODIFIER] instanceof FHIRSearchModifierCode) { - $this->addModifier($data[self::FIELD_MODIFIER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MODIFIER])) { - $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $data[self::FIELD_MODIFIER]] + $ext)); - } else { - $this->addModifier(new FHIRSearchModifierCode($data[self::FIELD_MODIFIER])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addModifier(new FHIRSearchModifierCode($iext)); } + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TARGET])) { - $ext = (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) - ? $data[self::FIELD_TARGET_EXT] - : null; - if (is_array($data[self::FIELD_TARGET])) { - foreach($data[self::FIELD_TARGET] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addTarget($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTarget(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TARGET]) || isset($data[self::FIELD_TARGET_EXT])) { + if (isset($data[self::FIELD_TARGET])) { + $value = $data[self::FIELD_TARGET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) { + $ext = $data[self::FIELD_TARGET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addTarget($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addTarget($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTarget(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTarget(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addTarget(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_TARGET] instanceof FHIRCode) { - $this->addTarget($data[self::FIELD_TARGET]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TARGET])) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TARGET]] + $ext)); - } else { - $this->addTarget(new FHIRCode($data[self::FIELD_TARGET])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTarget(new FHIRCode($iext)); } + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -748,8 +803,8 @@ public function setType($type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -912,77 +967,112 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getChain())) { $a[self::FIELD_CHAIN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CHAIN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CHAIN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CHAIN_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CHAIN_EXT] = $encs; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { $a[self::FIELD_MODIFIER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MODIFIER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MODIFIER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRSearchModifierCode::FIELD_VALUE]) || array_key_exists(FHIRSearchModifierCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MODIFIER_EXT][] = null; + unset($enc[FHIRSearchModifierCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MODIFIER_EXT] = $encs; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { $a[self::FIELD_TARGET] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TARGET][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TARGET_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TARGET_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TARGET_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php index f6935d74cf..b4d29e9d8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRConformanceSecurity extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A conformance statement is a set of capabilities of a FHIR Server that may be @@ -176,36 +176,50 @@ public function __construct($data = null) $this->addCertificate(new FHIRConformanceCertificate($data[self::FIELD_CERTIFICATE])); } } - if (isset($data[self::FIELD_CORS])) { - $ext = (isset($data[self::FIELD_CORS_EXT]) && is_array($data[self::FIELD_CORS_EXT])) - ? $data[self::FIELD_CORS_EXT] - : null; - if ($data[self::FIELD_CORS] instanceof FHIRBoolean) { - $this->setCors($data[self::FIELD_CORS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CORS])) { - $this->setCors(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CORS]] + $ext)); - } else if (is_array($data[self::FIELD_CORS])) { - $this->setCors(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CORS]))); - } + if (isset($data[self::FIELD_CORS]) || isset($data[self::FIELD_CORS_EXT])) { + if (isset($data[self::FIELD_CORS])) { + $value = $data[self::FIELD_CORS]; } else { - $this->setCors(new FHIRBoolean($data[self::FIELD_CORS])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CORS_EXT]) && is_array($data[self::FIELD_CORS_EXT])) { + $ext = $data[self::FIELD_CORS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCors($value); + } else if (is_array($value)) { + $this->setCors(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCors(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCors(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -444,8 +458,8 @@ public function setService(array $service = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -566,24 +580,43 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCertificate())) { - $a[self::FIELD_CERTIFICATE] = $vs; + $a[self::FIELD_CERTIFICATE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CERTIFICATE][] = $v; + } } if (null !== ($v = $this->getCors())) { $a[self::FIELD_CORS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CORS_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getService())) { - $a[self::FIELD_SERVICE] = $vs; + $a[self::FIELD_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php index b2f092a01b..5dc4880988 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRConformanceSoftware extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -148,52 +148,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_RELEASE_DATE])) { - $ext = (isset($data[self::FIELD_RELEASE_DATE_EXT]) && is_array($data[self::FIELD_RELEASE_DATE_EXT])) - ? $data[self::FIELD_RELEASE_DATE_EXT] - : null; - if ($data[self::FIELD_RELEASE_DATE] instanceof FHIRDateTime) { - $this->setReleaseDate($data[self::FIELD_RELEASE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELEASE_DATE])) { - $this->setReleaseDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RELEASE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RELEASE_DATE])) { - $this->setReleaseDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RELEASE_DATE]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setReleaseDate(new FHIRDateTime($data[self::FIELD_RELEASE_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_RELEASE_DATE]) || isset($data[self::FIELD_RELEASE_DATE_EXT])) { + if (isset($data[self::FIELD_RELEASE_DATE])) { + $value = $data[self::FIELD_RELEASE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELEASE_DATE_EXT]) && is_array($data[self::FIELD_RELEASE_DATE_EXT])) { + $ext = $data[self::FIELD_RELEASE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReleaseDate($value); + } else if (is_array($value)) { + $this->setReleaseDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReleaseDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReleaseDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -343,8 +364,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -454,25 +475,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getReleaseDate())) { $a[self::FIELD_RELEASE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RELEASE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor.php index a041b0a30c..91fe9b4560 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractActor extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -271,8 +271,8 @@ public function setRole(array $role = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -361,7 +361,16 @@ public function jsonSerialize() $a[self::FIELD_ENTITY] = $v; } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1.php index bde4f385cd..cc3fab230a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractActor1 extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -271,8 +271,8 @@ public function setRole(array $role = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -361,7 +361,16 @@ public function jsonSerialize() $a[self::FIELD_ENTITY] = $v; } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php index 04ebdfe2b2..5dbe38b4ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractFriendly extends FHIRBackboneElement const FIELD_CONTENT_REFERENCE = 'contentReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -236,8 +236,8 @@ public function setContentReference(FHIRReference $contentReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php index de95424280..17e6649b3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractLegal extends FHIRBackboneElement const FIELD_CONTENT_REFERENCE = 'contentReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -230,8 +230,8 @@ public function setContentReference(FHIRReference $contentReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -315,6 +315,9 @@ public function jsonSerialize() if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php index 0de326fbd7..338f4f282a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractRule extends FHIRBackboneElement const FIELD_CONTENT_REFERENCE = 'contentReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -236,8 +236,8 @@ public function setContentReference(FHIRReference $contentReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php index a450bc7ddb..f4e01e975c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRContractSigner extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -150,20 +150,27 @@ public function __construct($data = null) $this->setParty(new FHIRReference($data[self::FIELD_PARTY])); } } - if (isset($data[self::FIELD_SIGNATURE])) { - $ext = (isset($data[self::FIELD_SIGNATURE_EXT]) && is_array($data[self::FIELD_SIGNATURE_EXT])) - ? $data[self::FIELD_SIGNATURE_EXT] - : null; - if ($data[self::FIELD_SIGNATURE] instanceof FHIRString) { - $this->setSignature($data[self::FIELD_SIGNATURE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SIGNATURE])) { - $this->setSignature(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SIGNATURE]] + $ext)); - } else if (is_array($data[self::FIELD_SIGNATURE])) { - $this->setSignature(new FHIRString(array_merge($ext, $data[self::FIELD_SIGNATURE]))); - } + if (isset($data[self::FIELD_SIGNATURE]) || isset($data[self::FIELD_SIGNATURE_EXT])) { + if (isset($data[self::FIELD_SIGNATURE])) { + $value = $data[self::FIELD_SIGNATURE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SIGNATURE_EXT]) && is_array($data[self::FIELD_SIGNATURE_EXT])) { + $ext = $data[self::FIELD_SIGNATURE_EXT]; } else { - $this->setSignature(new FHIRString($data[self::FIELD_SIGNATURE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSignature($value); + } else if (is_array($value)) { + $this->setSignature(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSignature(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSignature(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -298,8 +305,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -396,14 +403,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSignature())) { $a[self::FIELD_SIGNATURE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SIGNATURE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php index 20262aebeb..966bd1edc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRContractTerm extends FHIRBackboneElement const FIELD_VALUED_ITEM = 'valuedItem'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -347,20 +347,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRDateTime) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRDateTime($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SUB_TYPE])) { @@ -377,20 +384,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -962,8 +976,8 @@ public function setValuedItem(array $valuedItem = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1153,27 +1167,53 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if ([] !== ($vs = $this->getActionReason())) { - $a[self::FIELD_ACTION_REASON] = $vs; + $a[self::FIELD_ACTION_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION_REASON][] = $v; + } } if ([] !== ($vs = $this->getActor())) { - $a[self::FIELD_ACTOR] = $vs; + $a[self::FIELD_ACTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTOR][] = $v; + } } if (null !== ($v = $this->getApplies())) { $a[self::FIELD_APPLIES] = $v; } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } @@ -1185,8 +1225,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } @@ -1194,7 +1236,16 @@ public function jsonSerialize() $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getValuedItem())) { - $a[self::FIELD_VALUED_ITEM] = $vs; + $a[self::FIELD_VALUED_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUED_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php index 98f873fc82..3ea7c8d878 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRContractValuedItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -225,20 +225,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EFFECTIVE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveTime($data[self::FIELD_EFFECTIVE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_TIME]) || isset($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_TIME_EXT]; } else { - $this->setEffectiveTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveTime($value); + } else if (is_array($value)) { + $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { @@ -255,20 +262,27 @@ public function __construct($data = null) $this->setEntityReference(new FHIRReference($data[self::FIELD_ENTITY_REFERENCE])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -285,20 +299,27 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_POINTS])) { - $ext = (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) - ? $data[self::FIELD_POINTS_EXT] - : null; - if ($data[self::FIELD_POINTS] instanceof FHIRDecimal) { - $this->setPoints($data[self::FIELD_POINTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POINTS]] + $ext)); - } else if (is_array($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POINTS]))); - } + if (isset($data[self::FIELD_POINTS]) || isset($data[self::FIELD_POINTS_EXT])) { + if (isset($data[self::FIELD_POINTS])) { + $value = $data[self::FIELD_POINTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) { + $ext = $data[self::FIELD_POINTS_EXT]; } else { - $this->setPoints(new FHIRDecimal($data[self::FIELD_POINTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPoints($value); + } else if (is_array($value)) { + $this->setPoints(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPoints(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -644,8 +665,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -791,8 +812,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEffectiveTime())) { $a[self::FIELD_EFFECTIVE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_TIME_EXT] = $enc; } } @@ -804,8 +827,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } @@ -817,8 +842,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPoints())) { $a[self::FIELD_POINTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POINTS_EXT] = $enc; } } @@ -828,6 +855,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php index 9aa900a52f..33c290f4f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRContractValuedItem1 extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -227,20 +227,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EFFECTIVE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveTime($data[self::FIELD_EFFECTIVE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_TIME]) || isset($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_TIME_EXT]; } else { - $this->setEffectiveTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveTime($value); + } else if (is_array($value)) { + $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { @@ -257,20 +264,27 @@ public function __construct($data = null) $this->setEntityReference(new FHIRReference($data[self::FIELD_ENTITY_REFERENCE])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -287,20 +301,27 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_POINTS])) { - $ext = (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) - ? $data[self::FIELD_POINTS_EXT] - : null; - if ($data[self::FIELD_POINTS] instanceof FHIRDecimal) { - $this->setPoints($data[self::FIELD_POINTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POINTS]] + $ext)); - } else if (is_array($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POINTS]))); - } + if (isset($data[self::FIELD_POINTS]) || isset($data[self::FIELD_POINTS_EXT])) { + if (isset($data[self::FIELD_POINTS])) { + $value = $data[self::FIELD_POINTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) { + $ext = $data[self::FIELD_POINTS_EXT]; } else { - $this->setPoints(new FHIRDecimal($data[self::FIELD_POINTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPoints($value); + } else if (is_array($value)) { + $this->setPoints(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPoints(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -650,8 +671,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -797,8 +818,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEffectiveTime())) { $a[self::FIELD_EFFECTIVE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_TIME_EXT] = $enc; } } @@ -810,8 +833,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } @@ -823,8 +848,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPoints())) { $a[self::FIELD_POINTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POINTS_EXT] = $enc; } } @@ -834,6 +861,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContact.php index 027fea0b18..0909e29f2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRDataElementContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -289,8 +296,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -385,13 +392,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php index eab3dacfaa..0562ee1399 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRDataElementMapping extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -164,68 +164,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENTS])) { - $ext = (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) - ? $data[self::FIELD_COMMENTS_EXT] - : null; - if ($data[self::FIELD_COMMENTS] instanceof FHIRString) { - $this->setComments($data[self::FIELD_COMMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENTS]))); - } + if (isset($data[self::FIELD_COMMENTS]) || isset($data[self::FIELD_COMMENTS_EXT])) { + if (isset($data[self::FIELD_COMMENTS])) { + $value = $data[self::FIELD_COMMENTS]; } else { - $this->setComments(new FHIRString($data[self::FIELD_COMMENTS])); + $value = null; } - } - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) { + $ext = $data[self::FIELD_COMMENTS_EXT]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComments($value); + } else if (is_array($value)) { + $this->setComments(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComments(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -419,8 +447,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -544,32 +572,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComments())) { $a[self::FIELD_COMMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENTS_EXT] = $enc; } } if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php index 19e852f86f..3cfa65ac4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDetectedIssueMitigation extends FHIRBackboneElement const FIELD_DATE_EXT = '_date'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -164,20 +164,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } } @@ -317,8 +324,8 @@ public function setDate($date = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -418,11 +425,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php index df571411bd..96bf5f791e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDeviceComponentProductionSpecification extends FHIRBackboneElement const FIELD_SPEC_TYPE = 'specType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -154,20 +154,27 @@ public function __construct($data = null) $this->setComponentId(new FHIRIdentifier($data[self::FIELD_COMPONENT_ID])); } } - if (isset($data[self::FIELD_PRODUCTION_SPEC])) { - $ext = (isset($data[self::FIELD_PRODUCTION_SPEC_EXT]) && is_array($data[self::FIELD_PRODUCTION_SPEC_EXT])) - ? $data[self::FIELD_PRODUCTION_SPEC_EXT] - : null; - if ($data[self::FIELD_PRODUCTION_SPEC] instanceof FHIRString) { - $this->setProductionSpec($data[self::FIELD_PRODUCTION_SPEC]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRODUCTION_SPEC])) { - $this->setProductionSpec(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRODUCTION_SPEC]] + $ext)); - } else if (is_array($data[self::FIELD_PRODUCTION_SPEC])) { - $this->setProductionSpec(new FHIRString(array_merge($ext, $data[self::FIELD_PRODUCTION_SPEC]))); - } + if (isset($data[self::FIELD_PRODUCTION_SPEC]) || isset($data[self::FIELD_PRODUCTION_SPEC_EXT])) { + if (isset($data[self::FIELD_PRODUCTION_SPEC])) { + $value = $data[self::FIELD_PRODUCTION_SPEC]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRODUCTION_SPEC_EXT]) && is_array($data[self::FIELD_PRODUCTION_SPEC_EXT])) { + $ext = $data[self::FIELD_PRODUCTION_SPEC_EXT]; } else { - $this->setProductionSpec(new FHIRString($data[self::FIELD_PRODUCTION_SPEC])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setProductionSpec($value); + } else if (is_array($value)) { + $this->setProductionSpec(new FHIRString(array_merge($ext, $value))); + } else { + $this->setProductionSpec(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProductionSpec(new FHIRString($ext)); } } if (isset($data[self::FIELD_SPEC_TYPE])) { @@ -310,8 +317,8 @@ public function setSpecType(FHIRCodeableConcept $specType = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -408,14 +415,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getProductionSpec())) { $a[self::FIELD_PRODUCTION_SPEC] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PRODUCTION_SPEC_EXT] = $enc; } } if (null !== ($v = $this->getSpecType())) { $a[self::FIELD_SPEC_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php index 96a937ad59..f1c920ffc1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDeviceMetricCalibration extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the state of a metric calibration. @@ -144,52 +144,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_STATE])) { - $ext = (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) - ? $data[self::FIELD_STATE_EXT] - : null; - if ($data[self::FIELD_STATE] instanceof FHIRDeviceMetricCalibrationState) { - $this->setState($data[self::FIELD_STATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATE])) { - $this->setState(new FHIRDeviceMetricCalibrationState([FHIRDeviceMetricCalibrationState::FIELD_VALUE => $data[self::FIELD_STATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATE])) { - $this->setState(new FHIRDeviceMetricCalibrationState(array_merge($ext, $data[self::FIELD_STATE]))); - } + if (isset($data[self::FIELD_STATE]) || isset($data[self::FIELD_STATE_EXT])) { + if (isset($data[self::FIELD_STATE])) { + $value = $data[self::FIELD_STATE]; } else { - $this->setState(new FHIRDeviceMetricCalibrationState($data[self::FIELD_STATE])); + $value = null; } - } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRInstant) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRInstant(array_merge($ext, $data[self::FIELD_TIME]))); - } + if (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) { + $ext = $data[self::FIELD_STATE_EXT]; } else { - $this->setTime(new FHIRInstant($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricCalibrationState) { + $this->setState($value); + } else if (is_array($value)) { + $this->setState(new FHIRDeviceMetricCalibrationState(array_merge($ext, $value))); + } else { + $this->setState(new FHIRDeviceMetricCalibrationState([FHIRDeviceMetricCalibrationState::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setState(new FHIRDeviceMetricCalibrationState($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRDeviceMetricCalibrationType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceMetricCalibrationType([FHIRDeviceMetricCalibrationType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceMetricCalibrationType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTime(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRDeviceMetricCalibrationType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricCalibrationType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRDeviceMetricCalibrationType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRDeviceMetricCalibrationType([FHIRDeviceMetricCalibrationType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRDeviceMetricCalibrationType($ext)); } } } @@ -317,8 +338,8 @@ public function setType(FHIRDeviceMetricCalibrationType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -412,25 +433,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getState())) { $a[self::FIELD_STATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricCalibrationState::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricCalibrationState::FIELD_VALUE]); $a[self::FIELD_STATE_EXT] = $enc; } } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricCalibrationType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricCalibrationType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php index b3f8eef96e..283eba48c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRDiagnosticOrderEvent extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -167,20 +167,27 @@ public function __construct($data = null) $this->setActor(new FHIRReference($data[self::FIELD_ACTOR])); } } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DESCRIPTION])) { @@ -190,20 +197,27 @@ public function __construct($data = null) $this->setDescription(new FHIRCodeableConcept($data[self::FIELD_DESCRIPTION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticOrderStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRDiagnosticOrderStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticOrderStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticOrderStatus($ext)); } } } @@ -369,8 +383,8 @@ public function setStatus(FHIRDiagnosticOrderStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -473,8 +487,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } @@ -483,11 +499,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticOrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticOrderStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php index 463f6f54b9..948561cc35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDiagnosticOrderItem extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -218,20 +218,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticOrderStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDiagnosticOrderStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticOrderStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticOrderStatus($ext)); } } } @@ -466,8 +473,8 @@ public function setStatus(FHIRDiagnosticOrderStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -584,18 +591,35 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticOrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticOrderStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php index 57e9758744..4f9556dfd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDiagnosticReportImage extends FHIRBackboneElement const FIELD_LINK = 'link'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -135,20 +135,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_LINK])) { @@ -257,8 +264,8 @@ public function setLink(FHIRReference $link = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -346,14 +353,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getLink())) { $a[self::FIELD_LINK] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php index 851e27d9ec..aa78fb6b3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentManifestContent extends FHIRBackboneElement const FIELD_P_REFERENCE = 'pReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -241,8 +241,8 @@ public function setPReference(FHIRReference $pReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -326,6 +326,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPReference())) { $a[self::FIELD_P_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php index b342a8999b..8f4c104cda 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentManifestRelated extends FHIRBackboneElement const FIELD_REF = 'ref'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -235,8 +235,8 @@ public function setRef(FHIRReference $ref = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -320,6 +320,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRef())) { $a[self::FIELD_REF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php index 10762249fc..f20e46e8c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentReferenceContent extends FHIRBackboneElement const FIELD_FORMAT = 'format'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -273,8 +273,8 @@ public function setFormat(array $format = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -363,7 +363,16 @@ public function jsonSerialize() $a[self::FIELD_ATTACHMENT] = $v; } if ([] !== ($vs = $this->getFormat())) { - $a[self::FIELD_FORMAT] = $vs; + $a[self::FIELD_FORMAT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FORMAT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php index 278937337a..65748701df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRDocumentReferenceContext extends FHIRBackboneElement const FIELD_SOURCE_PATIENT_INFO = 'sourcePatientInfo'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -575,8 +575,8 @@ public function setSourcePatientInfo(FHIRReference $sourcePatientInfo = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -702,7 +702,13 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getFacilityType())) { $a[self::FIELD_FACILITY_TYPE] = $v; @@ -714,11 +720,20 @@ public function jsonSerialize() $a[self::FIELD_PRACTICE_SETTING] = $v; } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getSourcePatientInfo())) { $a[self::FIELD_SOURCE_PATIENT_INFO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php index 5e240c21aa..a96689d6a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentReferenceRelated extends FHIRBackboneElement const FIELD_REF = 'ref'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -235,8 +235,8 @@ public function setRef(FHIRReference $ref = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -320,6 +320,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRef())) { $a[self::FIELD_REF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php index 3e2209fc63..65f3b6028e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRDocumentReferenceRelatesTo extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The type of relationship between documents. @@ -128,20 +128,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRDocumentRelationshipType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRDocumentRelationshipType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentRelationshipType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRDocumentRelationshipType($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -236,8 +243,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -317,14 +324,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentRelationshipType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php index 504c6b8b00..0b608259de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIREncounterHospitalization extends FHIRBackboneElement const FIELD_SPECIAL_COURTESY = 'specialCourtesy'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -890,8 +890,8 @@ public function setSpecialCourtesy(array $specialCourtesy = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1062,16 +1062,34 @@ public function jsonSerialize() $a[self::FIELD_ADMIT_SOURCE] = $v; } if ([] !== ($vs = $this->getAdmittingDiagnosis())) { - $a[self::FIELD_ADMITTING_DIAGNOSIS] = $vs; + $a[self::FIELD_ADMITTING_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADMITTING_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getDestination())) { $a[self::FIELD_DESTINATION] = $v; } if ([] !== ($vs = $this->getDietPreference())) { - $a[self::FIELD_DIET_PREFERENCE] = $vs; + $a[self::FIELD_DIET_PREFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIET_PREFERENCE][] = $v; + } } if ([] !== ($vs = $this->getDischargeDiagnosis())) { - $a[self::FIELD_DISCHARGE_DIAGNOSIS] = $vs; + $a[self::FIELD_DISCHARGE_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DISCHARGE_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getDischargeDisposition())) { $a[self::FIELD_DISCHARGE_DISPOSITION] = $v; @@ -1086,10 +1104,25 @@ public function jsonSerialize() $a[self::FIELD_RE_ADMISSION] = $v; } if ([] !== ($vs = $this->getSpecialArrangement())) { - $a[self::FIELD_SPECIAL_ARRANGEMENT] = $vs; + $a[self::FIELD_SPECIAL_ARRANGEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_ARRANGEMENT][] = $v; + } } if ([] !== ($vs = $this->getSpecialCourtesy())) { - $a[self::FIELD_SPECIAL_COURTESY] = $vs; + $a[self::FIELD_SPECIAL_COURTESY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_COURTESY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php index a0b4244285..bf55913637 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIREncounterLocation extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -158,20 +158,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterLocationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterLocationStatus([FHIREncounterLocationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterLocationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREncounterLocationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterLocationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterLocationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterLocationStatus([FHIREncounterLocationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterLocationStatus($ext)); } } } @@ -293,8 +300,8 @@ public function setStatus(FHIREncounterLocationStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,11 +393,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterLocationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterLocationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php index 0bd6a18d45..d3e78e944b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIREncounterParticipant extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -324,8 +324,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -423,7 +423,16 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php index f2c9d07288..a31374009e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIREncounterStatusHistory extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -136,20 +136,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterState) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterState([FHIREncounterState::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterState(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREncounterState($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterState) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterState(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterState([FHIREncounterState::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterState($ext)); } } } @@ -237,8 +244,8 @@ public function setStatus(FHIREncounterState $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,11 +328,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterState::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterState::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeam.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeam.php index 2552435f0b..89d2a3dee9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIREpisodeOfCareCareTeam extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -325,8 +325,8 @@ public function setRole(array $role = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -424,7 +424,16 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php index 479e3bc939..176b93a99a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIREpisodeOfCareStatusHistory extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -137,20 +137,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREpisodeOfCareStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREpisodeOfCareStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREpisodeOfCareStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREpisodeOfCareStatus($ext)); } } } @@ -238,8 +245,8 @@ public function setStatus(FHIREpisodeOfCareStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -322,11 +329,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREpisodeOfCareStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREpisodeOfCareStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php index 2afbfab961..71369fd1c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRFamilyMemberHistoryCondition extends FHIRBackboneElement const FIELD_OUTCOME = 'outcome'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -239,20 +239,27 @@ public function __construct($data = null) $this->setOnsetRange(new FHIRRange($data[self::FIELD_ONSET_RANGE])); } } - if (isset($data[self::FIELD_ONSET_STRING])) { - $ext = (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) - ? $data[self::FIELD_ONSET_STRING_EXT] - : null; - if ($data[self::FIELD_ONSET_STRING] instanceof FHIRString) { - $this->setOnsetString($data[self::FIELD_ONSET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ONSET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString(array_merge($ext, $data[self::FIELD_ONSET_STRING]))); - } + if (isset($data[self::FIELD_ONSET_STRING]) || isset($data[self::FIELD_ONSET_STRING_EXT])) { + if (isset($data[self::FIELD_ONSET_STRING])) { + $value = $data[self::FIELD_ONSET_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) { + $ext = $data[self::FIELD_ONSET_STRING_EXT]; } else { - $this->setOnsetString(new FHIRString($data[self::FIELD_ONSET_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOnsetString($value); + } else if (is_array($value)) { + $this->setOnsetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetString(new FHIRString($ext)); } } if (isset($data[self::FIELD_OUTCOME])) { @@ -527,8 +534,8 @@ public function setOutcome(FHIRCodeableConcept $outcome = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -661,14 +668,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetString())) { $a[self::FIELD_ONSET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ONSET_STRING_EXT] = $enc; } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcome.php index 4964bb1549..dd919a15ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRGoalOutcome extends FHIRBackboneElement const FIELD_RESULT_REFERENCE = 'resultReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -234,8 +234,8 @@ public function setResultReference(FHIRReference $resultReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getResultReference())) { $a[self::FIELD_RESULT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php index b5bc8d7bad..3b59654ab6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRGroupCharacteristic extends FHIRBackboneElement const FIELD_VALUE_RANGE = 'valueRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -210,20 +210,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_EXCLUDE])) { - $ext = (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) - ? $data[self::FIELD_EXCLUDE_EXT] - : null; - if ($data[self::FIELD_EXCLUDE] instanceof FHIRBoolean) { - $this->setExclude($data[self::FIELD_EXCLUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDE]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDE]))); - } + if (isset($data[self::FIELD_EXCLUDE]) || isset($data[self::FIELD_EXCLUDE_EXT])) { + if (isset($data[self::FIELD_EXCLUDE])) { + $value = $data[self::FIELD_EXCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_EXT]; } else { - $this->setExclude(new FHIRBoolean($data[self::FIELD_EXCLUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExclude($value); + } else if (is_array($value)) { + $this->setExclude(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExclude(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -233,20 +240,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -539,8 +553,8 @@ public function setValueRange(FHIRRange $valueRange = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -669,8 +683,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExclude())) { $a[self::FIELD_EXCLUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDE_EXT] = $enc; } } @@ -679,8 +695,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -693,6 +711,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValueRange())) { $a[self::FIELD_VALUE_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php index 0e9fc49c0d..a0fe960931 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRGroupMember extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -152,20 +152,27 @@ public function __construct($data = null) $this->setEntity(new FHIRReference($data[self::FIELD_ENTITY])); } } - if (isset($data[self::FIELD_INACTIVE])) { - $ext = (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) - ? $data[self::FIELD_INACTIVE_EXT] - : null; - if ($data[self::FIELD_INACTIVE] instanceof FHIRBoolean) { - $this->setInactive($data[self::FIELD_INACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INACTIVE]))); - } + if (isset($data[self::FIELD_INACTIVE]) || isset($data[self::FIELD_INACTIVE_EXT])) { + if (isset($data[self::FIELD_INACTIVE])) { + $value = $data[self::FIELD_INACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) { + $ext = $data[self::FIELD_INACTIVE_EXT]; } else { - $this->setInactive(new FHIRBoolean($data[self::FIELD_INACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInactive($value); + } else if (is_array($value)) { + $this->setInactive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInactive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -302,8 +309,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -400,14 +407,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getInactive())) { $a[self::FIELD_INACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php index d3db69406f..aea34813a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRHealthcareServiceAvailableTime extends FHIRBackboneElement const FIELD_DAYS_OF_WEEK_EXT = '_daysOfWeek'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -155,81 +155,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALL_DAY])) { - $ext = (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) - ? $data[self::FIELD_ALL_DAY_EXT] - : null; - if ($data[self::FIELD_ALL_DAY] instanceof FHIRBoolean) { - $this->setAllDay($data[self::FIELD_ALL_DAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALL_DAY]] + $ext)); - } else if (is_array($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALL_DAY]))); - } + if (isset($data[self::FIELD_ALL_DAY]) || isset($data[self::FIELD_ALL_DAY_EXT])) { + if (isset($data[self::FIELD_ALL_DAY])) { + $value = $data[self::FIELD_ALL_DAY]; } else { - $this->setAllDay(new FHIRBoolean($data[self::FIELD_ALL_DAY])); + $value = null; } - } - if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_END_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_END_TIME] instanceof FHIRTime) { - $this->setAvailableEndTime($data[self::FIELD_AVAILABLE_END_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_END_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_END_TIME]))); - } + if (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) { + $ext = $data[self::FIELD_ALL_DAY_EXT]; } else { - $this->setAvailableEndTime(new FHIRTime($data[self::FIELD_AVAILABLE_END_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllDay($value); + } else if (is_array($value)) { + $this->setAllDay(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllDay(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_START_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_START_TIME] instanceof FHIRTime) { - $this->setAvailableStartTime($data[self::FIELD_AVAILABLE_START_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_START_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_START_TIME]))); + if (isset($data[self::FIELD_AVAILABLE_END_TIME]) || isset($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { + $value = $data[self::FIELD_AVAILABLE_END_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_END_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableEndTime($value); + } else if (is_array($value)) { + $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAvailableEndTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME]) || isset($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { + $value = $data[self::FIELD_AVAILABLE_START_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_START_TIME_EXT]; } else { - $this->setAvailableStartTime(new FHIRTime($data[self::FIELD_AVAILABLE_START_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableStartTime($value); + } else if (is_array($value)) { + $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailableStartTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_DAYS_OF_WEEK])) { - $ext = (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) - ? $data[self::FIELD_DAYS_OF_WEEK_EXT] - : null; - if (is_array($data[self::FIELD_DAYS_OF_WEEK])) { - foreach($data[self::FIELD_DAYS_OF_WEEK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DAYS_OF_WEEK]) || isset($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + if (isset($data[self::FIELD_DAYS_OF_WEEK])) { + $value = $data[self::FIELD_DAYS_OF_WEEK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + $ext = $data[self::FIELD_DAYS_OF_WEEK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $iext))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($v)); } + } elseif (is_array($value)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($ext, $value))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDaysOfWeek(new FHIRDaysOfWeek($iext)); } - } elseif ($data[self::FIELD_DAYS_OF_WEEK] instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DAYS_OF_WEEK])) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $data[self::FIELD_DAYS_OF_WEEK]] + $ext)); - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK])); } } } @@ -424,8 +454,8 @@ public function setDaysOfWeek(array $daysOfWeek = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -548,39 +578,56 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllDay())) { $a[self::FIELD_ALL_DAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALL_DAY_EXT] = $enc; } } if (null !== ($v = $this->getAvailableEndTime())) { $a[self::FIELD_AVAILABLE_END_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_END_TIME_EXT] = $enc; } } if (null !== ($v = $this->getAvailableStartTime())) { $a[self::FIELD_AVAILABLE_START_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_START_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getDaysOfWeek())) { $a[self::FIELD_DAYS_OF_WEEK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DAYS_OF_WEEK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDaysOfWeek::FIELD_VALUE]) || array_key_exists(FHIRDaysOfWeek::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = null; + unset($enc[FHIRDaysOfWeek::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DAYS_OF_WEEK_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php index e99c468fc6..0fedd8e5d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRHealthcareServiceNotAvailable extends FHIRBackboneElement const FIELD_DURING = 'during'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DURING])) { @@ -250,8 +257,8 @@ public function setDuring(FHIRPeriod $during = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -339,14 +346,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDuring())) { $a[self::FIELD_DURING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceType.php index 77b6be3a1e..a12b8b250e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRHealthcareServiceServiceType extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -276,8 +276,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -363,11 +363,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFrames.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFrames.php index e980dce800..127c84fe4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFrames.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFrames.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRImagingObjectSelectionFrames extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An integer with a value that is not negative (e.g. >= 0) @@ -143,49 +143,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FRAME_NUMBERS])) { - $ext = (isset($data[self::FIELD_FRAME_NUMBERS_EXT]) && is_array($data[self::FIELD_FRAME_NUMBERS_EXT])) - ? $data[self::FIELD_FRAME_NUMBERS_EXT] - : null; - if (is_array($data[self::FIELD_FRAME_NUMBERS])) { - foreach($data[self::FIELD_FRAME_NUMBERS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUnsignedInt) { - $this->addFrameNumbers($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFrameNumbers(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFrameNumbers(new FHIRUnsignedInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FRAME_NUMBERS]) || isset($data[self::FIELD_FRAME_NUMBERS_EXT])) { + if (isset($data[self::FIELD_FRAME_NUMBERS])) { + $value = $data[self::FIELD_FRAME_NUMBERS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FRAME_NUMBERS_EXT]) && is_array($data[self::FIELD_FRAME_NUMBERS_EXT])) { + $ext = $data[self::FIELD_FRAME_NUMBERS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->addFrameNumbers($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUnsignedInt) { + $this->addFrameNumbers($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFrameNumbers(new FHIRUnsignedInt(array_merge($v, $iext))); + } else { + $this->addFrameNumbers(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFrameNumbers(new FHIRUnsignedInt($v)); } + } elseif (is_array($value)) { + $this->addFrameNumbers(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->addFrameNumbers(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFrameNumbers(new FHIRUnsignedInt($iext)); } - } elseif ($data[self::FIELD_FRAME_NUMBERS] instanceof FHIRUnsignedInt) { - $this->addFrameNumbers($data[self::FIELD_FRAME_NUMBERS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FRAME_NUMBERS])) { - $this->addFrameNumbers(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_FRAME_NUMBERS]] + $ext)); - } else { - $this->addFrameNumbers(new FHIRUnsignedInt($data[self::FIELD_FRAME_NUMBERS])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -317,8 +333,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -413,26 +429,39 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getFrameNumbers())) { $a[self::FIELD_FRAME_NUMBERS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FRAME_NUMBERS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FRAME_NUMBERS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUnsignedInt::FIELD_VALUE]) || array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FRAME_NUMBERS_EXT][] = null; + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FRAME_NUMBERS_EXT] = $encs; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstance.php index d08779699d..70d96a0c6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRImagingObjectSelectionInstance extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The @@ -191,52 +191,73 @@ public function __construct($data = null) $this->addFrames(new FHIRImagingObjectSelectionFrames($data[self::FIELD_FRAMES])); } } - if (isset($data[self::FIELD_SOP_CLASS])) { - $ext = (isset($data[self::FIELD_SOP_CLASS_EXT]) && is_array($data[self::FIELD_SOP_CLASS_EXT])) - ? $data[self::FIELD_SOP_CLASS_EXT] - : null; - if ($data[self::FIELD_SOP_CLASS] instanceof FHIROid) { - $this->setSopClass($data[self::FIELD_SOP_CLASS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOP_CLASS])) { - $this->setSopClass(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_SOP_CLASS]] + $ext)); - } else if (is_array($data[self::FIELD_SOP_CLASS])) { - $this->setSopClass(new FHIROid(array_merge($ext, $data[self::FIELD_SOP_CLASS]))); - } + if (isset($data[self::FIELD_SOP_CLASS]) || isset($data[self::FIELD_SOP_CLASS_EXT])) { + if (isset($data[self::FIELD_SOP_CLASS])) { + $value = $data[self::FIELD_SOP_CLASS]; } else { - $this->setSopClass(new FHIROid($data[self::FIELD_SOP_CLASS])); + $value = null; } - } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); - } + if (isset($data[self::FIELD_SOP_CLASS_EXT]) && is_array($data[self::FIELD_SOP_CLASS_EXT])) { + $ext = $data[self::FIELD_SOP_CLASS_EXT]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setSopClass($value); + } else if (is_array($value)) { + $this->setSopClass(new FHIROid(array_merge($ext, $value))); + } else { + $this->setSopClass(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSopClass(new FHIROid($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -461,8 +482,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -584,29 +605,44 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getFrames())) { - $a[self::FIELD_FRAMES] = $vs; + $a[self::FIELD_FRAMES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FRAMES][] = $v; + } } if (null !== ($v = $this->getSopClass())) { $a[self::FIELD_SOP_CLASS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_SOP_CLASS_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeries.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeries.php index c249926255..21cb1a2d22 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeries.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRImagingObjectSelectionSeries extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The @@ -182,36 +182,50 @@ public function __construct($data = null) $this->addInstance(new FHIRImagingObjectSelectionInstance($data[self::FIELD_INSTANCE])); } } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); - } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -398,8 +412,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -507,22 +521,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudy.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudy.php index c4b9042c8f..612b138f1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRImagingObjectSelectionStudy extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -203,36 +203,50 @@ public function __construct($data = null) $this->addSeries(new FHIRImagingObjectSelectionSeries($data[self::FIELD_SERIES])); } } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); - } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -452,8 +466,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -570,22 +584,35 @@ public function jsonSerialize() $a[self::FIELD_IMAGING_STUDY] = $v; } if ([] !== ($vs = $this->getSeries())) { - $a[self::FIELD_SERIES] = $vs; + $a[self::FIELD_SERIES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERIES][] = $v; + } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php index c0643ea1d0..eedf9ce94d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRImagingStudyInstance extends FHIRBackboneElement const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -211,84 +211,119 @@ public function __construct($data = null) $this->addContent(new FHIRAttachment($data[self::FIELD_CONTENT])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRUnsignedInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; } else { - $this->setNumber(new FHIRUnsignedInt($data[self::FIELD_NUMBER])); - } - } - if (isset($data[self::FIELD_SOP_CLASS])) { - $ext = (isset($data[self::FIELD_SOP_CLASS_EXT]) && is_array($data[self::FIELD_SOP_CLASS_EXT])) - ? $data[self::FIELD_SOP_CLASS_EXT] - : null; - if ($data[self::FIELD_SOP_CLASS] instanceof FHIROid) { - $this->setSopClass($data[self::FIELD_SOP_CLASS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOP_CLASS])) { - $this->setSopClass(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_SOP_CLASS]] + $ext)); - } else if (is_array($data[self::FIELD_SOP_CLASS])) { - $this->setSopClass(new FHIROid(array_merge($ext, $data[self::FIELD_SOP_CLASS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumber(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_SOP_CLASS]) || isset($data[self::FIELD_SOP_CLASS_EXT])) { + if (isset($data[self::FIELD_SOP_CLASS])) { + $value = $data[self::FIELD_SOP_CLASS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOP_CLASS_EXT]) && is_array($data[self::FIELD_SOP_CLASS_EXT])) { + $ext = $data[self::FIELD_SOP_CLASS_EXT]; } else { - $this->setSopClass(new FHIROid($data[self::FIELD_SOP_CLASS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setSopClass($value); + } else if (is_array($value)) { + $this->setSopClass(new FHIROid(array_merge($ext, $value))); + } else { + $this->setSopClass(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSopClass(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); } } } @@ -580,8 +615,8 @@ public function setUid($uid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -731,43 +766,62 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getSopClass())) { $a[self::FIELD_SOP_CLASS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_SOP_CLASS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php index cc354dc1f0..50cf1451f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRImagingStudySeries extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Availability of the resource @@ -259,20 +259,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AVAILABILITY])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY] instanceof FHIRInstanceAvailability) { - $this->setAvailability($data[self::FIELD_AVAILABILITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $data[self::FIELD_AVAILABILITY]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $data[self::FIELD_AVAILABILITY]))); - } + if (isset($data[self::FIELD_AVAILABILITY]) || isset($data[self::FIELD_AVAILABILITY_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY])) { + $value = $data[self::FIELD_AVAILABILITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXT]; } else { - $this->setAvailability(new FHIRInstanceAvailability($data[self::FIELD_AVAILABILITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstanceAvailability) { + $this->setAvailability($value); + } else if (is_array($value)) { + $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $value))); + } else { + $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailability(new FHIRInstanceAvailability($ext)); } } if (isset($data[self::FIELD_BODY_SITE])) { @@ -282,20 +289,27 @@ public function __construct($data = null) $this->setBodySite(new FHIRCoding($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_INSTANCE])) { @@ -330,84 +344,119 @@ public function __construct($data = null) $this->setModality(new FHIRCoding($data[self::FIELD_MODALITY])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRUnsignedInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setNumber(new FHIRUnsignedInt($data[self::FIELD_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) - ? $data[self::FIELD_NUMBER_OF_INSTANCES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_INSTANCES] instanceof FHIRUnsignedInt) { - $this->setNumberOfInstances($data[self::FIELD_NUMBER_OF_INSTANCES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_INSTANCES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_INSTANCES]))); - } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; } else { - $this->setNumberOfInstances(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_INSTANCES])); + $ext = []; } - } - if (isset($data[self::FIELD_STARTED])) { - $ext = (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) - ? $data[self::FIELD_STARTED_EXT] - : null; - if ($data[self::FIELD_STARTED] instanceof FHIRDateTime) { - $this->setStarted($data[self::FIELD_STARTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STARTED]] + $ext)); - } else if (is_array($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STARTED]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setStarted(new FHIRDateTime($data[self::FIELD_STARTED])); + } else if ([] !== $ext) { + $this->setNumber(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES]) || isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { + $value = $data[self::FIELD_NUMBER_OF_INSTANCES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_INSTANCES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfInstances($value); + } else if (is_array($value)) { + $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumberOfInstances(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_STARTED]) || isset($data[self::FIELD_STARTED_EXT])) { + if (isset($data[self::FIELD_STARTED])) { + $value = $data[self::FIELD_STARTED]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $value = null; + } + if (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) { + $ext = $data[self::FIELD_STARTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStarted($value); + } else if (is_array($value)) { + $this->setStarted(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStarted(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -857,8 +906,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1047,8 +1096,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAvailability())) { $a[self::FIELD_AVAILABILITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstanceAvailability::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstanceAvailability::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXT] = $enc; } } @@ -1057,13 +1108,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if (null !== ($v = $this->getLaterality())) { $a[self::FIELD_LATERALITY] = $v; @@ -1073,39 +1132,52 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfInstances())) { $a[self::FIELD_NUMBER_OF_INSTANCES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_INSTANCES_EXT] = $enc; } } if (null !== ($v = $this->getStarted())) { $a[self::FIELD_STARTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STARTED_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php index bde33cf24d..838a48453d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRImmunizationExplanation extends FHIRBackboneElement const FIELD_REASON_NOT_GIVEN = 'reasonNotGiven'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -312,8 +312,8 @@ public function setReasonNotGiven(array $reasonNotGiven = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -406,10 +406,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getReasonNotGiven())) { - $a[self::FIELD_REASON_NOT_GIVEN] = $vs; + $a[self::FIELD_REASON_NOT_GIVEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_NOT_GIVEN][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php index 8db92be3c1..fe4ad69d87 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRImmunizationReaction extends FHIRBackboneElement const FIELD_REPORTED_EXT = '_reported'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -147,20 +147,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -170,20 +177,27 @@ public function __construct($data = null) $this->setDetail(new FHIRReference($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_REPORTED])) { - $ext = (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) - ? $data[self::FIELD_REPORTED_EXT] - : null; - if ($data[self::FIELD_REPORTED] instanceof FHIRBoolean) { - $this->setReported($data[self::FIELD_REPORTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPORTED]] + $ext)); - } else if (is_array($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPORTED]))); - } + if (isset($data[self::FIELD_REPORTED]) || isset($data[self::FIELD_REPORTED_EXT])) { + if (isset($data[self::FIELD_REPORTED])) { + $value = $data[self::FIELD_REPORTED]; } else { - $this->setReported(new FHIRBoolean($data[self::FIELD_REPORTED])); + $value = null; + } + if (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) { + $ext = $data[self::FIELD_REPORTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReported($value); + } else if (is_array($value)) { + $this->setReported(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReported(new FHIRBoolean($ext)); } } } @@ -323,8 +337,8 @@ public function setReported($reported = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -426,8 +440,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -436,11 +452,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getReported())) { $a[self::FIELD_REPORTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPORTED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php index c6fa99e5e3..a2b80fc99f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRImmunizationVaccinationProtocol extends FHIRBackboneElement const FIELD_TARGET_DISEASE = 'targetDisease'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -225,36 +225,50 @@ public function __construct($data = null) $this->setAuthority(new FHIRReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_DOSE_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) - ? $data[self::FIELD_DOSE_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_DOSE_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setDoseSequence($data[self::FIELD_DOSE_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DOSE_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DOSE_SEQUENCE]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DOSE_SEQUENCE]) || isset($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DOSE_SEQUENCE])) { + $value = $data[self::FIELD_DOSE_SEQUENCE]; } else { - $this->setDoseSequence(new FHIRPositiveInt($data[self::FIELD_DOSE_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DOSE_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDoseSequence($value); + } else if (is_array($value)) { + $this->setDoseSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDoseSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoseSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_DOSE_STATUS])) { @@ -271,36 +285,50 @@ public function __construct($data = null) $this->setDoseStatusReason(new FHIRCodeableConcept($data[self::FIELD_DOSE_STATUS_REASON])); } } - if (isset($data[self::FIELD_SERIES])) { - $ext = (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) - ? $data[self::FIELD_SERIES_EXT] - : null; - if ($data[self::FIELD_SERIES] instanceof FHIRString) { - $this->setSeries($data[self::FIELD_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES]))); - } + if (isset($data[self::FIELD_SERIES]) || isset($data[self::FIELD_SERIES_EXT])) { + if (isset($data[self::FIELD_SERIES])) { + $value = $data[self::FIELD_SERIES]; } else { - $this->setSeries(new FHIRString($data[self::FIELD_SERIES])); + $value = null; } - } - if (isset($data[self::FIELD_SERIES_DOSES])) { - $ext = (isset($data[self::FIELD_SERIES_DOSES_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_EXT])) - ? $data[self::FIELD_SERIES_DOSES_EXT] - : null; - if ($data[self::FIELD_SERIES_DOSES] instanceof FHIRPositiveInt) { - $this->setSeriesDoses($data[self::FIELD_SERIES_DOSES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES_DOSES])) { - $this->setSeriesDoses(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SERIES_DOSES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES_DOSES])) { - $this->setSeriesDoses(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SERIES_DOSES]))); + if (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) { + $ext = $data[self::FIELD_SERIES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeries($value); + } else if (is_array($value)) { + $this->setSeries(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeries(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SERIES_DOSES]) || isset($data[self::FIELD_SERIES_DOSES_EXT])) { + if (isset($data[self::FIELD_SERIES_DOSES])) { + $value = $data[self::FIELD_SERIES_DOSES]; } else { - $this->setSeriesDoses(new FHIRPositiveInt($data[self::FIELD_SERIES_DOSES])); + $value = null; + } + if (isset($data[self::FIELD_SERIES_DOSES_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_EXT])) { + $ext = $data[self::FIELD_SERIES_DOSES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSeriesDoses($value); + } else if (is_array($value)) { + $this->setSeriesDoses(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSeriesDoses(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeriesDoses(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_TARGET_DISEASE])) { @@ -659,8 +687,8 @@ public function setTargetDisease(array $targetDisease = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -818,15 +846,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoseSequence())) { $a[self::FIELD_DOSE_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DOSE_SEQUENCE_EXT] = $enc; } } @@ -838,20 +870,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getSeries())) { $a[self::FIELD_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_EXT] = $enc; } } if (null !== ($v = $this->getSeriesDoses())) { $a[self::FIELD_SERIES_DOSES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SERIES_DOSES_EXT] = $enc; } } if ([] !== ($vs = $this->getTargetDisease())) { - $a[self::FIELD_TARGET_DISEASE] = $vs; + $a[self::FIELD_TARGET_DISEASE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET_DISEASE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php index 2e6ed01360..5553ed00a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRImmunizationRecommendationDateCriterion extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -143,20 +143,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDateTime) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDateTime($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDateTime($ext)); } } } @@ -264,8 +271,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -357,11 +364,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php index 6b6a2da02b..42b09d0127 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRImmunizationRecommendationProtocol extends FHIRBackboneElement const FIELD_SERIES_EXT = '_series'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -168,52 +168,73 @@ public function __construct($data = null) $this->setAuthority(new FHIRReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_DOSE_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) - ? $data[self::FIELD_DOSE_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_DOSE_SEQUENCE] instanceof FHIRInteger) { - $this->setDoseSequence($data[self::FIELD_DOSE_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DOSE_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRInteger(array_merge($ext, $data[self::FIELD_DOSE_SEQUENCE]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDoseSequence(new FHIRInteger($data[self::FIELD_DOSE_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SERIES])) { - $ext = (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) - ? $data[self::FIELD_SERIES_EXT] - : null; - if ($data[self::FIELD_SERIES] instanceof FHIRString) { - $this->setSeries($data[self::FIELD_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES]))); + if (isset($data[self::FIELD_DOSE_SEQUENCE]) || isset($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DOSE_SEQUENCE])) { + $value = $data[self::FIELD_DOSE_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DOSE_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDoseSequence($value); + } else if (is_array($value)) { + $this->setDoseSequence(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDoseSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDoseSequence(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_SERIES]) || isset($data[self::FIELD_SERIES_EXT])) { + if (isset($data[self::FIELD_SERIES])) { + $value = $data[self::FIELD_SERIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) { + $ext = $data[self::FIELD_SERIES_EXT]; } else { - $this->setSeries(new FHIRString($data[self::FIELD_SERIES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeries($value); + } else if (is_array($value)) { + $this->setSeries(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeries(new FHIRString($ext)); } } } @@ -393,8 +414,8 @@ public function setSeries($series = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -513,25 +534,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoseSequence())) { $a[self::FIELD_DOSE_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DOSE_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getSeries())) { $a[self::FIELD_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php index e6d29b4719..df80dea83f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRImmunizationRecommendationRecommendation extends FHIRBackboneElement const FIELD_VACCINE_CODE = 'vaccineCode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -215,20 +215,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DATE_CRITERION])) { @@ -249,20 +256,27 @@ public function __construct($data = null) $this->addDateCriterion(new FHIRImmunizationRecommendationDateCriterion($data[self::FIELD_DATE_CRITERION])); } } - if (isset($data[self::FIELD_DOSE_NUMBER])) { - $ext = (isset($data[self::FIELD_DOSE_NUMBER_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_EXT])) - ? $data[self::FIELD_DOSE_NUMBER_EXT] - : null; - if ($data[self::FIELD_DOSE_NUMBER] instanceof FHIRPositiveInt) { - $this->setDoseNumber($data[self::FIELD_DOSE_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_NUMBER])) { - $this->setDoseNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DOSE_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_NUMBER])) { - $this->setDoseNumber(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DOSE_NUMBER]))); - } + if (isset($data[self::FIELD_DOSE_NUMBER]) || isset($data[self::FIELD_DOSE_NUMBER_EXT])) { + if (isset($data[self::FIELD_DOSE_NUMBER])) { + $value = $data[self::FIELD_DOSE_NUMBER]; } else { - $this->setDoseNumber(new FHIRPositiveInt($data[self::FIELD_DOSE_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_DOSE_NUMBER_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_EXT])) { + $ext = $data[self::FIELD_DOSE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDoseNumber($value); + } else if (is_array($value)) { + $this->setDoseNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDoseNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoseNumber(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_FORECAST_STATUS])) { @@ -703,8 +717,8 @@ public function setVaccineCode(FHIRCodeableConcept $vaccineCode = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -857,18 +871,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDateCriterion())) { - $a[self::FIELD_DATE_CRITERION] = $vs; + $a[self::FIELD_DATE_CRITERION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATE_CRITERION][] = $v; + } } if (null !== ($v = $this->getDoseNumber())) { $a[self::FIELD_DOSE_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DOSE_NUMBER_EXT] = $enc; } } @@ -879,14 +903,29 @@ public function jsonSerialize() $a[self::FIELD_PROTOCOL] = $v; } if ([] !== ($vs = $this->getSupportingImmunization())) { - $a[self::FIELD_SUPPORTING_IMMUNIZATION] = $vs; + $a[self::FIELD_SUPPORTING_IMMUNIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_IMMUNIZATION][] = $v; + } } if ([] !== ($vs = $this->getSupportingPatientInformation())) { - $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION][] = $v; + } } if (null !== ($v = $this->getVaccineCode())) { $a[self::FIELD_VACCINE_CODE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContact.php index 19ab1ad47b..0f3809b2e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRImplementationGuideContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,20 +132,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -290,8 +297,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,13 +393,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php index ec1ad832be..9c4ce0fedf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRImplementationGuideDependency extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How a dependency is represented when the guide is published. @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRGuideDependencyType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGuideDependencyType([FHIRGuideDependencyType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGuideDependencyType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRGuideDependencyType($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGuideDependencyType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRGuideDependencyType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRGuideDependencyType([FHIRGuideDependencyType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRGuideDependencyType($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -256,8 +270,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -345,18 +359,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGuideDependencyType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGuideDependencyType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php index 9a55026d74..10245cd462 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRImplementationGuideGlobal extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -139,20 +139,27 @@ public function __construct($data = null) $this->setProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -252,8 +259,8 @@ public function setType($type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -344,11 +351,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php index d739033c34..b715fee58d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRImplementationGuidePackage extends FHIRBackboneElement const FIELD_RESOURCE = 'resource'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -150,36 +150,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -368,8 +382,8 @@ public function setResource(array $resource = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -478,20 +492,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php index 5f02a50b88..3186097da2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRImplementationGuidePage extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -203,81 +203,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FORMAT])) { - $ext = (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) - ? $data[self::FIELD_FORMAT_EXT] - : null; - if ($data[self::FIELD_FORMAT] instanceof FHIRCode) { - $this->setFormat($data[self::FIELD_FORMAT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FORMAT])) { - $this->setFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FORMAT]] + $ext)); - } else if (is_array($data[self::FIELD_FORMAT])) { - $this->setFormat(new FHIRCode(array_merge($ext, $data[self::FIELD_FORMAT]))); - } + if (isset($data[self::FIELD_FORMAT]) || isset($data[self::FIELD_FORMAT_EXT])) { + if (isset($data[self::FIELD_FORMAT])) { + $value = $data[self::FIELD_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) { + $ext = $data[self::FIELD_FORMAT_EXT]; } else { - $this->setFormat(new FHIRCode($data[self::FIELD_FORMAT])); - } - } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRGuidePageKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRGuidePageKind([FHIRGuidePageKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRGuidePageKind(array_merge($ext, $data[self::FIELD_KIND]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setFormat($value); + } else if (is_array($value)) { + $this->setFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFormat(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRGuidePageKind($data[self::FIELD_KIND])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGuidePageKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRGuidePageKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRGuidePageKind([FHIRGuidePageKind::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKind(new FHIRGuidePageKind($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PACKAGE])) { - $ext = (isset($data[self::FIELD_PACKAGE_EXT]) && is_array($data[self::FIELD_PACKAGE_EXT])) - ? $data[self::FIELD_PACKAGE_EXT] - : null; - if (is_array($data[self::FIELD_PACKAGE])) { - foreach($data[self::FIELD_PACKAGE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPackage($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPackage(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPackage(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PACKAGE]) || isset($data[self::FIELD_PACKAGE_EXT])) { + if (isset($data[self::FIELD_PACKAGE])) { + $value = $data[self::FIELD_PACKAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PACKAGE_EXT]) && is_array($data[self::FIELD_PACKAGE_EXT])) { + $ext = $data[self::FIELD_PACKAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPackage($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPackage($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPackage(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPackage(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPackage(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPackage(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPackage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPackage(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PACKAGE] instanceof FHIRString) { - $this->addPackage($data[self::FIELD_PACKAGE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PACKAGE])) { - $this->addPackage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PACKAGE]] + $ext)); - } else { - $this->addPackage(new FHIRString($data[self::FIELD_PACKAGE])); } } if (isset($data[self::FIELD_PAGE])) { @@ -298,49 +328,65 @@ public function __construct($data = null) $this->addPage(new FHIRImplementationGuidePage($data[self::FIELD_PAGE])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if (is_array($data[self::FIELD_TYPE])) { - foreach($data[self::FIELD_TYPE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addType($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addType(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addType($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addType($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addType(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addType(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addType(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->addType($data[self::FIELD_TYPE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TYPE])) { - $this->addType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else { - $this->addType(new FHIRCode($data[self::FIELD_TYPE])); } } } @@ -710,8 +756,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -866,64 +912,97 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFormat())) { $a[self::FIELD_FORMAT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_FORMAT_EXT] = $enc; } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGuidePageKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGuidePageKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPackage())) { $a[self::FIELD_PACKAGE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PACKAGE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PACKAGE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PACKAGE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PACKAGE_EXT] = $encs; + } } if ([] !== ($vs = $this->getPage())) { - $a[self::FIELD_PAGE] = $vs; + $a[self::FIELD_PAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAGE][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { $a[self::FIELD_TYPE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TYPE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TYPE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TYPE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TYPE_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php index 7e361b9251..6d046ae69c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRImplementationGuideResource extends FHIRBackboneElement const FIELD_SOURCE_URI_EXT = '_sourceUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -200,36 +200,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACRONYM])) { - $ext = (isset($data[self::FIELD_ACRONYM_EXT]) && is_array($data[self::FIELD_ACRONYM_EXT])) - ? $data[self::FIELD_ACRONYM_EXT] - : null; - if ($data[self::FIELD_ACRONYM] instanceof FHIRString) { - $this->setAcronym($data[self::FIELD_ACRONYM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACRONYM])) { - $this->setAcronym(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ACRONYM]] + $ext)); - } else if (is_array($data[self::FIELD_ACRONYM])) { - $this->setAcronym(new FHIRString(array_merge($ext, $data[self::FIELD_ACRONYM]))); - } + if (isset($data[self::FIELD_ACRONYM]) || isset($data[self::FIELD_ACRONYM_EXT])) { + if (isset($data[self::FIELD_ACRONYM])) { + $value = $data[self::FIELD_ACRONYM]; } else { - $this->setAcronym(new FHIRString($data[self::FIELD_ACRONYM])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_ACRONYM_EXT]) && is_array($data[self::FIELD_ACRONYM_EXT])) { + $ext = $data[self::FIELD_ACRONYM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAcronym($value); + } else if (is_array($value)) { + $this->setAcronym(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAcronym(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAcronym(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_EXAMPLE_FOR])) { @@ -239,36 +253,50 @@ public function __construct($data = null) $this->setExampleFor(new FHIRReference($data[self::FIELD_EXAMPLE_FOR])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRGuideResourcePurpose) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRGuideResourcePurpose([FHIRGuideResourcePurpose::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRGuideResourcePurpose(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRGuideResourcePurpose($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGuideResourcePurpose) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRGuideResourcePurpose(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRGuideResourcePurpose([FHIRGuideResourcePurpose::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRGuideResourcePurpose($ext)); } } if (isset($data[self::FIELD_SOURCE_REFERENCE])) { @@ -278,20 +306,27 @@ public function __construct($data = null) $this->setSourceReference(new FHIRReference($data[self::FIELD_SOURCE_REFERENCE])); } } - if (isset($data[self::FIELD_SOURCE_URI])) { - $ext = (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) - ? $data[self::FIELD_SOURCE_URI_EXT] - : null; - if ($data[self::FIELD_SOURCE_URI] instanceof FHIRUri) { - $this->setSourceUri($data[self::FIELD_SOURCE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE_URI]))); - } + if (isset($data[self::FIELD_SOURCE_URI]) || isset($data[self::FIELD_SOURCE_URI_EXT])) { + if (isset($data[self::FIELD_SOURCE_URI])) { + $value = $data[self::FIELD_SOURCE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) { + $ext = $data[self::FIELD_SOURCE_URI_EXT]; } else { - $this->setSourceUri(new FHIRUri($data[self::FIELD_SOURCE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSourceUri($value); + } else if (is_array($value)) { + $this->setSourceUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSourceUri(new FHIRUri($ext)); } } } @@ -569,8 +604,8 @@ public function setSourceUri($sourceUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -712,15 +747,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAcronym())) { $a[self::FIELD_ACRONYM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ACRONYM_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -729,15 +768,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGuideResourcePurpose::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGuideResourcePurpose::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } @@ -746,11 +789,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSourceUri())) { $a[self::FIELD_SOURCE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php index 57a78934da..a8c1f33b8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRListEntry extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -160,36 +160,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DELETED])) { - $ext = (isset($data[self::FIELD_DELETED_EXT]) && is_array($data[self::FIELD_DELETED_EXT])) - ? $data[self::FIELD_DELETED_EXT] - : null; - if ($data[self::FIELD_DELETED] instanceof FHIRBoolean) { - $this->setDeleted($data[self::FIELD_DELETED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DELETED])) { - $this->setDeleted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DELETED]] + $ext)); - } else if (is_array($data[self::FIELD_DELETED])) { - $this->setDeleted(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DELETED]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DELETED]) || isset($data[self::FIELD_DELETED_EXT])) { + if (isset($data[self::FIELD_DELETED])) { + $value = $data[self::FIELD_DELETED]; } else { - $this->setDeleted(new FHIRBoolean($data[self::FIELD_DELETED])); + $value = null; + } + if (isset($data[self::FIELD_DELETED_EXT]) && is_array($data[self::FIELD_DELETED_EXT])) { + $ext = $data[self::FIELD_DELETED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeleted($value); + } else if (is_array($value)) { + $this->setDeleted(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeleted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeleted(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FLAG])) { @@ -377,8 +391,8 @@ public function setItem(FHIRReference $item = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -486,15 +500,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDeleted())) { $a[self::FIELD_DELETED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DELETED_EXT] = $enc; } } @@ -504,6 +522,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItem())) { $a[self::FIELD_ITEM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php index 7e9b021ac3..fd24b3f703 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRLocationPosition extends FHIRBackboneElement const FIELD_LONGITUDE_EXT = '_longitude'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -150,52 +150,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALTITUDE])) { - $ext = (isset($data[self::FIELD_ALTITUDE_EXT]) && is_array($data[self::FIELD_ALTITUDE_EXT])) - ? $data[self::FIELD_ALTITUDE_EXT] - : null; - if ($data[self::FIELD_ALTITUDE] instanceof FHIRDecimal) { - $this->setAltitude($data[self::FIELD_ALTITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALTITUDE])) { - $this->setAltitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ALTITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_ALTITUDE])) { - $this->setAltitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ALTITUDE]))); - } + if (isset($data[self::FIELD_ALTITUDE]) || isset($data[self::FIELD_ALTITUDE_EXT])) { + if (isset($data[self::FIELD_ALTITUDE])) { + $value = $data[self::FIELD_ALTITUDE]; } else { - $this->setAltitude(new FHIRDecimal($data[self::FIELD_ALTITUDE])); + $value = null; } - } - if (isset($data[self::FIELD_LATITUDE])) { - $ext = (isset($data[self::FIELD_LATITUDE_EXT]) && is_array($data[self::FIELD_LATITUDE_EXT])) - ? $data[self::FIELD_LATITUDE_EXT] - : null; - if ($data[self::FIELD_LATITUDE] instanceof FHIRDecimal) { - $this->setLatitude($data[self::FIELD_LATITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LATITUDE])) { - $this->setLatitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LATITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_LATITUDE])) { - $this->setLatitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LATITUDE]))); - } + if (isset($data[self::FIELD_ALTITUDE_EXT]) && is_array($data[self::FIELD_ALTITUDE_EXT])) { + $ext = $data[self::FIELD_ALTITUDE_EXT]; } else { - $this->setLatitude(new FHIRDecimal($data[self::FIELD_LATITUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAltitude($value); + } else if (is_array($value)) { + $this->setAltitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAltitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAltitude(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_LONGITUDE])) { - $ext = (isset($data[self::FIELD_LONGITUDE_EXT]) && is_array($data[self::FIELD_LONGITUDE_EXT])) - ? $data[self::FIELD_LONGITUDE_EXT] - : null; - if ($data[self::FIELD_LONGITUDE] instanceof FHIRDecimal) { - $this->setLongitude($data[self::FIELD_LONGITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LONGITUDE])) { - $this->setLongitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LONGITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_LONGITUDE])) { - $this->setLongitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LONGITUDE]))); + if (isset($data[self::FIELD_LATITUDE]) || isset($data[self::FIELD_LATITUDE_EXT])) { + if (isset($data[self::FIELD_LATITUDE])) { + $value = $data[self::FIELD_LATITUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LATITUDE_EXT]) && is_array($data[self::FIELD_LATITUDE_EXT])) { + $ext = $data[self::FIELD_LATITUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLatitude($value); + } else if (is_array($value)) { + $this->setLatitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLatitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLatitude(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_LONGITUDE]) || isset($data[self::FIELD_LONGITUDE_EXT])) { + if (isset($data[self::FIELD_LONGITUDE])) { + $value = $data[self::FIELD_LONGITUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LONGITUDE_EXT]) && is_array($data[self::FIELD_LONGITUDE_EXT])) { + $ext = $data[self::FIELD_LONGITUDE_EXT]; } else { - $this->setLongitude(new FHIRDecimal($data[self::FIELD_LONGITUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLongitude($value); + } else if (is_array($value)) { + $this->setLongitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLongitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLongitude(new FHIRDecimal($ext)); } } } @@ -351,8 +372,8 @@ public function setLongitude($longitude = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -462,25 +483,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAltitude())) { $a[self::FIELD_ALTITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ALTITUDE_EXT] = $enc; } } if (null !== ($v = $this->getLatitude())) { $a[self::FIELD_LATITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LATITUDE_EXT] = $enc; } } if (null !== ($v = $this->getLongitude())) { $a[self::FIELD_LONGITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LONGITUDE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php index 0e8e38944a..6b53b0a899 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicationBatch extends FHIRBackboneElement const FIELD_LOT_NUMBER_EXT = '_lotNumber'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPIRATION_DATE])) { - $ext = (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) - ? $data[self::FIELD_EXPIRATION_DATE_EXT] - : null; - if ($data[self::FIELD_EXPIRATION_DATE] instanceof FHIRDateTime) { - $this->setExpirationDate($data[self::FIELD_EXPIRATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRATION_DATE]))); - } + if (isset($data[self::FIELD_EXPIRATION_DATE]) || isset($data[self::FIELD_EXPIRATION_DATE_EXT])) { + if (isset($data[self::FIELD_EXPIRATION_DATE])) { + $value = $data[self::FIELD_EXPIRATION_DATE]; } else { - $this->setExpirationDate(new FHIRDateTime($data[self::FIELD_EXPIRATION_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); + if (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) { + $ext = $data[self::FIELD_EXPIRATION_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpirationDate($value); + } else if (is_array($value)) { + $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpirationDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); } } } @@ -275,8 +289,8 @@ public function setLotNumber($lotNumber = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -372,18 +386,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpirationDate())) { $a[self::FIELD_EXPIRATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRATION_DATE_EXT] = $enc; } } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php index 105faeffeb..f1b9701103 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicationContent extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The amount of the product that is in the package. @@ -218,8 +218,8 @@ public function setItem(FHIRReference $item = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -303,6 +303,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItem())) { $a[self::FIELD_ITEM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php index b583abb222..1a1cd6fb18 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicationIngredient extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A relationship of two Quantity values - expressed as a numerator and a @@ -239,8 +239,8 @@ public function setItem(FHIRReference $item = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItem())) { $a[self::FIELD_ITEM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php index 4ddd104c37..a8b9a48179 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationPackage extends FHIRBackboneElement const FIELD_CONTENT = 'content'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -265,8 +265,8 @@ public function setContent(array $content = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -355,7 +355,16 @@ public function jsonSerialize() $a[self::FIELD_CONTAINER] = $v; } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php index 56f1b8f889..0c17d6423f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProduct.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicationProduct extends FHIRBackboneElement const FIELD_INGREDIENT = 'ingredient'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource is primarily used for the identification and definition of a @@ -351,8 +351,8 @@ public function setIngredient(array $ingredient = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -451,13 +451,28 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBatch())) { - $a[self::FIELD_BATCH] = $vs; + $a[self::FIELD_BATCH] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BATCH][] = $v; + } } if (null !== ($v = $this->getForm())) { $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php index 661cecf8fb..8a2202f334 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRMedicationAdministrationDosage extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -280,20 +280,27 @@ public function __construct($data = null) $this->setSiteReference(new FHIRReference($data[self::FIELD_SITE_REFERENCE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -615,8 +622,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -761,11 +768,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstruction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstruction.php index 60e7deab89..33f69e72dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstruction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstruction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRMedicationDispenseDosageInstruction extends FHIRBackboneElement const FIELD_TIMING = 'timing'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -325,20 +325,27 @@ public function __construct($data = null) $this->setAdditionalInstructions(new FHIRCodeableConcept($data[self::FIELD_ADDITIONAL_INSTRUCTIONS])); } } - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -411,20 +418,27 @@ public function __construct($data = null) $this->setSiteReference(new FHIRReference($data[self::FIELD_SITE_REFERENCE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TIMING])) { @@ -967,8 +981,8 @@ public function setTiming(FHIRTiming $timing = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1139,8 +1153,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -1176,14 +1192,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTiming())) { $a[self::FIELD_TIMING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php index 89d0459c19..689644d135 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMedicationDispenseSubstitution extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -369,8 +369,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -469,14 +469,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getResponsibleParty())) { - $a[self::FIELD_RESPONSIBLE_PARTY] = $vs; + $a[self::FIELD_RESPONSIBLE_PARTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESPONSIBLE_PARTY][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequest.php index 8231694828..3d7ea869b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRMedicationOrderDispenseRequest extends FHIRBackboneElement const FIELD_VALIDITY_PERIOD = 'validityPeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Identifies the period time over which the supplied product is expected to be @@ -210,20 +210,27 @@ public function __construct($data = null) $this->setMedicationReference(new FHIRReference($data[self::FIELD_MEDICATION_REFERENCE])); } } - if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]) && is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) - ? $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] instanceof FHIRPositiveInt) { - $this->setNumberOfRepeatsAllowed($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]))); - } + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]) || isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $value = $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]) && is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]; } else { - $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setNumberOfRepeatsAllowed($value); + } else if (is_array($value)) { + $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -465,8 +472,8 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -587,8 +594,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumberOfRepeatsAllowed())) { $a[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT] = $enc; } } @@ -598,6 +607,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValidityPeriod())) { $a[self::FIELD_VALIDITY_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstruction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstruction.php index f9b87e5921..467373b84e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstruction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstruction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRMedicationOrderDosageInstruction extends FHIRBackboneElement const FIELD_TIMING = 'timing'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -325,20 +325,27 @@ public function __construct($data = null) $this->setAdditionalInstructions(new FHIRCodeableConcept($data[self::FIELD_ADDITIONAL_INSTRUCTIONS])); } } - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -411,20 +418,27 @@ public function __construct($data = null) $this->setSiteReference(new FHIRReference($data[self::FIELD_SITE_REFERENCE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TIMING])) { @@ -967,8 +981,8 @@ public function setTiming(FHIRTiming $timing = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1139,8 +1153,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -1176,14 +1192,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTiming())) { $a[self::FIELD_TIMING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitution.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitution.php index 5b8eb78998..848cb9d0eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRMedicationOrderSubstitution extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -243,8 +243,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -328,6 +328,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php index 2e41a42699..2aaeb79697 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRMedicationStatementDosage extends FHIRBackboneElement const FIELD_TIMING = 'timing'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -321,20 +321,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -407,20 +414,27 @@ public function __construct($data = null) $this->setSiteReference(new FHIRReference($data[self::FIELD_SITE_REFERENCE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TIMING])) { @@ -931,8 +945,8 @@ public function setTiming(FHIRTiming $timing = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1094,8 +1108,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -1131,14 +1147,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTiming())) { $a[self::FIELD_TIMING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php index f82cc9e957..489f9fd0c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMessageHeaderDestination extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -147,36 +147,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUri) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUri($data[self::FIELD_ENDPOINT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -321,8 +335,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -424,21 +438,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php index e3a3d34efe..43e5d62e32 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMessageHeaderResponse extends FHIRBackboneElement const FIELD_IDENTIFIER_EXT = '_identifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of response to a message @@ -149,20 +149,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRResponseType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResponseType([FHIRResponseType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResponseType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRResponseType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResponseType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRResponseType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRResponseType([FHIRResponseType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRResponseType($ext)); } } if (isset($data[self::FIELD_DETAILS])) { @@ -172,20 +179,27 @@ public function __construct($data = null) $this->setDetails(new FHIRReference($data[self::FIELD_DETAILS])); } } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRId) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; } else { - $this->setIdentifier(new FHIRId($data[self::FIELD_IDENTIFIER])); + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRId($ext)); } } } @@ -319,8 +333,8 @@ public function setIdentifier($identifier = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -414,8 +428,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResponseType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResponseType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } @@ -424,11 +440,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php index a7d9922216..08a725c076 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMessageHeaderSource extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details for all kinds of technology mediated contact points for a person or @@ -182,68 +182,96 @@ public function __construct($data = null) $this->setContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUri) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUri($data[self::FIELD_ENDPOINT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_SOFTWARE])) { - $ext = (isset($data[self::FIELD_SOFTWARE_EXT]) && is_array($data[self::FIELD_SOFTWARE_EXT])) - ? $data[self::FIELD_SOFTWARE_EXT] - : null; - if ($data[self::FIELD_SOFTWARE] instanceof FHIRString) { - $this->setSoftware($data[self::FIELD_SOFTWARE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOFTWARE])) { - $this->setSoftware(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOFTWARE]] + $ext)); - } else if (is_array($data[self::FIELD_SOFTWARE])) { - $this->setSoftware(new FHIRString(array_merge($ext, $data[self::FIELD_SOFTWARE]))); + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setSoftware(new FHIRString($data[self::FIELD_SOFTWARE])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SOFTWARE]) || isset($data[self::FIELD_SOFTWARE_EXT])) { + if (isset($data[self::FIELD_SOFTWARE])) { + $value = $data[self::FIELD_SOFTWARE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOFTWARE_EXT]) && is_array($data[self::FIELD_SOFTWARE_EXT])) { + $ext = $data[self::FIELD_SOFTWARE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSoftware($value); + } else if (is_array($value)) { + $this->setSoftware(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSoftware(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSoftware(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -461,8 +489,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -595,32 +623,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getSoftware())) { $a[self::FIELD_SOFTWARE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOFTWARE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContact.php index eb09479325..8e0d8cc40d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRNamingSystemContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,20 +132,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -290,8 +297,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,13 +393,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php index a23a805edc..b664da120c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRNamingSystemUniqueId extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -167,52 +167,73 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_PREFERRED])) { - $ext = (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) - ? $data[self::FIELD_PREFERRED_EXT] - : null; - if ($data[self::FIELD_PREFERRED] instanceof FHIRBoolean) { - $this->setPreferred($data[self::FIELD_PREFERRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PREFERRED]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PREFERRED]))); - } + if (isset($data[self::FIELD_PREFERRED]) || isset($data[self::FIELD_PREFERRED_EXT])) { + if (isset($data[self::FIELD_PREFERRED])) { + $value = $data[self::FIELD_PREFERRED]; } else { - $this->setPreferred(new FHIRBoolean($data[self::FIELD_PREFERRED])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRNamingSystemIdentifierType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNamingSystemIdentifierType([FHIRNamingSystemIdentifierType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNamingSystemIdentifierType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) { + $ext = $data[self::FIELD_PREFERRED_EXT]; } else { - $this->setType(new FHIRNamingSystemIdentifierType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPreferred($value); + } else if (is_array($value)) { + $this->setPreferred(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreferred(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNamingSystemIdentifierType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRNamingSystemIdentifierType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRNamingSystemIdentifierType([FHIRNamingSystemIdentifierType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRNamingSystemIdentifierType($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -380,8 +401,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -493,25 +514,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getPreferred())) { $a[self::FIELD_PREFERRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PREFERRED_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNamingSystemIdentifierType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNamingSystemIdentifierType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php index f75fc3f26a..dd23f91894 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRNutritionOrderAdministration extends FHIRBackboneElement const FIELD_SCHEDULE = 'schedule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The volume of formula to provide to the patient per the specified administration @@ -329,8 +329,8 @@ public function setSchedule(FHIRTiming $schedule = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -432,6 +432,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSchedule())) { $a[self::FIELD_SCHEDULE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php index 5e505ca4f5..0d99a9409d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRNutritionOrderEnteralFormula extends FHIRBackboneElement const FIELD_ROUTEOF_ADMINISTRATION = 'routeofAdministration'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -225,20 +225,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_ADDITIVE_PRODUCT_NAME] instanceof FHIRString) { - $this->setAdditiveProductName($data[self::FIELD_ADDITIVE_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { - $this->setAdditiveProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADDITIVE_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { - $this->setAdditiveProductName(new FHIRString(array_merge($ext, $data[self::FIELD_ADDITIVE_PRODUCT_NAME]))); - } + if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME]) || isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { + $value = $data[self::FIELD_ADDITIVE_PRODUCT_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT]; } else { - $this->setAdditiveProductName(new FHIRString($data[self::FIELD_ADDITIVE_PRODUCT_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAdditiveProductName($value); + } else if (is_array($value)) { + $this->setAdditiveProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAdditiveProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAdditiveProductName(new FHIRString($ext)); } } if (isset($data[self::FIELD_ADDITIVE_TYPE])) { @@ -266,36 +273,50 @@ public function __construct($data = null) $this->addAdministration(new FHIRNutritionOrderAdministration($data[self::FIELD_ADMINISTRATION])); } } - if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT]) && is_array($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT])) - ? $data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_ADMINISTRATION_INSTRUCTION] instanceof FHIRString) { - $this->setAdministrationInstruction($data[self::FIELD_ADMINISTRATION_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { - $this->setAdministrationInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADMINISTRATION_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { - $this->setAdministrationInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_ADMINISTRATION_INSTRUCTION]))); - } + if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION]) || isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { + $value = $data[self::FIELD_ADMINISTRATION_INSTRUCTION]; } else { - $this->setAdministrationInstruction(new FHIRString($data[self::FIELD_ADMINISTRATION_INSTRUCTION])); + $value = null; } - } - if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME] instanceof FHIRString) { - $this->setBaseFormulaProductName($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { - $this->setBaseFormulaProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { - $this->setBaseFormulaProductName(new FHIRString(array_merge($ext, $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]))); + if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT]) && is_array($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAdministrationInstruction($value); + } else if (is_array($value)) { + $this->setAdministrationInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAdministrationInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAdministrationInstruction(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]) || isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { + $value = $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]; } else { - $this->setBaseFormulaProductName(new FHIRString($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])); + $value = null; + } + if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBaseFormulaProductName($value); + } else if (is_array($value)) { + $this->setBaseFormulaProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBaseFormulaProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBaseFormulaProductName(new FHIRString($ext)); } } if (isset($data[self::FIELD_BASE_FORMULA_TYPE])) { @@ -691,8 +712,8 @@ public function setRouteofAdministration(FHIRCodeableConcept $routeofAdministrat */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -845,8 +866,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAdditiveProductName())) { $a[self::FIELD_ADDITIVE_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT] = $enc; } } @@ -854,19 +877,29 @@ public function jsonSerialize() $a[self::FIELD_ADDITIVE_TYPE] = $v; } if ([] !== ($vs = $this->getAdministration())) { - $a[self::FIELD_ADMINISTRATION] = $vs; + $a[self::FIELD_ADMINISTRATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADMINISTRATION][] = $v; + } } if (null !== ($v = $this->getAdministrationInstruction())) { $a[self::FIELD_ADMINISTRATION_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT] = $enc; } } if (null !== ($v = $this->getBaseFormulaProductName())) { $a[self::FIELD_BASE_FORMULA_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT] = $enc; } } @@ -882,6 +915,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRouteofAdministration())) { $a[self::FIELD_ROUTEOF_ADMINISTRATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php index e51424ef85..d7b6e08d8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRNutritionOrderNutrient extends FHIRBackboneElement const FIELD_MODIFIER = 'modifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The quantity of the specified nutrient to include in diet. @@ -221,8 +221,8 @@ public function setModifier(FHIRCodeableConcept $modifier = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -306,6 +306,9 @@ public function jsonSerialize() if (null !== ($v = $this->getModifier())) { $a[self::FIELD_MODIFIER] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php index 3e34368edc..a874eb2a4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRNutritionOrderOralDiet extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -204,20 +204,27 @@ public function __construct($data = null) $this->addFluidConsistencyType(new FHIRCodeableConcept($data[self::FIELD_FLUID_CONSISTENCY_TYPE])); } } - if (isset($data[self::FIELD_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) - ? $data[self::FIELD_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_INSTRUCTION] instanceof FHIRString) { - $this->setInstruction($data[self::FIELD_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_INSTRUCTION]))); - } + if (isset($data[self::FIELD_INSTRUCTION]) || isset($data[self::FIELD_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_INSTRUCTION])) { + $value = $data[self::FIELD_INSTRUCTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_INSTRUCTION_EXT]; } else { - $this->setInstruction(new FHIRString($data[self::FIELD_INSTRUCTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setInstruction($value); + } else if (is_array($value)) { + $this->setInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInstruction(new FHIRString($ext)); } } if (isset($data[self::FIELD_NUTRIENT])) { @@ -658,8 +665,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -805,26 +812,61 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getFluidConsistencyType())) { - $a[self::FIELD_FLUID_CONSISTENCY_TYPE] = $vs; + $a[self::FIELD_FLUID_CONSISTENCY_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FLUID_CONSISTENCY_TYPE][] = $v; + } } if (null !== ($v = $this->getInstruction())) { $a[self::FIELD_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INSTRUCTION_EXT] = $enc; } } if ([] !== ($vs = $this->getNutrient())) { - $a[self::FIELD_NUTRIENT] = $vs; + $a[self::FIELD_NUTRIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NUTRIENT][] = $v; + } } if ([] !== ($vs = $this->getSchedule())) { - $a[self::FIELD_SCHEDULE] = $vs; + $a[self::FIELD_SCHEDULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SCHEDULE][] = $v; + } } if ([] !== ($vs = $this->getTexture())) { - $a[self::FIELD_TEXTURE] = $vs; + $a[self::FIELD_TEXTURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEXTURE][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php index 5c18b27f11..a897211631 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRNutritionOrderSupplement extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -172,36 +172,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) - ? $data[self::FIELD_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_INSTRUCTION] instanceof FHIRString) { - $this->setInstruction($data[self::FIELD_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_INSTRUCTION]))); - } + if (isset($data[self::FIELD_INSTRUCTION]) || isset($data[self::FIELD_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_INSTRUCTION])) { + $value = $data[self::FIELD_INSTRUCTION]; } else { - $this->setInstruction(new FHIRString($data[self::FIELD_INSTRUCTION])); + $value = null; } - } - if (isset($data[self::FIELD_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_PRODUCT_NAME] instanceof FHIRString) { - $this->setProductName($data[self::FIELD_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRODUCT_NAME])) { - $this->setProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_PRODUCT_NAME])) { - $this->setProductName(new FHIRString(array_merge($ext, $data[self::FIELD_PRODUCT_NAME]))); + if (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_INSTRUCTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setInstruction($value); + } else if (is_array($value)) { + $this->setInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInstruction(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PRODUCT_NAME]) || isset($data[self::FIELD_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_PRODUCT_NAME])) { + $value = $data[self::FIELD_PRODUCT_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_PRODUCT_NAME_EXT]; } else { - $this->setProductName(new FHIRString($data[self::FIELD_PRODUCT_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setProductName($value); + } else if (is_array($value)) { + $this->setProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProductName(new FHIRString($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -464,8 +478,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -586,15 +600,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getInstruction())) { $a[self::FIELD_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INSTRUCTION_EXT] = $enc; } } if (null !== ($v = $this->getProductName())) { $a[self::FIELD_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PRODUCT_NAME_EXT] = $enc; } } @@ -602,11 +620,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getSchedule())) { - $a[self::FIELD_SCHEDULE] = $vs; + $a[self::FIELD_SCHEDULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SCHEDULE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php index f854694a47..c958b09575 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNutritionOrderTexture extends FHIRBackboneElement const FIELD_MODIFIER = 'modifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -241,8 +241,8 @@ public function setModifier(FHIRCodeableConcept $modifier = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -326,6 +326,9 @@ public function jsonSerialize() if (null !== ($v = $this->getModifier())) { $a[self::FIELD_MODIFIER] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php index 6fccf69e67..45b00132a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRObservationComponent extends FHIRBackboneElement const FIELD_VALUE_TIME_EXT = '_valueTime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -338,20 +338,27 @@ public function __construct($data = null) $this->setValueCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_VALUE_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -389,36 +396,50 @@ public function __construct($data = null) $this->setValueSampledData(new FHIRSampledData($data[self::FIELD_VALUE_SAMPLED_DATA])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } } @@ -928,8 +949,8 @@ public function setValueTime($valueTime = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1111,7 +1132,13 @@ public function jsonSerialize() $a[self::FIELD_DATA_ABSENT_REASON] = $v; } if ([] !== ($vs = $this->getReferenceRange())) { - $a[self::FIELD_REFERENCE_RANGE] = $vs; + $a[self::FIELD_REFERENCE_RANGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_RANGE][] = $v; + } } if (null !== ($v = $this->getValueAttachment())) { $a[self::FIELD_VALUE_ATTACHMENT] = $v; @@ -1121,8 +1148,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } @@ -1143,18 +1172,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php index d740161bed..4f34dea357 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRObservationReferenceRange extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of ordered Quantities defined by a low and high limit. @@ -198,20 +198,27 @@ public function __construct($data = null) $this->setMeaning(new FHIRCodeableConcept($data[self::FIELD_MEANING])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -403,8 +410,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -522,11 +529,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php index a9291e774e..2ca798cd0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRObservationRelated extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -137,20 +137,27 @@ public function __construct($data = null) $this->setTarget(new FHIRReference($data[self::FIELD_TARGET])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRObservationRelationshipType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRObservationRelationshipType([FHIRObservationRelationshipType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRObservationRelationshipType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRObservationRelationshipType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationRelationshipType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRObservationRelationshipType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRObservationRelationshipType([FHIRObservationRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRObservationRelationshipType($ext)); } } } @@ -240,8 +247,8 @@ public function setType(FHIRObservationRelationshipType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -324,11 +331,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationRelationshipType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php index 3c60c70a9d..63ebca1274 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIROperationDefinitionBinding extends FHIRBackboneElement const FIELD_VALUE_SET_URI_EXT = '_valueSetUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -149,20 +149,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_STRENGTH])) { - $ext = (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) - ? $data[self::FIELD_STRENGTH_EXT] - : null; - if ($data[self::FIELD_STRENGTH] instanceof FHIRCode) { - $this->setStrength($data[self::FIELD_STRENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STRENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRCode(array_merge($ext, $data[self::FIELD_STRENGTH]))); - } + if (isset($data[self::FIELD_STRENGTH]) || isset($data[self::FIELD_STRENGTH_EXT])) { + if (isset($data[self::FIELD_STRENGTH])) { + $value = $data[self::FIELD_STRENGTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) { + $ext = $data[self::FIELD_STRENGTH_EXT]; } else { - $this->setStrength(new FHIRCode($data[self::FIELD_STRENGTH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStrength($value); + } else if (is_array($value)) { + $this->setStrength(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStrength(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStrength(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_SET_REFERENCE])) { @@ -172,20 +179,27 @@ public function __construct($data = null) $this->setValueSetReference(new FHIRReference($data[self::FIELD_VALUE_SET_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_SET_URI])) { - $ext = (isset($data[self::FIELD_VALUE_SET_URI_EXT]) && is_array($data[self::FIELD_VALUE_SET_URI_EXT])) - ? $data[self::FIELD_VALUE_SET_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_SET_URI] instanceof FHIRUri) { - $this->setValueSetUri($data[self::FIELD_VALUE_SET_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET_URI])) { - $this->setValueSetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_SET_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET_URI])) { - $this->setValueSetUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_SET_URI]))); - } + if (isset($data[self::FIELD_VALUE_SET_URI]) || isset($data[self::FIELD_VALUE_SET_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_SET_URI])) { + $value = $data[self::FIELD_VALUE_SET_URI]; } else { - $this->setValueSetUri(new FHIRUri($data[self::FIELD_VALUE_SET_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_URI_EXT]) && is_array($data[self::FIELD_VALUE_SET_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueSetUri($value); + } else if (is_array($value)) { + $this->setValueSetUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueSetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSetUri(new FHIRUri($ext)); } } } @@ -331,8 +345,8 @@ public function setValueSetUri($valueSetUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -434,8 +448,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getStrength())) { $a[self::FIELD_STRENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STRENGTH_EXT] = $enc; } } @@ -444,11 +460,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueSetUri())) { $a[self::FIELD_VALUE_SET_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContact.php index 16acffcf84..dd86442b53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIROperationDefinitionContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -289,8 +296,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -385,13 +392,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php index de5c9d03b7..3a5371653b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIROperationDefinitionParameter extends FHIRBackboneElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A formal computable definition of an operation (on the RESTful interface) or a @@ -230,68 +230,96 @@ public function __construct($data = null) $this->setBinding(new FHIROperationDefinitionBinding($data[self::FIELD_BINDING])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); - } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); - } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRCode) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRCode($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PART])) { @@ -319,36 +347,50 @@ public function __construct($data = null) $this->setProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIROperationParameterUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIROperationParameterUse([FHIROperationParameterUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIROperationParameterUse(array_merge($ext, $data[self::FIELD_USE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIROperationParameterUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROperationParameterUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIROperationParameterUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIROperationParameterUse([FHIROperationParameterUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIROperationParameterUse($ext)); } } } @@ -715,8 +757,8 @@ public function setUse(FHIROperationParameterUse $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -888,52 +930,73 @@ public function jsonSerialize() } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPart())) { - $a[self::FIELD_PART] = $vs; + $a[self::FIELD_PART] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART][] = $v; + } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROperationParameterUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIROperationParameterUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php index 906fd673c7..4d219f6749 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIROperationOutcomeIssue extends FHIRBackboneElement const FIELD_SEVERITY_EXT = '_severity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A code that describes the type of issue. @@ -177,20 +177,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRIssueType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRIssueType([FHIRIssueType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRIssueType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRIssueType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIssueType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRIssueType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRIssueType([FHIRIssueType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRIssueType($ext)); } } if (isset($data[self::FIELD_DETAILS])) { @@ -200,65 +207,88 @@ public function __construct($data = null) $this->setDetails(new FHIRCodeableConcept($data[self::FIELD_DETAILS])); } } - if (isset($data[self::FIELD_DIAGNOSTICS])) { - $ext = (isset($data[self::FIELD_DIAGNOSTICS_EXT]) && is_array($data[self::FIELD_DIAGNOSTICS_EXT])) - ? $data[self::FIELD_DIAGNOSTICS_EXT] - : null; - if ($data[self::FIELD_DIAGNOSTICS] instanceof FHIRString) { - $this->setDiagnostics($data[self::FIELD_DIAGNOSTICS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIAGNOSTICS])) { - $this->setDiagnostics(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DIAGNOSTICS]] + $ext)); - } else if (is_array($data[self::FIELD_DIAGNOSTICS])) { - $this->setDiagnostics(new FHIRString(array_merge($ext, $data[self::FIELD_DIAGNOSTICS]))); - } + if (isset($data[self::FIELD_DIAGNOSTICS]) || isset($data[self::FIELD_DIAGNOSTICS_EXT])) { + if (isset($data[self::FIELD_DIAGNOSTICS])) { + $value = $data[self::FIELD_DIAGNOSTICS]; } else { - $this->setDiagnostics(new FHIRString($data[self::FIELD_DIAGNOSTICS])); + $value = null; + } + if (isset($data[self::FIELD_DIAGNOSTICS_EXT]) && is_array($data[self::FIELD_DIAGNOSTICS_EXT])) { + $ext = $data[self::FIELD_DIAGNOSTICS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDiagnostics($value); + } else if (is_array($value)) { + $this->setDiagnostics(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDiagnostics(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDiagnostics(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LOCATION])) { - $ext = (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) - ? $data[self::FIELD_LOCATION_EXT] - : null; - if (is_array($data[self::FIELD_LOCATION])) { - foreach($data[self::FIELD_LOCATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLocation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLocation(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LOCATION]) || isset($data[self::FIELD_LOCATION_EXT])) { + if (isset($data[self::FIELD_LOCATION])) { + $value = $data[self::FIELD_LOCATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) { + $ext = $data[self::FIELD_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLocation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLocation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLocation(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLocation(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLocation(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLocation(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LOCATION] instanceof FHIRString) { - $this->addLocation($data[self::FIELD_LOCATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LOCATION])) { - $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOCATION]] + $ext)); - } else { - $this->addLocation(new FHIRString($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRIssueSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRIssueSeverity([FHIRIssueSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRIssueSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); - } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; } else { - $this->setSeverity(new FHIRIssueSeverity($data[self::FIELD_SEVERITY])); + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIssueSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRIssueSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRIssueSeverity([FHIRIssueSeverity::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRIssueSeverity($ext)); } } } @@ -494,8 +524,8 @@ public function setSeverity(FHIRIssueSeverity $severity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -608,8 +638,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIssueType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIssueType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } @@ -618,33 +650,48 @@ public function jsonSerialize() } if (null !== ($v = $this->getDiagnostics())) { $a[self::FIELD_DIAGNOSTICS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DIAGNOSTICS_EXT] = $enc; } } if ([] !== ($vs = $this->getLocation())) { $a[self::FIELD_LOCATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LOCATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LOCATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LOCATION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LOCATION_EXT] = $encs; + } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIssueSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIssueSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php index 8873eceb20..eeab746ac1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIROrderWhen extends FHIRBackboneElement const FIELD_SCHEDULE = 'schedule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -244,8 +244,8 @@ public function setSchedule(FHIRTiming $schedule = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -329,6 +329,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSchedule())) { $a[self::FIELD_SCHEDULE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php index ff039e6c22..169ff555ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIROrganizationContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * There is a variety of postal address formats defined around the world. This @@ -383,8 +383,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -491,7 +491,16 @@ public function jsonSerialize() $a[self::FIELD_PURPOSE] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php index fc32cee432..09434f012c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -173,7 +173,7 @@ class FHIRParametersParameter extends FHIRBackboneElement const FIELD_VALUE_UUID_EXT = '_valueUuid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -645,20 +645,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART])) { @@ -726,52 +733,73 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -795,52 +823,73 @@ public function __construct($data = null) $this->setValueContactPoint(new FHIRContactPoint($data[self::FIELD_VALUE_CONTACT_POINT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_ELEMENT_DEFINITION])) { @@ -857,20 +906,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -880,52 +936,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -935,20 +1012,27 @@ public function __construct($data = null) $this->setValueMeta(new FHIRMeta($data[self::FIELD_VALUE_META])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -958,20 +1042,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1016,36 +1107,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1055,52 +1160,73 @@ public function __construct($data = null) $this->setValueTiming(new FHIRTiming($data[self::FIELD_VALUE_TIMING])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) - ? $data[self::FIELD_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_VALUE_UUID] instanceof FHIRUuid) { - $this->setValueUuid($data[self::FIELD_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_VALUE_UUID]))); + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VALUE_UUID]) || isset($data[self::FIELD_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_VALUE_UUID])) { + $value = $data[self::FIELD_VALUE_UUID]; } else { - $this->setValueUuid(new FHIRUuid($data[self::FIELD_VALUE_UUID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_VALUE_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setValueUuid($value); + } else if (is_array($value)) { + $this->setValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUuid(new FHIRUuid($ext)); } } } @@ -2501,8 +2627,8 @@ public function setValueUuid($valueUuid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2955,13 +3081,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPart())) { - $a[self::FIELD_PART] = $vs; + $a[self::FIELD_PART] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART][] = $v; + } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v; @@ -2977,22 +3111,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -3007,22 +3147,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -3034,8 +3180,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -3044,22 +3192,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -3068,8 +3222,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -3078,8 +3234,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -3103,15 +3261,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -3120,25 +3282,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getValueUuid())) { $a[self::FIELD_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_VALUE_UUID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php index d2f6e24d8b..138ea77332 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRPatientAnimal extends FHIRBackboneElement const FIELD_SPECIES = 'species'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -287,8 +287,8 @@ public function setSpecies(FHIRCodeableConcept $species = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -381,6 +381,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSpecies())) { $a[self::FIELD_SPECIES] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php index 171339ccff..9e5be0ee4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPatientCommunication extends FHIRBackboneElement const FIELD_PREFERRED_EXT = '_preferred'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -141,20 +141,27 @@ public function __construct($data = null) $this->setLanguage(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_PREFERRED])) { - $ext = (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) - ? $data[self::FIELD_PREFERRED_EXT] - : null; - if ($data[self::FIELD_PREFERRED] instanceof FHIRBoolean) { - $this->setPreferred($data[self::FIELD_PREFERRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PREFERRED]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PREFERRED]))); - } + if (isset($data[self::FIELD_PREFERRED]) || isset($data[self::FIELD_PREFERRED_EXT])) { + if (isset($data[self::FIELD_PREFERRED])) { + $value = $data[self::FIELD_PREFERRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) { + $ext = $data[self::FIELD_PREFERRED_EXT]; } else { - $this->setPreferred(new FHIRBoolean($data[self::FIELD_PREFERRED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPreferred($value); + } else if (is_array($value)) { + $this->setPreferred(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreferred(new FHIRBoolean($ext)); } } } @@ -260,8 +267,8 @@ public function setPreferred($preferred = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -352,11 +359,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getPreferred())) { $a[self::FIELD_PREFERRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PREFERRED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php index 697e6b9ad0..63b09c9fd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRPatientContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * There is a variety of postal address formats defined around the world. This @@ -209,20 +209,27 @@ public function __construct($data = null) $this->setAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRCode) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode(array_merge($ext, $data[self::FIELD_GENDER]))); - } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRCode($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRCode($ext)); } } if (isset($data[self::FIELD_NAME])) { @@ -595,8 +602,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -731,8 +738,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } @@ -746,10 +755,25 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getRelationship())) { - $a[self::FIELD_RELATIONSHIP] = $vs; + $a[self::FIELD_RELATIONSHIP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATIONSHIP][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php index fbe52b90f4..120e0fb8c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPatientLink extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -136,20 +136,27 @@ public function __construct($data = null) $this->setOther(new FHIRReference($data[self::FIELD_OTHER])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRLinkType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkType([FHIRLinkType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRLinkType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLinkType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRLinkType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRLinkType([FHIRLinkType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRLinkType($ext)); } } } @@ -237,8 +244,8 @@ public function setType(FHIRLinkType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,11 +328,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLinkType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLinkType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php index 3ffa4dd7a8..1a7ac75df9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRPaymentReconciliationDetail extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Amount paid for this detail. @@ -196,20 +196,27 @@ public function __construct($data = null) $this->setAmount(new FHIRMoney($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_PAYEE])) { @@ -486,8 +493,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -608,8 +615,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -628,6 +637,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNote.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNote.php index e90bb7dfd7..2e6b496f37 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNote.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPaymentReconciliationNote extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -248,8 +255,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -337,14 +344,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php index 28462c1c33..9cafbaadb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPersonLink extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The level of confidence that this link represents the same actual person, based @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ASSURANCE])) { - $ext = (isset($data[self::FIELD_ASSURANCE_EXT]) && is_array($data[self::FIELD_ASSURANCE_EXT])) - ? $data[self::FIELD_ASSURANCE_EXT] - : null; - if ($data[self::FIELD_ASSURANCE] instanceof FHIRIdentityAssuranceLevel) { - $this->setAssurance($data[self::FIELD_ASSURANCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ASSURANCE])) { - $this->setAssurance(new FHIRIdentityAssuranceLevel([FHIRIdentityAssuranceLevel::FIELD_VALUE => $data[self::FIELD_ASSURANCE]] + $ext)); - } else if (is_array($data[self::FIELD_ASSURANCE])) { - $this->setAssurance(new FHIRIdentityAssuranceLevel(array_merge($ext, $data[self::FIELD_ASSURANCE]))); - } + if (isset($data[self::FIELD_ASSURANCE]) || isset($data[self::FIELD_ASSURANCE_EXT])) { + if (isset($data[self::FIELD_ASSURANCE])) { + $value = $data[self::FIELD_ASSURANCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ASSURANCE_EXT]) && is_array($data[self::FIELD_ASSURANCE_EXT])) { + $ext = $data[self::FIELD_ASSURANCE_EXT]; } else { - $this->setAssurance(new FHIRIdentityAssuranceLevel($data[self::FIELD_ASSURANCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIdentityAssuranceLevel) { + $this->setAssurance($value); + } else if (is_array($value)) { + $this->setAssurance(new FHIRIdentityAssuranceLevel(array_merge($ext, $value))); + } else { + $this->setAssurance(new FHIRIdentityAssuranceLevel([FHIRIdentityAssuranceLevel::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAssurance(new FHIRIdentityAssuranceLevel($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -243,8 +250,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -324,14 +331,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAssurance())) { $a[self::FIELD_ASSURANCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIdentityAssuranceLevel::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIdentityAssuranceLevel::FIELD_VALUE]); $a[self::FIELD_ASSURANCE_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRole.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRole.php index b49ec6ac42..04a07a5040 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRole.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRPractitionerPractitionerRole extends FHIRBackboneElement const FIELD_SPECIALTY = 'specialty'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -552,8 +552,8 @@ public function setSpecialty(array $specialty = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -677,10 +677,22 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getHealthcareService())) { - $a[self::FIELD_HEALTHCARE_SERVICE] = $vs; + $a[self::FIELD_HEALTHCARE_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_HEALTHCARE_SERVICE][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; @@ -692,7 +704,16 @@ public function jsonSerialize() $a[self::FIELD_ROLE] = $v; } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php index 443d540eb2..044d518277 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRPractitionerQualification extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -370,8 +370,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -472,7 +472,13 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIssuer())) { $a[self::FIELD_ISSUER] = $v; @@ -480,6 +486,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php index d7ce830b1f..e2eb1e21e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRProcedureFocalDevice extends FHIRBackboneElement const FIELD_MANIPULATED = 'manipulated'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -234,8 +234,8 @@ public function setManipulated(FHIRReference $manipulated = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getManipulated())) { $a[self::FIELD_MANIPULATED] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php index c4a3235533..11455a288c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRProcedurePerformer extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -234,8 +234,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php index 3625521991..9166bddbd8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRProcessRequestItem extends FHIRBackboneElement const FIELD_SEQUENCE_LINK_ID_EXT = '_sequenceLinkId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -117,20 +117,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRInteger) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRInteger(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; } else { - $this->setSequenceLinkId(new FHIRInteger($data[self::FIELD_SEQUENCE_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRInteger($ext)); } } } @@ -198,8 +205,8 @@ public function setSequenceLinkId($sequenceLinkId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -281,11 +288,16 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotes.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotes.php index e82e2a4a05..7a2b12b391 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotes.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRProcessResponseNotes extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -248,8 +255,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -337,14 +344,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php index c88c611b83..6c78346d7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRProvenanceAgent extends FHIRBackboneElement const FIELD_USER_ID = 'userId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -409,8 +409,8 @@ public function setUserId(FHIRIdentifier $userId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -511,7 +511,13 @@ public function jsonSerialize() $a[self::FIELD_ACTOR] = $v; } if ([] !== ($vs = $this->getRelatedAgent())) { - $a[self::FIELD_RELATED_AGENT] = $vs; + $a[self::FIELD_RELATED_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_AGENT][] = $v; + } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; @@ -519,6 +525,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUserId())) { $a[self::FIELD_USER_ID] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php index c33e65c846..3ee8d6574d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRProvenanceEntity extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Provenance of a resource is a record that describes entities and processes @@ -194,52 +194,73 @@ public function __construct($data = null) $this->setAgent(new FHIRProvenanceAgent($data[self::FIELD_AGENT])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRUri) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri(array_merge($ext, $data[self::FIELD_REFERENCE]))); - } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setReference(new FHIRUri($data[self::FIELD_REFERENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_ROLE])) { - $ext = (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) - ? $data[self::FIELD_ROLE_EXT] - : null; - if ($data[self::FIELD_ROLE] instanceof FHIRProvenanceEntityRole) { - $this->setRole($data[self::FIELD_ROLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRProvenanceEntityRole([FHIRProvenanceEntityRole::FIELD_VALUE => $data[self::FIELD_ROLE]] + $ext)); - } else if (is_array($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRProvenanceEntityRole(array_merge($ext, $data[self::FIELD_ROLE]))); + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReference(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_ROLE]) || isset($data[self::FIELD_ROLE_EXT])) { + if (isset($data[self::FIELD_ROLE])) { + $value = $data[self::FIELD_ROLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) { + $ext = $data[self::FIELD_ROLE_EXT]; } else { - $this->setRole(new FHIRProvenanceEntityRole($data[self::FIELD_ROLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRProvenanceEntityRole) { + $this->setRole($value); + } else if (is_array($value)) { + $this->setRole(new FHIRProvenanceEntityRole(array_merge($ext, $value))); + } else { + $this->setRole(new FHIRProvenanceEntityRole([FHIRProvenanceEntityRole::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRole(new FHIRProvenanceEntityRole($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -462,8 +483,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -580,28 +601,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRProvenanceEntityRole::FIELD_VALUE, $enc)))) { + unset($enc[FHIRProvenanceEntityRole::FIELD_VALUE]); $a[self::FIELD_ROLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgent.php index dc1e25ebd2..64003c11f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRProvenanceRelatedAgent extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -139,20 +139,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TARGET])) { - $ext = (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) - ? $data[self::FIELD_TARGET_EXT] - : null; - if ($data[self::FIELD_TARGET] instanceof FHIRUri) { - $this->setTarget($data[self::FIELD_TARGET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET])) { - $this->setTarget(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_TARGET]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET])) { - $this->setTarget(new FHIRUri(array_merge($ext, $data[self::FIELD_TARGET]))); - } + if (isset($data[self::FIELD_TARGET]) || isset($data[self::FIELD_TARGET_EXT])) { + if (isset($data[self::FIELD_TARGET])) { + $value = $data[self::FIELD_TARGET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) { + $ext = $data[self::FIELD_TARGET_EXT]; } else { - $this->setTarget(new FHIRUri($data[self::FIELD_TARGET])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setTarget($value); + } else if (is_array($value)) { + $this->setTarget(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setTarget(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTarget(new FHIRUri($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -261,8 +268,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -350,14 +357,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_TARGET_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php index e956e0faaf..263f3e2229 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRQuestionnaireGroup extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -249,20 +249,27 @@ public function __construct($data = null) $this->addGroup(new FHIRQuestionnaireGroup($data[self::FIELD_GROUP])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->setLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString(array_merge($ext, $data[self::FIELD_LINK_ID]))); - } + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; } else { - $this->setLinkId(new FHIRString($data[self::FIELD_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLinkId($value); + } else if (is_array($value)) { + $this->setLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLinkId(new FHIRString($ext)); } } if (isset($data[self::FIELD_QUESTION])) { @@ -283,68 +290,96 @@ public function __construct($data = null) $this->addQuestion(new FHIRQuestionnaireQuestion($data[self::FIELD_QUESTION])); } } - if (isset($data[self::FIELD_REPEATS])) { - $ext = (isset($data[self::FIELD_REPEATS_EXT]) && is_array($data[self::FIELD_REPEATS_EXT])) - ? $data[self::FIELD_REPEATS_EXT] - : null; - if ($data[self::FIELD_REPEATS] instanceof FHIRBoolean) { - $this->setRepeats($data[self::FIELD_REPEATS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPEATS])) { - $this->setRepeats(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPEATS]] + $ext)); - } else if (is_array($data[self::FIELD_REPEATS])) { - $this->setRepeats(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPEATS]))); - } + if (isset($data[self::FIELD_REPEATS]) || isset($data[self::FIELD_REPEATS_EXT])) { + if (isset($data[self::FIELD_REPEATS])) { + $value = $data[self::FIELD_REPEATS]; } else { - $this->setRepeats(new FHIRBoolean($data[self::FIELD_REPEATS])); - } - } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRBoolean) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUIRED]))); + $value = null; + } + if (isset($data[self::FIELD_REPEATS_EXT]) && is_array($data[self::FIELD_REPEATS_EXT])) { + $ext = $data[self::FIELD_REPEATS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRepeats($value); + } else if (is_array($value)) { + $this->setRepeats(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRepeats(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRepeats(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; } else { - $this->setRequired(new FHIRBoolean($data[self::FIELD_REQUIRED])); - } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + $value = null; + } + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -745,8 +780,8 @@ public function setTitle($title = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -922,49 +957,80 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LINK_ID_EXT] = $enc; } } if ([] !== ($vs = $this->getQuestion())) { - $a[self::FIELD_QUESTION] = $vs; + $a[self::FIELD_QUESTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUESTION][] = $v; + } } if (null !== ($v = $this->getRepeats())) { $a[self::FIELD_REPEATS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPEATS_EXT] = $enc; } } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php index 2c41f91bd8..d65fa5f7d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRQuestionnaireQuestion extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -263,20 +263,27 @@ public function __construct($data = null) $this->addGroup(new FHIRQuestionnaireGroup($data[self::FIELD_GROUP])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->setLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString(array_merge($ext, $data[self::FIELD_LINK_ID]))); - } + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; } else { - $this->setLinkId(new FHIRString($data[self::FIELD_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLinkId($value); + } else if (is_array($value)) { + $this->setLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLinkId(new FHIRString($ext)); } } if (isset($data[self::FIELD_OPTION])) { @@ -304,68 +311,96 @@ public function __construct($data = null) $this->setOptions(new FHIRReference($data[self::FIELD_OPTIONS])); } } - if (isset($data[self::FIELD_REPEATS])) { - $ext = (isset($data[self::FIELD_REPEATS_EXT]) && is_array($data[self::FIELD_REPEATS_EXT])) - ? $data[self::FIELD_REPEATS_EXT] - : null; - if ($data[self::FIELD_REPEATS] instanceof FHIRBoolean) { - $this->setRepeats($data[self::FIELD_REPEATS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPEATS])) { - $this->setRepeats(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPEATS]] + $ext)); - } else if (is_array($data[self::FIELD_REPEATS])) { - $this->setRepeats(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPEATS]))); - } + if (isset($data[self::FIELD_REPEATS]) || isset($data[self::FIELD_REPEATS_EXT])) { + if (isset($data[self::FIELD_REPEATS])) { + $value = $data[self::FIELD_REPEATS]; } else { - $this->setRepeats(new FHIRBoolean($data[self::FIELD_REPEATS])); - } - } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRBoolean) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUIRED]))); + $value = null; + } + if (isset($data[self::FIELD_REPEATS_EXT]) && is_array($data[self::FIELD_REPEATS_EXT])) { + $ext = $data[self::FIELD_REPEATS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRepeats($value); + } else if (is_array($value)) { + $this->setRepeats(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRepeats(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRepeats(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; } else { - $this->setRequired(new FHIRBoolean($data[self::FIELD_REQUIRED])); - } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + $value = null; + } + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAnswerFormat) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAnswerFormat([FHIRAnswerFormat::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAnswerFormat(array_merge($ext, $data[self::FIELD_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRAnswerFormat($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAnswerFormat) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAnswerFormat(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAnswerFormat([FHIRAnswerFormat::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRAnswerFormat($ext)); } } } @@ -788,8 +823,8 @@ public function setType(FHIRAnswerFormat $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -963,52 +998,83 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LINK_ID_EXT] = $enc; } } if ([] !== ($vs = $this->getOption())) { - $a[self::FIELD_OPTION] = $vs; + $a[self::FIELD_OPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPTION][] = $v; + } } if (null !== ($v = $this->getOptions())) { $a[self::FIELD_OPTIONS] = $v; } if (null !== ($v = $this->getRepeats())) { $a[self::FIELD_REPEATS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPEATS_EXT] = $enc; } } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAnswerFormat::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAnswerFormat::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php index 72ea2ff4fa..67ff97f3de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRQuestionnaireResponseAnswer extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of questions and their answers. The questions are ordered and @@ -327,20 +327,27 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODING])) { @@ -350,84 +357,119 @@ public function __construct($data = null) $this->setValueCoding(new FHIRCoding($data[self::FIELD_VALUE_CODING])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -444,52 +486,73 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -1054,8 +1117,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1285,15 +1348,23 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getValueAttachment())) { $a[self::FIELD_VALUE_ATTACHMENT] = $v; } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -1302,36 +1373,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } @@ -1343,25 +1424,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroup.php index acb225cd44..74e18b44c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRQuestionnaireResponseGroup extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of questions and their answers. The questions are ordered and @@ -203,20 +203,27 @@ public function __construct($data = null) $this->addGroup(new FHIRQuestionnaireResponseGroup($data[self::FIELD_GROUP])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->setLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString(array_merge($ext, $data[self::FIELD_LINK_ID]))); - } + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; } else { - $this->setLinkId(new FHIRString($data[self::FIELD_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLinkId($value); + } else if (is_array($value)) { + $this->setLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLinkId(new FHIRString($ext)); } } if (isset($data[self::FIELD_QUESTION])) { @@ -244,36 +251,50 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -569,8 +590,8 @@ public function setTitle($title = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -711,35 +732,56 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LINK_ID_EXT] = $enc; } } if ([] !== ($vs = $this->getQuestion())) { - $a[self::FIELD_QUESTION] = $vs; + $a[self::FIELD_QUESTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUESTION][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestion.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestion.php index 15a7cb13a3..9ecd42298d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRQuestionnaireResponseQuestion extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of questions and their answers. The questions are ordered and @@ -162,36 +162,50 @@ public function __construct($data = null) $this->addAnswer(new FHIRQuestionnaireResponseAnswer($data[self::FIELD_ANSWER])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->setLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString(array_merge($ext, $data[self::FIELD_LINK_ID]))); - } + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; } else { - $this->setLinkId(new FHIRString($data[self::FIELD_LINK_ID])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLinkId($value); + } else if (is_array($value)) { + $this->setLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLinkId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -355,8 +369,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -464,22 +478,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAnswer())) { - $a[self::FIELD_ANSWER] = $vs; + $a[self::FIELD_ANSWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ANSWER][] = $v; + } } if (null !== ($v = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LINK_ID_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php index fbe216c641..9a22c64fed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRRiskAssessmentPrediction extends FHIRBackboneElement const FIELD_WHEN_RANGE = 'whenRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -231,20 +231,27 @@ public function __construct($data = null) $this->setProbabilityCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_PROBABILITY_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_PROBABILITY_DECIMAL])) { - $ext = (isset($data[self::FIELD_PROBABILITY_DECIMAL_EXT]) && is_array($data[self::FIELD_PROBABILITY_DECIMAL_EXT])) - ? $data[self::FIELD_PROBABILITY_DECIMAL_EXT] - : null; - if ($data[self::FIELD_PROBABILITY_DECIMAL] instanceof FHIRDecimal) { - $this->setProbabilityDecimal($data[self::FIELD_PROBABILITY_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROBABILITY_DECIMAL])) { - $this->setProbabilityDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PROBABILITY_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_PROBABILITY_DECIMAL])) { - $this->setProbabilityDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PROBABILITY_DECIMAL]))); - } + if (isset($data[self::FIELD_PROBABILITY_DECIMAL]) || isset($data[self::FIELD_PROBABILITY_DECIMAL_EXT])) { + if (isset($data[self::FIELD_PROBABILITY_DECIMAL])) { + $value = $data[self::FIELD_PROBABILITY_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROBABILITY_DECIMAL_EXT]) && is_array($data[self::FIELD_PROBABILITY_DECIMAL_EXT])) { + $ext = $data[self::FIELD_PROBABILITY_DECIMAL_EXT]; } else { - $this->setProbabilityDecimal(new FHIRDecimal($data[self::FIELD_PROBABILITY_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setProbabilityDecimal($value); + } else if (is_array($value)) { + $this->setProbabilityDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setProbabilityDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProbabilityDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PROBABILITY_RANGE])) { @@ -254,36 +261,50 @@ public function __construct($data = null) $this->setProbabilityRange(new FHIRRange($data[self::FIELD_PROBABILITY_RANGE])); } } - if (isset($data[self::FIELD_RATIONALE])) { - $ext = (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) - ? $data[self::FIELD_RATIONALE_EXT] - : null; - if ($data[self::FIELD_RATIONALE] instanceof FHIRString) { - $this->setRationale($data[self::FIELD_RATIONALE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RATIONALE]] + $ext)); - } else if (is_array($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRString(array_merge($ext, $data[self::FIELD_RATIONALE]))); - } + if (isset($data[self::FIELD_RATIONALE]) || isset($data[self::FIELD_RATIONALE_EXT])) { + if (isset($data[self::FIELD_RATIONALE])) { + $value = $data[self::FIELD_RATIONALE]; } else { - $this->setRationale(new FHIRString($data[self::FIELD_RATIONALE])); + $value = null; } - } - if (isset($data[self::FIELD_RELATIVE_RISK])) { - $ext = (isset($data[self::FIELD_RELATIVE_RISK_EXT]) && is_array($data[self::FIELD_RELATIVE_RISK_EXT])) - ? $data[self::FIELD_RELATIVE_RISK_EXT] - : null; - if ($data[self::FIELD_RELATIVE_RISK] instanceof FHIRDecimal) { - $this->setRelativeRisk($data[self::FIELD_RELATIVE_RISK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIVE_RISK])) { - $this->setRelativeRisk(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_RELATIVE_RISK]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIVE_RISK])) { - $this->setRelativeRisk(new FHIRDecimal(array_merge($ext, $data[self::FIELD_RELATIVE_RISK]))); + if (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) { + $ext = $data[self::FIELD_RATIONALE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRationale($value); + } else if (is_array($value)) { + $this->setRationale(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRationale(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRationale(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RELATIVE_RISK]) || isset($data[self::FIELD_RELATIVE_RISK_EXT])) { + if (isset($data[self::FIELD_RELATIVE_RISK])) { + $value = $data[self::FIELD_RELATIVE_RISK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELATIVE_RISK_EXT]) && is_array($data[self::FIELD_RELATIVE_RISK_EXT])) { + $ext = $data[self::FIELD_RELATIVE_RISK_EXT]; } else { - $this->setRelativeRisk(new FHIRDecimal($data[self::FIELD_RELATIVE_RISK])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setRelativeRisk($value); + } else if (is_array($value)) { + $this->setRelativeRisk(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setRelativeRisk(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelativeRisk(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_WHEN_PERIOD])) { @@ -611,8 +632,8 @@ public function setWhenRange(FHIRRange $whenRange = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -758,8 +779,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getProbabilityDecimal())) { $a[self::FIELD_PROBABILITY_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PROBABILITY_DECIMAL_EXT] = $enc; } } @@ -768,15 +791,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRationale())) { $a[self::FIELD_RATIONALE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RATIONALE_EXT] = $enc; } } if (null !== ($v = $this->getRelativeRisk())) { $a[self::FIELD_RELATIVE_RISK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_RELATIVE_RISK_EXT] = $enc; } } @@ -786,6 +813,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhenRange())) { $a[self::FIELD_WHEN_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContact.php index f047bb1f58..85c7889209 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSearchParameterContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -289,8 +296,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -385,13 +392,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php index dd7a22aec4..631945504d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSpecimenCollection extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -208,20 +208,27 @@ public function __construct($data = null) $this->setBodySite(new FHIRCodeableConcept($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) - ? $data[self::FIELD_COLLECTED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_COLLECTED_DATE_TIME] instanceof FHIRDateTime) { - $this->setCollectedDateTime($data[self::FIELD_COLLECTED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_COLLECTED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_COLLECTED_DATE_TIME]))); - } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME]) || isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { + $value = $data[self::FIELD_COLLECTED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_COLLECTED_DATE_TIME_EXT]; } else { - $this->setCollectedDateTime(new FHIRDateTime($data[self::FIELD_COLLECTED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCollectedDateTime($value); + } else if (is_array($value)) { + $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCollectedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_COLLECTED_PERIOD])) { @@ -238,33 +245,42 @@ public function __construct($data = null) $this->setCollector(new FHIRReference($data[self::FIELD_COLLECTOR])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if (is_array($data[self::FIELD_COMMENT])) { - foreach($data[self::FIELD_COMMENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addComment($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addComment(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addComment($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addComment($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addComment(new FHIRString(array_merge($v, $iext))); + } else { + $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addComment(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addComment(new FHIRString($iext)); } - } elseif ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->addComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COMMENT])) { - $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else { - $this->addComment(new FHIRString($data[self::FIELD_COMMENT])); } } if (isset($data[self::FIELD_METHOD])) { @@ -575,8 +591,8 @@ public function setQuantity(FHIRSimpleQuantity $quantity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -704,8 +720,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getCollectedDateTime())) { $a[self::FIELD_COLLECTED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_COLLECTED_DATE_TIME_EXT] = $enc; } } @@ -717,18 +735,26 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getComment())) { $a[self::FIELD_COMMENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COMMENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COMMENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COMMENT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COMMENT_EXT] = $encs; + } } if (null !== ($v = $this->getMethod())) { $a[self::FIELD_METHOD] = $v; @@ -736,6 +762,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php index e2b57fbd8e..31cc9cb168 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSpecimenContainer extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -212,20 +212,27 @@ public function __construct($data = null) $this->setCapacity(new FHIRSimpleQuantity($data[self::FIELD_CAPACITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -531,8 +538,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -666,13 +673,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getSpecimenQuantity())) { $a[self::FIELD_SPECIMEN_QUANTITY] = $v; @@ -680,6 +695,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php index 8a0faef21f..aaec4ca63d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSpecimenTreatment extends FHIRBackboneElement const FIELD_PROCEDURE = 'procedure'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -161,20 +161,27 @@ public function __construct($data = null) $this->addAdditive(new FHIRReference($data[self::FIELD_ADDITIVE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROCEDURE])) { @@ -337,8 +344,8 @@ public function setProcedure(FHIRCodeableConcept $procedure = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -438,18 +445,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdditive())) { - $a[self::FIELD_ADDITIVE] = $vs; + $a[self::FIELD_ADDITIVE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIVE][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getProcedure())) { $a[self::FIELD_PROCEDURE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContact.php index e82aff08d0..08d7de40e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRStructureDefinitionContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,20 +132,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -290,8 +297,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,13 +393,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php index e0ab436b6d..86322551e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureDefinitionDifferential extends FHIRBackboneElement const FIELD_ELEMENT = 'element'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Captures constraints on each element within the resource, profile, or extension. @@ -222,8 +222,8 @@ public function setElement(array $element = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -303,7 +303,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php index 9377abdb1c..d6768cdacc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRStructureDefinitionMapping extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -165,68 +165,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENTS])) { - $ext = (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) - ? $data[self::FIELD_COMMENTS_EXT] - : null; - if ($data[self::FIELD_COMMENTS] instanceof FHIRString) { - $this->setComments($data[self::FIELD_COMMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENTS]))); - } + if (isset($data[self::FIELD_COMMENTS]) || isset($data[self::FIELD_COMMENTS_EXT])) { + if (isset($data[self::FIELD_COMMENTS])) { + $value = $data[self::FIELD_COMMENTS]; } else { - $this->setComments(new FHIRString($data[self::FIELD_COMMENTS])); + $value = null; } - } - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) { + $ext = $data[self::FIELD_COMMENTS_EXT]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComments($value); + } else if (is_array($value)) { + $this->setComments(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComments(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -420,8 +448,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -545,32 +573,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComments())) { $a[self::FIELD_COMMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENTS_EXT] = $enc; } } if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php index 7c531a470d..44aed4eb01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureDefinitionSnapshot extends FHIRBackboneElement const FIELD_ELEMENT = 'element'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Captures constraints on each element within the resource, profile, or extension. @@ -222,8 +222,8 @@ public function setElement(array $element = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -303,7 +303,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php index 7b276812c8..78e1d484f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSubscriptionChannel extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -162,68 +162,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUri) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUri($data[self::FIELD_ENDPOINT])); + $value = null; } - } - if (isset($data[self::FIELD_HEADER])) { - $ext = (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) - ? $data[self::FIELD_HEADER_EXT] - : null; - if ($data[self::FIELD_HEADER] instanceof FHIRString) { - $this->setHeader($data[self::FIELD_HEADER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEADER])) { - $this->setHeader(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER]] + $ext)); - } else if (is_array($data[self::FIELD_HEADER])) { - $this->setHeader(new FHIRString(array_merge($ext, $data[self::FIELD_HEADER]))); - } + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; } else { - $this->setHeader(new FHIRString($data[self::FIELD_HEADER])); + $ext = []; } - } - if (isset($data[self::FIELD_PAYLOAD])) { - $ext = (isset($data[self::FIELD_PAYLOAD_EXT]) && is_array($data[self::FIELD_PAYLOAD_EXT])) - ? $data[self::FIELD_PAYLOAD_EXT] - : null; - if ($data[self::FIELD_PAYLOAD] instanceof FHIRString) { - $this->setPayload($data[self::FIELD_PAYLOAD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAYLOAD])) { - $this->setPayload(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PAYLOAD]] + $ext)); - } else if (is_array($data[self::FIELD_PAYLOAD])) { - $this->setPayload(new FHIRString(array_merge($ext, $data[self::FIELD_PAYLOAD]))); + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_HEADER]) || isset($data[self::FIELD_HEADER_EXT])) { + if (isset($data[self::FIELD_HEADER])) { + $value = $data[self::FIELD_HEADER]; } else { - $this->setPayload(new FHIRString($data[self::FIELD_PAYLOAD])); + $value = null; + } + if (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) { + $ext = $data[self::FIELD_HEADER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHeader($value); + } else if (is_array($value)) { + $this->setHeader(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHeader(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHeader(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSubscriptionChannelType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSubscriptionChannelType([FHIRSubscriptionChannelType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSubscriptionChannelType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_PAYLOAD]) || isset($data[self::FIELD_PAYLOAD_EXT])) { + if (isset($data[self::FIELD_PAYLOAD])) { + $value = $data[self::FIELD_PAYLOAD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PAYLOAD_EXT]) && is_array($data[self::FIELD_PAYLOAD_EXT])) { + $ext = $data[self::FIELD_PAYLOAD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPayload($value); + } else if (is_array($value)) { + $this->setPayload(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPayload(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPayload(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRSubscriptionChannelType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSubscriptionChannelType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSubscriptionChannelType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSubscriptionChannelType([FHIRSubscriptionChannelType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRSubscriptionChannelType($ext)); } } } @@ -399,8 +427,8 @@ public function setType(FHIRSubscriptionChannelType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -516,32 +544,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if (null !== ($v = $this->getHeader())) { $a[self::FIELD_HEADER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HEADER_EXT] = $enc; } } if (null !== ($v = $this->getPayload())) { $a[self::FIELD_PAYLOAD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PAYLOAD_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSubscriptionChannelType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSubscriptionChannelType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php index 4ea9a36f1f..db4b09dfc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSubstanceIngredient extends FHIRBackboneElement const FIELD_SUBSTANCE = 'substance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A relationship of two Quantity values - expressed as a numerator and a @@ -232,8 +232,8 @@ public function setSubstance(FHIRReference $substance = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -317,6 +317,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubstance())) { $a[self::FIELD_SUBSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php index 7a3c672524..7e51bc50dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSubstanceInstance extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -143,20 +143,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPIRY])) { - $ext = (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) - ? $data[self::FIELD_EXPIRY_EXT] - : null; - if ($data[self::FIELD_EXPIRY] instanceof FHIRDateTime) { - $this->setExpiry($data[self::FIELD_EXPIRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRY]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRY]))); - } + if (isset($data[self::FIELD_EXPIRY]) || isset($data[self::FIELD_EXPIRY_EXT])) { + if (isset($data[self::FIELD_EXPIRY])) { + $value = $data[self::FIELD_EXPIRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) { + $ext = $data[self::FIELD_EXPIRY_EXT]; } else { - $this->setExpiry(new FHIRDateTime($data[self::FIELD_EXPIRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpiry($value); + } else if (is_array($value)) { + $this->setExpiry(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpiry(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -300,8 +307,8 @@ public function setQuantity(FHIRSimpleQuantity $quantity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -395,8 +402,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpiry())) { $a[self::FIELD_EXPIRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRY_EXT] = $enc; } } @@ -406,6 +415,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhen.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhen.php index b04272e7fd..5bd8795d2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRSupplyRequestWhen extends FHIRBackboneElement const FIELD_SCHEDULE = 'schedule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -242,8 +242,8 @@ public function setSchedule(FHIRTiming $schedule = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -327,6 +327,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSchedule())) { $a[self::FIELD_SCHEDULE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php index bbe4399f88..d541a4307c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptAction extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * TestScript is a resource that specifies a suite of tests against a FHIR server @@ -225,8 +225,8 @@ public function setOperation(FHIRTestScriptOperation $operation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -310,6 +310,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php index efe8a816ac..ed791e52d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptAction1 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * TestScript is a resource that specifies a suite of tests against a FHIR server @@ -225,8 +225,8 @@ public function setOperation(FHIRTestScriptOperation $operation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -310,6 +310,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php index 7704580784..17fbcb14c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestScriptAction2 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * TestScript is a resource that specifies a suite of tests against a FHIR server @@ -176,8 +176,8 @@ public function setOperation(FHIRTestScriptOperation $operation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -252,6 +252,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php index 20b805ba3e..bd24c99680 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRTestScriptAssert extends FHIRBackboneElement const FIELD_WARNING_ONLY_EXT = '_warningOnly'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -354,292 +354,418 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT])) - ? $data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_COMPARE_TO_SOURCE_ID] instanceof FHIRString) { - $this->setCompareToSourceId($data[self::FIELD_COMPARE_TO_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { - $this->setCompareToSourceId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMPARE_TO_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { - $this->setCompareToSourceId(new FHIRString(array_merge($ext, $data[self::FIELD_COMPARE_TO_SOURCE_ID]))); - } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID]) || isset($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { + $value = $data[self::FIELD_COMPARE_TO_SOURCE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT]; } else { - $this->setCompareToSourceId(new FHIRString($data[self::FIELD_COMPARE_TO_SOURCE_ID])); - } - } - if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { - $ext = (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT])) - ? $data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT] - : null; - if ($data[self::FIELD_COMPARE_TO_SOURCE_PATH] instanceof FHIRString) { - $this->setCompareToSourcePath($data[self::FIELD_COMPARE_TO_SOURCE_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { - $this->setCompareToSourcePath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMPARE_TO_SOURCE_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { - $this->setCompareToSourcePath(new FHIRString(array_merge($ext, $data[self::FIELD_COMPARE_TO_SOURCE_PATH]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCompareToSourceId($value); + } else if (is_array($value)) { + $this->setCompareToSourceId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCompareToSourceId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCompareToSourceId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH]) || isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT])) { + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { + $value = $data[self::FIELD_COMPARE_TO_SOURCE_PATH]; } else { - $this->setCompareToSourcePath(new FHIRString($data[self::FIELD_COMPARE_TO_SOURCE_PATH])); - } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRContentType) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRContentType([FHIRContentType::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRContentType(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT])) { + $ext = $data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCompareToSourcePath($value); + } else if (is_array($value)) { + $this->setCompareToSourcePath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCompareToSourcePath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCompareToSourcePath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; } else { - $this->setContentType(new FHIRContentType($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContentType) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRContentType(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRContentType([FHIRContentType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRContentType($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DIRECTION])) { - $ext = (isset($data[self::FIELD_DIRECTION_EXT]) && is_array($data[self::FIELD_DIRECTION_EXT])) - ? $data[self::FIELD_DIRECTION_EXT] - : null; - if ($data[self::FIELD_DIRECTION] instanceof FHIRAssertionDirectionType) { - $this->setDirection($data[self::FIELD_DIRECTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIRECTION])) { - $this->setDirection(new FHIRAssertionDirectionType([FHIRAssertionDirectionType::FIELD_VALUE => $data[self::FIELD_DIRECTION]] + $ext)); - } else if (is_array($data[self::FIELD_DIRECTION])) { - $this->setDirection(new FHIRAssertionDirectionType(array_merge($ext, $data[self::FIELD_DIRECTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DIRECTION]) || isset($data[self::FIELD_DIRECTION_EXT])) { + if (isset($data[self::FIELD_DIRECTION])) { + $value = $data[self::FIELD_DIRECTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIRECTION_EXT]) && is_array($data[self::FIELD_DIRECTION_EXT])) { + $ext = $data[self::FIELD_DIRECTION_EXT]; } else { - $this->setDirection(new FHIRAssertionDirectionType($data[self::FIELD_DIRECTION])); - } - } - if (isset($data[self::FIELD_HEADER_FIELD])) { - $ext = (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) - ? $data[self::FIELD_HEADER_FIELD_EXT] - : null; - if ($data[self::FIELD_HEADER_FIELD] instanceof FHIRString) { - $this->setHeaderField($data[self::FIELD_HEADER_FIELD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER_FIELD]] + $ext)); - } else if (is_array($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString(array_merge($ext, $data[self::FIELD_HEADER_FIELD]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAssertionDirectionType) { + $this->setDirection($value); + } else if (is_array($value)) { + $this->setDirection(new FHIRAssertionDirectionType(array_merge($ext, $value))); + } else { + $this->setDirection(new FHIRAssertionDirectionType([FHIRAssertionDirectionType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDirection(new FHIRAssertionDirectionType($ext)); + } + } + if (isset($data[self::FIELD_HEADER_FIELD]) || isset($data[self::FIELD_HEADER_FIELD_EXT])) { + if (isset($data[self::FIELD_HEADER_FIELD])) { + $value = $data[self::FIELD_HEADER_FIELD]; } else { - $this->setHeaderField(new FHIRString($data[self::FIELD_HEADER_FIELD])); - } - } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); + $value = null; + } + if (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) { + $ext = $data[self::FIELD_HEADER_FIELD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHeaderField($value); + } else if (is_array($value)) { + $this->setHeaderField(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHeaderField(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); - } - } - if (isset($data[self::FIELD_MINIMUM_ID])) { - $ext = (isset($data[self::FIELD_MINIMUM_ID_EXT]) && is_array($data[self::FIELD_MINIMUM_ID_EXT])) - ? $data[self::FIELD_MINIMUM_ID_EXT] - : null; - if ($data[self::FIELD_MINIMUM_ID] instanceof FHIRString) { - $this->setMinimumId($data[self::FIELD_MINIMUM_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MINIMUM_ID])) { - $this->setMinimumId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MINIMUM_ID]] + $ext)); - } else if (is_array($data[self::FIELD_MINIMUM_ID])) { - $this->setMinimumId(new FHIRString(array_merge($ext, $data[self::FIELD_MINIMUM_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MINIMUM_ID]) || isset($data[self::FIELD_MINIMUM_ID_EXT])) { + if (isset($data[self::FIELD_MINIMUM_ID])) { + $value = $data[self::FIELD_MINIMUM_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MINIMUM_ID_EXT]) && is_array($data[self::FIELD_MINIMUM_ID_EXT])) { + $ext = $data[self::FIELD_MINIMUM_ID_EXT]; } else { - $this->setMinimumId(new FHIRString($data[self::FIELD_MINIMUM_ID])); - } - } - if (isset($data[self::FIELD_NAVIGATION_LINKS])) { - $ext = (isset($data[self::FIELD_NAVIGATION_LINKS_EXT]) && is_array($data[self::FIELD_NAVIGATION_LINKS_EXT])) - ? $data[self::FIELD_NAVIGATION_LINKS_EXT] - : null; - if ($data[self::FIELD_NAVIGATION_LINKS] instanceof FHIRBoolean) { - $this->setNavigationLinks($data[self::FIELD_NAVIGATION_LINKS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAVIGATION_LINKS])) { - $this->setNavigationLinks(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NAVIGATION_LINKS]] + $ext)); - } else if (is_array($data[self::FIELD_NAVIGATION_LINKS])) { - $this->setNavigationLinks(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NAVIGATION_LINKS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMinimumId($value); + } else if (is_array($value)) { + $this->setMinimumId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMinimumId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinimumId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAVIGATION_LINKS]) || isset($data[self::FIELD_NAVIGATION_LINKS_EXT])) { + if (isset($data[self::FIELD_NAVIGATION_LINKS])) { + $value = $data[self::FIELD_NAVIGATION_LINKS]; } else { - $this->setNavigationLinks(new FHIRBoolean($data[self::FIELD_NAVIGATION_LINKS])); - } - } - if (isset($data[self::FIELD_OPERATOR])) { - $ext = (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) - ? $data[self::FIELD_OPERATOR_EXT] - : null; - if ($data[self::FIELD_OPERATOR] instanceof FHIRAssertionOperatorType) { - $this->setOperator($data[self::FIELD_OPERATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OPERATOR])) { - $this->setOperator(new FHIRAssertionOperatorType([FHIRAssertionOperatorType::FIELD_VALUE => $data[self::FIELD_OPERATOR]] + $ext)); - } else if (is_array($data[self::FIELD_OPERATOR])) { - $this->setOperator(new FHIRAssertionOperatorType(array_merge($ext, $data[self::FIELD_OPERATOR]))); + $value = null; + } + if (isset($data[self::FIELD_NAVIGATION_LINKS_EXT]) && is_array($data[self::FIELD_NAVIGATION_LINKS_EXT])) { + $ext = $data[self::FIELD_NAVIGATION_LINKS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNavigationLinks($value); + } else if (is_array($value)) { + $this->setNavigationLinks(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNavigationLinks(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNavigationLinks(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_OPERATOR]) || isset($data[self::FIELD_OPERATOR_EXT])) { + if (isset($data[self::FIELD_OPERATOR])) { + $value = $data[self::FIELD_OPERATOR]; } else { - $this->setOperator(new FHIRAssertionOperatorType($data[self::FIELD_OPERATOR])); - } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + $value = null; + } + if (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) { + $ext = $data[self::FIELD_OPERATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAssertionOperatorType) { + $this->setOperator($value); + } else if (is_array($value)) { + $this->setOperator(new FHIRAssertionOperatorType(array_merge($ext, $value))); + } else { + $this->setOperator(new FHIRAssertionOperatorType([FHIRAssertionOperatorType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOperator(new FHIRAssertionOperatorType($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); - } - } - if (isset($data[self::FIELD_RESOURCE])) { - $ext = (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) - ? $data[self::FIELD_RESOURCE_EXT] - : null; - if ($data[self::FIELD_RESOURCE] instanceof FHIRCode) { - $this->setResource($data[self::FIELD_RESOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_RESOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCode(array_merge($ext, $data[self::FIELD_RESOURCE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RESOURCE]) || isset($data[self::FIELD_RESOURCE_EXT])) { + if (isset($data[self::FIELD_RESOURCE])) { + $value = $data[self::FIELD_RESOURCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_EXT]; } else { - $this->setResource(new FHIRCode($data[self::FIELD_RESOURCE])); - } - } - if (isset($data[self::FIELD_RESPONSE])) { - $ext = (isset($data[self::FIELD_RESPONSE_EXT]) && is_array($data[self::FIELD_RESPONSE_EXT])) - ? $data[self::FIELD_RESPONSE_EXT] - : null; - if ($data[self::FIELD_RESPONSE] instanceof FHIRAssertionResponseTypes) { - $this->setResponse($data[self::FIELD_RESPONSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE])) { - $this->setResponse(new FHIRAssertionResponseTypes([FHIRAssertionResponseTypes::FIELD_VALUE => $data[self::FIELD_RESPONSE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE])) { - $this->setResponse(new FHIRAssertionResponseTypes(array_merge($ext, $data[self::FIELD_RESPONSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setResource($value); + } else if (is_array($value)) { + $this->setResource(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setResource(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResource(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_RESPONSE]) || isset($data[self::FIELD_RESPONSE_EXT])) { + if (isset($data[self::FIELD_RESPONSE])) { + $value = $data[self::FIELD_RESPONSE]; } else { - $this->setResponse(new FHIRAssertionResponseTypes($data[self::FIELD_RESPONSE])); - } - } - if (isset($data[self::FIELD_RESPONSE_CODE])) { - $ext = (isset($data[self::FIELD_RESPONSE_CODE_EXT]) && is_array($data[self::FIELD_RESPONSE_CODE_EXT])) - ? $data[self::FIELD_RESPONSE_CODE_EXT] - : null; - if ($data[self::FIELD_RESPONSE_CODE] instanceof FHIRString) { - $this->setResponseCode($data[self::FIELD_RESPONSE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE_CODE])) { - $this->setResponseCode(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESPONSE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE_CODE])) { - $this->setResponseCode(new FHIRString(array_merge($ext, $data[self::FIELD_RESPONSE_CODE]))); + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_EXT]) && is_array($data[self::FIELD_RESPONSE_EXT])) { + $ext = $data[self::FIELD_RESPONSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAssertionResponseTypes) { + $this->setResponse($value); + } else if (is_array($value)) { + $this->setResponse(new FHIRAssertionResponseTypes(array_merge($ext, $value))); + } else { + $this->setResponse(new FHIRAssertionResponseTypes([FHIRAssertionResponseTypes::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponse(new FHIRAssertionResponseTypes($ext)); + } + } + if (isset($data[self::FIELD_RESPONSE_CODE]) || isset($data[self::FIELD_RESPONSE_CODE_EXT])) { + if (isset($data[self::FIELD_RESPONSE_CODE])) { + $value = $data[self::FIELD_RESPONSE_CODE]; } else { - $this->setResponseCode(new FHIRString($data[self::FIELD_RESPONSE_CODE])); - } - } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRId) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_CODE_EXT]) && is_array($data[self::FIELD_RESPONSE_CODE_EXT])) { + $ext = $data[self::FIELD_RESPONSE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResponseCode($value); + } else if (is_array($value)) { + $this->setResponseCode(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResponseCode(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponseCode(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; } else { - $this->setSourceId(new FHIRId($data[self::FIELD_SOURCE_ID])); - } - } - if (isset($data[self::FIELD_VALIDATE_PROFILE_ID])) { - $ext = (isset($data[self::FIELD_VALIDATE_PROFILE_ID_EXT]) && is_array($data[self::FIELD_VALIDATE_PROFILE_ID_EXT])) - ? $data[self::FIELD_VALIDATE_PROFILE_ID_EXT] - : null; - if ($data[self::FIELD_VALIDATE_PROFILE_ID] instanceof FHIRId) { - $this->setValidateProfileId($data[self::FIELD_VALIDATE_PROFILE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALIDATE_PROFILE_ID])) { - $this->setValidateProfileId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALIDATE_PROFILE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALIDATE_PROFILE_ID])) { - $this->setValidateProfileId(new FHIRId(array_merge($ext, $data[self::FIELD_VALIDATE_PROFILE_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_VALIDATE_PROFILE_ID]) || isset($data[self::FIELD_VALIDATE_PROFILE_ID_EXT])) { + if (isset($data[self::FIELD_VALIDATE_PROFILE_ID])) { + $value = $data[self::FIELD_VALIDATE_PROFILE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALIDATE_PROFILE_ID_EXT]) && is_array($data[self::FIELD_VALIDATE_PROFILE_ID_EXT])) { + $ext = $data[self::FIELD_VALIDATE_PROFILE_ID_EXT]; } else { - $this->setValidateProfileId(new FHIRId($data[self::FIELD_VALIDATE_PROFILE_ID])); - } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValidateProfileId($value); + } else if (is_array($value)) { + $this->setValidateProfileId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValidateProfileId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValidateProfileId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); - } - } - if (isset($data[self::FIELD_WARNING_ONLY])) { - $ext = (isset($data[self::FIELD_WARNING_ONLY_EXT]) && is_array($data[self::FIELD_WARNING_ONLY_EXT])) - ? $data[self::FIELD_WARNING_ONLY_EXT] - : null; - if ($data[self::FIELD_WARNING_ONLY] instanceof FHIRBoolean) { - $this->setWarningOnly($data[self::FIELD_WARNING_ONLY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WARNING_ONLY])) { - $this->setWarningOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WARNING_ONLY]] + $ext)); - } else if (is_array($data[self::FIELD_WARNING_ONLY])) { - $this->setWarningOnly(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WARNING_ONLY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_WARNING_ONLY]) || isset($data[self::FIELD_WARNING_ONLY_EXT])) { + if (isset($data[self::FIELD_WARNING_ONLY])) { + $value = $data[self::FIELD_WARNING_ONLY]; } else { - $this->setWarningOnly(new FHIRBoolean($data[self::FIELD_WARNING_ONLY])); + $value = null; + } + if (isset($data[self::FIELD_WARNING_ONLY_EXT]) && is_array($data[self::FIELD_WARNING_ONLY_EXT])) { + $ext = $data[self::FIELD_WARNING_ONLY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWarningOnly($value); + } else if (is_array($value)) { + $this->setWarningOnly(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWarningOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWarningOnly(new FHIRBoolean($ext)); } } } @@ -1339,8 +1465,8 @@ public function setWarningOnly($warningOnly = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1629,130 +1755,169 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCompareToSourceId())) { $a[self::FIELD_COMPARE_TO_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMPARE_TO_SOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getCompareToSourcePath())) { $a[self::FIELD_COMPARE_TO_SOURCE_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContentType::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDirection())) { $a[self::FIELD_DIRECTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAssertionDirectionType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAssertionDirectionType::FIELD_VALUE]); $a[self::FIELD_DIRECTION_EXT] = $enc; } } if (null !== ($v = $this->getHeaderField())) { $a[self::FIELD_HEADER_FIELD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HEADER_FIELD_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if (null !== ($v = $this->getMinimumId())) { $a[self::FIELD_MINIMUM_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MINIMUM_ID_EXT] = $enc; } } if (null !== ($v = $this->getNavigationLinks())) { $a[self::FIELD_NAVIGATION_LINKS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NAVIGATION_LINKS_EXT] = $enc; } } if (null !== ($v = $this->getOperator())) { $a[self::FIELD_OPERATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAssertionOperatorType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAssertionOperatorType::FIELD_VALUE]); $a[self::FIELD_OPERATOR_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_RESOURCE_EXT] = $enc; } } if (null !== ($v = $this->getResponse())) { $a[self::FIELD_RESPONSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAssertionResponseTypes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAssertionResponseTypes::FIELD_VALUE]); $a[self::FIELD_RESPONSE_EXT] = $enc; } } if (null !== ($v = $this->getResponseCode())) { $a[self::FIELD_RESPONSE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESPONSE_CODE_EXT] = $enc; } } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getValidateProfileId())) { $a[self::FIELD_VALIDATE_PROFILE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALIDATE_PROFILE_ID_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } if (null !== ($v = $this->getWarningOnly())) { $a[self::FIELD_WARNING_ONLY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WARNING_ONLY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php index 01bc48baa2..b610e76666 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRTestScriptCapability extends FHIRBackboneElement const FIELD_VALIDATED_EXT = '_validated'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -196,97 +196,134 @@ public function __construct($data = null) $this->setConformance(new FHIRReference($data[self::FIELD_CONFORMANCE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_DESTINATION])) { - $ext = (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) - ? $data[self::FIELD_DESTINATION_EXT] - : null; - if ($data[self::FIELD_DESTINATION] instanceof FHIRInteger) { - $this->setDestination($data[self::FIELD_DESTINATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DESTINATION]] + $ext)); - } else if (is_array($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger(array_merge($ext, $data[self::FIELD_DESTINATION]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESTINATION]) || isset($data[self::FIELD_DESTINATION_EXT])) { + if (isset($data[self::FIELD_DESTINATION])) { + $value = $data[self::FIELD_DESTINATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) { + $ext = $data[self::FIELD_DESTINATION_EXT]; } else { - $this->setDestination(new FHIRInteger($data[self::FIELD_DESTINATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDestination($value); + } else if (is_array($value)) { + $this->setDestination(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDestination(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_LINK])) { - $ext = (isset($data[self::FIELD_LINK_EXT]) && is_array($data[self::FIELD_LINK_EXT])) - ? $data[self::FIELD_LINK_EXT] - : null; - if (is_array($data[self::FIELD_LINK])) { - foreach($data[self::FIELD_LINK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addLink($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLink(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINK]) || isset($data[self::FIELD_LINK_EXT])) { + if (isset($data[self::FIELD_LINK])) { + $value = $data[self::FIELD_LINK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_EXT]) && is_array($data[self::FIELD_LINK_EXT])) { + $ext = $data[self::FIELD_LINK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addLink($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addLink($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLink(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLink(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addLink(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLink(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_LINK] instanceof FHIRUri) { - $this->addLink($data[self::FIELD_LINK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINK])) { - $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_LINK]] + $ext)); - } else { - $this->addLink(new FHIRUri($data[self::FIELD_LINK])); } } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRBoolean) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUIRED]))); - } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; } else { - $this->setRequired(new FHIRBoolean($data[self::FIELD_REQUIRED])); + $value = null; } - } - if (isset($data[self::FIELD_VALIDATED])) { - $ext = (isset($data[self::FIELD_VALIDATED_EXT]) && is_array($data[self::FIELD_VALIDATED_EXT])) - ? $data[self::FIELD_VALIDATED_EXT] - : null; - if ($data[self::FIELD_VALIDATED] instanceof FHIRBoolean) { - $this->setValidated($data[self::FIELD_VALIDATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALIDATED])) { - $this->setValidated(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALIDATED]] + $ext)); - } else if (is_array($data[self::FIELD_VALIDATED])) { - $this->setValidated(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALIDATED]))); + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALIDATED]) || isset($data[self::FIELD_VALIDATED_EXT])) { + if (isset($data[self::FIELD_VALIDATED])) { + $value = $data[self::FIELD_VALIDATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALIDATED_EXT]) && is_array($data[self::FIELD_VALIDATED_EXT])) { + $ext = $data[self::FIELD_VALIDATED_EXT]; } else { - $this->setValidated(new FHIRBoolean($data[self::FIELD_VALIDATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValidated($value); + } else if (is_array($value)) { + $this->setValidated(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValidated(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValidated(new FHIRBoolean($ext)); } } } @@ -571,8 +608,8 @@ public function setValidated($validated = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -718,47 +755,66 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDestination())) { $a[self::FIELD_DESTINATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DESTINATION_EXT] = $enc; } } if ([] !== ($vs = $this->getLink())) { $a[self::FIELD_LINK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINK_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINK_EXT] = $encs; + } } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getValidated())) { $a[self::FIELD_VALIDATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALIDATED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContact.php index 9f262ae755..6bb111d0a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -289,8 +296,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -385,13 +392,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php index f0efa238e1..86a108fbe2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRTestScriptFixture extends FHIRBackboneElement const FIELD_RESOURCE = 'resource'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -148,36 +148,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTOCREATE])) { - $ext = (isset($data[self::FIELD_AUTOCREATE_EXT]) && is_array($data[self::FIELD_AUTOCREATE_EXT])) - ? $data[self::FIELD_AUTOCREATE_EXT] - : null; - if ($data[self::FIELD_AUTOCREATE] instanceof FHIRBoolean) { - $this->setAutocreate($data[self::FIELD_AUTOCREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTOCREATE])) { - $this->setAutocreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AUTOCREATE]] + $ext)); - } else if (is_array($data[self::FIELD_AUTOCREATE])) { - $this->setAutocreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AUTOCREATE]))); - } + if (isset($data[self::FIELD_AUTOCREATE]) || isset($data[self::FIELD_AUTOCREATE_EXT])) { + if (isset($data[self::FIELD_AUTOCREATE])) { + $value = $data[self::FIELD_AUTOCREATE]; } else { - $this->setAutocreate(new FHIRBoolean($data[self::FIELD_AUTOCREATE])); + $value = null; } - } - if (isset($data[self::FIELD_AUTODELETE])) { - $ext = (isset($data[self::FIELD_AUTODELETE_EXT]) && is_array($data[self::FIELD_AUTODELETE_EXT])) - ? $data[self::FIELD_AUTODELETE_EXT] - : null; - if ($data[self::FIELD_AUTODELETE] instanceof FHIRBoolean) { - $this->setAutodelete($data[self::FIELD_AUTODELETE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTODELETE])) { - $this->setAutodelete(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AUTODELETE]] + $ext)); - } else if (is_array($data[self::FIELD_AUTODELETE])) { - $this->setAutodelete(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AUTODELETE]))); + if (isset($data[self::FIELD_AUTOCREATE_EXT]) && is_array($data[self::FIELD_AUTOCREATE_EXT])) { + $ext = $data[self::FIELD_AUTOCREATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAutocreate($value); + } else if (is_array($value)) { + $this->setAutocreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAutocreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAutocreate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_AUTODELETE]) || isset($data[self::FIELD_AUTODELETE_EXT])) { + if (isset($data[self::FIELD_AUTODELETE])) { + $value = $data[self::FIELD_AUTODELETE]; } else { - $this->setAutodelete(new FHIRBoolean($data[self::FIELD_AUTODELETE])); + $value = null; + } + if (isset($data[self::FIELD_AUTODELETE_EXT]) && is_array($data[self::FIELD_AUTODELETE_EXT])) { + $ext = $data[self::FIELD_AUTODELETE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAutodelete($value); + } else if (is_array($value)) { + $this->setAutodelete(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAutodelete(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAutodelete(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -330,8 +344,8 @@ public function setResource(FHIRReference $resource = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -433,21 +447,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAutocreate())) { $a[self::FIELD_AUTOCREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AUTOCREATE_EXT] = $enc; } } if (null !== ($v = $this->getAutodelete())) { $a[self::FIELD_AUTODELETE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AUTODELETE_EXT] = $enc; } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php index f64dd6b17c..6df183a260 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRTestScriptLink extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -266,8 +280,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -363,18 +377,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php index bf57b416a8..6d66556752 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptMetadata extends FHIRBackboneElement const FIELD_LINK = 'link'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * TestScript is a resource that specifies a suite of tests against a FHIR server @@ -302,8 +302,8 @@ public function setLink(array $link = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -396,10 +396,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCapability())) { - $a[self::FIELD_CAPABILITY] = $vs; + $a[self::FIELD_CAPABILITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CAPABILITY][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php index 05faad70ae..75b465483b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRTestScriptOperation extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The content or mime type. @@ -302,116 +302,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACCEPT])) { - $ext = (isset($data[self::FIELD_ACCEPT_EXT]) && is_array($data[self::FIELD_ACCEPT_EXT])) - ? $data[self::FIELD_ACCEPT_EXT] - : null; - if ($data[self::FIELD_ACCEPT] instanceof FHIRContentType) { - $this->setAccept($data[self::FIELD_ACCEPT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACCEPT])) { - $this->setAccept(new FHIRContentType([FHIRContentType::FIELD_VALUE => $data[self::FIELD_ACCEPT]] + $ext)); - } else if (is_array($data[self::FIELD_ACCEPT])) { - $this->setAccept(new FHIRContentType(array_merge($ext, $data[self::FIELD_ACCEPT]))); - } + if (isset($data[self::FIELD_ACCEPT]) || isset($data[self::FIELD_ACCEPT_EXT])) { + if (isset($data[self::FIELD_ACCEPT])) { + $value = $data[self::FIELD_ACCEPT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACCEPT_EXT]) && is_array($data[self::FIELD_ACCEPT_EXT])) { + $ext = $data[self::FIELD_ACCEPT_EXT]; } else { - $this->setAccept(new FHIRContentType($data[self::FIELD_ACCEPT])); - } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRContentType) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRContentType([FHIRContentType::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRContentType(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContentType) { + $this->setAccept($value); + } else if (is_array($value)) { + $this->setAccept(new FHIRContentType(array_merge($ext, $value))); + } else { + $this->setAccept(new FHIRContentType([FHIRContentType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAccept(new FHIRContentType($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; } else { - $this->setContentType(new FHIRContentType($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContentType) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRContentType(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRContentType([FHIRContentType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRContentType($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DESTINATION])) { - $ext = (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) - ? $data[self::FIELD_DESTINATION_EXT] - : null; - if ($data[self::FIELD_DESTINATION] instanceof FHIRInteger) { - $this->setDestination($data[self::FIELD_DESTINATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DESTINATION]] + $ext)); - } else if (is_array($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger(array_merge($ext, $data[self::FIELD_DESTINATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESTINATION]) || isset($data[self::FIELD_DESTINATION_EXT])) { + if (isset($data[self::FIELD_DESTINATION])) { + $value = $data[self::FIELD_DESTINATION]; } else { - $this->setDestination(new FHIRInteger($data[self::FIELD_DESTINATION])); - } - } - if (isset($data[self::FIELD_ENCODE_REQUEST_URL])) { - $ext = (isset($data[self::FIELD_ENCODE_REQUEST_URL_EXT]) && is_array($data[self::FIELD_ENCODE_REQUEST_URL_EXT])) - ? $data[self::FIELD_ENCODE_REQUEST_URL_EXT] - : null; - if ($data[self::FIELD_ENCODE_REQUEST_URL] instanceof FHIRBoolean) { - $this->setEncodeRequestUrl($data[self::FIELD_ENCODE_REQUEST_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENCODE_REQUEST_URL])) { - $this->setEncodeRequestUrl(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ENCODE_REQUEST_URL]] + $ext)); - } else if (is_array($data[self::FIELD_ENCODE_REQUEST_URL])) { - $this->setEncodeRequestUrl(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ENCODE_REQUEST_URL]))); + $value = null; + } + if (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) { + $ext = $data[self::FIELD_DESTINATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDestination($value); + } else if (is_array($value)) { + $this->setDestination(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDestination(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_ENCODE_REQUEST_URL]) || isset($data[self::FIELD_ENCODE_REQUEST_URL_EXT])) { + if (isset($data[self::FIELD_ENCODE_REQUEST_URL])) { + $value = $data[self::FIELD_ENCODE_REQUEST_URL]; } else { - $this->setEncodeRequestUrl(new FHIRBoolean($data[self::FIELD_ENCODE_REQUEST_URL])); - } - } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); + $value = null; + } + if (isset($data[self::FIELD_ENCODE_REQUEST_URL_EXT]) && is_array($data[self::FIELD_ENCODE_REQUEST_URL_EXT])) { + $ext = $data[self::FIELD_ENCODE_REQUEST_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setEncodeRequestUrl($value); + } else if (is_array($value)) { + $this->setEncodeRequestUrl(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setEncodeRequestUrl(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEncodeRequestUrl(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); - } - } - if (isset($data[self::FIELD_PARAMS])) { - $ext = (isset($data[self::FIELD_PARAMS_EXT]) && is_array($data[self::FIELD_PARAMS_EXT])) - ? $data[self::FIELD_PARAMS_EXT] - : null; - if ($data[self::FIELD_PARAMS] instanceof FHIRString) { - $this->setParams($data[self::FIELD_PARAMS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARAMS])) { - $this->setParams(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARAMS]] + $ext)); - } else if (is_array($data[self::FIELD_PARAMS])) { - $this->setParams(new FHIRString(array_merge($ext, $data[self::FIELD_PARAMS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PARAMS]) || isset($data[self::FIELD_PARAMS_EXT])) { + if (isset($data[self::FIELD_PARAMS])) { + $value = $data[self::FIELD_PARAMS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARAMS_EXT]) && is_array($data[self::FIELD_PARAMS_EXT])) { + $ext = $data[self::FIELD_PARAMS_EXT]; } else { - $this->setParams(new FHIRString($data[self::FIELD_PARAMS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setParams($value); + } else if (is_array($value)) { + $this->setParams(new FHIRString(array_merge($ext, $value))); + } else { + $this->setParams(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParams(new FHIRString($ext)); } } if (isset($data[self::FIELD_REQUEST_HEADER])) { @@ -432,68 +481,96 @@ public function __construct($data = null) $this->addRequestHeader(new FHIRTestScriptRequestHeader($data[self::FIELD_REQUEST_HEADER])); } } - if (isset($data[self::FIELD_RESOURCE])) { - $ext = (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) - ? $data[self::FIELD_RESOURCE_EXT] - : null; - if ($data[self::FIELD_RESOURCE] instanceof FHIRCode) { - $this->setResource($data[self::FIELD_RESOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_RESOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCode(array_merge($ext, $data[self::FIELD_RESOURCE]))); - } + if (isset($data[self::FIELD_RESOURCE]) || isset($data[self::FIELD_RESOURCE_EXT])) { + if (isset($data[self::FIELD_RESOURCE])) { + $value = $data[self::FIELD_RESOURCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_EXT]; } else { - $this->setResource(new FHIRCode($data[self::FIELD_RESOURCE])); - } - } - if (isset($data[self::FIELD_RESPONSE_ID])) { - $ext = (isset($data[self::FIELD_RESPONSE_ID_EXT]) && is_array($data[self::FIELD_RESPONSE_ID_EXT])) - ? $data[self::FIELD_RESPONSE_ID_EXT] - : null; - if ($data[self::FIELD_RESPONSE_ID] instanceof FHIRId) { - $this->setResponseId($data[self::FIELD_RESPONSE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE_ID])) { - $this->setResponseId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_RESPONSE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE_ID])) { - $this->setResponseId(new FHIRId(array_merge($ext, $data[self::FIELD_RESPONSE_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setResource($value); + } else if (is_array($value)) { + $this->setResource(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setResource(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResource(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_RESPONSE_ID]) || isset($data[self::FIELD_RESPONSE_ID_EXT])) { + if (isset($data[self::FIELD_RESPONSE_ID])) { + $value = $data[self::FIELD_RESPONSE_ID]; } else { - $this->setResponseId(new FHIRId($data[self::FIELD_RESPONSE_ID])); - } - } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRId) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_ID_EXT]) && is_array($data[self::FIELD_RESPONSE_ID_EXT])) { + $ext = $data[self::FIELD_RESPONSE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setResponseId($value); + } else if (is_array($value)) { + $this->setResponseId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setResponseId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponseId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; } else { - $this->setSourceId(new FHIRId($data[self::FIELD_SOURCE_ID])); - } - } - if (isset($data[self::FIELD_TARGET_ID])) { - $ext = (isset($data[self::FIELD_TARGET_ID_EXT]) && is_array($data[self::FIELD_TARGET_ID_EXT])) - ? $data[self::FIELD_TARGET_ID_EXT] - : null; - if ($data[self::FIELD_TARGET_ID] instanceof FHIRId) { - $this->setTargetId($data[self::FIELD_TARGET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_ID])) { - $this->setTargetId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_TARGET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_ID])) { - $this->setTargetId(new FHIRId(array_merge($ext, $data[self::FIELD_TARGET_ID]))); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_TARGET_ID]) || isset($data[self::FIELD_TARGET_ID_EXT])) { + if (isset($data[self::FIELD_TARGET_ID])) { + $value = $data[self::FIELD_TARGET_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_ID_EXT]) && is_array($data[self::FIELD_TARGET_ID_EXT])) { + $ext = $data[self::FIELD_TARGET_ID_EXT]; } else { - $this->setTargetId(new FHIRId($data[self::FIELD_TARGET_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setTargetId($value); + } else if (is_array($value)) { + $this->setTargetId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setTargetId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTargetId(new FHIRId($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -503,20 +580,27 @@ public function __construct($data = null) $this->setType(new FHIRCoding($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRString) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRString(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRString($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRString($ext)); } } } @@ -1095,8 +1179,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1335,81 +1419,109 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAccept())) { $a[self::FIELD_ACCEPT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContentType::FIELD_VALUE]); $a[self::FIELD_ACCEPT_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContentType::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDestination())) { $a[self::FIELD_DESTINATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DESTINATION_EXT] = $enc; } } if (null !== ($v = $this->getEncodeRequestUrl())) { $a[self::FIELD_ENCODE_REQUEST_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ENCODE_REQUEST_URL_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if (null !== ($v = $this->getParams())) { $a[self::FIELD_PARAMS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PARAMS_EXT] = $enc; } } if ([] !== ($vs = $this->getRequestHeader())) { - $a[self::FIELD_REQUEST_HEADER] = $vs; + $a[self::FIELD_REQUEST_HEADER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUEST_HEADER][] = $v; + } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_RESOURCE_EXT] = $enc; } } if (null !== ($v = $this->getResponseId())) { $a[self::FIELD_RESPONSE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_RESPONSE_ID_EXT] = $enc; } } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getTargetId())) { $a[self::FIELD_TARGET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_TARGET_ID_EXT] = $enc; } } @@ -1418,11 +1530,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php index 18a3c2f3f8..c43c88239f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptRequestHeader extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,36 +130,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FIELD])) { - $ext = (isset($data[self::FIELD_FIELD_EXT]) && is_array($data[self::FIELD_FIELD_EXT])) - ? $data[self::FIELD_FIELD_EXT] - : null; - if ($data[self::FIELD_FIELD] instanceof FHIRString) { - $this->setField($data[self::FIELD_FIELD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIELD])) { - $this->setField(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FIELD]] + $ext)); - } else if (is_array($data[self::FIELD_FIELD])) { - $this->setField(new FHIRString(array_merge($ext, $data[self::FIELD_FIELD]))); - } + if (isset($data[self::FIELD_FIELD]) || isset($data[self::FIELD_FIELD_EXT])) { + if (isset($data[self::FIELD_FIELD])) { + $value = $data[self::FIELD_FIELD]; } else { - $this->setField(new FHIRString($data[self::FIELD_FIELD])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_FIELD_EXT]) && is_array($data[self::FIELD_FIELD_EXT])) { + $ext = $data[self::FIELD_FIELD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setField($value); + } else if (is_array($value)) { + $this->setField(new FHIRString(array_merge($ext, $value))); + } else { + $this->setField(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setField(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -265,8 +279,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -363,18 +377,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getField())) { $a[self::FIELD_FIELD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FIELD_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php index 73ad188cfb..48b1149c14 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptSetup extends FHIRBackboneElement const FIELD_METADATA = 'metadata'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * TestScript is a resource that specifies a suite of tests against a FHIR server @@ -265,8 +265,8 @@ public function setMetadata(FHIRTestScriptMetadata $metadata = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -352,11 +352,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getMetadata())) { $a[self::FIELD_METADATA] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php index 723a6ae35f..5d3a20e95a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestScriptTeardown extends FHIRBackboneElement const FIELD_ACTION = 'action'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * TestScript is a resource that specifies a suite of tests against a FHIR server @@ -216,8 +216,8 @@ public function setAction(array $action = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -297,7 +297,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php index 7b13313961..6b13413904 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRTestScriptTest extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * TestScript is a resource that specifies a suite of tests against a FHIR server @@ -176,20 +176,27 @@ public function __construct($data = null) $this->addAction(new FHIRTestScriptAction1($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_METADATA])) { @@ -199,20 +206,27 @@ public function __construct($data = null) $this->setMetadata(new FHIRTestScriptMetadata($data[self::FIELD_METADATA])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -403,8 +417,8 @@ public function setName($name = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -518,12 +532,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -532,11 +554,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php index 80e7eab80b..c5e3f0a8e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRTestScriptVariable extends FHIRBackboneElement const FIELD_SOURCE_ID_EXT = '_sourceId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -163,68 +163,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_HEADER_FIELD])) { - $ext = (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) - ? $data[self::FIELD_HEADER_FIELD_EXT] - : null; - if ($data[self::FIELD_HEADER_FIELD] instanceof FHIRString) { - $this->setHeaderField($data[self::FIELD_HEADER_FIELD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER_FIELD]] + $ext)); - } else if (is_array($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString(array_merge($ext, $data[self::FIELD_HEADER_FIELD]))); - } + if (isset($data[self::FIELD_HEADER_FIELD]) || isset($data[self::FIELD_HEADER_FIELD_EXT])) { + if (isset($data[self::FIELD_HEADER_FIELD])) { + $value = $data[self::FIELD_HEADER_FIELD]; } else { - $this->setHeaderField(new FHIRString($data[self::FIELD_HEADER_FIELD])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) { + $ext = $data[self::FIELD_HEADER_FIELD_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHeaderField($value); + } else if (is_array($value)) { + $this->setHeaderField(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHeaderField(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRId) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; } else { - $this->setSourceId(new FHIRId($data[self::FIELD_SOURCE_ID])); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRId($ext)); } } } @@ -418,8 +446,8 @@ public function setSourceId($sourceId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -543,32 +571,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getHeaderField())) { $a[self::FIELD_HEADER_FIELD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HEADER_FIELD_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystem.php index fe31ce0b98..05c5dace82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRValueSetCodeSystem extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -165,20 +165,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CASE_SENSITIVE])) { - $ext = (isset($data[self::FIELD_CASE_SENSITIVE_EXT]) && is_array($data[self::FIELD_CASE_SENSITIVE_EXT])) - ? $data[self::FIELD_CASE_SENSITIVE_EXT] - : null; - if ($data[self::FIELD_CASE_SENSITIVE] instanceof FHIRBoolean) { - $this->setCaseSensitive($data[self::FIELD_CASE_SENSITIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CASE_SENSITIVE])) { - $this->setCaseSensitive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CASE_SENSITIVE]] + $ext)); - } else if (is_array($data[self::FIELD_CASE_SENSITIVE])) { - $this->setCaseSensitive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CASE_SENSITIVE]))); - } + if (isset($data[self::FIELD_CASE_SENSITIVE]) || isset($data[self::FIELD_CASE_SENSITIVE_EXT])) { + if (isset($data[self::FIELD_CASE_SENSITIVE])) { + $value = $data[self::FIELD_CASE_SENSITIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CASE_SENSITIVE_EXT]) && is_array($data[self::FIELD_CASE_SENSITIVE_EXT])) { + $ext = $data[self::FIELD_CASE_SENSITIVE_EXT]; } else { - $this->setCaseSensitive(new FHIRBoolean($data[self::FIELD_CASE_SENSITIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCaseSensitive($value); + } else if (is_array($value)) { + $this->setCaseSensitive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCaseSensitive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCaseSensitive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CONCEPT])) { @@ -199,36 +206,50 @@ public function __construct($data = null) $this->addConcept(new FHIRValueSetConcept($data[self::FIELD_CONCEPT])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -438,8 +459,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -562,28 +583,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCaseSensitive())) { $a[self::FIELD_CASE_SENSITIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CASE_SENSITIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php index 8b9fd9fce8..c1200fc727 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRValueSetCompose extends FHIRBackboneElement const FIELD_INCLUDE = 'include'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -155,33 +155,42 @@ public function __construct($data = null) $this->addExclude(new FHIRValueSetInclude($data[self::FIELD_EXCLUDE])); } } - if (isset($data[self::FIELD_IMPORT])) { - $ext = (isset($data[self::FIELD_IMPORT_EXT]) && is_array($data[self::FIELD_IMPORT_EXT])) - ? $data[self::FIELD_IMPORT_EXT] - : null; - if (is_array($data[self::FIELD_IMPORT])) { - foreach($data[self::FIELD_IMPORT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addImport($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addImport(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_IMPORT]) || isset($data[self::FIELD_IMPORT_EXT])) { + if (isset($data[self::FIELD_IMPORT])) { + $value = $data[self::FIELD_IMPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPORT_EXT]) && is_array($data[self::FIELD_IMPORT_EXT])) { + $ext = $data[self::FIELD_IMPORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addImport($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addImport($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addImport(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addImport(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addImport(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addImport(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_IMPORT] instanceof FHIRUri) { - $this->addImport($data[self::FIELD_IMPORT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_IMPORT])) { - $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IMPORT]] + $ext)); - } else { - $this->addImport(new FHIRUri($data[self::FIELD_IMPORT])); } } if (isset($data[self::FIELD_INCLUDE])) { @@ -396,8 +405,8 @@ public function setInclude(array $include = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -503,25 +512,48 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getExclude())) { - $a[self::FIELD_EXCLUDE] = $vs; + $a[self::FIELD_EXCLUDE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCLUDE][] = $v; + } } if ([] !== ($vs = $this->getImport())) { $a[self::FIELD_IMPORT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_IMPORT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_IMPORT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_IMPORT_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_IMPORT_EXT] = $encs; + } } if ([] !== ($vs = $this->getInclude())) { - $a[self::FIELD_INCLUDE] = $vs; + $a[self::FIELD_INCLUDE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INCLUDE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php index 3435d3b2c6..96bdff388d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRValueSetConcept extends FHIRBackboneElement const FIELD_DISPLAY_EXT = '_display'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -185,36 +185,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ABSTRACT])) { - $ext = (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) - ? $data[self::FIELD_ABSTRACT_EXT] - : null; - if ($data[self::FIELD_ABSTRACT] instanceof FHIRBoolean) { - $this->setAbstract($data[self::FIELD_ABSTRACT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABSTRACT]] + $ext)); - } else if (is_array($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABSTRACT]))); - } + if (isset($data[self::FIELD_ABSTRACT]) || isset($data[self::FIELD_ABSTRACT_EXT])) { + if (isset($data[self::FIELD_ABSTRACT])) { + $value = $data[self::FIELD_ABSTRACT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) { + $ext = $data[self::FIELD_ABSTRACT_EXT]; } else { - $this->setAbstract(new FHIRBoolean($data[self::FIELD_ABSTRACT])); - } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbstract($value); + } else if (is_array($value)) { + $this->setAbstract(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbstract(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONCEPT])) { @@ -235,20 +249,27 @@ public function __construct($data = null) $this->addConcept(new FHIRValueSetConcept($data[self::FIELD_CONCEPT])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRString) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRString(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRString($data[self::FIELD_DEFINITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRString($ext)); } } if (isset($data[self::FIELD_DESIGNATION])) { @@ -269,20 +290,27 @@ public function __construct($data = null) $this->addDesignation(new FHIRValueSetDesignation($data[self::FIELD_DESIGNATION])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } } @@ -583,8 +611,8 @@ public function setDisplay($display = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -734,38 +762,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAbstract())) { $a[self::FIELD_ABSTRACT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABSTRACT_EXT] = $enc; } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1.php index 911bb8ac7c..dac8695d65 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRValueSetConcept1 extends FHIRBackboneElement const FIELD_DISPLAY_EXT = '_display'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -144,20 +144,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DESIGNATION])) { @@ -178,20 +185,27 @@ public function __construct($data = null) $this->addDesignation(new FHIRValueSetDesignation($data[self::FIELD_DESIGNATION])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } } @@ -356,8 +370,8 @@ public function setDisplay($display = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -466,21 +480,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContact.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContact.php index 14de0cc338..22bb6473ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContact.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRValueSetContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -288,8 +295,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -384,13 +391,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php index 20cd7e97fb..1a91699686 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRValueSetContains extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -186,36 +186,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ABSTRACT])) { - $ext = (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) - ? $data[self::FIELD_ABSTRACT_EXT] - : null; - if ($data[self::FIELD_ABSTRACT] instanceof FHIRBoolean) { - $this->setAbstract($data[self::FIELD_ABSTRACT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABSTRACT]] + $ext)); - } else if (is_array($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABSTRACT]))); - } + if (isset($data[self::FIELD_ABSTRACT]) || isset($data[self::FIELD_ABSTRACT_EXT])) { + if (isset($data[self::FIELD_ABSTRACT])) { + $value = $data[self::FIELD_ABSTRACT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) { + $ext = $data[self::FIELD_ABSTRACT_EXT]; } else { - $this->setAbstract(new FHIRBoolean($data[self::FIELD_ABSTRACT])); - } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbstract($value); + } else if (is_array($value)) { + $this->setAbstract(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbstract(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONTAINS])) { @@ -236,52 +250,73 @@ public function __construct($data = null) $this->addContains(new FHIRValueSetContains($data[self::FIELD_CONTAINS])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); - } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); - } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -561,8 +596,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -713,42 +748,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAbstract())) { $a[self::FIELD_ABSTRACT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABSTRACT_EXT] = $enc; } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getContains())) { - $a[self::FIELD_CONTAINS] = $vs; + $a[self::FIELD_CONTAINS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINS][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php index 47c4f7fbd5..42a28c7d07 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRValueSetDesignation extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -144,20 +144,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); - } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_USE])) { @@ -167,20 +174,27 @@ public function __construct($data = null) $this->setUse(new FHIRCoding($data[self::FIELD_USE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -318,8 +332,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -422,8 +436,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } @@ -432,11 +448,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php index ac79d819ec..e789884314 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRValueSetExpansion extends FHIRBackboneElement const FIELD_TOTAL_EXT = '_total'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -206,36 +206,50 @@ public function __construct($data = null) $this->addContains(new FHIRValueSetContains($data[self::FIELD_CONTAINS])); } } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRUri) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; } else { - $this->setIdentifier(new FHIRUri($data[self::FIELD_IDENTIFIER])); - } - } - if (isset($data[self::FIELD_OFFSET])) { - $ext = (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) - ? $data[self::FIELD_OFFSET_EXT] - : null; - if ($data[self::FIELD_OFFSET] instanceof FHIRInteger) { - $this->setOffset($data[self::FIELD_OFFSET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_OFFSET]] + $ext)); - } else if (is_array($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRInteger(array_merge($ext, $data[self::FIELD_OFFSET]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_OFFSET]) || isset($data[self::FIELD_OFFSET_EXT])) { + if (isset($data[self::FIELD_OFFSET])) { + $value = $data[self::FIELD_OFFSET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) { + $ext = $data[self::FIELD_OFFSET_EXT]; } else { - $this->setOffset(new FHIRInteger($data[self::FIELD_OFFSET])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setOffset($value); + } else if (is_array($value)) { + $this->setOffset(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setOffset(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOffset(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -256,36 +270,50 @@ public function __construct($data = null) $this->addParameter(new FHIRValueSetParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_TIMESTAMP])) { - $ext = (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) - ? $data[self::FIELD_TIMESTAMP_EXT] - : null; - if ($data[self::FIELD_TIMESTAMP] instanceof FHIRDateTime) { - $this->setTimestamp($data[self::FIELD_TIMESTAMP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMESTAMP]] + $ext)); - } else if (is_array($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMESTAMP]))); - } + if (isset($data[self::FIELD_TIMESTAMP]) || isset($data[self::FIELD_TIMESTAMP_EXT])) { + if (isset($data[self::FIELD_TIMESTAMP])) { + $value = $data[self::FIELD_TIMESTAMP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) { + $ext = $data[self::FIELD_TIMESTAMP_EXT]; } else { - $this->setTimestamp(new FHIRDateTime($data[self::FIELD_TIMESTAMP])); - } - } - if (isset($data[self::FIELD_TOTAL])) { - $ext = (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) - ? $data[self::FIELD_TOTAL_EXT] - : null; - if ($data[self::FIELD_TOTAL] instanceof FHIRInteger) { - $this->setTotal($data[self::FIELD_TOTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_TOTAL]] + $ext)); - } else if (is_array($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRInteger(array_merge($ext, $data[self::FIELD_TOTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimestamp($value); + } else if (is_array($value)) { + $this->setTimestamp(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimestamp(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTimestamp(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_TOTAL]) || isset($data[self::FIELD_TOTAL_EXT])) { + if (isset($data[self::FIELD_TOTAL])) { + $value = $data[self::FIELD_TOTAL]; } else { - $this->setTotal(new FHIRInteger($data[self::FIELD_TOTAL])); + $value = null; + } + if (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) { + $ext = $data[self::FIELD_TOTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setTotal($value); + } else if (is_array($value)) { + $this->setTotal(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setTotal(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTotal(new FHIRInteger($ext)); } } } @@ -591,8 +619,8 @@ public function setTotal($total = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -741,39 +769,62 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContains())) { - $a[self::FIELD_CONTAINS] = $vs; + $a[self::FIELD_CONTAINS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINS][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getOffset())) { $a[self::FIELD_OFFSET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_OFFSET_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getTimestamp())) { $a[self::FIELD_TIMESTAMP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMESTAMP_EXT] = $enc; } } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_TOTAL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php index f8935f026f..dc8ceeecf5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRValueSetFilter extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of operation to perform as a part of a property based filter. @@ -145,52 +145,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_OP])) { - $ext = (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) - ? $data[self::FIELD_OP_EXT] - : null; - if ($data[self::FIELD_OP] instanceof FHIRFilterOperator) { - $this->setOp($data[self::FIELD_OP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OP])) { - $this->setOp(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $data[self::FIELD_OP]] + $ext)); - } else if (is_array($data[self::FIELD_OP])) { - $this->setOp(new FHIRFilterOperator(array_merge($ext, $data[self::FIELD_OP]))); - } + if (isset($data[self::FIELD_OP]) || isset($data[self::FIELD_OP_EXT])) { + if (isset($data[self::FIELD_OP])) { + $value = $data[self::FIELD_OP]; } else { - $this->setOp(new FHIRFilterOperator($data[self::FIELD_OP])); + $value = null; } - } - if (isset($data[self::FIELD_PROPERTY])) { - $ext = (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) - ? $data[self::FIELD_PROPERTY_EXT] - : null; - if ($data[self::FIELD_PROPERTY] instanceof FHIRCode) { - $this->setProperty($data[self::FIELD_PROPERTY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PROPERTY]] + $ext)); - } else if (is_array($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRCode(array_merge($ext, $data[self::FIELD_PROPERTY]))); - } + if (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) { + $ext = $data[self::FIELD_OP_EXT]; } else { - $this->setProperty(new FHIRCode($data[self::FIELD_PROPERTY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFilterOperator) { + $this->setOp($value); + } else if (is_array($value)) { + $this->setOp(new FHIRFilterOperator(array_merge($ext, $value))); + } else { + $this->setOp(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOp(new FHIRFilterOperator($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRCode) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_PROPERTY]) || isset($data[self::FIELD_PROPERTY_EXT])) { + if (isset($data[self::FIELD_PROPERTY])) { + $value = $data[self::FIELD_PROPERTY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) { + $ext = $data[self::FIELD_PROPERTY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setProperty($value); + } else if (is_array($value)) { + $this->setProperty(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProperty(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRCode($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRCode($ext)); } } } @@ -330,8 +351,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -434,25 +455,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getOp())) { $a[self::FIELD_OP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFilterOperator::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFilterOperator::FIELD_VALUE]); $a[self::FIELD_OP_EXT] = $enc; } } if (null !== ($v = $this->getProperty())) { $a[self::FIELD_PROPERTY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_PROPERTY_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php index cd944aac03..8fec28ee95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRValueSetInclude extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -189,36 +189,50 @@ public function __construct($data = null) $this->addFilter(new FHIRValueSetFilter($data[self::FIELD_FILTER])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -432,8 +446,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -554,25 +568,44 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getFilter())) { - $a[self::FIELD_FILTER] = $vs; + $a[self::FIELD_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FILTER][] = $v; + } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php index 70dc07aeb6..d1b0c9a262 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRValueSetParameter extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -200,116 +200,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -607,8 +656,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -774,53 +823,70 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php index 3ddcf872db..9493ab7c19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRVisionPrescriptionDispense extends FHIRBackboneElement const FIELD_SPHERE_EXT = '_sphere'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -304,132 +304,188 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADD])) { - $ext = (isset($data[self::FIELD_ADD_EXT]) && is_array($data[self::FIELD_ADD_EXT])) - ? $data[self::FIELD_ADD_EXT] - : null; - if ($data[self::FIELD_ADD] instanceof FHIRDecimal) { - $this->setAdd($data[self::FIELD_ADD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADD])) { - $this->setAdd(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ADD]] + $ext)); - } else if (is_array($data[self::FIELD_ADD])) { - $this->setAdd(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ADD]))); - } + if (isset($data[self::FIELD_ADD]) || isset($data[self::FIELD_ADD_EXT])) { + if (isset($data[self::FIELD_ADD])) { + $value = $data[self::FIELD_ADD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADD_EXT]) && is_array($data[self::FIELD_ADD_EXT])) { + $ext = $data[self::FIELD_ADD_EXT]; } else { - $this->setAdd(new FHIRDecimal($data[self::FIELD_ADD])); - } - } - if (isset($data[self::FIELD_AXIS])) { - $ext = (isset($data[self::FIELD_AXIS_EXT]) && is_array($data[self::FIELD_AXIS_EXT])) - ? $data[self::FIELD_AXIS_EXT] - : null; - if ($data[self::FIELD_AXIS] instanceof FHIRInteger) { - $this->setAxis($data[self::FIELD_AXIS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AXIS])) { - $this->setAxis(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_AXIS]] + $ext)); - } else if (is_array($data[self::FIELD_AXIS])) { - $this->setAxis(new FHIRInteger(array_merge($ext, $data[self::FIELD_AXIS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAdd($value); + } else if (is_array($value)) { + $this->setAdd(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAdd(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAdd(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_AXIS]) || isset($data[self::FIELD_AXIS_EXT])) { + if (isset($data[self::FIELD_AXIS])) { + $value = $data[self::FIELD_AXIS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AXIS_EXT]) && is_array($data[self::FIELD_AXIS_EXT])) { + $ext = $data[self::FIELD_AXIS_EXT]; } else { - $this->setAxis(new FHIRInteger($data[self::FIELD_AXIS])); - } - } - if (isset($data[self::FIELD_BACK_CURVE])) { - $ext = (isset($data[self::FIELD_BACK_CURVE_EXT]) && is_array($data[self::FIELD_BACK_CURVE_EXT])) - ? $data[self::FIELD_BACK_CURVE_EXT] - : null; - if ($data[self::FIELD_BACK_CURVE] instanceof FHIRDecimal) { - $this->setBackCurve($data[self::FIELD_BACK_CURVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BACK_CURVE])) { - $this->setBackCurve(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_BACK_CURVE]] + $ext)); - } else if (is_array($data[self::FIELD_BACK_CURVE])) { - $this->setBackCurve(new FHIRDecimal(array_merge($ext, $data[self::FIELD_BACK_CURVE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setAxis($value); + } else if (is_array($value)) { + $this->setAxis(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setAxis(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAxis(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_BACK_CURVE]) || isset($data[self::FIELD_BACK_CURVE_EXT])) { + if (isset($data[self::FIELD_BACK_CURVE])) { + $value = $data[self::FIELD_BACK_CURVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BACK_CURVE_EXT]) && is_array($data[self::FIELD_BACK_CURVE_EXT])) { + $ext = $data[self::FIELD_BACK_CURVE_EXT]; } else { - $this->setBackCurve(new FHIRDecimal($data[self::FIELD_BACK_CURVE])); - } - } - if (isset($data[self::FIELD_BASE])) { - $ext = (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) - ? $data[self::FIELD_BASE_EXT] - : null; - if ($data[self::FIELD_BASE] instanceof FHIRVisionBase) { - $this->setBase($data[self::FIELD_BASE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE])) { - $this->setBase(new FHIRVisionBase([FHIRVisionBase::FIELD_VALUE => $data[self::FIELD_BASE]] + $ext)); - } else if (is_array($data[self::FIELD_BASE])) { - $this->setBase(new FHIRVisionBase(array_merge($ext, $data[self::FIELD_BASE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setBackCurve($value); + } else if (is_array($value)) { + $this->setBackCurve(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setBackCurve(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBackCurve(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_BASE]) || isset($data[self::FIELD_BASE_EXT])) { + if (isset($data[self::FIELD_BASE])) { + $value = $data[self::FIELD_BASE]; } else { - $this->setBase(new FHIRVisionBase($data[self::FIELD_BASE])); - } - } - if (isset($data[self::FIELD_BRAND])) { - $ext = (isset($data[self::FIELD_BRAND_EXT]) && is_array($data[self::FIELD_BRAND_EXT])) - ? $data[self::FIELD_BRAND_EXT] - : null; - if ($data[self::FIELD_BRAND] instanceof FHIRString) { - $this->setBrand($data[self::FIELD_BRAND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BRAND])) { - $this->setBrand(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BRAND]] + $ext)); - } else if (is_array($data[self::FIELD_BRAND])) { - $this->setBrand(new FHIRString(array_merge($ext, $data[self::FIELD_BRAND]))); + $value = null; + } + if (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) { + $ext = $data[self::FIELD_BASE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRVisionBase) { + $this->setBase($value); + } else if (is_array($value)) { + $this->setBase(new FHIRVisionBase(array_merge($ext, $value))); + } else { + $this->setBase(new FHIRVisionBase([FHIRVisionBase::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBase(new FHIRVisionBase($ext)); + } + } + if (isset($data[self::FIELD_BRAND]) || isset($data[self::FIELD_BRAND_EXT])) { + if (isset($data[self::FIELD_BRAND])) { + $value = $data[self::FIELD_BRAND]; } else { - $this->setBrand(new FHIRString($data[self::FIELD_BRAND])); - } - } - if (isset($data[self::FIELD_COLOR])) { - $ext = (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) - ? $data[self::FIELD_COLOR_EXT] - : null; - if ($data[self::FIELD_COLOR] instanceof FHIRString) { - $this->setColor($data[self::FIELD_COLOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COLOR]] + $ext)); - } else if (is_array($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRString(array_merge($ext, $data[self::FIELD_COLOR]))); + $value = null; + } + if (isset($data[self::FIELD_BRAND_EXT]) && is_array($data[self::FIELD_BRAND_EXT])) { + $ext = $data[self::FIELD_BRAND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBrand($value); + } else if (is_array($value)) { + $this->setBrand(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBrand(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBrand(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COLOR]) || isset($data[self::FIELD_COLOR_EXT])) { + if (isset($data[self::FIELD_COLOR])) { + $value = $data[self::FIELD_COLOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) { + $ext = $data[self::FIELD_COLOR_EXT]; } else { - $this->setColor(new FHIRString($data[self::FIELD_COLOR])); - } - } - if (isset($data[self::FIELD_CYLINDER])) { - $ext = (isset($data[self::FIELD_CYLINDER_EXT]) && is_array($data[self::FIELD_CYLINDER_EXT])) - ? $data[self::FIELD_CYLINDER_EXT] - : null; - if ($data[self::FIELD_CYLINDER] instanceof FHIRDecimal) { - $this->setCylinder($data[self::FIELD_CYLINDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CYLINDER])) { - $this->setCylinder(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_CYLINDER]] + $ext)); - } else if (is_array($data[self::FIELD_CYLINDER])) { - $this->setCylinder(new FHIRDecimal(array_merge($ext, $data[self::FIELD_CYLINDER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setColor($value); + } else if (is_array($value)) { + $this->setColor(new FHIRString(array_merge($ext, $value))); + } else { + $this->setColor(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setColor(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CYLINDER]) || isset($data[self::FIELD_CYLINDER_EXT])) { + if (isset($data[self::FIELD_CYLINDER])) { + $value = $data[self::FIELD_CYLINDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CYLINDER_EXT]) && is_array($data[self::FIELD_CYLINDER_EXT])) { + $ext = $data[self::FIELD_CYLINDER_EXT]; } else { - $this->setCylinder(new FHIRDecimal($data[self::FIELD_CYLINDER])); - } - } - if (isset($data[self::FIELD_DIAMETER])) { - $ext = (isset($data[self::FIELD_DIAMETER_EXT]) && is_array($data[self::FIELD_DIAMETER_EXT])) - ? $data[self::FIELD_DIAMETER_EXT] - : null; - if ($data[self::FIELD_DIAMETER] instanceof FHIRDecimal) { - $this->setDiameter($data[self::FIELD_DIAMETER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIAMETER])) { - $this->setDiameter(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DIAMETER]] + $ext)); - } else if (is_array($data[self::FIELD_DIAMETER])) { - $this->setDiameter(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DIAMETER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setCylinder($value); + } else if (is_array($value)) { + $this->setCylinder(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setCylinder(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCylinder(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_DIAMETER]) || isset($data[self::FIELD_DIAMETER_EXT])) { + if (isset($data[self::FIELD_DIAMETER])) { + $value = $data[self::FIELD_DIAMETER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIAMETER_EXT]) && is_array($data[self::FIELD_DIAMETER_EXT])) { + $ext = $data[self::FIELD_DIAMETER_EXT]; } else { - $this->setDiameter(new FHIRDecimal($data[self::FIELD_DIAMETER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDiameter($value); + } else if (is_array($value)) { + $this->setDiameter(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDiameter(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDiameter(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_DURATION])) { @@ -439,68 +495,96 @@ public function __construct($data = null) $this->setDuration(new FHIRSimpleQuantity($data[self::FIELD_DURATION])); } } - if (isset($data[self::FIELD_EYE])) { - $ext = (isset($data[self::FIELD_EYE_EXT]) && is_array($data[self::FIELD_EYE_EXT])) - ? $data[self::FIELD_EYE_EXT] - : null; - if ($data[self::FIELD_EYE] instanceof FHIRVisionEyes) { - $this->setEye($data[self::FIELD_EYE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EYE])) { - $this->setEye(new FHIRVisionEyes([FHIRVisionEyes::FIELD_VALUE => $data[self::FIELD_EYE]] + $ext)); - } else if (is_array($data[self::FIELD_EYE])) { - $this->setEye(new FHIRVisionEyes(array_merge($ext, $data[self::FIELD_EYE]))); - } + if (isset($data[self::FIELD_EYE]) || isset($data[self::FIELD_EYE_EXT])) { + if (isset($data[self::FIELD_EYE])) { + $value = $data[self::FIELD_EYE]; } else { - $this->setEye(new FHIRVisionEyes($data[self::FIELD_EYE])); - } - } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->setNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else if (is_array($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString(array_merge($ext, $data[self::FIELD_NOTES]))); + $value = null; + } + if (isset($data[self::FIELD_EYE_EXT]) && is_array($data[self::FIELD_EYE_EXT])) { + $ext = $data[self::FIELD_EYE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRVisionEyes) { + $this->setEye($value); + } else if (is_array($value)) { + $this->setEye(new FHIRVisionEyes(array_merge($ext, $value))); + } else { + $this->setEye(new FHIRVisionEyes([FHIRVisionEyes::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEye(new FHIRVisionEyes($ext)); + } + } + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; } else { - $this->setNotes(new FHIRString($data[self::FIELD_NOTES])); - } - } - if (isset($data[self::FIELD_POWER])) { - $ext = (isset($data[self::FIELD_POWER_EXT]) && is_array($data[self::FIELD_POWER_EXT])) - ? $data[self::FIELD_POWER_EXT] - : null; - if ($data[self::FIELD_POWER] instanceof FHIRDecimal) { - $this->setPower($data[self::FIELD_POWER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POWER])) { - $this->setPower(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POWER]] + $ext)); - } else if (is_array($data[self::FIELD_POWER])) { - $this->setPower(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POWER]))); + $value = null; + } + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNotes($value); + } else if (is_array($value)) { + $this->setNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNotes(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_POWER]) || isset($data[self::FIELD_POWER_EXT])) { + if (isset($data[self::FIELD_POWER])) { + $value = $data[self::FIELD_POWER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POWER_EXT]) && is_array($data[self::FIELD_POWER_EXT])) { + $ext = $data[self::FIELD_POWER_EXT]; } else { - $this->setPower(new FHIRDecimal($data[self::FIELD_POWER])); - } - } - if (isset($data[self::FIELD_PRISM])) { - $ext = (isset($data[self::FIELD_PRISM_EXT]) && is_array($data[self::FIELD_PRISM_EXT])) - ? $data[self::FIELD_PRISM_EXT] - : null; - if ($data[self::FIELD_PRISM] instanceof FHIRDecimal) { - $this->setPrism($data[self::FIELD_PRISM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRISM])) { - $this->setPrism(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PRISM]] + $ext)); - } else if (is_array($data[self::FIELD_PRISM])) { - $this->setPrism(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PRISM]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPower($value); + } else if (is_array($value)) { + $this->setPower(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPower(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPower(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_PRISM]) || isset($data[self::FIELD_PRISM_EXT])) { + if (isset($data[self::FIELD_PRISM])) { + $value = $data[self::FIELD_PRISM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRISM_EXT]) && is_array($data[self::FIELD_PRISM_EXT])) { + $ext = $data[self::FIELD_PRISM_EXT]; } else { - $this->setPrism(new FHIRDecimal($data[self::FIELD_PRISM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPrism($value); + } else if (is_array($value)) { + $this->setPrism(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPrism(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrism(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PRODUCT])) { @@ -510,20 +594,27 @@ public function __construct($data = null) $this->setProduct(new FHIRCoding($data[self::FIELD_PRODUCT])); } } - if (isset($data[self::FIELD_SPHERE])) { - $ext = (isset($data[self::FIELD_SPHERE_EXT]) && is_array($data[self::FIELD_SPHERE_EXT])) - ? $data[self::FIELD_SPHERE_EXT] - : null; - if ($data[self::FIELD_SPHERE] instanceof FHIRDecimal) { - $this->setSphere($data[self::FIELD_SPHERE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SPHERE])) { - $this->setSphere(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_SPHERE]] + $ext)); - } else if (is_array($data[self::FIELD_SPHERE])) { - $this->setSphere(new FHIRDecimal(array_merge($ext, $data[self::FIELD_SPHERE]))); - } + if (isset($data[self::FIELD_SPHERE]) || isset($data[self::FIELD_SPHERE_EXT])) { + if (isset($data[self::FIELD_SPHERE])) { + $value = $data[self::FIELD_SPHERE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SPHERE_EXT]) && is_array($data[self::FIELD_SPHERE_EXT])) { + $ext = $data[self::FIELD_SPHERE_EXT]; } else { - $this->setSphere(new FHIRDecimal($data[self::FIELD_SPHERE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setSphere($value); + } else if (is_array($value)) { + $this->setSphere(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setSphere(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSphere(new FHIRDecimal($ext)); } } } @@ -1095,8 +1186,8 @@ public function setSphere($sphere = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1342,57 +1433,73 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAdd())) { $a[self::FIELD_ADD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ADD_EXT] = $enc; } } if (null !== ($v = $this->getAxis())) { $a[self::FIELD_AXIS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_AXIS_EXT] = $enc; } } if (null !== ($v = $this->getBackCurve())) { $a[self::FIELD_BACK_CURVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_BACK_CURVE_EXT] = $enc; } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRVisionBase::FIELD_VALUE, $enc)))) { + unset($enc[FHIRVisionBase::FIELD_VALUE]); $a[self::FIELD_BASE_EXT] = $enc; } } if (null !== ($v = $this->getBrand())) { $a[self::FIELD_BRAND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BRAND_EXT] = $enc; } } if (null !== ($v = $this->getColor())) { $a[self::FIELD_COLOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COLOR_EXT] = $enc; } } if (null !== ($v = $this->getCylinder())) { $a[self::FIELD_CYLINDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_CYLINDER_EXT] = $enc; } } if (null !== ($v = $this->getDiameter())) { $a[self::FIELD_DIAMETER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DIAMETER_EXT] = $enc; } } @@ -1401,29 +1508,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getEye())) { $a[self::FIELD_EYE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRVisionEyes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRVisionEyes::FIELD_VALUE]); $a[self::FIELD_EYE_EXT] = $enc; } } if (null !== ($v = $this->getNotes())) { $a[self::FIELD_NOTES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTES_EXT] = $enc; } } if (null !== ($v = $this->getPower())) { $a[self::FIELD_POWER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POWER_EXT] = $enc; } } if (null !== ($v = $this->getPrism())) { $a[self::FIELD_PRISM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PRISM_EXT] = $enc; } } @@ -1432,11 +1547,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSphere())) { $a[self::FIELD_SPHERE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_SPHERE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBase64Binary.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBase64Binary.php index 5405f29780..d2927a2a2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBase64Binary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBase64Binary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRBase64Binary extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BASE_64BINARY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRBase64BinaryPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBindingStrength.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBindingStrength.php index e29af7dffb..b25b357f3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBindingStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBindingStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBindingStrength extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINDING_STRENGTH; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRBindingStrengthList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBoolean.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBoolean.php index 2dd4b2861f..9dcf68fbe4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBoolean.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBoolean.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBoolean extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BOOLEAN; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRBooleanPrimitive @@ -175,8 +174,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -259,6 +258,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBundleType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBundleType.php index e4f04a6b8a..bddc5a8d99 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBundleType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRBundleType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBundleType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BUNDLE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRBundleTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanActivityStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanActivityStatus.php index 3107c42cfe..5ad5a8ae5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanActivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanActivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCarePlanActivityStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRCarePlanActivityStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanRelationship.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanRelationship.php index 6aaeb97e2e..204fcde81b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanRelationship.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanRelationship.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCarePlanRelationship extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_RELATIONSHIP; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRCarePlanRelationshipList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanStatus.php index 088eda7124..508f1334e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCarePlanStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRCarePlanStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRCarePlanStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClaimType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClaimType.php index 30a8bc1397..e82dc22202 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClaimType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClaimType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRClaimType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLAIM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRClaimTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClinicalImpressionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClinicalImpressionStatus.php index 5b2a263233..ff53c7d6c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClinicalImpressionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRClinicalImpressionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRClinicalImpressionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRClinicalImpressionStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCode.php index 2dd5164fb7..7e69ebc7f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRCodePrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCodeableConcept.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCodeableConcept.php index 74adb17bfd..95145331e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCodeableConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCodeableConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRCodeableConcept extends FHIRElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -150,20 +150,27 @@ public function __construct($data = null) $this->addCoding(new FHIRCoding($data[self::FIELD_CODING])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -291,8 +298,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,15 +393,26 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCoding())) { - $a[self::FIELD_CODING] = $vs; + $a[self::FIELD_CODING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODING][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCoding.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCoding.php index 7d19997329..c05ced1067 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCoding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCoding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCoding extends FHIRElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -177,84 +177,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_USER_SELECTED])) { - $ext = (isset($data[self::FIELD_USER_SELECTED_EXT]) && is_array($data[self::FIELD_USER_SELECTED_EXT])) - ? $data[self::FIELD_USER_SELECTED_EXT] - : null; - if ($data[self::FIELD_USER_SELECTED] instanceof FHIRBoolean) { - $this->setUserSelected($data[self::FIELD_USER_SELECTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USER_SELECTED])) { - $this->setUserSelected(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_USER_SELECTED]] + $ext)); - } else if (is_array($data[self::FIELD_USER_SELECTED])) { - $this->setUserSelected(new FHIRBoolean(array_merge($ext, $data[self::FIELD_USER_SELECTED]))); + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setUserSelected(new FHIRBoolean($data[self::FIELD_USER_SELECTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_USER_SELECTED]) || isset($data[self::FIELD_USER_SELECTED_EXT])) { + if (isset($data[self::FIELD_USER_SELECTED])) { + $value = $data[self::FIELD_USER_SELECTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USER_SELECTED_EXT]) && is_array($data[self::FIELD_USER_SELECTED_EXT])) { + $ext = $data[self::FIELD_USER_SELECTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setUserSelected($value); + } else if (is_array($value)) { + $this->setUserSelected(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setUserSelected(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUserSelected(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -490,8 +525,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -629,39 +664,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUserSelected())) { $a[self::FIELD_USER_SELECTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_USER_SELECTED_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationRequestStatus.php index 1d042e79c5..dc1af0b279 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCommunicationRequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRCommunicationRequestStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationStatus.php index f52d7700d8..09d658be74 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCommunicationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCommunicationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMMUNICATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRCommunicationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionAttestationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionAttestationMode.php index e349985c93..55abc6c8bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionAttestationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionAttestationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCompositionAttestationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRCompositionAttestationModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionStatus.php index 5c8dbe0cd6..7561a3a528 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRCompositionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCompositionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRCompositionStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConceptMapEquivalence.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConceptMapEquivalence.php index 4cd848c639..11b8725597 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConceptMapEquivalence.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConceptMapEquivalence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRConceptMapEquivalence extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRConceptMapEquivalenceList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionVerificationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionVerificationStatus.php index d4b29b379f..59149102c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionVerificationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionVerificationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRConditionVerificationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_VERIFICATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRConditionVerificationStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionalDeleteStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionalDeleteStatus.php index 3ac5eaaea6..10a42d5fef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionalDeleteStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConditionalDeleteStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConditionalDeleteStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_DELETE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRConditionalDeleteStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceEventMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceEventMode.php index a0bc517979..5e4d38c9a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceEventMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceEventMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConformanceEventMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_EVENT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRConformanceEventModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceResourceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceResourceStatus.php index 7a089af91b..5b4bbdcdfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceResourceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceResourceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRConformanceResourceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_RESOURCE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRConformanceResourceStatusList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceStatementKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceStatementKind.php index 316ca267b8..147f49b954 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceStatementKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConformanceStatementKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConformanceStatementKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_STATEMENT_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRConformanceStatementKindList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConstraintSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConstraintSeverity.php index 47d246db15..46b4b22dd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConstraintSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRConstraintSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConstraintSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRConstraintSeverityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPoint.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPoint.php index 9db27f8207..96b9424680 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPoint.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRContactPoint extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -177,68 +177,96 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_RANK])) { - $ext = (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) - ? $data[self::FIELD_RANK_EXT] - : null; - if ($data[self::FIELD_RANK] instanceof FHIRPositiveInt) { - $this->setRank($data[self::FIELD_RANK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_RANK]] + $ext)); - } else if (is_array($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_RANK]))); - } + if (isset($data[self::FIELD_RANK]) || isset($data[self::FIELD_RANK_EXT])) { + if (isset($data[self::FIELD_RANK])) { + $value = $data[self::FIELD_RANK]; } else { - $this->setRank(new FHIRPositiveInt($data[self::FIELD_RANK])); + $value = null; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRContactPointSystem) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRContactPointSystem([FHIRContactPointSystem::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRContactPointSystem(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) { + $ext = $data[self::FIELD_RANK_EXT]; } else { - $this->setSystem(new FHIRContactPointSystem($data[self::FIELD_SYSTEM])); + $ext = []; } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRContactPointUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRContactPointUse([FHIRContactPointUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRContactPointUse(array_merge($ext, $data[self::FIELD_USE]))); + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setRank($value); + } else if (is_array($value)) { + $this->setRank(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRank(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setUse(new FHIRContactPointUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContactPointSystem) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRContactPointSystem(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRContactPointSystem([FHIRContactPointSystem::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRContactPointSystem($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContactPointUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRContactPointUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRContactPointUse([FHIRContactPointUse::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUse(new FHIRContactPointUse($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -436,8 +464,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -555,32 +583,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getRank())) { $a[self::FIELD_RANK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_RANK_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContactPointSystem::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContactPointSystem::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContactPointUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContactPointUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointSystem.php index 5fe108820f..95fa72b2ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContactPointSystem extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_SYSTEM; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRContactPointSystemList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointUse.php index 63da523e7e..1c4b5596ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContactPointUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContactPointUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRContactPointUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContentType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContentType.php index c7d4078d1b..1fe066b0b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContentType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRContentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContentType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTENT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRContentTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDataElementStringency.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDataElementStringency.php index d04c351e02..1f4991f70b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDataElementStringency.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDataElementStringency.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDataElementStringency extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_STRINGENCY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDataElementStringencyList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDate.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDate.php index 4951fabbd3..c4565219c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDate.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRDate extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRDatePrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDateTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDateTime.php index cf3dcc1f4d..52e42003b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDateTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDateTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,10 +83,9 @@ class FHIRDateTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRDateTimePrimitive @@ -179,8 +178,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -263,6 +262,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDaysOfWeek.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDaysOfWeek.php index 8d8d9576d0..29618b4224 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDaysOfWeek.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDaysOfWeek.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDaysOfWeek extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DAYS_OF_WEEK; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDaysOfWeekList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDecimal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDecimal.php index 2747964d4d..8f5e904163 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDecimal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDecimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRDecimal extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DECIMAL; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRDecimalPrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDetectedIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDetectedIssueSeverity.php index e49c341578..42af46f3c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDetectedIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDetectedIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDetectedIssueSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDetectedIssueSeverityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationState.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationState.php index 0835c1744c..77035ad157 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationState.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricCalibrationState extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_STATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDeviceMetricCalibrationStateList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationType.php index 5776d06d28..bd48933653 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCalibrationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricCalibrationType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDeviceMetricCalibrationTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCategory.php index e09450a8c3..d56b9faa1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDeviceMetricCategoryList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricColor.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricColor.php index 9168384cb8..08cfa7ae14 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricColor.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricColor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricColor extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_COLOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDeviceMetricColorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricOperationalStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricOperationalStatus.php index 84af5d2156..c0341b9c01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricOperationalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceMetricOperationalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricOperationalStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_OPERATIONAL_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDeviceMetricOperationalStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceStatus.php index 4c43e3de90..401966a9b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDeviceStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestPriority.php index d471d1451f..d9f145c86a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceUseRequestPriority extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST_PRIORITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDeviceUseRequestPriorityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestStatus.php index 741d6aa726..93625e34f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDeviceUseRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceUseRequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDeviceUseRequestStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderPriority.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderPriority.php index f66ddc0165..3a057d6ba9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDiagnosticOrderPriority extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_PRIORITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDiagnosticOrderPriorityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderStatus.php index a91dda1cd1..2c21fcc80e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDiagnosticOrderStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDiagnosticOrderStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticReportStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticReportStatus.php index 6865375618..7f46e27603 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDiagnosticReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDiagnosticReportStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDiagnosticReportStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDigitalMediaType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDigitalMediaType.php index 97007d660d..6f1b5fb0ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDigitalMediaType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDigitalMediaType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDigitalMediaType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIGITAL_MEDIA_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDigitalMediaTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentMode.php index d5ecce1831..5afe6b94aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDocumentMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDocumentModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentReferenceStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentReferenceStatus.php index 9279d7fe73..10d7290ccf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentReferenceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentReferenceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRDocumentReferenceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDocumentReferenceStatusList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentRelationshipType.php index a9303d38e8..25d981311b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRDocumentRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDocumentRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRDocumentRelationshipTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition.php index ab14ab219b..f470db37b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -435,7 +435,7 @@ class FHIRElementDefinition extends FHIRElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -3681,33 +3681,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if (is_array($data[self::FIELD_ALIAS])) { - foreach($data[self::FIELD_ALIAS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAlias($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAlias(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAlias($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAlias($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAlias(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAlias(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAlias(new FHIRString($iext)); } - } elseif ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->addAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ALIAS])) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else { - $this->addAlias(new FHIRString($data[self::FIELD_ALIAS])); } } if (isset($data[self::FIELD_BASE])) { @@ -3742,49 +3751,65 @@ public function __construct($data = null) $this->addCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COMMENTS])) { - $ext = (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) - ? $data[self::FIELD_COMMENTS_EXT] - : null; - if ($data[self::FIELD_COMMENTS] instanceof FHIRMarkdown) { - $this->setComments($data[self::FIELD_COMMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COMMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COMMENTS]))); - } + if (isset($data[self::FIELD_COMMENTS]) || isset($data[self::FIELD_COMMENTS_EXT])) { + if (isset($data[self::FIELD_COMMENTS])) { + $value = $data[self::FIELD_COMMENTS]; } else { - $this->setComments(new FHIRMarkdown($data[self::FIELD_COMMENTS])); + $value = null; } - } - if (isset($data[self::FIELD_CONDITION])) { - $ext = (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) - ? $data[self::FIELD_CONDITION_EXT] - : null; - if (is_array($data[self::FIELD_CONDITION])) { - foreach($data[self::FIELD_CONDITION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRId) { - $this->addCondition($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCondition(new FHIRId(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) { + $ext = $data[self::FIELD_COMMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setComments($value); + } else if (is_array($value)) { + $this->setComments(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setComments(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComments(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_CONDITION]) || isset($data[self::FIELD_CONDITION_EXT])) { + if (isset($data[self::FIELD_CONDITION])) { + $value = $data[self::FIELD_CONDITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) { + $ext = $data[self::FIELD_CONDITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->addCondition($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRId) { + $this->addCondition($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCondition(new FHIRId(array_merge($v, $iext))); + } else { + $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCondition(new FHIRId($v)); } + } elseif (is_array($value)) { + $this->addCondition(new FHIRId(array_merge($ext, $value))); + } else { + $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCondition(new FHIRId($iext)); } - } elseif ($data[self::FIELD_CONDITION] instanceof FHIRId) { - $this->addCondition($data[self::FIELD_CONDITION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONDITION])) { - $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_CONDITION]] + $ext)); - } else { - $this->addCondition(new FHIRId($data[self::FIELD_CONDITION])); } } if (isset($data[self::FIELD_CONSTRAINT])) { @@ -3826,52 +3851,73 @@ public function __construct($data = null) $this->setDefaultValueAttachment(new FHIRAttachment($data[self::FIELD_DEFAULT_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setDefaultValueBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]; } else { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setDefaultValueBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]; } else { - $this->setDefaultValueBoolean(new FHIRBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setDefaultValueBase64Binary($value); + } else if (is_array($value)) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_CODE] instanceof FHIRCode) { - $this->setDefaultValueCode($data[self::FIELD_DEFAULT_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_CODE]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]) || isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDefaultValueBoolean($value); + } else if (is_array($value)) { + $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE]) || isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_CODE_EXT]; } else { - $this->setDefaultValueCode(new FHIRCode($data[self::FIELD_DEFAULT_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setDefaultValueCode($value); + } else if (is_array($value)) { + $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { @@ -3895,52 +3941,73 @@ public function __construct($data = null) $this->setDefaultValueContactPoint(new FHIRContactPoint($data[self::FIELD_DEFAULT_VALUE_CONTACT_POINT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE] instanceof FHIRDate) { - $this->setDefaultValueDate($data[self::FIELD_DEFAULT_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE]; } else { - $this->setDefaultValueDate(new FHIRDate($data[self::FIELD_DEFAULT_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setDefaultValueDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_EXT]; } else { - $this->setDefaultValueDateTime(new FHIRDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDefaultValueDate($value); + } else if (is_array($value)) { + $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setDefaultValueDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDefaultValueDateTime($value); + } else if (is_array($value)) { + $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL]) || isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DECIMAL]; } else { - $this->setDefaultValueDecimal(new FHIRDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDefaultValueDecimal($value); + } else if (is_array($value)) { + $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])) { @@ -3950,20 +4017,27 @@ public function __construct($data = null) $this->setDefaultValueHumanName(new FHIRHumanName($data[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_ID] instanceof FHIRId) { - $this->setDefaultValueId($data[self::FIELD_DEFAULT_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_ID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID]) || isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_ID_EXT]; } else { - $this->setDefaultValueId(new FHIRId($data[self::FIELD_DEFAULT_VALUE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setDefaultValueId($value); + } else if (is_array($value)) { + $this->setDefaultValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { @@ -3973,52 +4047,73 @@ public function __construct($data = null) $this->setDefaultValueIdentifier(new FHIRIdentifier($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setDefaultValueInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT]) || isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INSTANT]; } else { - $this->setDefaultValueInstant(new FHIRInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setDefaultValueInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]; } else { - $this->setDefaultValueInteger(new FHIRInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setDefaultValueInstant($value); + } else if (is_array($value)) { + $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setDefaultValueMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER]) || isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDefaultValueInteger($value); + } else if (is_array($value)) { + $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]) || isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]; } else { - $this->setDefaultValueMarkdown(new FHIRMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDefaultValueMarkdown($value); + } else if (is_array($value)) { + $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_META])) { @@ -4028,20 +4123,27 @@ public function __construct($data = null) $this->setDefaultValueMeta(new FHIRMeta($data[self::FIELD_DEFAULT_VALUE_META])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_OID] instanceof FHIROid) { - $this->setDefaultValueOid($data[self::FIELD_DEFAULT_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_OID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID]) || isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_OID_EXT]; } else { - $this->setDefaultValueOid(new FHIROid($data[self::FIELD_DEFAULT_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setDefaultValueOid($value); + } else if (is_array($value)) { + $this->setDefaultValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_PERIOD])) { @@ -4051,20 +4153,27 @@ public function __construct($data = null) $this->setDefaultValuePeriod(new FHIRPeriod($data[self::FIELD_DEFAULT_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setDefaultValuePositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]; } else { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDefaultValuePositiveInt($value); + } else if (is_array($value)) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_QUANTITY])) { @@ -4109,36 +4218,50 @@ public function __construct($data = null) $this->setDefaultValueSignature(new FHIRSignature($data[self::FIELD_DEFAULT_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_STRING] instanceof FHIRString) { - $this->setDefaultValueString($data[self::FIELD_DEFAULT_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_STRING]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING]) || isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { + $value = $data[self::FIELD_DEFAULT_VALUE_STRING]; } else { - $this->setDefaultValueString(new FHIRString($data[self::FIELD_DEFAULT_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_TIME] instanceof FHIRTime) { - $this->setDefaultValueTime($data[self::FIELD_DEFAULT_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_TIME]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefaultValueString($value); + } else if (is_array($value)) { + $this->setDefaultValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_TIME_EXT]; } else { - $this->setDefaultValueTime(new FHIRTime($data[self::FIELD_DEFAULT_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setDefaultValueTime($value); + } else if (is_array($value)) { + $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_TIMING])) { @@ -4148,68 +4271,96 @@ public function __construct($data = null) $this->setDefaultValueTiming(new FHIRTiming($data[self::FIELD_DEFAULT_VALUE_TIMING])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setDefaultValueUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]; } else { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_URI] instanceof FHIRUri) { - $this->setDefaultValueUri($data[self::FIELD_DEFAULT_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_URI]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setDefaultValueUri(new FHIRUri($data[self::FIELD_DEFAULT_VALUE_URI])); + $ext = []; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_UUID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UUID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_UUID] instanceof FHIRUuid) { - $this->setDefaultValueUuid($data[self::FIELD_DEFAULT_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_UUID])) { - $this->setDefaultValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_UUID])) { - $this->setDefaultValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_UUID]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setDefaultValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URI]) || isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { + $value = $data[self::FIELD_DEFAULT_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_URI_EXT]; } else { - $this->setDefaultValueUuid(new FHIRUuid($data[self::FIELD_DEFAULT_VALUE_UUID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefaultValueUri($value); + } else if (is_array($value)) { + $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueUri(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRMarkdown) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DEFINITION]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_UUID]) || isset($data[self::FIELD_DEFAULT_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_UUID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_UUID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setDefaultValueUuid($value); + } else if (is_array($value)) { + $this->setDefaultValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setDefaultValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueUuid(new FHIRUuid($ext)); + } + } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; } else { - $this->setDefinition(new FHIRMarkdown($data[self::FIELD_DEFINITION])); + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EXAMPLE_ADDRESS])) { @@ -4233,52 +4384,73 @@ public function __construct($data = null) $this->setExampleAttachment(new FHIRAttachment($data[self::FIELD_EXAMPLE_ATTACHMENT])); } } - if (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setExampleBase64Binary($data[self::FIELD_EXAMPLE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_BASE_64BINARY])) { - $this->setExampleBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_EXAMPLE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_BASE_64BINARY])) { - $this->setExampleBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_EXAMPLE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY]) || isset($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY])) { + $value = $data[self::FIELD_EXAMPLE_BASE_64BINARY]; } else { - $this->setExampleBase64Binary(new FHIRBase64Binary($data[self::FIELD_EXAMPLE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT]) && is_array($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) - ? $data[self::FIELD_EXAMPLE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_BOOLEAN] instanceof FHIRBoolean) { - $this->setExampleBoolean($data[self::FIELD_EXAMPLE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $this->setExampleBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXAMPLE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $this->setExampleBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXAMPLE_BOOLEAN]))); - } + if (isset($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_BASE_64BINARY_EXT]; } else { - $this->setExampleBoolean(new FHIRBoolean($data[self::FIELD_EXAMPLE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setExampleBase64Binary($value); + } else if (is_array($value)) { + $this->setExampleBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setExampleBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_EXAMPLE_CODE])) { - $ext = (isset($data[self::FIELD_EXAMPLE_CODE_EXT]) && is_array($data[self::FIELD_EXAMPLE_CODE_EXT])) - ? $data[self::FIELD_EXAMPLE_CODE_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_CODE] instanceof FHIRCode) { - $this->setExampleCode($data[self::FIELD_EXAMPLE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_CODE])) { - $this->setExampleCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_EXAMPLE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_CODE])) { - $this->setExampleCode(new FHIRCode(array_merge($ext, $data[self::FIELD_EXAMPLE_CODE]))); + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN]) || isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN])) { + $value = $data[self::FIELD_EXAMPLE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT]) && is_array($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExampleBoolean($value); + } else if (is_array($value)) { + $this->setExampleBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExampleBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_CODE]) || isset($data[self::FIELD_EXAMPLE_CODE_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_CODE])) { + $value = $data[self::FIELD_EXAMPLE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_CODE_EXT]) && is_array($data[self::FIELD_EXAMPLE_CODE_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_CODE_EXT]; } else { - $this->setExampleCode(new FHIRCode($data[self::FIELD_EXAMPLE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setExampleCode($value); + } else if (is_array($value)) { + $this->setExampleCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setExampleCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_EXAMPLE_CODEABLE_CONCEPT])) { @@ -4302,52 +4474,73 @@ public function __construct($data = null) $this->setExampleContactPoint(new FHIRContactPoint($data[self::FIELD_EXAMPLE_CONTACT_POINT])); } } - if (isset($data[self::FIELD_EXAMPLE_DATE])) { - $ext = (isset($data[self::FIELD_EXAMPLE_DATE_EXT]) && is_array($data[self::FIELD_EXAMPLE_DATE_EXT])) - ? $data[self::FIELD_EXAMPLE_DATE_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_DATE] instanceof FHIRDate) { - $this->setExampleDate($data[self::FIELD_EXAMPLE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_DATE])) { - $this->setExampleDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_EXAMPLE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_DATE])) { - $this->setExampleDate(new FHIRDate(array_merge($ext, $data[self::FIELD_EXAMPLE_DATE]))); - } + if (isset($data[self::FIELD_EXAMPLE_DATE]) || isset($data[self::FIELD_EXAMPLE_DATE_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_DATE])) { + $value = $data[self::FIELD_EXAMPLE_DATE]; } else { - $this->setExampleDate(new FHIRDate($data[self::FIELD_EXAMPLE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EXAMPLE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EXAMPLE_DATE_TIME_EXT])) - ? $data[self::FIELD_EXAMPLE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_DATE_TIME] instanceof FHIRDateTime) { - $this->setExampleDateTime($data[self::FIELD_EXAMPLE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_DATE_TIME])) { - $this->setExampleDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXAMPLE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_DATE_TIME])) { - $this->setExampleDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXAMPLE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EXAMPLE_DATE_EXT]) && is_array($data[self::FIELD_EXAMPLE_DATE_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_DATE_EXT]; } else { - $this->setExampleDateTime(new FHIRDateTime($data[self::FIELD_EXAMPLE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setExampleDate($value); + } else if (is_array($value)) { + $this->setExampleDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setExampleDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_EXAMPLE_DECIMAL])) { - $ext = (isset($data[self::FIELD_EXAMPLE_DECIMAL_EXT]) && is_array($data[self::FIELD_EXAMPLE_DECIMAL_EXT])) - ? $data[self::FIELD_EXAMPLE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_DECIMAL] instanceof FHIRDecimal) { - $this->setExampleDecimal($data[self::FIELD_EXAMPLE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_DECIMAL])) { - $this->setExampleDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_EXAMPLE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_DECIMAL])) { - $this->setExampleDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_EXAMPLE_DECIMAL]))); + if (isset($data[self::FIELD_EXAMPLE_DATE_TIME]) || isset($data[self::FIELD_EXAMPLE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_DATE_TIME])) { + $value = $data[self::FIELD_EXAMPLE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EXAMPLE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExampleDateTime($value); + } else if (is_array($value)) { + $this->setExampleDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExampleDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_DECIMAL]) || isset($data[self::FIELD_EXAMPLE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_DECIMAL])) { + $value = $data[self::FIELD_EXAMPLE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_DECIMAL_EXT]) && is_array($data[self::FIELD_EXAMPLE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_DECIMAL_EXT]; } else { - $this->setExampleDecimal(new FHIRDecimal($data[self::FIELD_EXAMPLE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setExampleDecimal($value); + } else if (is_array($value)) { + $this->setExampleDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setExampleDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_EXAMPLE_HUMAN_NAME])) { @@ -4357,20 +4550,27 @@ public function __construct($data = null) $this->setExampleHumanName(new FHIRHumanName($data[self::FIELD_EXAMPLE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_EXAMPLE_ID])) { - $ext = (isset($data[self::FIELD_EXAMPLE_ID_EXT]) && is_array($data[self::FIELD_EXAMPLE_ID_EXT])) - ? $data[self::FIELD_EXAMPLE_ID_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_ID] instanceof FHIRId) { - $this->setExampleId($data[self::FIELD_EXAMPLE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_ID])) { - $this->setExampleId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_EXAMPLE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_ID])) { - $this->setExampleId(new FHIRId(array_merge($ext, $data[self::FIELD_EXAMPLE_ID]))); - } + if (isset($data[self::FIELD_EXAMPLE_ID]) || isset($data[self::FIELD_EXAMPLE_ID_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_ID])) { + $value = $data[self::FIELD_EXAMPLE_ID]; } else { - $this->setExampleId(new FHIRId($data[self::FIELD_EXAMPLE_ID])); + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_ID_EXT]) && is_array($data[self::FIELD_EXAMPLE_ID_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setExampleId($value); + } else if (is_array($value)) { + $this->setExampleId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setExampleId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleId(new FHIRId($ext)); } } if (isset($data[self::FIELD_EXAMPLE_IDENTIFIER])) { @@ -4380,52 +4580,73 @@ public function __construct($data = null) $this->setExampleIdentifier(new FHIRIdentifier($data[self::FIELD_EXAMPLE_IDENTIFIER])); } } - if (isset($data[self::FIELD_EXAMPLE_INSTANT])) { - $ext = (isset($data[self::FIELD_EXAMPLE_INSTANT_EXT]) && is_array($data[self::FIELD_EXAMPLE_INSTANT_EXT])) - ? $data[self::FIELD_EXAMPLE_INSTANT_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_INSTANT] instanceof FHIRInstant) { - $this->setExampleInstant($data[self::FIELD_EXAMPLE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_INSTANT])) { - $this->setExampleInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_EXAMPLE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_INSTANT])) { - $this->setExampleInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_EXAMPLE_INSTANT]))); - } + if (isset($data[self::FIELD_EXAMPLE_INSTANT]) || isset($data[self::FIELD_EXAMPLE_INSTANT_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_INSTANT])) { + $value = $data[self::FIELD_EXAMPLE_INSTANT]; } else { - $this->setExampleInstant(new FHIRInstant($data[self::FIELD_EXAMPLE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_INTEGER])) { - $ext = (isset($data[self::FIELD_EXAMPLE_INTEGER_EXT]) && is_array($data[self::FIELD_EXAMPLE_INTEGER_EXT])) - ? $data[self::FIELD_EXAMPLE_INTEGER_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_INTEGER] instanceof FHIRInteger) { - $this->setExampleInteger($data[self::FIELD_EXAMPLE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_INTEGER])) { - $this->setExampleInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_EXAMPLE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_INTEGER])) { - $this->setExampleInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_EXAMPLE_INTEGER]))); - } + if (isset($data[self::FIELD_EXAMPLE_INSTANT_EXT]) && is_array($data[self::FIELD_EXAMPLE_INSTANT_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_INSTANT_EXT]; } else { - $this->setExampleInteger(new FHIRInteger($data[self::FIELD_EXAMPLE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setExampleInstant($value); + } else if (is_array($value)) { + $this->setExampleInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setExampleInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_EXAMPLE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_EXAMPLE_MARKDOWN_EXT]) && is_array($data[self::FIELD_EXAMPLE_MARKDOWN_EXT])) - ? $data[self::FIELD_EXAMPLE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setExampleMarkdown($data[self::FIELD_EXAMPLE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_MARKDOWN])) { - $this->setExampleMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_EXAMPLE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_MARKDOWN])) { - $this->setExampleMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_EXAMPLE_MARKDOWN]))); + if (isset($data[self::FIELD_EXAMPLE_INTEGER]) || isset($data[self::FIELD_EXAMPLE_INTEGER_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_INTEGER])) { + $value = $data[self::FIELD_EXAMPLE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_INTEGER_EXT]) && is_array($data[self::FIELD_EXAMPLE_INTEGER_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setExampleInteger($value); + } else if (is_array($value)) { + $this->setExampleInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setExampleInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_MARKDOWN]) || isset($data[self::FIELD_EXAMPLE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_MARKDOWN])) { + $value = $data[self::FIELD_EXAMPLE_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_MARKDOWN_EXT]) && is_array($data[self::FIELD_EXAMPLE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_MARKDOWN_EXT]; } else { - $this->setExampleMarkdown(new FHIRMarkdown($data[self::FIELD_EXAMPLE_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setExampleMarkdown($value); + } else if (is_array($value)) { + $this->setExampleMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setExampleMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EXAMPLE_META])) { @@ -4435,20 +4656,27 @@ public function __construct($data = null) $this->setExampleMeta(new FHIRMeta($data[self::FIELD_EXAMPLE_META])); } } - if (isset($data[self::FIELD_EXAMPLE_OID])) { - $ext = (isset($data[self::FIELD_EXAMPLE_OID_EXT]) && is_array($data[self::FIELD_EXAMPLE_OID_EXT])) - ? $data[self::FIELD_EXAMPLE_OID_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_OID] instanceof FHIROid) { - $this->setExampleOid($data[self::FIELD_EXAMPLE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_OID])) { - $this->setExampleOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_EXAMPLE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_OID])) { - $this->setExampleOid(new FHIROid(array_merge($ext, $data[self::FIELD_EXAMPLE_OID]))); - } + if (isset($data[self::FIELD_EXAMPLE_OID]) || isset($data[self::FIELD_EXAMPLE_OID_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_OID])) { + $value = $data[self::FIELD_EXAMPLE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_OID_EXT]) && is_array($data[self::FIELD_EXAMPLE_OID_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_OID_EXT]; } else { - $this->setExampleOid(new FHIROid($data[self::FIELD_EXAMPLE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setExampleOid($value); + } else if (is_array($value)) { + $this->setExampleOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setExampleOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_EXAMPLE_PERIOD])) { @@ -4458,20 +4686,27 @@ public function __construct($data = null) $this->setExamplePeriod(new FHIRPeriod($data[self::FIELD_EXAMPLE_PERIOD])); } } - if (isset($data[self::FIELD_EXAMPLE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_EXAMPLE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_EXAMPLE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_EXAMPLE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setExamplePositiveInt($data[self::FIELD_EXAMPLE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_POSITIVE_INT])) { - $this->setExamplePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_EXAMPLE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_POSITIVE_INT])) { - $this->setExamplePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_EXAMPLE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_EXAMPLE_POSITIVE_INT]) || isset($data[self::FIELD_EXAMPLE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_POSITIVE_INT])) { + $value = $data[self::FIELD_EXAMPLE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_EXAMPLE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_POSITIVE_INT_EXT]; } else { - $this->setExamplePositiveInt(new FHIRPositiveInt($data[self::FIELD_EXAMPLE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setExamplePositiveInt($value); + } else if (is_array($value)) { + $this->setExamplePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setExamplePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExamplePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_EXAMPLE_QUANTITY])) { @@ -4516,36 +4751,50 @@ public function __construct($data = null) $this->setExampleSignature(new FHIRSignature($data[self::FIELD_EXAMPLE_SIGNATURE])); } } - if (isset($data[self::FIELD_EXAMPLE_STRING])) { - $ext = (isset($data[self::FIELD_EXAMPLE_STRING_EXT]) && is_array($data[self::FIELD_EXAMPLE_STRING_EXT])) - ? $data[self::FIELD_EXAMPLE_STRING_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_STRING] instanceof FHIRString) { - $this->setExampleString($data[self::FIELD_EXAMPLE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_STRING])) { - $this->setExampleString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXAMPLE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_STRING])) { - $this->setExampleString(new FHIRString(array_merge($ext, $data[self::FIELD_EXAMPLE_STRING]))); - } + if (isset($data[self::FIELD_EXAMPLE_STRING]) || isset($data[self::FIELD_EXAMPLE_STRING_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_STRING])) { + $value = $data[self::FIELD_EXAMPLE_STRING]; } else { - $this->setExampleString(new FHIRString($data[self::FIELD_EXAMPLE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_TIME])) { - $ext = (isset($data[self::FIELD_EXAMPLE_TIME_EXT]) && is_array($data[self::FIELD_EXAMPLE_TIME_EXT])) - ? $data[self::FIELD_EXAMPLE_TIME_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_TIME] instanceof FHIRTime) { - $this->setExampleTime($data[self::FIELD_EXAMPLE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_TIME])) { - $this->setExampleTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_EXAMPLE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_TIME])) { - $this->setExampleTime(new FHIRTime(array_merge($ext, $data[self::FIELD_EXAMPLE_TIME]))); + if (isset($data[self::FIELD_EXAMPLE_STRING_EXT]) && is_array($data[self::FIELD_EXAMPLE_STRING_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExampleString($value); + } else if (is_array($value)) { + $this->setExampleString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExampleString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_TIME]) || isset($data[self::FIELD_EXAMPLE_TIME_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_TIME])) { + $value = $data[self::FIELD_EXAMPLE_TIME]; } else { - $this->setExampleTime(new FHIRTime($data[self::FIELD_EXAMPLE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_TIME_EXT]) && is_array($data[self::FIELD_EXAMPLE_TIME_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setExampleTime($value); + } else if (is_array($value)) { + $this->setExampleTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setExampleTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_EXAMPLE_TIMING])) { @@ -4555,52 +4804,73 @@ public function __construct($data = null) $this->setExampleTiming(new FHIRTiming($data[self::FIELD_EXAMPLE_TIMING])); } } - if (isset($data[self::FIELD_EXAMPLE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_EXAMPLE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_EXAMPLE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_EXAMPLE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setExampleUnsignedInt($data[self::FIELD_EXAMPLE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_UNSIGNED_INT])) { - $this->setExampleUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_EXAMPLE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_UNSIGNED_INT])) { - $this->setExampleUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_EXAMPLE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_EXAMPLE_UNSIGNED_INT]) || isset($data[self::FIELD_EXAMPLE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_UNSIGNED_INT])) { + $value = $data[self::FIELD_EXAMPLE_UNSIGNED_INT]; } else { - $this->setExampleUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_EXAMPLE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_URI])) { - $ext = (isset($data[self::FIELD_EXAMPLE_URI_EXT]) && is_array($data[self::FIELD_EXAMPLE_URI_EXT])) - ? $data[self::FIELD_EXAMPLE_URI_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_URI] instanceof FHIRUri) { - $this->setExampleUri($data[self::FIELD_EXAMPLE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_URI])) { - $this->setExampleUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_EXAMPLE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_URI])) { - $this->setExampleUri(new FHIRUri(array_merge($ext, $data[self::FIELD_EXAMPLE_URI]))); - } + if (isset($data[self::FIELD_EXAMPLE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_EXAMPLE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_UNSIGNED_INT_EXT]; } else { - $this->setExampleUri(new FHIRUri($data[self::FIELD_EXAMPLE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setExampleUnsignedInt($value); + } else if (is_array($value)) { + $this->setExampleUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setExampleUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_EXAMPLE_UUID])) { - $ext = (isset($data[self::FIELD_EXAMPLE_UUID_EXT]) && is_array($data[self::FIELD_EXAMPLE_UUID_EXT])) - ? $data[self::FIELD_EXAMPLE_UUID_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_UUID] instanceof FHIRUuid) { - $this->setExampleUuid($data[self::FIELD_EXAMPLE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_UUID])) { - $this->setExampleUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_EXAMPLE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_UUID])) { - $this->setExampleUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_EXAMPLE_UUID]))); + if (isset($data[self::FIELD_EXAMPLE_URI]) || isset($data[self::FIELD_EXAMPLE_URI_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_URI])) { + $value = $data[self::FIELD_EXAMPLE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_URI_EXT]) && is_array($data[self::FIELD_EXAMPLE_URI_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setExampleUri($value); + } else if (is_array($value)) { + $this->setExampleUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setExampleUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_UUID]) || isset($data[self::FIELD_EXAMPLE_UUID_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_UUID])) { + $value = $data[self::FIELD_EXAMPLE_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_UUID_EXT]) && is_array($data[self::FIELD_EXAMPLE_UUID_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_UUID_EXT]; } else { - $this->setExampleUuid(new FHIRUuid($data[self::FIELD_EXAMPLE_UUID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setExampleUuid($value); + } else if (is_array($value)) { + $this->setExampleUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setExampleUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleUuid(new FHIRUuid($ext)); } } if (isset($data[self::FIELD_FIXED_ADDRESS])) { @@ -4624,52 +4894,73 @@ public function __construct($data = null) $this->setFixedAttachment(new FHIRAttachment($data[self::FIELD_FIXED_ATTACHMENT])); } } - if (isset($data[self::FIELD_FIXED_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_FIXED_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_FIXED_BASE_64BINARY_EXT])) - ? $data[self::FIELD_FIXED_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_FIXED_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setFixedBase64Binary($data[self::FIELD_FIXED_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_BASE_64BINARY])) { - $this->setFixedBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_FIXED_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_BASE_64BINARY])) { - $this->setFixedBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_FIXED_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_FIXED_BASE_64BINARY]) || isset($data[self::FIELD_FIXED_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_FIXED_BASE_64BINARY])) { + $value = $data[self::FIELD_FIXED_BASE_64BINARY]; } else { - $this->setFixedBase64Binary(new FHIRBase64Binary($data[self::FIELD_FIXED_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_FIXED_BOOLEAN_EXT]) && is_array($data[self::FIELD_FIXED_BOOLEAN_EXT])) - ? $data[self::FIELD_FIXED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_FIXED_BOOLEAN] instanceof FHIRBoolean) { - $this->setFixedBoolean($data[self::FIELD_FIXED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_BOOLEAN])) { - $this->setFixedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FIXED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_BOOLEAN])) { - $this->setFixedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FIXED_BOOLEAN]))); - } + if (isset($data[self::FIELD_FIXED_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_FIXED_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_FIXED_BASE_64BINARY_EXT]; } else { - $this->setFixedBoolean(new FHIRBoolean($data[self::FIELD_FIXED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setFixedBase64Binary($value); + } else if (is_array($value)) { + $this->setFixedBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setFixedBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_FIXED_CODE])) { - $ext = (isset($data[self::FIELD_FIXED_CODE_EXT]) && is_array($data[self::FIELD_FIXED_CODE_EXT])) - ? $data[self::FIELD_FIXED_CODE_EXT] - : null; - if ($data[self::FIELD_FIXED_CODE] instanceof FHIRCode) { - $this->setFixedCode($data[self::FIELD_FIXED_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_CODE])) { - $this->setFixedCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FIXED_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_CODE])) { - $this->setFixedCode(new FHIRCode(array_merge($ext, $data[self::FIELD_FIXED_CODE]))); + if (isset($data[self::FIELD_FIXED_BOOLEAN]) || isset($data[self::FIELD_FIXED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_FIXED_BOOLEAN])) { + $value = $data[self::FIELD_FIXED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_BOOLEAN_EXT]) && is_array($data[self::FIELD_FIXED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_FIXED_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFixedBoolean($value); + } else if (is_array($value)) { + $this->setFixedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFixedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FIXED_CODE]) || isset($data[self::FIELD_FIXED_CODE_EXT])) { + if (isset($data[self::FIELD_FIXED_CODE])) { + $value = $data[self::FIELD_FIXED_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_CODE_EXT]) && is_array($data[self::FIELD_FIXED_CODE_EXT])) { + $ext = $data[self::FIELD_FIXED_CODE_EXT]; } else { - $this->setFixedCode(new FHIRCode($data[self::FIELD_FIXED_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setFixedCode($value); + } else if (is_array($value)) { + $this->setFixedCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setFixedCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_FIXED_CODEABLE_CONCEPT])) { @@ -4693,52 +4984,73 @@ public function __construct($data = null) $this->setFixedContactPoint(new FHIRContactPoint($data[self::FIELD_FIXED_CONTACT_POINT])); } } - if (isset($data[self::FIELD_FIXED_DATE])) { - $ext = (isset($data[self::FIELD_FIXED_DATE_EXT]) && is_array($data[self::FIELD_FIXED_DATE_EXT])) - ? $data[self::FIELD_FIXED_DATE_EXT] - : null; - if ($data[self::FIELD_FIXED_DATE] instanceof FHIRDate) { - $this->setFixedDate($data[self::FIELD_FIXED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_DATE])) { - $this->setFixedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_FIXED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_DATE])) { - $this->setFixedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_FIXED_DATE]))); - } + if (isset($data[self::FIELD_FIXED_DATE]) || isset($data[self::FIELD_FIXED_DATE_EXT])) { + if (isset($data[self::FIELD_FIXED_DATE])) { + $value = $data[self::FIELD_FIXED_DATE]; } else { - $this->setFixedDate(new FHIRDate($data[self::FIELD_FIXED_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_FIXED_DATE_TIME_EXT]) && is_array($data[self::FIELD_FIXED_DATE_TIME_EXT])) - ? $data[self::FIELD_FIXED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_FIXED_DATE_TIME] instanceof FHIRDateTime) { - $this->setFixedDateTime($data[self::FIELD_FIXED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_DATE_TIME])) { - $this->setFixedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_FIXED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_DATE_TIME])) { - $this->setFixedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_FIXED_DATE_TIME]))); - } + if (isset($data[self::FIELD_FIXED_DATE_EXT]) && is_array($data[self::FIELD_FIXED_DATE_EXT])) { + $ext = $data[self::FIELD_FIXED_DATE_EXT]; } else { - $this->setFixedDateTime(new FHIRDateTime($data[self::FIELD_FIXED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setFixedDate($value); + } else if (is_array($value)) { + $this->setFixedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setFixedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_FIXED_DECIMAL])) { - $ext = (isset($data[self::FIELD_FIXED_DECIMAL_EXT]) && is_array($data[self::FIELD_FIXED_DECIMAL_EXT])) - ? $data[self::FIELD_FIXED_DECIMAL_EXT] - : null; - if ($data[self::FIELD_FIXED_DECIMAL] instanceof FHIRDecimal) { - $this->setFixedDecimal($data[self::FIELD_FIXED_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_DECIMAL])) { - $this->setFixedDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FIXED_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_DECIMAL])) { - $this->setFixedDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FIXED_DECIMAL]))); + if (isset($data[self::FIELD_FIXED_DATE_TIME]) || isset($data[self::FIELD_FIXED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_FIXED_DATE_TIME])) { + $value = $data[self::FIELD_FIXED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_DATE_TIME_EXT]) && is_array($data[self::FIELD_FIXED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_FIXED_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setFixedDateTime($value); + } else if (is_array($value)) { + $this->setFixedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setFixedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_FIXED_DECIMAL]) || isset($data[self::FIELD_FIXED_DECIMAL_EXT])) { + if (isset($data[self::FIELD_FIXED_DECIMAL])) { + $value = $data[self::FIELD_FIXED_DECIMAL]; } else { - $this->setFixedDecimal(new FHIRDecimal($data[self::FIELD_FIXED_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_FIXED_DECIMAL_EXT]) && is_array($data[self::FIELD_FIXED_DECIMAL_EXT])) { + $ext = $data[self::FIELD_FIXED_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFixedDecimal($value); + } else if (is_array($value)) { + $this->setFixedDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFixedDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_FIXED_HUMAN_NAME])) { @@ -4748,20 +5060,27 @@ public function __construct($data = null) $this->setFixedHumanName(new FHIRHumanName($data[self::FIELD_FIXED_HUMAN_NAME])); } } - if (isset($data[self::FIELD_FIXED_ID])) { - $ext = (isset($data[self::FIELD_FIXED_ID_EXT]) && is_array($data[self::FIELD_FIXED_ID_EXT])) - ? $data[self::FIELD_FIXED_ID_EXT] - : null; - if ($data[self::FIELD_FIXED_ID] instanceof FHIRId) { - $this->setFixedId($data[self::FIELD_FIXED_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_ID])) { - $this->setFixedId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FIXED_ID]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_ID])) { - $this->setFixedId(new FHIRId(array_merge($ext, $data[self::FIELD_FIXED_ID]))); - } + if (isset($data[self::FIELD_FIXED_ID]) || isset($data[self::FIELD_FIXED_ID_EXT])) { + if (isset($data[self::FIELD_FIXED_ID])) { + $value = $data[self::FIELD_FIXED_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_ID_EXT]) && is_array($data[self::FIELD_FIXED_ID_EXT])) { + $ext = $data[self::FIELD_FIXED_ID_EXT]; } else { - $this->setFixedId(new FHIRId($data[self::FIELD_FIXED_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFixedId($value); + } else if (is_array($value)) { + $this->setFixedId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFixedId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedId(new FHIRId($ext)); } } if (isset($data[self::FIELD_FIXED_IDENTIFIER])) { @@ -4771,52 +5090,73 @@ public function __construct($data = null) $this->setFixedIdentifier(new FHIRIdentifier($data[self::FIELD_FIXED_IDENTIFIER])); } } - if (isset($data[self::FIELD_FIXED_INSTANT])) { - $ext = (isset($data[self::FIELD_FIXED_INSTANT_EXT]) && is_array($data[self::FIELD_FIXED_INSTANT_EXT])) - ? $data[self::FIELD_FIXED_INSTANT_EXT] - : null; - if ($data[self::FIELD_FIXED_INSTANT] instanceof FHIRInstant) { - $this->setFixedInstant($data[self::FIELD_FIXED_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_INSTANT])) { - $this->setFixedInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_FIXED_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_INSTANT])) { - $this->setFixedInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_FIXED_INSTANT]))); - } + if (isset($data[self::FIELD_FIXED_INSTANT]) || isset($data[self::FIELD_FIXED_INSTANT_EXT])) { + if (isset($data[self::FIELD_FIXED_INSTANT])) { + $value = $data[self::FIELD_FIXED_INSTANT]; } else { - $this->setFixedInstant(new FHIRInstant($data[self::FIELD_FIXED_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_INTEGER])) { - $ext = (isset($data[self::FIELD_FIXED_INTEGER_EXT]) && is_array($data[self::FIELD_FIXED_INTEGER_EXT])) - ? $data[self::FIELD_FIXED_INTEGER_EXT] - : null; - if ($data[self::FIELD_FIXED_INTEGER] instanceof FHIRInteger) { - $this->setFixedInteger($data[self::FIELD_FIXED_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_INTEGER])) { - $this->setFixedInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_FIXED_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_INTEGER])) { - $this->setFixedInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_FIXED_INTEGER]))); - } + if (isset($data[self::FIELD_FIXED_INSTANT_EXT]) && is_array($data[self::FIELD_FIXED_INSTANT_EXT])) { + $ext = $data[self::FIELD_FIXED_INSTANT_EXT]; } else { - $this->setFixedInteger(new FHIRInteger($data[self::FIELD_FIXED_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setFixedInstant($value); + } else if (is_array($value)) { + $this->setFixedInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setFixedInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_FIXED_MARKDOWN])) { - $ext = (isset($data[self::FIELD_FIXED_MARKDOWN_EXT]) && is_array($data[self::FIELD_FIXED_MARKDOWN_EXT])) - ? $data[self::FIELD_FIXED_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_FIXED_MARKDOWN] instanceof FHIRMarkdown) { - $this->setFixedMarkdown($data[self::FIELD_FIXED_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_MARKDOWN])) { - $this->setFixedMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_FIXED_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_MARKDOWN])) { - $this->setFixedMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_FIXED_MARKDOWN]))); + if (isset($data[self::FIELD_FIXED_INTEGER]) || isset($data[self::FIELD_FIXED_INTEGER_EXT])) { + if (isset($data[self::FIELD_FIXED_INTEGER])) { + $value = $data[self::FIELD_FIXED_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_INTEGER_EXT]) && is_array($data[self::FIELD_FIXED_INTEGER_EXT])) { + $ext = $data[self::FIELD_FIXED_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setFixedInteger($value); + } else if (is_array($value)) { + $this->setFixedInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setFixedInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_FIXED_MARKDOWN]) || isset($data[self::FIELD_FIXED_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_FIXED_MARKDOWN])) { + $value = $data[self::FIELD_FIXED_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_MARKDOWN_EXT]) && is_array($data[self::FIELD_FIXED_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_FIXED_MARKDOWN_EXT]; } else { - $this->setFixedMarkdown(new FHIRMarkdown($data[self::FIELD_FIXED_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setFixedMarkdown($value); + } else if (is_array($value)) { + $this->setFixedMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setFixedMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_FIXED_META])) { @@ -4826,20 +5166,27 @@ public function __construct($data = null) $this->setFixedMeta(new FHIRMeta($data[self::FIELD_FIXED_META])); } } - if (isset($data[self::FIELD_FIXED_OID])) { - $ext = (isset($data[self::FIELD_FIXED_OID_EXT]) && is_array($data[self::FIELD_FIXED_OID_EXT])) - ? $data[self::FIELD_FIXED_OID_EXT] - : null; - if ($data[self::FIELD_FIXED_OID] instanceof FHIROid) { - $this->setFixedOid($data[self::FIELD_FIXED_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_OID])) { - $this->setFixedOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_FIXED_OID]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_OID])) { - $this->setFixedOid(new FHIROid(array_merge($ext, $data[self::FIELD_FIXED_OID]))); - } + if (isset($data[self::FIELD_FIXED_OID]) || isset($data[self::FIELD_FIXED_OID_EXT])) { + if (isset($data[self::FIELD_FIXED_OID])) { + $value = $data[self::FIELD_FIXED_OID]; } else { - $this->setFixedOid(new FHIROid($data[self::FIELD_FIXED_OID])); + $value = null; + } + if (isset($data[self::FIELD_FIXED_OID_EXT]) && is_array($data[self::FIELD_FIXED_OID_EXT])) { + $ext = $data[self::FIELD_FIXED_OID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setFixedOid($value); + } else if (is_array($value)) { + $this->setFixedOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setFixedOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_FIXED_PERIOD])) { @@ -4849,20 +5196,27 @@ public function __construct($data = null) $this->setFixedPeriod(new FHIRPeriod($data[self::FIELD_FIXED_PERIOD])); } } - if (isset($data[self::FIELD_FIXED_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_FIXED_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_FIXED_POSITIVE_INT_EXT])) - ? $data[self::FIELD_FIXED_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_FIXED_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setFixedPositiveInt($data[self::FIELD_FIXED_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_POSITIVE_INT])) { - $this->setFixedPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_FIXED_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_POSITIVE_INT])) { - $this->setFixedPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_FIXED_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_FIXED_POSITIVE_INT]) || isset($data[self::FIELD_FIXED_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_FIXED_POSITIVE_INT])) { + $value = $data[self::FIELD_FIXED_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_FIXED_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_FIXED_POSITIVE_INT_EXT]; } else { - $this->setFixedPositiveInt(new FHIRPositiveInt($data[self::FIELD_FIXED_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setFixedPositiveInt($value); + } else if (is_array($value)) { + $this->setFixedPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setFixedPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedPositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_FIXED_QUANTITY])) { @@ -4907,36 +5261,50 @@ public function __construct($data = null) $this->setFixedSignature(new FHIRSignature($data[self::FIELD_FIXED_SIGNATURE])); } } - if (isset($data[self::FIELD_FIXED_STRING])) { - $ext = (isset($data[self::FIELD_FIXED_STRING_EXT]) && is_array($data[self::FIELD_FIXED_STRING_EXT])) - ? $data[self::FIELD_FIXED_STRING_EXT] - : null; - if ($data[self::FIELD_FIXED_STRING] instanceof FHIRString) { - $this->setFixedString($data[self::FIELD_FIXED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_STRING])) { - $this->setFixedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FIXED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_STRING])) { - $this->setFixedString(new FHIRString(array_merge($ext, $data[self::FIELD_FIXED_STRING]))); - } + if (isset($data[self::FIELD_FIXED_STRING]) || isset($data[self::FIELD_FIXED_STRING_EXT])) { + if (isset($data[self::FIELD_FIXED_STRING])) { + $value = $data[self::FIELD_FIXED_STRING]; } else { - $this->setFixedString(new FHIRString($data[self::FIELD_FIXED_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_TIME])) { - $ext = (isset($data[self::FIELD_FIXED_TIME_EXT]) && is_array($data[self::FIELD_FIXED_TIME_EXT])) - ? $data[self::FIELD_FIXED_TIME_EXT] - : null; - if ($data[self::FIELD_FIXED_TIME] instanceof FHIRTime) { - $this->setFixedTime($data[self::FIELD_FIXED_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_TIME])) { - $this->setFixedTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_FIXED_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_TIME])) { - $this->setFixedTime(new FHIRTime(array_merge($ext, $data[self::FIELD_FIXED_TIME]))); + if (isset($data[self::FIELD_FIXED_STRING_EXT]) && is_array($data[self::FIELD_FIXED_STRING_EXT])) { + $ext = $data[self::FIELD_FIXED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setFixedString($value); + } else if (is_array($value)) { + $this->setFixedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setFixedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_FIXED_TIME]) || isset($data[self::FIELD_FIXED_TIME_EXT])) { + if (isset($data[self::FIELD_FIXED_TIME])) { + $value = $data[self::FIELD_FIXED_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_TIME_EXT]) && is_array($data[self::FIELD_FIXED_TIME_EXT])) { + $ext = $data[self::FIELD_FIXED_TIME_EXT]; } else { - $this->setFixedTime(new FHIRTime($data[self::FIELD_FIXED_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setFixedTime($value); + } else if (is_array($value)) { + $this->setFixedTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setFixedTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_FIXED_TIMING])) { @@ -4946,100 +5314,142 @@ public function __construct($data = null) $this->setFixedTiming(new FHIRTiming($data[self::FIELD_FIXED_TIMING])); } } - if (isset($data[self::FIELD_FIXED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_FIXED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_FIXED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_FIXED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_FIXED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setFixedUnsignedInt($data[self::FIELD_FIXED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_UNSIGNED_INT])) { - $this->setFixedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_FIXED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_UNSIGNED_INT])) { - $this->setFixedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_FIXED_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_FIXED_UNSIGNED_INT]) || isset($data[self::FIELD_FIXED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_FIXED_UNSIGNED_INT])) { + $value = $data[self::FIELD_FIXED_UNSIGNED_INT]; } else { - $this->setFixedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_FIXED_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_URI])) { - $ext = (isset($data[self::FIELD_FIXED_URI_EXT]) && is_array($data[self::FIELD_FIXED_URI_EXT])) - ? $data[self::FIELD_FIXED_URI_EXT] - : null; - if ($data[self::FIELD_FIXED_URI] instanceof FHIRUri) { - $this->setFixedUri($data[self::FIELD_FIXED_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_URI])) { - $this->setFixedUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_FIXED_URI]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_URI])) { - $this->setFixedUri(new FHIRUri(array_merge($ext, $data[self::FIELD_FIXED_URI]))); - } + if (isset($data[self::FIELD_FIXED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_FIXED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_FIXED_UNSIGNED_INT_EXT]; } else { - $this->setFixedUri(new FHIRUri($data[self::FIELD_FIXED_URI])); + $ext = []; } - } - if (isset($data[self::FIELD_FIXED_UUID])) { - $ext = (isset($data[self::FIELD_FIXED_UUID_EXT]) && is_array($data[self::FIELD_FIXED_UUID_EXT])) - ? $data[self::FIELD_FIXED_UUID_EXT] - : null; - if ($data[self::FIELD_FIXED_UUID] instanceof FHIRUuid) { - $this->setFixedUuid($data[self::FIELD_FIXED_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_UUID])) { - $this->setFixedUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_FIXED_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_UUID])) { - $this->setFixedUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_FIXED_UUID]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setFixedUnsignedInt($value); + } else if (is_array($value)) { + $this->setFixedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setFixedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setFixedUuid(new FHIRUuid($data[self::FIELD_FIXED_UUID])); + } else if ([] !== $ext) { + $this->setFixedUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_IS_MODIFIER])) { - $ext = (isset($data[self::FIELD_IS_MODIFIER_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_EXT])) - ? $data[self::FIELD_IS_MODIFIER_EXT] - : null; - if ($data[self::FIELD_IS_MODIFIER] instanceof FHIRBoolean) { - $this->setIsModifier($data[self::FIELD_IS_MODIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_MODIFIER])) { - $this->setIsModifier(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_MODIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IS_MODIFIER])) { - $this->setIsModifier(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_MODIFIER]))); - } + if (isset($data[self::FIELD_FIXED_URI]) || isset($data[self::FIELD_FIXED_URI_EXT])) { + if (isset($data[self::FIELD_FIXED_URI])) { + $value = $data[self::FIELD_FIXED_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_URI_EXT]) && is_array($data[self::FIELD_FIXED_URI_EXT])) { + $ext = $data[self::FIELD_FIXED_URI_EXT]; } else { - $this->setIsModifier(new FHIRBoolean($data[self::FIELD_IS_MODIFIER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setFixedUri($value); + } else if (is_array($value)) { + $this->setFixedUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setFixedUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedUri(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_IS_SUMMARY])) { - $ext = (isset($data[self::FIELD_IS_SUMMARY_EXT]) && is_array($data[self::FIELD_IS_SUMMARY_EXT])) - ? $data[self::FIELD_IS_SUMMARY_EXT] - : null; - if ($data[self::FIELD_IS_SUMMARY] instanceof FHIRBoolean) { - $this->setIsSummary($data[self::FIELD_IS_SUMMARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_SUMMARY])) { - $this->setIsSummary(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_SUMMARY]] + $ext)); - } else if (is_array($data[self::FIELD_IS_SUMMARY])) { - $this->setIsSummary(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_SUMMARY]))); + if (isset($data[self::FIELD_FIXED_UUID]) || isset($data[self::FIELD_FIXED_UUID_EXT])) { + if (isset($data[self::FIELD_FIXED_UUID])) { + $value = $data[self::FIELD_FIXED_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_UUID_EXT]) && is_array($data[self::FIELD_FIXED_UUID_EXT])) { + $ext = $data[self::FIELD_FIXED_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setFixedUuid($value); + } else if (is_array($value)) { + $this->setFixedUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setFixedUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedUuid(new FHIRUuid($ext)); + } + } + if (isset($data[self::FIELD_IS_MODIFIER]) || isset($data[self::FIELD_IS_MODIFIER_EXT])) { + if (isset($data[self::FIELD_IS_MODIFIER])) { + $value = $data[self::FIELD_IS_MODIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_MODIFIER_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_EXT])) { + $ext = $data[self::FIELD_IS_MODIFIER_EXT]; } else { - $this->setIsSummary(new FHIRBoolean($data[self::FIELD_IS_SUMMARY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsModifier($value); + } else if (is_array($value)) { + $this->setIsModifier(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsModifier(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsModifier(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); + if (isset($data[self::FIELD_IS_SUMMARY]) || isset($data[self::FIELD_IS_SUMMARY_EXT])) { + if (isset($data[self::FIELD_IS_SUMMARY])) { + $value = $data[self::FIELD_IS_SUMMARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_SUMMARY_EXT]) && is_array($data[self::FIELD_IS_SUMMARY_EXT])) { + $ext = $data[self::FIELD_IS_SUMMARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsSummary($value); + } else if (is_array($value)) { + $this->setIsSummary(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsSummary(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIsSummary(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); } } if (isset($data[self::FIELD_MAPPING])) { @@ -5060,36 +5470,50 @@ public function __construct($data = null) $this->addMapping(new FHIRElementDefinitionMapping($data[self::FIELD_MAPPING])); } } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_LENGTH])) { - $ext = (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) - ? $data[self::FIELD_MAX_LENGTH_EXT] - : null; - if ($data[self::FIELD_MAX_LENGTH] instanceof FHIRInteger) { - $this->setMaxLength($data[self::FIELD_MAX_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MAX_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_MAX_LENGTH]))); + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX_LENGTH]) || isset($data[self::FIELD_MAX_LENGTH_EXT])) { + if (isset($data[self::FIELD_MAX_LENGTH])) { + $value = $data[self::FIELD_MAX_LENGTH]; } else { - $this->setMaxLength(new FHIRInteger($data[self::FIELD_MAX_LENGTH])); + $value = null; + } + if (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) { + $ext = $data[self::FIELD_MAX_LENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMaxLength($value); + } else if (is_array($value)) { + $this->setMaxLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxLength(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_MAX_VALUE_ADDRESS])) { @@ -5113,52 +5537,73 @@ public function __construct($data = null) $this->setMaxValueAttachment(new FHIRAttachment($data[self::FIELD_MAX_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_MAX_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_MAX_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_MAX_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setMaxValueBase64Binary($data[self::FIELD_MAX_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_BASE_64BINARY])) { - $this->setMaxValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_BASE_64BINARY])) { - $this->setMaxValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_MAX_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_MAX_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_MAX_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_MAX_VALUE_BASE_64BINARY]; } else { - $this->setMaxValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_MAX_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_MAX_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_MAX_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setMaxValueBoolean($data[self::FIELD_MAX_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_BOOLEAN])) { - $this->setMaxValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_BOOLEAN])) { - $this->setMaxValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MAX_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_MAX_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_MAX_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_BASE_64BINARY_EXT]; } else { - $this->setMaxValueBoolean(new FHIRBoolean($data[self::FIELD_MAX_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setMaxValueBase64Binary($value); + } else if (is_array($value)) { + $this->setMaxValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setMaxValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_MAX_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_CODE_EXT]) && is_array($data[self::FIELD_MAX_VALUE_CODE_EXT])) - ? $data[self::FIELD_MAX_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_CODE] instanceof FHIRCode) { - $this->setMaxValueCode($data[self::FIELD_MAX_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_CODE])) { - $this->setMaxValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_CODE])) { - $this->setMaxValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_MAX_VALUE_CODE]))); + if (isset($data[self::FIELD_MAX_VALUE_BOOLEAN]) || isset($data[self::FIELD_MAX_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_MAX_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_MAX_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMaxValueBoolean($value); + } else if (is_array($value)) { + $this->setMaxValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMaxValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMaxValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_CODE]) || isset($data[self::FIELD_MAX_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_CODE])) { + $value = $data[self::FIELD_MAX_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_CODE_EXT]) && is_array($data[self::FIELD_MAX_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_CODE_EXT]; } else { - $this->setMaxValueCode(new FHIRCode($data[self::FIELD_MAX_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setMaxValueCode($value); + } else if (is_array($value)) { + $this->setMaxValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setMaxValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_MAX_VALUE_CODEABLE_CONCEPT])) { @@ -5182,52 +5627,73 @@ public function __construct($data = null) $this->setMaxValueContactPoint(new FHIRContactPoint($data[self::FIELD_MAX_VALUE_CONTACT_POINT])); } } - if (isset($data[self::FIELD_MAX_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_EXT])) - ? $data[self::FIELD_MAX_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_DATE] instanceof FHIRDate) { - $this->setMaxValueDate($data[self::FIELD_MAX_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_DATE])) { - $this->setMaxValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_DATE])) { - $this->setMaxValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_MAX_VALUE_DATE]))); - } + if (isset($data[self::FIELD_MAX_VALUE_DATE]) || isset($data[self::FIELD_MAX_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_DATE])) { + $value = $data[self::FIELD_MAX_VALUE_DATE]; } else { - $this->setMaxValueDate(new FHIRDate($data[self::FIELD_MAX_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_MAX_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setMaxValueDateTime($data[self::FIELD_MAX_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_DATE_TIME])) { - $this->setMaxValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_DATE_TIME])) { - $this->setMaxValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MAX_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_MAX_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_DATE_EXT]; } else { - $this->setMaxValueDateTime(new FHIRDateTime($data[self::FIELD_MAX_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setMaxValueDate($value); + } else if (is_array($value)) { + $this->setMaxValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setMaxValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_MAX_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_MAX_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setMaxValueDecimal($data[self::FIELD_MAX_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_DECIMAL])) { - $this->setMaxValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_DECIMAL])) { - $this->setMaxValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_MAX_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME]) || isset($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_MAX_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setMaxValueDateTime($value); + } else if (is_array($value)) { + $this->setMaxValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setMaxValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMaxValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_DECIMAL]) || isset($data[self::FIELD_MAX_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_DECIMAL])) { + $value = $data[self::FIELD_MAX_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_DECIMAL_EXT]; } else { - $this->setMaxValueDecimal(new FHIRDecimal($data[self::FIELD_MAX_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setMaxValueDecimal($value); + } else if (is_array($value)) { + $this->setMaxValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setMaxValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MAX_VALUE_HUMAN_NAME])) { @@ -5237,20 +5703,27 @@ public function __construct($data = null) $this->setMaxValueHumanName(new FHIRHumanName($data[self::FIELD_MAX_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_MAX_VALUE_ID])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_ID_EXT]) && is_array($data[self::FIELD_MAX_VALUE_ID_EXT])) - ? $data[self::FIELD_MAX_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_ID] instanceof FHIRId) { - $this->setMaxValueId($data[self::FIELD_MAX_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_ID])) { - $this->setMaxValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_ID])) { - $this->setMaxValueId(new FHIRId(array_merge($ext, $data[self::FIELD_MAX_VALUE_ID]))); - } + if (isset($data[self::FIELD_MAX_VALUE_ID]) || isset($data[self::FIELD_MAX_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_ID])) { + $value = $data[self::FIELD_MAX_VALUE_ID]; } else { - $this->setMaxValueId(new FHIRId($data[self::FIELD_MAX_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_ID_EXT]) && is_array($data[self::FIELD_MAX_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setMaxValueId($value); + } else if (is_array($value)) { + $this->setMaxValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setMaxValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_MAX_VALUE_IDENTIFIER])) { @@ -5260,52 +5733,73 @@ public function __construct($data = null) $this->setMaxValueIdentifier(new FHIRIdentifier($data[self::FIELD_MAX_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_MAX_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_MAX_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setMaxValueInstant($data[self::FIELD_MAX_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_INSTANT])) { - $this->setMaxValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_INSTANT])) { - $this->setMaxValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_MAX_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_MAX_VALUE_INSTANT]) || isset($data[self::FIELD_MAX_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_INSTANT])) { + $value = $data[self::FIELD_MAX_VALUE_INSTANT]; } else { - $this->setMaxValueInstant(new FHIRInstant($data[self::FIELD_MAX_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_MAX_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setMaxValueInteger($data[self::FIELD_MAX_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_INTEGER])) { - $this->setMaxValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_INTEGER])) { - $this->setMaxValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MAX_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_MAX_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_INSTANT_EXT]; } else { - $this->setMaxValueInteger(new FHIRInteger($data[self::FIELD_MAX_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setMaxValueInstant($value); + } else if (is_array($value)) { + $this->setMaxValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setMaxValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_MAX_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_MAX_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_MAX_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setMaxValueMarkdown($data[self::FIELD_MAX_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_MARKDOWN])) { - $this->setMaxValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_MARKDOWN])) { - $this->setMaxValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_MAX_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_MAX_VALUE_INTEGER]) || isset($data[self::FIELD_MAX_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_INTEGER])) { + $value = $data[self::FIELD_MAX_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMaxValueInteger($value); + } else if (is_array($value)) { + $this->setMaxValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMaxValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMaxValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_MARKDOWN]) || isset($data[self::FIELD_MAX_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_MAX_VALUE_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_MAX_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_MARKDOWN_EXT]; } else { - $this->setMaxValueMarkdown(new FHIRMarkdown($data[self::FIELD_MAX_VALUE_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setMaxValueMarkdown($value); + } else if (is_array($value)) { + $this->setMaxValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setMaxValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_MAX_VALUE_META])) { @@ -5315,20 +5809,27 @@ public function __construct($data = null) $this->setMaxValueMeta(new FHIRMeta($data[self::FIELD_MAX_VALUE_META])); } } - if (isset($data[self::FIELD_MAX_VALUE_OID])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_OID_EXT]) && is_array($data[self::FIELD_MAX_VALUE_OID_EXT])) - ? $data[self::FIELD_MAX_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_OID] instanceof FHIROid) { - $this->setMaxValueOid($data[self::FIELD_MAX_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_OID])) { - $this->setMaxValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_OID])) { - $this->setMaxValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_MAX_VALUE_OID]))); - } + if (isset($data[self::FIELD_MAX_VALUE_OID]) || isset($data[self::FIELD_MAX_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_OID])) { + $value = $data[self::FIELD_MAX_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_OID_EXT]) && is_array($data[self::FIELD_MAX_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_OID_EXT]; } else { - $this->setMaxValueOid(new FHIROid($data[self::FIELD_MAX_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setMaxValueOid($value); + } else if (is_array($value)) { + $this->setMaxValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setMaxValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_MAX_VALUE_PERIOD])) { @@ -5338,20 +5839,27 @@ public function __construct($data = null) $this->setMaxValuePeriod(new FHIRPeriod($data[self::FIELD_MAX_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setMaxValuePositiveInt($data[self::FIELD_MAX_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { - $this->setMaxValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { - $this->setMaxValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_MAX_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_MAX_VALUE_POSITIVE_INT]; } else { - $this->setMaxValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_MAX_VALUE_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setMaxValuePositiveInt($value); + } else if (is_array($value)) { + $this->setMaxValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setMaxValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_MAX_VALUE_QUANTITY])) { @@ -5396,36 +5904,50 @@ public function __construct($data = null) $this->setMaxValueSignature(new FHIRSignature($data[self::FIELD_MAX_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_MAX_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_STRING_EXT]) && is_array($data[self::FIELD_MAX_VALUE_STRING_EXT])) - ? $data[self::FIELD_MAX_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_STRING] instanceof FHIRString) { - $this->setMaxValueString($data[self::FIELD_MAX_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_STRING])) { - $this->setMaxValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_STRING])) { - $this->setMaxValueString(new FHIRString(array_merge($ext, $data[self::FIELD_MAX_VALUE_STRING]))); - } + if (isset($data[self::FIELD_MAX_VALUE_STRING]) || isset($data[self::FIELD_MAX_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_STRING])) { + $value = $data[self::FIELD_MAX_VALUE_STRING]; } else { - $this->setMaxValueString(new FHIRString($data[self::FIELD_MAX_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_TIME_EXT])) - ? $data[self::FIELD_MAX_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_TIME] instanceof FHIRTime) { - $this->setMaxValueTime($data[self::FIELD_MAX_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_TIME])) { - $this->setMaxValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_TIME])) { - $this->setMaxValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_MAX_VALUE_TIME]))); + if (isset($data[self::FIELD_MAX_VALUE_STRING_EXT]) && is_array($data[self::FIELD_MAX_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMaxValueString($value); + } else if (is_array($value)) { + $this->setMaxValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMaxValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMaxValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_TIME]) || isset($data[self::FIELD_MAX_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_TIME])) { + $value = $data[self::FIELD_MAX_VALUE_TIME]; } else { - $this->setMaxValueTime(new FHIRTime($data[self::FIELD_MAX_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setMaxValueTime($value); + } else if (is_array($value)) { + $this->setMaxValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setMaxValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_MAX_VALUE_TIMING])) { @@ -5435,84 +5957,119 @@ public function __construct($data = null) $this->setMaxValueTiming(new FHIRTiming($data[self::FIELD_MAX_VALUE_TIMING])); } } - if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setMaxValueUnsignedInt($data[self::FIELD_MAX_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { - $this->setMaxValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { - $this->setMaxValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MAX_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_MAX_VALUE_UNSIGNED_INT]; } else { - $this->setMaxValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_URI])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_URI_EXT]) && is_array($data[self::FIELD_MAX_VALUE_URI_EXT])) - ? $data[self::FIELD_MAX_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_URI] instanceof FHIRUri) { - $this->setMaxValueUri($data[self::FIELD_MAX_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_URI])) { - $this->setMaxValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_URI])) { - $this->setMaxValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_MAX_VALUE_URI]))); - } + if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setMaxValueUri(new FHIRUri($data[self::FIELD_MAX_VALUE_URI])); + $ext = []; } - } - if (isset($data[self::FIELD_MAX_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_UUID_EXT]) && is_array($data[self::FIELD_MAX_VALUE_UUID_EXT])) - ? $data[self::FIELD_MAX_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_UUID] instanceof FHIRUuid) { - $this->setMaxValueUuid($data[self::FIELD_MAX_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_UUID])) { - $this->setMaxValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_UUID])) { - $this->setMaxValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_MAX_VALUE_UUID]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMaxValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setMaxValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMaxValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMaxValueUuid(new FHIRUuid($data[self::FIELD_MAX_VALUE_UUID])); + } else if ([] !== $ext) { + $this->setMaxValueUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_MEANING_WHEN_MISSING])) { - $ext = (isset($data[self::FIELD_MEANING_WHEN_MISSING_EXT]) && is_array($data[self::FIELD_MEANING_WHEN_MISSING_EXT])) - ? $data[self::FIELD_MEANING_WHEN_MISSING_EXT] - : null; - if ($data[self::FIELD_MEANING_WHEN_MISSING] instanceof FHIRMarkdown) { - $this->setMeaningWhenMissing($data[self::FIELD_MEANING_WHEN_MISSING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEANING_WHEN_MISSING])) { - $this->setMeaningWhenMissing(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_MEANING_WHEN_MISSING]] + $ext)); - } else if (is_array($data[self::FIELD_MEANING_WHEN_MISSING])) { - $this->setMeaningWhenMissing(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_MEANING_WHEN_MISSING]))); + if (isset($data[self::FIELD_MAX_VALUE_URI]) || isset($data[self::FIELD_MAX_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_URI])) { + $value = $data[self::FIELD_MAX_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_URI_EXT]) && is_array($data[self::FIELD_MAX_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setMaxValueUri($value); + } else if (is_array($value)) { + $this->setMaxValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setMaxValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMaxValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_UUID]) || isset($data[self::FIELD_MAX_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_UUID])) { + $value = $data[self::FIELD_MAX_VALUE_UUID]; } else { - $this->setMeaningWhenMissing(new FHIRMarkdown($data[self::FIELD_MEANING_WHEN_MISSING])); + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_UUID_EXT]) && is_array($data[self::FIELD_MAX_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setMaxValueUuid($value); + } else if (is_array($value)) { + $this->setMaxValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setMaxValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueUuid(new FHIRUuid($ext)); } } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + if (isset($data[self::FIELD_MEANING_WHEN_MISSING]) || isset($data[self::FIELD_MEANING_WHEN_MISSING_EXT])) { + if (isset($data[self::FIELD_MEANING_WHEN_MISSING])) { + $value = $data[self::FIELD_MEANING_WHEN_MISSING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MEANING_WHEN_MISSING_EXT]) && is_array($data[self::FIELD_MEANING_WHEN_MISSING_EXT])) { + $ext = $data[self::FIELD_MEANING_WHEN_MISSING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setMeaningWhenMissing($value); + } else if (is_array($value)) { + $this->setMeaningWhenMissing(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setMeaningWhenMissing(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMeaningWhenMissing(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_ADDRESS])) { @@ -5536,52 +6093,73 @@ public function __construct($data = null) $this->setMinValueAttachment(new FHIRAttachment($data[self::FIELD_MIN_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_MIN_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_MIN_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_MIN_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setMinValueBase64Binary($data[self::FIELD_MIN_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_BASE_64BINARY])) { - $this->setMinValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_BASE_64BINARY])) { - $this->setMinValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_MIN_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_MIN_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_MIN_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_MIN_VALUE_BASE_64BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_MIN_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_BASE_64BINARY_EXT]; } else { - $this->setMinValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_MIN_VALUE_BASE_64BINARY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setMinValueBase64Binary($value); + } else if (is_array($value)) { + $this->setMinValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setMinValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_MIN_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_MIN_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_MIN_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setMinValueBoolean($data[self::FIELD_MIN_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_BOOLEAN])) { - $this->setMinValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_BOOLEAN])) { - $this->setMinValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MIN_VALUE_BOOLEAN]))); + if (isset($data[self::FIELD_MIN_VALUE_BOOLEAN]) || isset($data[self::FIELD_MIN_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_MIN_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_MIN_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMinValueBoolean($value); + } else if (is_array($value)) { + $this->setMinValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMinValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_MIN_VALUE_CODE]) || isset($data[self::FIELD_MIN_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_CODE])) { + $value = $data[self::FIELD_MIN_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_CODE_EXT]) && is_array($data[self::FIELD_MIN_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_CODE_EXT]; } else { - $this->setMinValueBoolean(new FHIRBoolean($data[self::FIELD_MIN_VALUE_BOOLEAN])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_CODE_EXT]) && is_array($data[self::FIELD_MIN_VALUE_CODE_EXT])) - ? $data[self::FIELD_MIN_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_CODE] instanceof FHIRCode) { - $this->setMinValueCode($data[self::FIELD_MIN_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_CODE])) { - $this->setMinValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_CODE])) { - $this->setMinValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_MIN_VALUE_CODE]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setMinValueCode($value); + } else if (is_array($value)) { + $this->setMinValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setMinValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMinValueCode(new FHIRCode($data[self::FIELD_MIN_VALUE_CODE])); + } else if ([] !== $ext) { + $this->setMinValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_CODEABLE_CONCEPT])) { @@ -5605,52 +6183,73 @@ public function __construct($data = null) $this->setMinValueContactPoint(new FHIRContactPoint($data[self::FIELD_MIN_VALUE_CONTACT_POINT])); } } - if (isset($data[self::FIELD_MIN_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_EXT])) - ? $data[self::FIELD_MIN_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_DATE] instanceof FHIRDate) { - $this->setMinValueDate($data[self::FIELD_MIN_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_DATE])) { - $this->setMinValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_DATE])) { - $this->setMinValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_MIN_VALUE_DATE]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DATE]) || isset($data[self::FIELD_MIN_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_DATE])) { + $value = $data[self::FIELD_MIN_VALUE_DATE]; } else { - $this->setMinValueDate(new FHIRDate($data[self::FIELD_MIN_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_MIN_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setMinValueDateTime($data[self::FIELD_MIN_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_DATE_TIME])) { - $this->setMinValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_DATE_TIME])) { - $this->setMinValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MIN_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_DATE_EXT]; } else { - $this->setMinValueDateTime(new FHIRDateTime($data[self::FIELD_MIN_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setMinValueDate($value); + } else if (is_array($value)) { + $this->setMinValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setMinValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_MIN_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_MIN_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setMinValueDecimal($data[self::FIELD_MIN_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_DECIMAL])) { - $this->setMinValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_DECIMAL])) { - $this->setMinValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_MIN_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME]) || isset($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_MIN_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setMinValueDateTime($value); + } else if (is_array($value)) { + $this->setMinValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setMinValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_MIN_VALUE_DECIMAL]) || isset($data[self::FIELD_MIN_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_DECIMAL])) { + $value = $data[self::FIELD_MIN_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_DECIMAL_EXT]; } else { - $this->setMinValueDecimal(new FHIRDecimal($data[self::FIELD_MIN_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setMinValueDecimal($value); + } else if (is_array($value)) { + $this->setMinValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setMinValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_HUMAN_NAME])) { @@ -5660,20 +6259,27 @@ public function __construct($data = null) $this->setMinValueHumanName(new FHIRHumanName($data[self::FIELD_MIN_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_MIN_VALUE_ID])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_ID_EXT]) && is_array($data[self::FIELD_MIN_VALUE_ID_EXT])) - ? $data[self::FIELD_MIN_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_ID] instanceof FHIRId) { - $this->setMinValueId($data[self::FIELD_MIN_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_ID])) { - $this->setMinValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_ID])) { - $this->setMinValueId(new FHIRId(array_merge($ext, $data[self::FIELD_MIN_VALUE_ID]))); - } + if (isset($data[self::FIELD_MIN_VALUE_ID]) || isset($data[self::FIELD_MIN_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_ID])) { + $value = $data[self::FIELD_MIN_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_ID_EXT]) && is_array($data[self::FIELD_MIN_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_ID_EXT]; } else { - $this->setMinValueId(new FHIRId($data[self::FIELD_MIN_VALUE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setMinValueId($value); + } else if (is_array($value)) { + $this->setMinValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setMinValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_IDENTIFIER])) { @@ -5683,52 +6289,73 @@ public function __construct($data = null) $this->setMinValueIdentifier(new FHIRIdentifier($data[self::FIELD_MIN_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_MIN_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_MIN_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setMinValueInstant($data[self::FIELD_MIN_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_INSTANT])) { - $this->setMinValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_INSTANT])) { - $this->setMinValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_MIN_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_INSTANT]) || isset($data[self::FIELD_MIN_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_INSTANT])) { + $value = $data[self::FIELD_MIN_VALUE_INSTANT]; } else { - $this->setMinValueInstant(new FHIRInstant($data[self::FIELD_MIN_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_MIN_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setMinValueInteger($data[self::FIELD_MIN_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_INTEGER])) { - $this->setMinValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_INTEGER])) { - $this->setMinValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_MIN_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_INSTANT_EXT]; } else { - $this->setMinValueInteger(new FHIRInteger($data[self::FIELD_MIN_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setMinValueInstant($value); + } else if (is_array($value)) { + $this->setMinValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setMinValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_MIN_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_MIN_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_MIN_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setMinValueMarkdown($data[self::FIELD_MIN_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_MARKDOWN])) { - $this->setMinValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_MARKDOWN])) { - $this->setMinValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_MIN_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_MIN_VALUE_INTEGER]) || isset($data[self::FIELD_MIN_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_INTEGER])) { + $value = $data[self::FIELD_MIN_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMinValueInteger($value); + } else if (is_array($value)) { + $this->setMinValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMinValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_MIN_VALUE_MARKDOWN]) || isset($data[self::FIELD_MIN_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_MIN_VALUE_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_MIN_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_MARKDOWN_EXT]; } else { - $this->setMinValueMarkdown(new FHIRMarkdown($data[self::FIELD_MIN_VALUE_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setMinValueMarkdown($value); + } else if (is_array($value)) { + $this->setMinValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setMinValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_META])) { @@ -5738,20 +6365,27 @@ public function __construct($data = null) $this->setMinValueMeta(new FHIRMeta($data[self::FIELD_MIN_VALUE_META])); } } - if (isset($data[self::FIELD_MIN_VALUE_OID])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_OID_EXT]) && is_array($data[self::FIELD_MIN_VALUE_OID_EXT])) - ? $data[self::FIELD_MIN_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_OID] instanceof FHIROid) { - $this->setMinValueOid($data[self::FIELD_MIN_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_OID])) { - $this->setMinValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_OID])) { - $this->setMinValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_MIN_VALUE_OID]))); - } + if (isset($data[self::FIELD_MIN_VALUE_OID]) || isset($data[self::FIELD_MIN_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_OID])) { + $value = $data[self::FIELD_MIN_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_OID_EXT]) && is_array($data[self::FIELD_MIN_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_OID_EXT]; } else { - $this->setMinValueOid(new FHIROid($data[self::FIELD_MIN_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setMinValueOid($value); + } else if (is_array($value)) { + $this->setMinValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setMinValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_PERIOD])) { @@ -5761,20 +6395,27 @@ public function __construct($data = null) $this->setMinValuePeriod(new FHIRPeriod($data[self::FIELD_MIN_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setMinValuePositiveInt($data[self::FIELD_MIN_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { - $this->setMinValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { - $this->setMinValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_MIN_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_MIN_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT]; } else { - $this->setMinValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_MIN_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setMinValuePositiveInt($value); + } else if (is_array($value)) { + $this->setMinValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setMinValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_QUANTITY])) { @@ -5819,36 +6460,50 @@ public function __construct($data = null) $this->setMinValueSignature(new FHIRSignature($data[self::FIELD_MIN_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_MIN_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_STRING_EXT]) && is_array($data[self::FIELD_MIN_VALUE_STRING_EXT])) - ? $data[self::FIELD_MIN_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_STRING] instanceof FHIRString) { - $this->setMinValueString($data[self::FIELD_MIN_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_STRING])) { - $this->setMinValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_STRING])) { - $this->setMinValueString(new FHIRString(array_merge($ext, $data[self::FIELD_MIN_VALUE_STRING]))); - } + if (isset($data[self::FIELD_MIN_VALUE_STRING]) || isset($data[self::FIELD_MIN_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_STRING])) { + $value = $data[self::FIELD_MIN_VALUE_STRING]; } else { - $this->setMinValueString(new FHIRString($data[self::FIELD_MIN_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_TIME_EXT])) - ? $data[self::FIELD_MIN_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_TIME] instanceof FHIRTime) { - $this->setMinValueTime($data[self::FIELD_MIN_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_TIME])) { - $this->setMinValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_TIME])) { - $this->setMinValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_MIN_VALUE_TIME]))); + if (isset($data[self::FIELD_MIN_VALUE_STRING_EXT]) && is_array($data[self::FIELD_MIN_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMinValueString($value); + } else if (is_array($value)) { + $this->setMinValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMinValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN_VALUE_TIME]) || isset($data[self::FIELD_MIN_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_TIME])) { + $value = $data[self::FIELD_MIN_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_TIME_EXT]; } else { - $this->setMinValueTime(new FHIRTime($data[self::FIELD_MIN_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setMinValueTime($value); + } else if (is_array($value)) { + $this->setMinValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setMinValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_TIMING])) { @@ -5858,116 +6513,165 @@ public function __construct($data = null) $this->setMinValueTiming(new FHIRTiming($data[self::FIELD_MIN_VALUE_TIMING])); } } - if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setMinValueUnsignedInt($data[self::FIELD_MIN_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { - $this->setMinValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { - $this->setMinValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MIN_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_MIN_VALUE_UNSIGNED_INT]; } else { - $this->setMinValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_URI])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_URI_EXT]) && is_array($data[self::FIELD_MIN_VALUE_URI_EXT])) - ? $data[self::FIELD_MIN_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_URI] instanceof FHIRUri) { - $this->setMinValueUri($data[self::FIELD_MIN_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_URI])) { - $this->setMinValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_URI])) { - $this->setMinValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_MIN_VALUE_URI]))); - } + if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setMinValueUri(new FHIRUri($data[self::FIELD_MIN_VALUE_URI])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_UUID_EXT]) && is_array($data[self::FIELD_MIN_VALUE_UUID_EXT])) - ? $data[self::FIELD_MIN_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_UUID] instanceof FHIRUuid) { - $this->setMinValueUuid($data[self::FIELD_MIN_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_UUID])) { - $this->setMinValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_UUID])) { - $this->setMinValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_MIN_VALUE_UUID]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMinValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setMinValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMinValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMinValueUuid(new FHIRUuid($data[self::FIELD_MIN_VALUE_UUID])); + } else if ([] !== $ext) { + $this->setMinValueUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_MUST_SUPPORT])) { - $ext = (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) - ? $data[self::FIELD_MUST_SUPPORT_EXT] - : null; - if ($data[self::FIELD_MUST_SUPPORT] instanceof FHIRBoolean) { - $this->setMustSupport($data[self::FIELD_MUST_SUPPORT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MUST_SUPPORT])) { - $this->setMustSupport(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MUST_SUPPORT]] + $ext)); - } else if (is_array($data[self::FIELD_MUST_SUPPORT])) { - $this->setMustSupport(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MUST_SUPPORT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_URI]) || isset($data[self::FIELD_MIN_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_URI])) { + $value = $data[self::FIELD_MIN_VALUE_URI]; } else { - $this->setMustSupport(new FHIRBoolean($data[self::FIELD_MUST_SUPPORT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_MIN_VALUE_URI_EXT]) && is_array($data[self::FIELD_MIN_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setMinValueUri($value); + } else if (is_array($value)) { + $this->setMinValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setMinValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_MIN_VALUE_UUID]) || isset($data[self::FIELD_MIN_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_UUID])) { + $value = $data[self::FIELD_MIN_VALUE_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_UUID_EXT]) && is_array($data[self::FIELD_MIN_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_UUID_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setMinValueUuid($value); + } else if (is_array($value)) { + $this->setMinValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setMinValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueUuid(new FHIRUuid($ext)); } } - if (isset($data[self::FIELD_NAME_REFERENCE])) { - $ext = (isset($data[self::FIELD_NAME_REFERENCE_EXT]) && is_array($data[self::FIELD_NAME_REFERENCE_EXT])) - ? $data[self::FIELD_NAME_REFERENCE_EXT] - : null; - if ($data[self::FIELD_NAME_REFERENCE] instanceof FHIRString) { - $this->setNameReference($data[self::FIELD_NAME_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME_REFERENCE])) { - $this->setNameReference(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_NAME_REFERENCE])) { - $this->setNameReference(new FHIRString(array_merge($ext, $data[self::FIELD_NAME_REFERENCE]))); + if (isset($data[self::FIELD_MUST_SUPPORT]) || isset($data[self::FIELD_MUST_SUPPORT_EXT])) { + if (isset($data[self::FIELD_MUST_SUPPORT])) { + $value = $data[self::FIELD_MUST_SUPPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) { + $ext = $data[self::FIELD_MUST_SUPPORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMustSupport($value); + } else if (is_array($value)) { + $this->setMustSupport(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMustSupport(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMustSupport(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setNameReference(new FHIRString($data[self::FIELD_NAME_REFERENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_NAME_REFERENCE]) || isset($data[self::FIELD_NAME_REFERENCE_EXT])) { + if (isset($data[self::FIELD_NAME_REFERENCE])) { + $value = $data[self::FIELD_NAME_REFERENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_REFERENCE_EXT]) && is_array($data[self::FIELD_NAME_REFERENCE_EXT])) { + $ext = $data[self::FIELD_NAME_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNameReference($value); + } else if (is_array($value)) { + $this->setNameReference(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNameReference(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNameReference(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATTERN_ADDRESS])) { @@ -5991,52 +6695,73 @@ public function __construct($data = null) $this->setPatternAttachment(new FHIRAttachment($data[self::FIELD_PATTERN_ATTACHMENT])); } } - if (isset($data[self::FIELD_PATTERN_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_PATTERN_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_PATTERN_BASE_64BINARY_EXT])) - ? $data[self::FIELD_PATTERN_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_PATTERN_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setPatternBase64Binary($data[self::FIELD_PATTERN_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_BASE_64BINARY])) { - $this->setPatternBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_PATTERN_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_BASE_64BINARY])) { - $this->setPatternBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_PATTERN_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_PATTERN_BASE_64BINARY]) || isset($data[self::FIELD_PATTERN_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_PATTERN_BASE_64BINARY])) { + $value = $data[self::FIELD_PATTERN_BASE_64BINARY]; } else { - $this->setPatternBase64Binary(new FHIRBase64Binary($data[self::FIELD_PATTERN_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_BOOLEAN])) { - $ext = (isset($data[self::FIELD_PATTERN_BOOLEAN_EXT]) && is_array($data[self::FIELD_PATTERN_BOOLEAN_EXT])) - ? $data[self::FIELD_PATTERN_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_PATTERN_BOOLEAN] instanceof FHIRBoolean) { - $this->setPatternBoolean($data[self::FIELD_PATTERN_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_BOOLEAN])) { - $this->setPatternBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PATTERN_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_BOOLEAN])) { - $this->setPatternBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PATTERN_BOOLEAN]))); - } + if (isset($data[self::FIELD_PATTERN_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_PATTERN_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_PATTERN_BASE_64BINARY_EXT]; } else { - $this->setPatternBoolean(new FHIRBoolean($data[self::FIELD_PATTERN_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setPatternBase64Binary($value); + } else if (is_array($value)) { + $this->setPatternBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setPatternBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_PATTERN_CODE])) { - $ext = (isset($data[self::FIELD_PATTERN_CODE_EXT]) && is_array($data[self::FIELD_PATTERN_CODE_EXT])) - ? $data[self::FIELD_PATTERN_CODE_EXT] - : null; - if ($data[self::FIELD_PATTERN_CODE] instanceof FHIRCode) { - $this->setPatternCode($data[self::FIELD_PATTERN_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_CODE])) { - $this->setPatternCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PATTERN_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_CODE])) { - $this->setPatternCode(new FHIRCode(array_merge($ext, $data[self::FIELD_PATTERN_CODE]))); + if (isset($data[self::FIELD_PATTERN_BOOLEAN]) || isset($data[self::FIELD_PATTERN_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_PATTERN_BOOLEAN])) { + $value = $data[self::FIELD_PATTERN_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_BOOLEAN_EXT]) && is_array($data[self::FIELD_PATTERN_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_PATTERN_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPatternBoolean($value); + } else if (is_array($value)) { + $this->setPatternBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPatternBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_CODE]) || isset($data[self::FIELD_PATTERN_CODE_EXT])) { + if (isset($data[self::FIELD_PATTERN_CODE])) { + $value = $data[self::FIELD_PATTERN_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_CODE_EXT]) && is_array($data[self::FIELD_PATTERN_CODE_EXT])) { + $ext = $data[self::FIELD_PATTERN_CODE_EXT]; } else { - $this->setPatternCode(new FHIRCode($data[self::FIELD_PATTERN_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setPatternCode($value); + } else if (is_array($value)) { + $this->setPatternCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setPatternCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PATTERN_CODEABLE_CONCEPT])) { @@ -6060,52 +6785,73 @@ public function __construct($data = null) $this->setPatternContactPoint(new FHIRContactPoint($data[self::FIELD_PATTERN_CONTACT_POINT])); } } - if (isset($data[self::FIELD_PATTERN_DATE])) { - $ext = (isset($data[self::FIELD_PATTERN_DATE_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_EXT])) - ? $data[self::FIELD_PATTERN_DATE_EXT] - : null; - if ($data[self::FIELD_PATTERN_DATE] instanceof FHIRDate) { - $this->setPatternDate($data[self::FIELD_PATTERN_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_DATE])) { - $this->setPatternDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_PATTERN_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_DATE])) { - $this->setPatternDate(new FHIRDate(array_merge($ext, $data[self::FIELD_PATTERN_DATE]))); - } + if (isset($data[self::FIELD_PATTERN_DATE]) || isset($data[self::FIELD_PATTERN_DATE_EXT])) { + if (isset($data[self::FIELD_PATTERN_DATE])) { + $value = $data[self::FIELD_PATTERN_DATE]; } else { - $this->setPatternDate(new FHIRDate($data[self::FIELD_PATTERN_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_DATE_TIME])) { - $ext = (isset($data[self::FIELD_PATTERN_DATE_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_TIME_EXT])) - ? $data[self::FIELD_PATTERN_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_PATTERN_DATE_TIME] instanceof FHIRDateTime) { - $this->setPatternDateTime($data[self::FIELD_PATTERN_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_DATE_TIME])) { - $this->setPatternDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PATTERN_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_DATE_TIME])) { - $this->setPatternDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PATTERN_DATE_TIME]))); - } + if (isset($data[self::FIELD_PATTERN_DATE_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_EXT])) { + $ext = $data[self::FIELD_PATTERN_DATE_EXT]; } else { - $this->setPatternDateTime(new FHIRDateTime($data[self::FIELD_PATTERN_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setPatternDate($value); + } else if (is_array($value)) { + $this->setPatternDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setPatternDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_PATTERN_DECIMAL])) { - $ext = (isset($data[self::FIELD_PATTERN_DECIMAL_EXT]) && is_array($data[self::FIELD_PATTERN_DECIMAL_EXT])) - ? $data[self::FIELD_PATTERN_DECIMAL_EXT] - : null; - if ($data[self::FIELD_PATTERN_DECIMAL] instanceof FHIRDecimal) { - $this->setPatternDecimal($data[self::FIELD_PATTERN_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_DECIMAL])) { - $this->setPatternDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PATTERN_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_DECIMAL])) { - $this->setPatternDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PATTERN_DECIMAL]))); + if (isset($data[self::FIELD_PATTERN_DATE_TIME]) || isset($data[self::FIELD_PATTERN_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_PATTERN_DATE_TIME])) { + $value = $data[self::FIELD_PATTERN_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_DATE_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_PATTERN_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPatternDateTime($value); + } else if (is_array($value)) { + $this->setPatternDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPatternDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_DECIMAL]) || isset($data[self::FIELD_PATTERN_DECIMAL_EXT])) { + if (isset($data[self::FIELD_PATTERN_DECIMAL])) { + $value = $data[self::FIELD_PATTERN_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_DECIMAL_EXT]) && is_array($data[self::FIELD_PATTERN_DECIMAL_EXT])) { + $ext = $data[self::FIELD_PATTERN_DECIMAL_EXT]; } else { - $this->setPatternDecimal(new FHIRDecimal($data[self::FIELD_PATTERN_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPatternDecimal($value); + } else if (is_array($value)) { + $this->setPatternDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPatternDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PATTERN_HUMAN_NAME])) { @@ -6115,20 +6861,27 @@ public function __construct($data = null) $this->setPatternHumanName(new FHIRHumanName($data[self::FIELD_PATTERN_HUMAN_NAME])); } } - if (isset($data[self::FIELD_PATTERN_ID])) { - $ext = (isset($data[self::FIELD_PATTERN_ID_EXT]) && is_array($data[self::FIELD_PATTERN_ID_EXT])) - ? $data[self::FIELD_PATTERN_ID_EXT] - : null; - if ($data[self::FIELD_PATTERN_ID] instanceof FHIRId) { - $this->setPatternId($data[self::FIELD_PATTERN_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_ID])) { - $this->setPatternId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_PATTERN_ID]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_ID])) { - $this->setPatternId(new FHIRId(array_merge($ext, $data[self::FIELD_PATTERN_ID]))); - } + if (isset($data[self::FIELD_PATTERN_ID]) || isset($data[self::FIELD_PATTERN_ID_EXT])) { + if (isset($data[self::FIELD_PATTERN_ID])) { + $value = $data[self::FIELD_PATTERN_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_ID_EXT]) && is_array($data[self::FIELD_PATTERN_ID_EXT])) { + $ext = $data[self::FIELD_PATTERN_ID_EXT]; } else { - $this->setPatternId(new FHIRId($data[self::FIELD_PATTERN_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setPatternId($value); + } else if (is_array($value)) { + $this->setPatternId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setPatternId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternId(new FHIRId($ext)); } } if (isset($data[self::FIELD_PATTERN_IDENTIFIER])) { @@ -6138,52 +6891,73 @@ public function __construct($data = null) $this->setPatternIdentifier(new FHIRIdentifier($data[self::FIELD_PATTERN_IDENTIFIER])); } } - if (isset($data[self::FIELD_PATTERN_INSTANT])) { - $ext = (isset($data[self::FIELD_PATTERN_INSTANT_EXT]) && is_array($data[self::FIELD_PATTERN_INSTANT_EXT])) - ? $data[self::FIELD_PATTERN_INSTANT_EXT] - : null; - if ($data[self::FIELD_PATTERN_INSTANT] instanceof FHIRInstant) { - $this->setPatternInstant($data[self::FIELD_PATTERN_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_INSTANT])) { - $this->setPatternInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_PATTERN_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_INSTANT])) { - $this->setPatternInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_PATTERN_INSTANT]))); - } + if (isset($data[self::FIELD_PATTERN_INSTANT]) || isset($data[self::FIELD_PATTERN_INSTANT_EXT])) { + if (isset($data[self::FIELD_PATTERN_INSTANT])) { + $value = $data[self::FIELD_PATTERN_INSTANT]; } else { - $this->setPatternInstant(new FHIRInstant($data[self::FIELD_PATTERN_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_INTEGER])) { - $ext = (isset($data[self::FIELD_PATTERN_INTEGER_EXT]) && is_array($data[self::FIELD_PATTERN_INTEGER_EXT])) - ? $data[self::FIELD_PATTERN_INTEGER_EXT] - : null; - if ($data[self::FIELD_PATTERN_INTEGER] instanceof FHIRInteger) { - $this->setPatternInteger($data[self::FIELD_PATTERN_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_INTEGER])) { - $this->setPatternInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_PATTERN_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_INTEGER])) { - $this->setPatternInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_PATTERN_INTEGER]))); - } + if (isset($data[self::FIELD_PATTERN_INSTANT_EXT]) && is_array($data[self::FIELD_PATTERN_INSTANT_EXT])) { + $ext = $data[self::FIELD_PATTERN_INSTANT_EXT]; } else { - $this->setPatternInteger(new FHIRInteger($data[self::FIELD_PATTERN_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setPatternInstant($value); + } else if (is_array($value)) { + $this->setPatternInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setPatternInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_PATTERN_MARKDOWN])) { - $ext = (isset($data[self::FIELD_PATTERN_MARKDOWN_EXT]) && is_array($data[self::FIELD_PATTERN_MARKDOWN_EXT])) - ? $data[self::FIELD_PATTERN_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_PATTERN_MARKDOWN] instanceof FHIRMarkdown) { - $this->setPatternMarkdown($data[self::FIELD_PATTERN_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_MARKDOWN])) { - $this->setPatternMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PATTERN_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_MARKDOWN])) { - $this->setPatternMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PATTERN_MARKDOWN]))); + if (isset($data[self::FIELD_PATTERN_INTEGER]) || isset($data[self::FIELD_PATTERN_INTEGER_EXT])) { + if (isset($data[self::FIELD_PATTERN_INTEGER])) { + $value = $data[self::FIELD_PATTERN_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_INTEGER_EXT]) && is_array($data[self::FIELD_PATTERN_INTEGER_EXT])) { + $ext = $data[self::FIELD_PATTERN_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setPatternInteger($value); + } else if (is_array($value)) { + $this->setPatternInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setPatternInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_MARKDOWN]) || isset($data[self::FIELD_PATTERN_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_PATTERN_MARKDOWN])) { + $value = $data[self::FIELD_PATTERN_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_MARKDOWN_EXT]) && is_array($data[self::FIELD_PATTERN_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_PATTERN_MARKDOWN_EXT]; } else { - $this->setPatternMarkdown(new FHIRMarkdown($data[self::FIELD_PATTERN_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPatternMarkdown($value); + } else if (is_array($value)) { + $this->setPatternMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPatternMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_PATTERN_META])) { @@ -6193,20 +6967,27 @@ public function __construct($data = null) $this->setPatternMeta(new FHIRMeta($data[self::FIELD_PATTERN_META])); } } - if (isset($data[self::FIELD_PATTERN_OID])) { - $ext = (isset($data[self::FIELD_PATTERN_OID_EXT]) && is_array($data[self::FIELD_PATTERN_OID_EXT])) - ? $data[self::FIELD_PATTERN_OID_EXT] - : null; - if ($data[self::FIELD_PATTERN_OID] instanceof FHIROid) { - $this->setPatternOid($data[self::FIELD_PATTERN_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_OID])) { - $this->setPatternOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_PATTERN_OID]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_OID])) { - $this->setPatternOid(new FHIROid(array_merge($ext, $data[self::FIELD_PATTERN_OID]))); - } + if (isset($data[self::FIELD_PATTERN_OID]) || isset($data[self::FIELD_PATTERN_OID_EXT])) { + if (isset($data[self::FIELD_PATTERN_OID])) { + $value = $data[self::FIELD_PATTERN_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_OID_EXT]) && is_array($data[self::FIELD_PATTERN_OID_EXT])) { + $ext = $data[self::FIELD_PATTERN_OID_EXT]; } else { - $this->setPatternOid(new FHIROid($data[self::FIELD_PATTERN_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setPatternOid($value); + } else if (is_array($value)) { + $this->setPatternOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setPatternOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_PATTERN_PERIOD])) { @@ -6216,20 +6997,27 @@ public function __construct($data = null) $this->setPatternPeriod(new FHIRPeriod($data[self::FIELD_PATTERN_PERIOD])); } } - if (isset($data[self::FIELD_PATTERN_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_PATTERN_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_PATTERN_POSITIVE_INT_EXT])) - ? $data[self::FIELD_PATTERN_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_PATTERN_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setPatternPositiveInt($data[self::FIELD_PATTERN_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_POSITIVE_INT])) { - $this->setPatternPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PATTERN_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_POSITIVE_INT])) { - $this->setPatternPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_PATTERN_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_PATTERN_POSITIVE_INT]) || isset($data[self::FIELD_PATTERN_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_PATTERN_POSITIVE_INT])) { + $value = $data[self::FIELD_PATTERN_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_PATTERN_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_PATTERN_POSITIVE_INT_EXT]; } else { - $this->setPatternPositiveInt(new FHIRPositiveInt($data[self::FIELD_PATTERN_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setPatternPositiveInt($value); + } else if (is_array($value)) { + $this->setPatternPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setPatternPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternPositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PATTERN_QUANTITY])) { @@ -6274,36 +7062,50 @@ public function __construct($data = null) $this->setPatternSignature(new FHIRSignature($data[self::FIELD_PATTERN_SIGNATURE])); } } - if (isset($data[self::FIELD_PATTERN_STRING])) { - $ext = (isset($data[self::FIELD_PATTERN_STRING_EXT]) && is_array($data[self::FIELD_PATTERN_STRING_EXT])) - ? $data[self::FIELD_PATTERN_STRING_EXT] - : null; - if ($data[self::FIELD_PATTERN_STRING] instanceof FHIRString) { - $this->setPatternString($data[self::FIELD_PATTERN_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_STRING])) { - $this->setPatternString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATTERN_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_STRING])) { - $this->setPatternString(new FHIRString(array_merge($ext, $data[self::FIELD_PATTERN_STRING]))); - } + if (isset($data[self::FIELD_PATTERN_STRING]) || isset($data[self::FIELD_PATTERN_STRING_EXT])) { + if (isset($data[self::FIELD_PATTERN_STRING])) { + $value = $data[self::FIELD_PATTERN_STRING]; } else { - $this->setPatternString(new FHIRString($data[self::FIELD_PATTERN_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_TIME])) { - $ext = (isset($data[self::FIELD_PATTERN_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_TIME_EXT])) - ? $data[self::FIELD_PATTERN_TIME_EXT] - : null; - if ($data[self::FIELD_PATTERN_TIME] instanceof FHIRTime) { - $this->setPatternTime($data[self::FIELD_PATTERN_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_TIME])) { - $this->setPatternTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_PATTERN_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_TIME])) { - $this->setPatternTime(new FHIRTime(array_merge($ext, $data[self::FIELD_PATTERN_TIME]))); + if (isset($data[self::FIELD_PATTERN_STRING_EXT]) && is_array($data[self::FIELD_PATTERN_STRING_EXT])) { + $ext = $data[self::FIELD_PATTERN_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPatternString($value); + } else if (is_array($value)) { + $this->setPatternString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPatternString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_TIME]) || isset($data[self::FIELD_PATTERN_TIME_EXT])) { + if (isset($data[self::FIELD_PATTERN_TIME])) { + $value = $data[self::FIELD_PATTERN_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_TIME_EXT])) { + $ext = $data[self::FIELD_PATTERN_TIME_EXT]; } else { - $this->setPatternTime(new FHIRTime($data[self::FIELD_PATTERN_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setPatternTime($value); + } else if (is_array($value)) { + $this->setPatternTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setPatternTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_PATTERN_TIMING])) { @@ -6313,113 +7115,157 @@ public function __construct($data = null) $this->setPatternTiming(new FHIRTiming($data[self::FIELD_PATTERN_TIMING])); } } - if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_PATTERN_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_PATTERN_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setPatternUnsignedInt($data[self::FIELD_PATTERN_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_UNSIGNED_INT])) { - $this->setPatternUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_PATTERN_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_UNSIGNED_INT])) { - $this->setPatternUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_PATTERN_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT]) || isset($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT])) { + $value = $data[self::FIELD_PATTERN_UNSIGNED_INT]; } else { - $this->setPatternUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_PATTERN_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_URI])) { - $ext = (isset($data[self::FIELD_PATTERN_URI_EXT]) && is_array($data[self::FIELD_PATTERN_URI_EXT])) - ? $data[self::FIELD_PATTERN_URI_EXT] - : null; - if ($data[self::FIELD_PATTERN_URI] instanceof FHIRUri) { - $this->setPatternUri($data[self::FIELD_PATTERN_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_URI])) { - $this->setPatternUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PATTERN_URI]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_URI])) { - $this->setPatternUri(new FHIRUri(array_merge($ext, $data[self::FIELD_PATTERN_URI]))); - } + if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_PATTERN_UNSIGNED_INT_EXT]; } else { - $this->setPatternUri(new FHIRUri($data[self::FIELD_PATTERN_URI])); + $ext = []; } - } - if (isset($data[self::FIELD_PATTERN_UUID])) { - $ext = (isset($data[self::FIELD_PATTERN_UUID_EXT]) && is_array($data[self::FIELD_PATTERN_UUID_EXT])) - ? $data[self::FIELD_PATTERN_UUID_EXT] - : null; - if ($data[self::FIELD_PATTERN_UUID] instanceof FHIRUuid) { - $this->setPatternUuid($data[self::FIELD_PATTERN_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_UUID])) { - $this->setPatternUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_PATTERN_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_UUID])) { - $this->setPatternUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_PATTERN_UUID]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setPatternUnsignedInt($value); + } else if (is_array($value)) { + $this->setPatternUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setPatternUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_URI]) || isset($data[self::FIELD_PATTERN_URI_EXT])) { + if (isset($data[self::FIELD_PATTERN_URI])) { + $value = $data[self::FIELD_PATTERN_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_URI_EXT]) && is_array($data[self::FIELD_PATTERN_URI_EXT])) { + $ext = $data[self::FIELD_PATTERN_URI_EXT]; } else { - $this->setPatternUuid(new FHIRUuid($data[self::FIELD_PATTERN_UUID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setPatternUri($value); + } else if (is_array($value)) { + $this->setPatternUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setPatternUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternUri(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_REPRESENTATION])) { - $ext = (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) - ? $data[self::FIELD_REPRESENTATION_EXT] - : null; - if (is_array($data[self::FIELD_REPRESENTATION])) { - foreach($data[self::FIELD_REPRESENTATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPropertyRepresentation) { - $this->addRepresentation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PATTERN_UUID]) || isset($data[self::FIELD_PATTERN_UUID_EXT])) { + if (isset($data[self::FIELD_PATTERN_UUID])) { + $value = $data[self::FIELD_PATTERN_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_UUID_EXT]) && is_array($data[self::FIELD_PATTERN_UUID_EXT])) { + $ext = $data[self::FIELD_PATTERN_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setPatternUuid($value); + } else if (is_array($value)) { + $this->setPatternUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setPatternUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternUuid(new FHIRUuid($ext)); + } + } + if (isset($data[self::FIELD_REPRESENTATION]) || isset($data[self::FIELD_REPRESENTATION_EXT])) { + if (isset($data[self::FIELD_REPRESENTATION])) { + $value = $data[self::FIELD_REPRESENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) { + $ext = $data[self::FIELD_REPRESENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPropertyRepresentation) { + $this->addRepresentation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPropertyRepresentation) { + $this->addRepresentation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($v, $iext))); + } else { + $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addRepresentation(new FHIRPropertyRepresentation($v)); } + } elseif (is_array($value)) { + $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($ext, $value))); + } else { + $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_REPRESENTATION] instanceof FHIRPropertyRepresentation) { - $this->addRepresentation($data[self::FIELD_REPRESENTATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REPRESENTATION])) { - $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $data[self::FIELD_REPRESENTATION]] + $ext)); - } else { - $this->addRepresentation(new FHIRPropertyRepresentation($data[self::FIELD_REPRESENTATION])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRMarkdown) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addRepresentation(new FHIRPropertyRepresentation($iext)); } - } else { - $this->setRequirements(new FHIRMarkdown($data[self::FIELD_REQUIREMENTS])); } } - if (isset($data[self::FIELD_SHORT])) { - $ext = (isset($data[self::FIELD_SHORT_EXT]) && is_array($data[self::FIELD_SHORT_EXT])) - ? $data[self::FIELD_SHORT_EXT] - : null; - if ($data[self::FIELD_SHORT] instanceof FHIRString) { - $this->setShort($data[self::FIELD_SHORT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SHORT])) { - $this->setShort(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SHORT]] + $ext)); - } else if (is_array($data[self::FIELD_SHORT])) { - $this->setShort(new FHIRString(array_merge($ext, $data[self::FIELD_SHORT]))); + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_SHORT]) || isset($data[self::FIELD_SHORT_EXT])) { + if (isset($data[self::FIELD_SHORT])) { + $value = $data[self::FIELD_SHORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SHORT_EXT]) && is_array($data[self::FIELD_SHORT_EXT])) { + $ext = $data[self::FIELD_SHORT_EXT]; } else { - $this->setShort(new FHIRString($data[self::FIELD_SHORT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setShort($value); + } else if (is_array($value)) { + $this->setShort(new FHIRString(array_merge($ext, $value))); + } else { + $this->setShort(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setShort(new FHIRString($ext)); } } if (isset($data[self::FIELD_SLICING])) { @@ -15891,8 +16737,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -18319,18 +19165,26 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAlias())) { $a[self::FIELD_ALIAS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ALIAS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ALIAS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ALIAS_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ALIAS_EXT] = $encs; + } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v; @@ -18339,32 +19193,54 @@ public function jsonSerialize() $a[self::FIELD_BINDING] = $v; } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getComments())) { $a[self::FIELD_COMMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COMMENTS_EXT] = $enc; } } if ([] !== ($vs = $this->getCondition())) { $a[self::FIELD_CONDITION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONDITION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONDITION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRId::FIELD_VALUE]) || array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONDITION_EXT][] = null; + unset($enc[FHIRId::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONDITION_EXT] = $encs; + } } if ([] !== ($vs = $this->getConstraint())) { - $a[self::FIELD_CONSTRAINT] = $vs; + $a[self::FIELD_CONSTRAINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONSTRAINT][] = $v; + } } if (null !== ($v = $this->getDefaultValueAddress())) { $a[self::FIELD_DEFAULT_VALUE_ADDRESS] = $v; @@ -18377,22 +19253,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueBase64Binary())) { $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueBoolean())) { $a[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueCode())) { $a[self::FIELD_DEFAULT_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_CODE_EXT] = $enc; } } @@ -18407,22 +19289,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueDate())) { $a[self::FIELD_DEFAULT_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDateTime())) { $a[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDecimal())) { $a[self::FIELD_DEFAULT_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] = $enc; } } @@ -18431,8 +19319,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueId())) { $a[self::FIELD_DEFAULT_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_ID_EXT] = $enc; } } @@ -18441,22 +19331,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueInstant())) { $a[self::FIELD_DEFAULT_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueInteger())) { $a[self::FIELD_DEFAULT_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueMarkdown())) { $a[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] = $enc; } } @@ -18465,8 +19361,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueOid())) { $a[self::FIELD_DEFAULT_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_OID_EXT] = $enc; } } @@ -18475,8 +19373,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValuePositiveInt())) { $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -18500,15 +19400,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueString())) { $a[self::FIELD_DEFAULT_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueTime())) { $a[self::FIELD_DEFAULT_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_TIME_EXT] = $enc; } } @@ -18517,29 +19421,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueUnsignedInt())) { $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueUri())) { $a[self::FIELD_DEFAULT_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueUuid())) { $a[self::FIELD_DEFAULT_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_UUID_EXT] = $enc; } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } @@ -18554,22 +19466,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleBase64Binary())) { $a[self::FIELD_EXAMPLE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getExampleBoolean())) { $a[self::FIELD_EXAMPLE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getExampleCode())) { $a[self::FIELD_EXAMPLE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_CODE_EXT] = $enc; } } @@ -18584,22 +19502,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleDate())) { $a[self::FIELD_EXAMPLE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getExampleDateTime())) { $a[self::FIELD_EXAMPLE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getExampleDecimal())) { $a[self::FIELD_EXAMPLE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_DECIMAL_EXT] = $enc; } } @@ -18608,8 +19532,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleId())) { $a[self::FIELD_EXAMPLE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_ID_EXT] = $enc; } } @@ -18618,22 +19544,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleInstant())) { $a[self::FIELD_EXAMPLE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getExampleInteger())) { $a[self::FIELD_EXAMPLE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getExampleMarkdown())) { $a[self::FIELD_EXAMPLE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_MARKDOWN_EXT] = $enc; } } @@ -18642,8 +19574,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleOid())) { $a[self::FIELD_EXAMPLE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_OID_EXT] = $enc; } } @@ -18652,8 +19586,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExamplePositiveInt())) { $a[self::FIELD_EXAMPLE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_POSITIVE_INT_EXT] = $enc; } } @@ -18677,15 +19613,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleString())) { $a[self::FIELD_EXAMPLE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getExampleTime())) { $a[self::FIELD_EXAMPLE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_TIME_EXT] = $enc; } } @@ -18694,22 +19634,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getExampleUnsignedInt())) { $a[self::FIELD_EXAMPLE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getExampleUri())) { $a[self::FIELD_EXAMPLE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_URI_EXT] = $enc; } } if (null !== ($v = $this->getExampleUuid())) { $a[self::FIELD_EXAMPLE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_UUID_EXT] = $enc; } } @@ -18724,22 +19670,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedBase64Binary())) { $a[self::FIELD_FIXED_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_FIXED_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getFixedBoolean())) { $a[self::FIELD_FIXED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FIXED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getFixedCode())) { $a[self::FIELD_FIXED_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_FIXED_CODE_EXT] = $enc; } } @@ -18754,22 +19706,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedDate())) { $a[self::FIELD_FIXED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_FIXED_DATE_EXT] = $enc; } } if (null !== ($v = $this->getFixedDateTime())) { $a[self::FIELD_FIXED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_FIXED_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getFixedDecimal())) { $a[self::FIELD_FIXED_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FIXED_DECIMAL_EXT] = $enc; } } @@ -18778,8 +19736,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedId())) { $a[self::FIELD_FIXED_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FIXED_ID_EXT] = $enc; } } @@ -18788,22 +19748,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedInstant())) { $a[self::FIELD_FIXED_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_FIXED_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getFixedInteger())) { $a[self::FIELD_FIXED_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_FIXED_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getFixedMarkdown())) { $a[self::FIELD_FIXED_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_FIXED_MARKDOWN_EXT] = $enc; } } @@ -18812,8 +19778,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedOid())) { $a[self::FIELD_FIXED_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_FIXED_OID_EXT] = $enc; } } @@ -18822,8 +19790,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedPositiveInt())) { $a[self::FIELD_FIXED_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_FIXED_POSITIVE_INT_EXT] = $enc; } } @@ -18847,15 +19817,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedString())) { $a[self::FIELD_FIXED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FIXED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getFixedTime())) { $a[self::FIELD_FIXED_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_FIXED_TIME_EXT] = $enc; } } @@ -18864,60 +19838,82 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedUnsignedInt())) { $a[self::FIELD_FIXED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_FIXED_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getFixedUri())) { $a[self::FIELD_FIXED_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_FIXED_URI_EXT] = $enc; } } if (null !== ($v = $this->getFixedUuid())) { $a[self::FIELD_FIXED_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_FIXED_UUID_EXT] = $enc; } } if (null !== ($v = $this->getIsModifier())) { $a[self::FIELD_IS_MODIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_MODIFIER_EXT] = $enc; } } if (null !== ($v = $this->getIsSummary())) { $a[self::FIELD_IS_SUMMARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_SUMMARY_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMaxLength())) { $a[self::FIELD_MAX_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MAX_LENGTH_EXT] = $enc; } } @@ -18932,22 +19928,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValueBase64Binary())) { $a[self::FIELD_MAX_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueBoolean())) { $a[self::FIELD_MAX_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueCode())) { $a[self::FIELD_MAX_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_CODE_EXT] = $enc; } } @@ -18962,22 +19964,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValueDate())) { $a[self::FIELD_MAX_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueDateTime())) { $a[self::FIELD_MAX_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueDecimal())) { $a[self::FIELD_MAX_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_DECIMAL_EXT] = $enc; } } @@ -18986,8 +19994,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValueId())) { $a[self::FIELD_MAX_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_ID_EXT] = $enc; } } @@ -18996,22 +20006,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValueInstant())) { $a[self::FIELD_MAX_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueInteger())) { $a[self::FIELD_MAX_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueMarkdown())) { $a[self::FIELD_MAX_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_MARKDOWN_EXT] = $enc; } } @@ -19020,8 +20036,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValueOid())) { $a[self::FIELD_MAX_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_OID_EXT] = $enc; } } @@ -19030,8 +20048,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValuePositiveInt())) { $a[self::FIELD_MAX_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -19055,15 +20075,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValueString())) { $a[self::FIELD_MAX_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueTime())) { $a[self::FIELD_MAX_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_TIME_EXT] = $enc; } } @@ -19072,36 +20096,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValueUnsignedInt())) { $a[self::FIELD_MAX_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueUri())) { $a[self::FIELD_MAX_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueUuid())) { $a[self::FIELD_MAX_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_UUID_EXT] = $enc; } } if (null !== ($v = $this->getMeaningWhenMissing())) { $a[self::FIELD_MEANING_WHEN_MISSING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_MEANING_WHEN_MISSING_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } @@ -19116,22 +20150,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValueBase64Binary())) { $a[self::FIELD_MIN_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getMinValueBoolean())) { $a[self::FIELD_MIN_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getMinValueCode())) { $a[self::FIELD_MIN_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_CODE_EXT] = $enc; } } @@ -19146,22 +20186,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValueDate())) { $a[self::FIELD_MIN_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getMinValueDateTime())) { $a[self::FIELD_MIN_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMinValueDecimal())) { $a[self::FIELD_MIN_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_DECIMAL_EXT] = $enc; } } @@ -19170,8 +20216,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValueId())) { $a[self::FIELD_MIN_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_ID_EXT] = $enc; } } @@ -19180,22 +20228,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValueInstant())) { $a[self::FIELD_MIN_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getMinValueInteger())) { $a[self::FIELD_MIN_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getMinValueMarkdown())) { $a[self::FIELD_MIN_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_MARKDOWN_EXT] = $enc; } } @@ -19204,8 +20258,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValueOid())) { $a[self::FIELD_MIN_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_OID_EXT] = $enc; } } @@ -19214,8 +20270,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValuePositiveInt())) { $a[self::FIELD_MIN_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -19239,15 +20297,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValueString())) { $a[self::FIELD_MIN_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getMinValueTime())) { $a[self::FIELD_MIN_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_TIME_EXT] = $enc; } } @@ -19256,50 +20318,64 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValueUnsignedInt())) { $a[self::FIELD_MIN_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getMinValueUri())) { $a[self::FIELD_MIN_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getMinValueUuid())) { $a[self::FIELD_MIN_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_UUID_EXT] = $enc; } } if (null !== ($v = $this->getMustSupport())) { $a[self::FIELD_MUST_SUPPORT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MUST_SUPPORT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getNameReference())) { $a[self::FIELD_NAME_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_REFERENCE_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } @@ -19314,22 +20390,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternBase64Binary())) { $a[self::FIELD_PATTERN_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_PATTERN_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getPatternBoolean())) { $a[self::FIELD_PATTERN_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PATTERN_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getPatternCode())) { $a[self::FIELD_PATTERN_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_PATTERN_CODE_EXT] = $enc; } } @@ -19344,22 +20426,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternDate())) { $a[self::FIELD_PATTERN_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_PATTERN_DATE_EXT] = $enc; } } if (null !== ($v = $this->getPatternDateTime())) { $a[self::FIELD_PATTERN_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PATTERN_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getPatternDecimal())) { $a[self::FIELD_PATTERN_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PATTERN_DECIMAL_EXT] = $enc; } } @@ -19368,8 +20456,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternId())) { $a[self::FIELD_PATTERN_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_PATTERN_ID_EXT] = $enc; } } @@ -19378,22 +20468,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternInstant())) { $a[self::FIELD_PATTERN_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_PATTERN_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getPatternInteger())) { $a[self::FIELD_PATTERN_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_PATTERN_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getPatternMarkdown())) { $a[self::FIELD_PATTERN_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PATTERN_MARKDOWN_EXT] = $enc; } } @@ -19402,8 +20498,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternOid())) { $a[self::FIELD_PATTERN_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_PATTERN_OID_EXT] = $enc; } } @@ -19412,8 +20510,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternPositiveInt())) { $a[self::FIELD_PATTERN_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_PATTERN_POSITIVE_INT_EXT] = $enc; } } @@ -19437,15 +20537,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternString())) { $a[self::FIELD_PATTERN_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATTERN_STRING_EXT] = $enc; } } if (null !== ($v = $this->getPatternTime())) { $a[self::FIELD_PATTERN_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_PATTERN_TIME_EXT] = $enc; } } @@ -19454,51 +20558,69 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternUnsignedInt())) { $a[self::FIELD_PATTERN_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_PATTERN_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getPatternUri())) { $a[self::FIELD_PATTERN_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PATTERN_URI_EXT] = $enc; } } if (null !== ($v = $this->getPatternUuid())) { $a[self::FIELD_PATTERN_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_PATTERN_UUID_EXT] = $enc; } } if ([] !== ($vs = $this->getRepresentation())) { $a[self::FIELD_REPRESENTATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REPRESENTATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REPRESENTATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPropertyRepresentation::FIELD_VALUE]) || array_key_exists(FHIRPropertyRepresentation::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REPRESENTATION_EXT][] = null; + unset($enc[FHIRPropertyRepresentation::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REPRESENTATION_EXT] = $encs; + } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getShort())) { $a[self::FIELD_SHORT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SHORT_EXT] = $enc; } } @@ -19506,7 +20628,16 @@ public function jsonSerialize() $a[self::FIELD_SLICING] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php index 64a5b2431b..6c442fe969 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRElementDefinitionBase extends FHIRElement const FIELD_PATH_EXT = '_path'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -148,52 +148,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $value = null; } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); - } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } } @@ -343,8 +364,8 @@ public function setPath($path = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -454,25 +475,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php index 9acf0e3793..e1904d804f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRElementDefinitionBinding extends FHIRElement const FIELD_VALUE_SET_URI_EXT = '_valueSetUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -162,36 +162,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_STRENGTH])) { - $ext = (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) - ? $data[self::FIELD_STRENGTH_EXT] - : null; - if ($data[self::FIELD_STRENGTH] instanceof FHIRBindingStrength) { - $this->setStrength($data[self::FIELD_STRENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $data[self::FIELD_STRENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength(array_merge($ext, $data[self::FIELD_STRENGTH]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STRENGTH]) || isset($data[self::FIELD_STRENGTH_EXT])) { + if (isset($data[self::FIELD_STRENGTH])) { + $value = $data[self::FIELD_STRENGTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) { + $ext = $data[self::FIELD_STRENGTH_EXT]; } else { - $this->setStrength(new FHIRBindingStrength($data[self::FIELD_STRENGTH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBindingStrength) { + $this->setStrength($value); + } else if (is_array($value)) { + $this->setStrength(new FHIRBindingStrength(array_merge($ext, $value))); + } else { + $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStrength(new FHIRBindingStrength($ext)); } } if (isset($data[self::FIELD_VALUE_SET_REFERENCE])) { @@ -201,20 +215,27 @@ public function __construct($data = null) $this->setValueSetReference(new FHIRReference($data[self::FIELD_VALUE_SET_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_SET_URI])) { - $ext = (isset($data[self::FIELD_VALUE_SET_URI_EXT]) && is_array($data[self::FIELD_VALUE_SET_URI_EXT])) - ? $data[self::FIELD_VALUE_SET_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_SET_URI] instanceof FHIRUri) { - $this->setValueSetUri($data[self::FIELD_VALUE_SET_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET_URI])) { - $this->setValueSetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_SET_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET_URI])) { - $this->setValueSetUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_SET_URI]))); - } + if (isset($data[self::FIELD_VALUE_SET_URI]) || isset($data[self::FIELD_VALUE_SET_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_SET_URI])) { + $value = $data[self::FIELD_VALUE_SET_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_URI_EXT]) && is_array($data[self::FIELD_VALUE_SET_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_URI_EXT]; } else { - $this->setValueSetUri(new FHIRUri($data[self::FIELD_VALUE_SET_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueSetUri($value); + } else if (is_array($value)) { + $this->setValueSetUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueSetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSetUri(new FHIRUri($ext)); } } } @@ -386,8 +407,8 @@ public function setValueSetUri($valueSetUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -495,15 +516,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getStrength())) { $a[self::FIELD_STRENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBindingStrength::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBindingStrength::FIELD_VALUE]); $a[self::FIELD_STRENGTH_EXT] = $enc; } } @@ -512,11 +537,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueSetUri())) { $a[self::FIELD_VALUE_SET_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php index fa004dc2b5..577e2f6dbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRElementDefinitionConstraint extends FHIRElement const FIELD_XPATH_EXT = '_xpath'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -179,84 +179,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_HUMAN])) { - $ext = (isset($data[self::FIELD_HUMAN_EXT]) && is_array($data[self::FIELD_HUMAN_EXT])) - ? $data[self::FIELD_HUMAN_EXT] - : null; - if ($data[self::FIELD_HUMAN] instanceof FHIRString) { - $this->setHuman($data[self::FIELD_HUMAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HUMAN])) { - $this->setHuman(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HUMAN]] + $ext)); - } else if (is_array($data[self::FIELD_HUMAN])) { - $this->setHuman(new FHIRString(array_merge($ext, $data[self::FIELD_HUMAN]))); - } + if (isset($data[self::FIELD_HUMAN]) || isset($data[self::FIELD_HUMAN_EXT])) { + if (isset($data[self::FIELD_HUMAN])) { + $value = $data[self::FIELD_HUMAN]; } else { - $this->setHuman(new FHIRString($data[self::FIELD_HUMAN])); + $value = null; } - } - if (isset($data[self::FIELD_KEY])) { - $ext = (isset($data[self::FIELD_KEY_EXT]) && is_array($data[self::FIELD_KEY_EXT])) - ? $data[self::FIELD_KEY_EXT] - : null; - if ($data[self::FIELD_KEY] instanceof FHIRId) { - $this->setKey($data[self::FIELD_KEY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KEY])) { - $this->setKey(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_KEY]] + $ext)); - } else if (is_array($data[self::FIELD_KEY])) { - $this->setKey(new FHIRId(array_merge($ext, $data[self::FIELD_KEY]))); - } + if (isset($data[self::FIELD_HUMAN_EXT]) && is_array($data[self::FIELD_HUMAN_EXT])) { + $ext = $data[self::FIELD_HUMAN_EXT]; } else { - $this->setKey(new FHIRId($data[self::FIELD_KEY])); + $ext = []; } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHuman($value); + } else if (is_array($value)) { + $this->setHuman(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHuman(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); + } else if ([] !== $ext) { + $this->setHuman(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRConstraintSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRConstraintSeverity([FHIRConstraintSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRConstraintSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + if (isset($data[self::FIELD_KEY]) || isset($data[self::FIELD_KEY_EXT])) { + if (isset($data[self::FIELD_KEY])) { + $value = $data[self::FIELD_KEY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KEY_EXT]) && is_array($data[self::FIELD_KEY_EXT])) { + $ext = $data[self::FIELD_KEY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setKey($value); + } else if (is_array($value)) { + $this->setKey(new FHIRId(array_merge($ext, $value))); + } else { + $this->setKey(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKey(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; } else { - $this->setSeverity(new FHIRConstraintSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); } } - if (isset($data[self::FIELD_XPATH])) { - $ext = (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) - ? $data[self::FIELD_XPATH_EXT] - : null; - if ($data[self::FIELD_XPATH] instanceof FHIRString) { - $this->setXpath($data[self::FIELD_XPATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_XPATH]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString(array_merge($ext, $data[self::FIELD_XPATH]))); + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConstraintSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRConstraintSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRConstraintSeverity([FHIRConstraintSeverity::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRConstraintSeverity($ext)); + } + } + if (isset($data[self::FIELD_XPATH]) || isset($data[self::FIELD_XPATH_EXT])) { + if (isset($data[self::FIELD_XPATH])) { + $value = $data[self::FIELD_XPATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) { + $ext = $data[self::FIELD_XPATH_EXT]; } else { - $this->setXpath(new FHIRString($data[self::FIELD_XPATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setXpath($value); + } else if (is_array($value)) { + $this->setXpath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setXpath(new FHIRString($ext)); } } } @@ -482,8 +517,8 @@ public function setXpath($xpath = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -613,39 +648,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getHuman())) { $a[self::FIELD_HUMAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HUMAN_EXT] = $enc; } } if (null !== ($v = $this->getKey())) { $a[self::FIELD_KEY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_KEY_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConstraintSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConstraintSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getXpath())) { $a[self::FIELD_XPATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_XPATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php index 44d4476456..715a725730 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRElementDefinitionMapping extends FHIRElement const FIELD_MAP_EXT = '_map'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -150,52 +150,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $value = null; } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); - } + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); } } - if (isset($data[self::FIELD_MAP])) { - $ext = (isset($data[self::FIELD_MAP_EXT]) && is_array($data[self::FIELD_MAP_EXT])) - ? $data[self::FIELD_MAP_EXT] - : null; - if ($data[self::FIELD_MAP] instanceof FHIRString) { - $this->setMap($data[self::FIELD_MAP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAP])) { - $this->setMap(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAP]] + $ext)); - } else if (is_array($data[self::FIELD_MAP])) { - $this->setMap(new FHIRString(array_merge($ext, $data[self::FIELD_MAP]))); + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_MAP]) || isset($data[self::FIELD_MAP_EXT])) { + if (isset($data[self::FIELD_MAP])) { + $value = $data[self::FIELD_MAP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAP_EXT]) && is_array($data[self::FIELD_MAP_EXT])) { + $ext = $data[self::FIELD_MAP_EXT]; } else { - $this->setMap(new FHIRString($data[self::FIELD_MAP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMap($value); + } else if (is_array($value)) { + $this->setMap(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMap(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMap(new FHIRString($ext)); } } } @@ -347,8 +368,8 @@ public function setMap($map = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -458,25 +479,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getMap())) { $a[self::FIELD_MAP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php index 5b49590fce..5f8b7f4b24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRElementDefinitionSlicing extends FHIRElement const FIELD_RULES_EXT = '_rules'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -165,81 +165,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_DISCRIMINATOR])) { - $ext = (isset($data[self::FIELD_DISCRIMINATOR_EXT]) && is_array($data[self::FIELD_DISCRIMINATOR_EXT])) - ? $data[self::FIELD_DISCRIMINATOR_EXT] - : null; - if (is_array($data[self::FIELD_DISCRIMINATOR])) { - foreach($data[self::FIELD_DISCRIMINATOR] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addDiscriminator($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDiscriminator(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDiscriminator(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DISCRIMINATOR]) || isset($data[self::FIELD_DISCRIMINATOR_EXT])) { + if (isset($data[self::FIELD_DISCRIMINATOR])) { + $value = $data[self::FIELD_DISCRIMINATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISCRIMINATOR_EXT]) && is_array($data[self::FIELD_DISCRIMINATOR_EXT])) { + $ext = $data[self::FIELD_DISCRIMINATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addDiscriminator($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addDiscriminator($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDiscriminator(new FHIRString(array_merge($v, $iext))); + } else { + $this->addDiscriminator(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDiscriminator(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addDiscriminator(new FHIRString(array_merge($ext, $value))); + } else { + $this->addDiscriminator(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDiscriminator(new FHIRString($iext)); } - } elseif ($data[self::FIELD_DISCRIMINATOR] instanceof FHIRString) { - $this->addDiscriminator($data[self::FIELD_DISCRIMINATOR]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DISCRIMINATOR])) { - $this->addDiscriminator(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISCRIMINATOR]] + $ext)); - } else { - $this->addDiscriminator(new FHIRString($data[self::FIELD_DISCRIMINATOR])); } } - if (isset($data[self::FIELD_ORDERED])) { - $ext = (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) - ? $data[self::FIELD_ORDERED_EXT] - : null; - if ($data[self::FIELD_ORDERED] instanceof FHIRBoolean) { - $this->setOrdered($data[self::FIELD_ORDERED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ORDERED]] + $ext)); - } else if (is_array($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ORDERED]))); - } + if (isset($data[self::FIELD_ORDERED]) || isset($data[self::FIELD_ORDERED_EXT])) { + if (isset($data[self::FIELD_ORDERED])) { + $value = $data[self::FIELD_ORDERED]; } else { - $this->setOrdered(new FHIRBoolean($data[self::FIELD_ORDERED])); + $value = null; } - } - if (isset($data[self::FIELD_RULES])) { - $ext = (isset($data[self::FIELD_RULES_EXT]) && is_array($data[self::FIELD_RULES_EXT])) - ? $data[self::FIELD_RULES_EXT] - : null; - if ($data[self::FIELD_RULES] instanceof FHIRSlicingRules) { - $this->setRules($data[self::FIELD_RULES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULES])) { - $this->setRules(new FHIRSlicingRules([FHIRSlicingRules::FIELD_VALUE => $data[self::FIELD_RULES]] + $ext)); - } else if (is_array($data[self::FIELD_RULES])) { - $this->setRules(new FHIRSlicingRules(array_merge($ext, $data[self::FIELD_RULES]))); + if (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) { + $ext = $data[self::FIELD_ORDERED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOrdered($value); + } else if (is_array($value)) { + $this->setOrdered(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOrdered(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_RULES]) || isset($data[self::FIELD_RULES_EXT])) { + if (isset($data[self::FIELD_RULES])) { + $value = $data[self::FIELD_RULES]; } else { - $this->setRules(new FHIRSlicingRules($data[self::FIELD_RULES])); + $value = null; + } + if (isset($data[self::FIELD_RULES_EXT]) && is_array($data[self::FIELD_RULES_EXT])) { + $ext = $data[self::FIELD_RULES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSlicingRules) { + $this->setRules($value); + } else if (is_array($value)) { + $this->setRules(new FHIRSlicingRules(array_merge($ext, $value))); + } else { + $this->setRules(new FHIRSlicingRules([FHIRSlicingRules::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRules(new FHIRSlicingRules($ext)); } } } @@ -455,8 +485,8 @@ public function setRules(FHIRSlicingRules $rules = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -571,40 +601,57 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDiscriminator())) { $a[self::FIELD_DISCRIMINATOR] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DISCRIMINATOR][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DISCRIMINATOR_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DISCRIMINATOR_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DISCRIMINATOR_EXT] = $encs; + } } if (null !== ($v = $this->getOrdered())) { $a[self::FIELD_ORDERED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ORDERED_EXT] = $enc; } } if (null !== ($v = $this->getRules())) { $a[self::FIELD_RULES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSlicingRules::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSlicingRules::FIELD_VALUE]); $a[self::FIELD_RULES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php index 7d25f1fc43..fe07ae3703 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRElementDefinitionType extends FHIRElement const FIELD_PROFILE_EXT = '_profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How resource references can be aggregated. @@ -153,78 +153,103 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AGGREGATION])) { - $ext = (isset($data[self::FIELD_AGGREGATION_EXT]) && is_array($data[self::FIELD_AGGREGATION_EXT])) - ? $data[self::FIELD_AGGREGATION_EXT] - : null; - if (is_array($data[self::FIELD_AGGREGATION])) { - foreach($data[self::FIELD_AGGREGATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRAggregationMode) { - $this->addAggregation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAggregation(new FHIRAggregationMode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_AGGREGATION]) || isset($data[self::FIELD_AGGREGATION_EXT])) { + if (isset($data[self::FIELD_AGGREGATION])) { + $value = $data[self::FIELD_AGGREGATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AGGREGATION_EXT]) && is_array($data[self::FIELD_AGGREGATION_EXT])) { + $ext = $data[self::FIELD_AGGREGATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAggregationMode) { + $this->addAggregation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRAggregationMode) { + $this->addAggregation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAggregation(new FHIRAggregationMode(array_merge($v, $iext))); + } else { + $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAggregation(new FHIRAggregationMode($v)); } + } elseif (is_array($value)) { + $this->addAggregation(new FHIRAggregationMode(array_merge($ext, $value))); + } else { + $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAggregation(new FHIRAggregationMode($iext)); } - } elseif ($data[self::FIELD_AGGREGATION] instanceof FHIRAggregationMode) { - $this->addAggregation($data[self::FIELD_AGGREGATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_AGGREGATION])) { - $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $data[self::FIELD_AGGREGATION]] + $ext)); - } else { - $this->addAggregation(new FHIRAggregationMode($data[self::FIELD_AGGREGATION])); } } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_PROFILE])) { - foreach($data[self::FIELD_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProfile(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProfile(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProfile(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addProfile(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProfile(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_PROFILE] instanceof FHIRUri) { - $this->addProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROFILE])) { - $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else { - $this->addProfile(new FHIRUri($data[self::FIELD_PROFILE])); } } } @@ -432,8 +457,8 @@ public function setProfile(array $profile = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -541,40 +566,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAggregation())) { $a[self::FIELD_AGGREGATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_AGGREGATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_AGGREGATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRAggregationMode::FIELD_VALUE]) || array_key_exists(FHIRAggregationMode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_AGGREGATION_EXT][] = null; + unset($enc[FHIRAggregationMode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_AGGREGATION_EXT] = $encs; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getProfile())) { $a[self::FIELD_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROFILE_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROFILE_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterClass.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterClass.php index 3da30617a2..0e439ac62d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterClass.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterClass.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREncounterClass extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_CLASS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIREncounterClassList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterLocationStatus.php index 0bbd2e031d..90bb9623de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREncounterLocationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_LOCATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIREncounterLocationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterState.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterState.php index 5eec9b469d..c1901ce2ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterState.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREncounterState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREncounterState extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIREncounterStateList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREpisodeOfCareStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREpisodeOfCareStatus.php index 8d6f195667..f51f4171a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREpisodeOfCareStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREpisodeOfCareStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREpisodeOfCareStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIREpisodeOfCareStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREventTiming.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREventTiming.php index bda78f35d9..20767ca0d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREventTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIREventTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREventTiming extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_TIMING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIREventTimingList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtension.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtension.php index 47563bb6fb..4aa03930c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtension.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtension.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,6 @@ class FHIRExtension extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION; const FIELD_URL = 'url'; - const FIELD_URL_EXT = '_url'; const FIELD_VALUE_ADDRESS = 'valueAddress'; const FIELD_VALUE_ANNOTATION = 'valueAnnotation'; const FIELD_VALUE_ATTACHMENT = 'valueAttachment'; @@ -134,7 +133,7 @@ class FHIRExtension extends FHIRElement const FIELD_VALUE_UUID_EXT = '_valueUuid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRUriPrimitive @@ -628,52 +627,73 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -697,52 +717,73 @@ public function __construct($data = null) $this->setValueContactPoint(new FHIRContactPoint($data[self::FIELD_VALUE_CONTACT_POINT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_HUMAN_NAME])) { @@ -752,20 +793,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -775,52 +823,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -830,20 +899,27 @@ public function __construct($data = null) $this->setValueMeta(new FHIRMeta($data[self::FIELD_VALUE_META])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -853,20 +929,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -911,36 +994,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -950,52 +1047,73 @@ public function __construct($data = null) $this->setValueTiming(new FHIRTiming($data[self::FIELD_VALUE_TIMING])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) - ? $data[self::FIELD_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_VALUE_UUID] instanceof FHIRUuid) { - $this->setValueUuid($data[self::FIELD_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_VALUE_UUID]))); + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VALUE_UUID]) || isset($data[self::FIELD_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_VALUE_UUID])) { + $value = $data[self::FIELD_VALUE_UUID]; } else { - $this->setValueUuid(new FHIRUuid($data[self::FIELD_VALUE_UUID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_VALUE_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setValueUuid($value); + } else if (is_array($value)) { + $this->setValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUuid(new FHIRUuid($ext)); } } } @@ -2341,8 +2459,8 @@ public function setValueUuid($valueUuid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2776,22 +2894,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -2806,22 +2930,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -2830,8 +2960,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -2840,22 +2972,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -2864,8 +3002,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -2874,8 +3014,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -2899,15 +3041,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -2916,25 +3062,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getValueUuid())) { $a[self::FIELD_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_VALUE_UUID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtensionContext.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtensionContext.php index 1c25df7362..ce51041de5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtensionContext.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRExtensionContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRExtensionContext extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRExtensionContextList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFamilyHistoryStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFamilyHistoryStatus.php index 4106bf089d..646a3c7b83 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFamilyHistoryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFamilyHistoryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFamilyHistoryStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRFamilyHistoryStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFilterOperator.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFilterOperator.php index dec508352e..2a3bea1fc8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFilterOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFilterOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFilterOperator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRFilterOperatorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFlagStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFlagStatus.php index 9016657937..d6033bbff2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFlagStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRFlagStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRFlagStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FLAG_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRFlagStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGoalStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGoalStatus.php index 9b5dafb1fd..07c549e648 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGoalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGoalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGoalStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GOAL_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRGoalStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGroupType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGroupType.php index 13cc563613..bc002b19f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGroupType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGroupType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGroupType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRGroupTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideDependencyType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideDependencyType.php index 92582fd686..2e881ff541 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideDependencyType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideDependencyType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGuideDependencyType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_DEPENDENCY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRGuideDependencyTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuidePageKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuidePageKind.php index 68693a1f1a..95eda1acee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuidePageKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuidePageKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGuidePageKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_PAGE_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRGuidePageKindList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideResourcePurpose.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideResourcePurpose.php index a3840ece92..1927525e19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideResourcePurpose.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRGuideResourcePurpose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGuideResourcePurpose extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_RESOURCE_PURPOSE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRGuideResourcePurposeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHTTPVerb.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHTTPVerb.php index bf00dc8400..b47d39e0bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHTTPVerb.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHTTPVerb.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRHTTPVerb extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_HTTPVERB; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRHTTPVerbList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHumanName.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHumanName.php index e2c3f83e0c..72ad7d7238 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHumanName.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRHumanName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRHumanName extends FHIRElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -196,62 +196,80 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FAMILY])) { - $ext = (isset($data[self::FIELD_FAMILY_EXT]) && is_array($data[self::FIELD_FAMILY_EXT])) - ? $data[self::FIELD_FAMILY_EXT] - : null; - if (is_array($data[self::FIELD_FAMILY])) { - foreach($data[self::FIELD_FAMILY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addFamily($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFamily(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFamily(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FAMILY]) || isset($data[self::FIELD_FAMILY_EXT])) { + if (isset($data[self::FIELD_FAMILY])) { + $value = $data[self::FIELD_FAMILY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FAMILY_EXT]) && is_array($data[self::FIELD_FAMILY_EXT])) { + $ext = $data[self::FIELD_FAMILY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addFamily($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addFamily($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFamily(new FHIRString(array_merge($v, $iext))); + } else { + $this->addFamily(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFamily(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addFamily(new FHIRString(array_merge($ext, $value))); + } else { + $this->addFamily(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFamily(new FHIRString($iext)); } - } elseif ($data[self::FIELD_FAMILY] instanceof FHIRString) { - $this->addFamily($data[self::FIELD_FAMILY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FAMILY])) { - $this->addFamily(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FAMILY]] + $ext)); - } else { - $this->addFamily(new FHIRString($data[self::FIELD_FAMILY])); } } - if (isset($data[self::FIELD_GIVEN])) { - $ext = (isset($data[self::FIELD_GIVEN_EXT]) && is_array($data[self::FIELD_GIVEN_EXT])) - ? $data[self::FIELD_GIVEN_EXT] - : null; - if (is_array($data[self::FIELD_GIVEN])) { - foreach($data[self::FIELD_GIVEN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addGiven($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addGiven(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_GIVEN]) || isset($data[self::FIELD_GIVEN_EXT])) { + if (isset($data[self::FIELD_GIVEN])) { + $value = $data[self::FIELD_GIVEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GIVEN_EXT]) && is_array($data[self::FIELD_GIVEN_EXT])) { + $ext = $data[self::FIELD_GIVEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addGiven($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addGiven($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addGiven(new FHIRString(array_merge($v, $iext))); + } else { + $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addGiven(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addGiven(new FHIRString(array_merge($ext, $value))); + } else { + $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addGiven(new FHIRString($iext)); } - } elseif ($data[self::FIELD_GIVEN] instanceof FHIRString) { - $this->addGiven($data[self::FIELD_GIVEN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_GIVEN])) { - $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GIVEN]] + $ext)); - } else { - $this->addGiven(new FHIRString($data[self::FIELD_GIVEN])); } } if (isset($data[self::FIELD_PERIOD])) { @@ -261,94 +279,126 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_PREFIX])) { - $ext = (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) - ? $data[self::FIELD_PREFIX_EXT] - : null; - if (is_array($data[self::FIELD_PREFIX])) { - foreach($data[self::FIELD_PREFIX] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPrefix($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPrefix(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PREFIX]) || isset($data[self::FIELD_PREFIX_EXT])) { + if (isset($data[self::FIELD_PREFIX])) { + $value = $data[self::FIELD_PREFIX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) { + $ext = $data[self::FIELD_PREFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPrefix($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPrefix($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPrefix(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPrefix(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPrefix(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPrefix(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PREFIX] instanceof FHIRString) { - $this->addPrefix($data[self::FIELD_PREFIX]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PREFIX])) { - $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREFIX]] + $ext)); - } else { - $this->addPrefix(new FHIRString($data[self::FIELD_PREFIX])); } } - if (isset($data[self::FIELD_SUFFIX])) { - $ext = (isset($data[self::FIELD_SUFFIX_EXT]) && is_array($data[self::FIELD_SUFFIX_EXT])) - ? $data[self::FIELD_SUFFIX_EXT] - : null; - if (is_array($data[self::FIELD_SUFFIX])) { - foreach($data[self::FIELD_SUFFIX] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSuffix($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSuffix(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUFFIX]) || isset($data[self::FIELD_SUFFIX_EXT])) { + if (isset($data[self::FIELD_SUFFIX])) { + $value = $data[self::FIELD_SUFFIX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUFFIX_EXT]) && is_array($data[self::FIELD_SUFFIX_EXT])) { + $ext = $data[self::FIELD_SUFFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSuffix($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSuffix($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSuffix(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSuffix(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSuffix(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_SUFFIX] instanceof FHIRString) { - $this->addSuffix($data[self::FIELD_SUFFIX]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUFFIX])) { - $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUFFIX]] + $ext)); - } else { - $this->addSuffix(new FHIRString($data[self::FIELD_SUFFIX])); - } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSuffix(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRNameUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRNameUse([FHIRNameUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRNameUse(array_merge($ext, $data[self::FIELD_USE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIRNameUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNameUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRNameUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRNameUse([FHIRNameUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRNameUse($ext)); } } } @@ -739,8 +789,8 @@ public function setUse(FHIRNameUse $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -886,81 +936,120 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getFamily())) { $a[self::FIELD_FAMILY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FAMILY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FAMILY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FAMILY_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FAMILY_EXT] = $encs; + } } if ([] !== ($vs = $this->getGiven())) { $a[self::FIELD_GIVEN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_GIVEN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_GIVEN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_GIVEN_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_GIVEN_EXT] = $encs; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPrefix())) { $a[self::FIELD_PREFIX] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PREFIX][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PREFIX_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PREFIX_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PREFIX_EXT] = $encs; + } } if ([] !== ($vs = $this->getSuffix())) { $a[self::FIELD_SUFFIX] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUFFIX][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUFFIX_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUFFIX_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUFFIX_EXT] = $encs; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNameUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNameUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRId.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRId.php index fab275e4f0..b28ce0d108 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRId.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,10 +83,9 @@ class FHIRId extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRIdPrimitive @@ -179,8 +178,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -263,6 +262,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifier.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifier.php index 0bf5fa93cc..29e8f5c4fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRIdentifier extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -195,20 +195,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -218,36 +225,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRIdentifierUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRIdentifierUse([FHIRIdentifierUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRIdentifierUse(array_merge($ext, $data[self::FIELD_USE]))); - } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRIdentifierUse($data[self::FIELD_USE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIdentifierUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRIdentifierUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRIdentifierUse([FHIRIdentifierUse::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUse(new FHIRIdentifierUse($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -477,8 +498,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -605,8 +626,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } @@ -615,18 +638,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIdentifierUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIdentifierUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifierUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifierUse.php index a10dcbdd45..f1fd1da676 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifierUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentifierUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRIdentifierUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRIdentifierUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentityAssuranceLevel.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentityAssuranceLevel.php index 99f95fc9e2..234cf624c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentityAssuranceLevel.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIdentityAssuranceLevel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRIdentityAssuranceLevel extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTITY_ASSURANCE_LEVEL; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRIdentityAssuranceLevelList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstanceAvailability.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstanceAvailability.php index 8b4d10d25c..6027ccf2a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstanceAvailability.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstanceAvailability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRInstanceAvailability extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANCE_AVAILABILITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRInstanceAvailabilityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstant.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstant.php index 567c82988b..ffbaf9c226 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstant.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInstant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -82,10 +82,9 @@ class FHIRInstant extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRInstantPrimitive @@ -178,8 +177,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -262,6 +261,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInteger.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInteger.php index 40821a313f..3574855095 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInteger.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRInteger.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRInteger extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INTEGER; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRIntegerPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueSeverity.php index 2653fc2735..a66cc1f2df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRIssueSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRIssueSeverityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueType.php index 365d543ae5..11255d55a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRIssueType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRIssueType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRIssueTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLinkType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLinkType.php index 3a8df494be..d63765f8ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLinkType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLinkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRLinkType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINK_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRLinkTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListMode.php index b807f1ed6c..7f8cfb9be9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRListMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRListModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListStatus.php index 2577a3e382..4e450088ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRListStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRListStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRListStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationMode.php index df1579eeac..6566a57f38 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRLocationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRLocationModeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationStatus.php index bd620f8d80..e4b4d5d73d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRLocationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRLocationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMarkdown.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMarkdown.php index e25670ab03..0c9060c7b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMarkdown.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMarkdown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,10 +86,9 @@ class FHIRMarkdown extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MARKDOWN; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRMarkdownPrimitive @@ -182,8 +181,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -266,6 +265,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeasmnt_Principle.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeasmnt_Principle.php index b3eee91e22..d04ea62591 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeasmnt_Principle.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeasmnt_Principle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMeasmnt_Principle extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASMNT_HYPHEN_PRINCIPLE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRMeasmnt_PrincipleList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationAdministrationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationAdministrationStatus.php index 804a69af47..833d697c5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationAdministrationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationAdministrationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationAdministrationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRMedicationAdministrationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationDispenseStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationDispenseStatus.php index 9db901e988..a286e33643 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationDispenseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationDispenseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationDispenseStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRMedicationDispenseStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationOrderStatus.php index c265c012cc..4b43ba469c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRMedicationOrderStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRMedicationOrderStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationStatementStatus.php index df2304812d..08bf9174c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMedicationStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationStatementStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRMedicationStatementStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMessageSignificanceCategory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMessageSignificanceCategory.php index c9ce1a3534..7e6f644e3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMessageSignificanceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMessageSignificanceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMessageSignificanceCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRMessageSignificanceCategoryList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeta.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeta.php index 4cd7171665..7342831dbd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeta.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRMeta.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRMeta extends FHIRElement const FIELD_VERSION_ID_EXT = '_versionId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An instant in time - known at least to the second @@ -179,49 +179,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LAST_UPDATED])) { - $ext = (isset($data[self::FIELD_LAST_UPDATED_EXT]) && is_array($data[self::FIELD_LAST_UPDATED_EXT])) - ? $data[self::FIELD_LAST_UPDATED_EXT] - : null; - if ($data[self::FIELD_LAST_UPDATED] instanceof FHIRInstant) { - $this->setLastUpdated($data[self::FIELD_LAST_UPDATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_UPDATED])) { - $this->setLastUpdated(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_LAST_UPDATED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_UPDATED])) { - $this->setLastUpdated(new FHIRInstant(array_merge($ext, $data[self::FIELD_LAST_UPDATED]))); - } + if (isset($data[self::FIELD_LAST_UPDATED]) || isset($data[self::FIELD_LAST_UPDATED_EXT])) { + if (isset($data[self::FIELD_LAST_UPDATED])) { + $value = $data[self::FIELD_LAST_UPDATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_UPDATED_EXT]) && is_array($data[self::FIELD_LAST_UPDATED_EXT])) { + $ext = $data[self::FIELD_LAST_UPDATED_EXT]; } else { - $this->setLastUpdated(new FHIRInstant($data[self::FIELD_LAST_UPDATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setLastUpdated($value); + } else if (is_array($value)) { + $this->setLastUpdated(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setLastUpdated(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastUpdated(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_PROFILE])) { - foreach($data[self::FIELD_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProfile(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProfile(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProfile(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addProfile(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProfile(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_PROFILE] instanceof FHIRUri) { - $this->addProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROFILE])) { - $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else { - $this->addProfile(new FHIRUri($data[self::FIELD_PROFILE])); } } if (isset($data[self::FIELD_SECURITY])) { @@ -260,20 +276,27 @@ public function __construct($data = null) $this->addTag(new FHIRCoding($data[self::FIELD_TAG])); } } - if (isset($data[self::FIELD_VERSION_ID])) { - $ext = (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) - ? $data[self::FIELD_VERSION_ID_EXT] - : null; - if ($data[self::FIELD_VERSION_ID] instanceof FHIRId) { - $this->setVersionId($data[self::FIELD_VERSION_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VERSION_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRId(array_merge($ext, $data[self::FIELD_VERSION_ID]))); - } + if (isset($data[self::FIELD_VERSION_ID]) || isset($data[self::FIELD_VERSION_ID_EXT])) { + if (isset($data[self::FIELD_VERSION_ID])) { + $value = $data[self::FIELD_VERSION_ID]; } else { - $this->setVersionId(new FHIRId($data[self::FIELD_VERSION_ID])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) { + $ext = $data[self::FIELD_VERSION_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setVersionId($value); + } else if (is_array($value)) { + $this->setVersionId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setVersionId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersionId(new FHIRId($ext)); } } } @@ -579,8 +602,8 @@ public function setVersionId($versionId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -715,39 +738,66 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLastUpdated())) { $a[self::FIELD_LAST_UPDATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_LAST_UPDATED_EXT] = $enc; } } if ([] !== ($vs = $this->getProfile())) { $a[self::FIELD_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROFILE_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROFILE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSecurity())) { - $a[self::FIELD_SECURITY] = $vs; + $a[self::FIELD_SECURITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY][] = $v; + } } if ([] !== ($vs = $this->getTag())) { - $a[self::FIELD_TAG] = $vs; + $a[self::FIELD_TAG] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TAG][] = $v; + } } if (null !== ($v = $this->getVersionId())) { $a[self::FIELD_VERSION_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VERSION_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNameUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNameUse.php index 3ebd85b1ce..82a75e4e61 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNameUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNameUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNameUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAME_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRNameUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemIdentifierType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemIdentifierType.php index 56613f7899..4a186d3c1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemIdentifierType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemIdentifierType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNamingSystemIdentifierType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_IDENTIFIER_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRNamingSystemIdentifierTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemType.php index 4200a663be..cc2f54329b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNamingSystemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNamingSystemType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRNamingSystemTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrative.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrative.php index eb10525110..40237e7bd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrative.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,12 +80,11 @@ class FHIRNarrative extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE; const FIELD_DIV = 'div'; - const FIELD_DIV_EXT = '_div'; const FIELD_STATUS = 'status'; const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The actual narrative content, a stripped down version of XHTML. @@ -131,20 +130,27 @@ public function __construct($data = null) if (isset($data[self::FIELD_DIV])) { $this->setDiv($data[self::FIELD_DIV]); } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRNarrativeStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNarrativeStatus([FHIRNarrativeStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNarrativeStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRNarrativeStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNarrativeStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRNarrativeStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRNarrativeStatus([FHIRNarrativeStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRNarrativeStatus($ext)); } } } @@ -236,8 +242,8 @@ public function setStatus(FHIRNarrativeStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -328,11 +334,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNarrativeStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNarrativeStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrativeStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrativeStatus.php index 31ff59f29f..8e4b08ebab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrativeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNarrativeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNarrativeStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRNarrativeStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNoteType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNoteType.php index b87b9ff346..6bf6127d6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNoteType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNoteType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRNoteType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NOTE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRNoteTypeList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNutritionOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNutritionOrderStatus.php index 900c902fc0..397191b51f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNutritionOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRNutritionOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRNutritionOrderStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRNutritionOrderStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationRelationshipType.php index 4dfdc357b2..d61935a0ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRObservationRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRObservationRelationshipTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationStatus.php index 440a7cc905..cda0435a8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRObservationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRObservationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRObservationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROid.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROid.php index ed5ce97b1c..d1ac6b076c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROid.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIROid extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIROidPrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationKind.php index fe44ebba0d..a90d46ccd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIROperationKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIROperationKindList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationParameterUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationParameterUse.php index 5b89d62e00..aa1950efd3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationParameterUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROperationParameterUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIROperationParameterUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_PARAMETER_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIROperationParameterUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROrderStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROrderStatus.php index cbfd0e6ba5..85d0ff9aa6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIROrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIROrderStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ORDER_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIROrderStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantRequired.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantRequired.php index d89f47122a..a374f1eb01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantRequired.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantRequired.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRParticipantRequired extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPANT_REQUIRED; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRParticipantRequiredList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantStatus.php index 3253408b00..6052f521cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipantStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRParticipantStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPANT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRParticipantStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipationStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipationStatus.php index 51f9ad9fb0..84e25884f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRParticipationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRParticipationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRParticipationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPeriod.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPeriod.php index b006c4eb25..98297e320e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPeriod extends FHIRElement const FIELD_START_EXT = '_start'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -138,36 +138,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRDateTime) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRDateTime($data[self::FIELD_END])); + $value = null; } - } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRDateTime) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRDateTime(array_merge($ext, $data[self::FIELD_START]))); + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRDateTime($data[self::FIELD_START])); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRDateTime($ext)); } } } @@ -289,8 +303,8 @@ public function setStart($start = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,18 +400,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPositiveInt.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPositiveInt.php index 3439dc2b04..fa16912169 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPositiveInt.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPositiveInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRPositiveInt extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_POSITIVE_INT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRPositiveIntPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestPriority.php index 427ac05e83..b00c419c39 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRProcedureRequestPriority extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST_PRIORITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRProcedureRequestPriorityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestStatus.php index 9b1884408c..979d2e880f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRProcedureRequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRProcedureRequestStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureStatus.php index 64f4e35d98..7d7ac02dd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProcedureStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRProcedureStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROCEDURE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRProcedureStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPropertyRepresentation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPropertyRepresentation.php index f7c9aa5531..62ad226148 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPropertyRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRPropertyRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRPropertyRepresentation extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRPropertyRepresentationList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProvenanceEntityRole.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProvenanceEntityRole.php index 12dbab0155..792fabe613 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProvenanceEntityRole.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRProvenanceEntityRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRProvenanceEntityRole extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRProvenanceEntityRoleList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity.php index 848a6f542d..626baddf86 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuantity extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -175,84 +175,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_COMPARATOR])) { - $ext = (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) - ? $data[self::FIELD_COMPARATOR_EXT] - : null; - if ($data[self::FIELD_COMPARATOR] instanceof FHIRQuantityComparator) { - $this->setComparator($data[self::FIELD_COMPARATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARATOR])) { - $this->setComparator(new FHIRQuantityComparator([FHIRQuantityComparator::FIELD_VALUE => $data[self::FIELD_COMPARATOR]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARATOR])) { - $this->setComparator(new FHIRQuantityComparator(array_merge($ext, $data[self::FIELD_COMPARATOR]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setComparator(new FHIRQuantityComparator($data[self::FIELD_COMPARATOR])); + $ext = []; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_UNIT])) { - $ext = (isset($data[self::FIELD_UNIT_EXT]) && is_array($data[self::FIELD_UNIT_EXT])) - ? $data[self::FIELD_UNIT_EXT] - : null; - if ($data[self::FIELD_UNIT] instanceof FHIRString) { - $this->setUnit($data[self::FIELD_UNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UNIT])) { - $this->setUnit(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_UNIT]] + $ext)); - } else if (is_array($data[self::FIELD_UNIT])) { - $this->setUnit(new FHIRString(array_merge($ext, $data[self::FIELD_UNIT]))); + if (isset($data[self::FIELD_COMPARATOR]) || isset($data[self::FIELD_COMPARATOR_EXT])) { + if (isset($data[self::FIELD_COMPARATOR])) { + $value = $data[self::FIELD_COMPARATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) { + $ext = $data[self::FIELD_COMPARATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuantityComparator) { + $this->setComparator($value); + } else if (is_array($value)) { + $this->setComparator(new FHIRQuantityComparator(array_merge($ext, $value))); + } else { + $this->setComparator(new FHIRQuantityComparator([FHIRQuantityComparator::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComparator(new FHIRQuantityComparator($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setUnit(new FHIRString($data[self::FIELD_UNIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_UNIT]) || isset($data[self::FIELD_UNIT_EXT])) { + if (isset($data[self::FIELD_UNIT])) { + $value = $data[self::FIELD_UNIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UNIT_EXT]) && is_array($data[self::FIELD_UNIT_EXT])) { + $ext = $data[self::FIELD_UNIT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUnit($value); + } else if (is_array($value)) { + $this->setUnit(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUnit(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUnit(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -472,8 +507,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -604,39 +639,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getComparator())) { $a[self::FIELD_COMPARATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuantityComparator::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuantityComparator::FIELD_VALUE]); $a[self::FIELD_COMPARATOR_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_UNIT_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRAge.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRAge.php index d1c6387ba0..f31d5b138d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRAge.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRAge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAge extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Age @@ -127,8 +127,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRCount.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRCount.php index 8950cfc57c..4c2bd5f284 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRCount.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRCount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCount extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COUNT; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Count @@ -127,8 +127,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDistance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDistance.php index 5bdef5a688..b8ff70f49f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDistance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDistance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDistance extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DISTANCE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Distance @@ -127,8 +127,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDuration.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDuration.php index baa3fa7d18..d9a9db0d10 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDuration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRDuration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDuration extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DURATION; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Duration @@ -127,8 +127,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRMoney.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRMoney.php index 4c3466ea05..7fc51cb2f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRMoney.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRMoney.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMoney extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MONEY; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Money @@ -127,8 +127,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRSimpleQuantity.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRSimpleQuantity.php index c438da31e3..b9073746a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRSimpleQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantity/FHIRSimpleQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSimpleQuantity extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SIMPLE_QUANTITY; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SimpleQuantity @@ -127,8 +127,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantityComparator.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantityComparator.php index 2649161052..84556d78ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantityComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuantityComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQuantityComparator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRQuantityComparatorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireResponseStatus.php index 4431bb6e75..0a211a8be2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQuestionnaireResponseStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRQuestionnaireResponseStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireStatus.php index fab30c2c06..8df5ccb1a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRQuestionnaireStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQuestionnaireStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRQuestionnaireStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRange.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRange.php index d7538ff597..b5b80d1b41 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRange.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRRange extends FHIRElement const FIELD_LOW = 'low'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The high limit. The boundary is inclusive. @@ -206,8 +206,8 @@ public function setLow(FHIRSimpleQuantity $low = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -291,6 +291,9 @@ public function jsonSerialize() if (null !== ($v = $this->getLow())) { $a[self::FIELD_LOW] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRatio.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRatio.php index 3dfdcdc65c..641ebcabbe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRatio.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRatio.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRRatio extends FHIRElement const FIELD_NUMERATOR = 'numerator'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -242,8 +242,8 @@ public function setNumerator(FHIRQuantity $numerator = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -327,6 +327,9 @@ public function jsonSerialize() if (null !== ($v = $this->getNumerator())) { $a[self::FIELD_NUMERATOR] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReference.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReference.php index 649025ac45..667df765e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReference.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRReference extends FHIRElement const FIELD_REFERENCE_EXT = '_reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -136,36 +136,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRString) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE]))); + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRString($data[self::FIELD_REFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRString($ext)); } } } @@ -283,8 +297,8 @@ public function setReference($reference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -380,18 +394,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReferralStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReferralStatus.php index cd51b755b0..6c8cc12b6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReferralStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRReferralStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRReferralStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERRAL_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRReferralStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRemittanceOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRemittanceOutcome.php index 922d6b2463..e484427eee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRemittanceOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRemittanceOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRRemittanceOutcome extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REMITTANCE_OUTCOME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRRemittanceOutcomeList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResourceVersionPolicy.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResourceVersionPolicy.php index 6afd8e3749..909a557e82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResourceVersionPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResourceVersionPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResourceVersionPolicy extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_VERSION_POLICY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRResourceVersionPolicyList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResponseType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResponseType.php index 87df199e06..0424e18f59 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResponseType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRResponseType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResponseType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRResponseTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRestfulConformanceMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRestfulConformanceMode.php index 56623f01e5..818fb7c62d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRestfulConformanceMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRRestfulConformanceMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRestfulConformanceMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_CONFORMANCE_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRRestfulConformanceModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledData.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledData.php index 65eb4d1325..84ca25aa6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledData.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRSampledData extends FHIRElement const FIELD_UPPER_LIMIT_EXT = '_upperLimit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A series of data points which are decimal values separated by a single space @@ -200,68 +200,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRSampledDataDataType) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRSampledDataDataType([FHIRSampledDataDataType::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRSampledDataDataType(array_merge($ext, $data[self::FIELD_DATA]))); - } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; } else { - $this->setData(new FHIRSampledDataDataType($data[self::FIELD_DATA])); - } - } - if (isset($data[self::FIELD_DIMENSIONS])) { - $ext = (isset($data[self::FIELD_DIMENSIONS_EXT]) && is_array($data[self::FIELD_DIMENSIONS_EXT])) - ? $data[self::FIELD_DIMENSIONS_EXT] - : null; - if ($data[self::FIELD_DIMENSIONS] instanceof FHIRPositiveInt) { - $this->setDimensions($data[self::FIELD_DIMENSIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIMENSIONS])) { - $this->setDimensions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DIMENSIONS]] + $ext)); - } else if (is_array($data[self::FIELD_DIMENSIONS])) { - $this->setDimensions(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DIMENSIONS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSampledDataDataType) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRSampledDataDataType(array_merge($ext, $value))); + } else { + $this->setData(new FHIRSampledDataDataType([FHIRSampledDataDataType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setData(new FHIRSampledDataDataType($ext)); + } + } + if (isset($data[self::FIELD_DIMENSIONS]) || isset($data[self::FIELD_DIMENSIONS_EXT])) { + if (isset($data[self::FIELD_DIMENSIONS])) { + $value = $data[self::FIELD_DIMENSIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIMENSIONS_EXT]) && is_array($data[self::FIELD_DIMENSIONS_EXT])) { + $ext = $data[self::FIELD_DIMENSIONS_EXT]; } else { - $this->setDimensions(new FHIRPositiveInt($data[self::FIELD_DIMENSIONS])); - } - } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDimensions($value); + } else if (is_array($value)) { + $this->setDimensions(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDimensions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDimensions(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); - } - } - if (isset($data[self::FIELD_LOWER_LIMIT])) { - $ext = (isset($data[self::FIELD_LOWER_LIMIT_EXT]) && is_array($data[self::FIELD_LOWER_LIMIT_EXT])) - ? $data[self::FIELD_LOWER_LIMIT_EXT] - : null; - if ($data[self::FIELD_LOWER_LIMIT] instanceof FHIRDecimal) { - $this->setLowerLimit($data[self::FIELD_LOWER_LIMIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOWER_LIMIT])) { - $this->setLowerLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LOWER_LIMIT]] + $ext)); - } else if (is_array($data[self::FIELD_LOWER_LIMIT])) { - $this->setLowerLimit(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LOWER_LIMIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_LOWER_LIMIT]) || isset($data[self::FIELD_LOWER_LIMIT_EXT])) { + if (isset($data[self::FIELD_LOWER_LIMIT])) { + $value = $data[self::FIELD_LOWER_LIMIT]; } else { - $this->setLowerLimit(new FHIRDecimal($data[self::FIELD_LOWER_LIMIT])); + $value = null; + } + if (isset($data[self::FIELD_LOWER_LIMIT_EXT]) && is_array($data[self::FIELD_LOWER_LIMIT_EXT])) { + $ext = $data[self::FIELD_LOWER_LIMIT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLowerLimit($value); + } else if (is_array($value)) { + $this->setLowerLimit(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLowerLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLowerLimit(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_ORIGIN])) { @@ -271,36 +299,50 @@ public function __construct($data = null) $this->setOrigin(new FHIRSimpleQuantity($data[self::FIELD_ORIGIN])); } } - if (isset($data[self::FIELD_PERIOD])) { - $ext = (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) - ? $data[self::FIELD_PERIOD_EXT] - : null; - if ($data[self::FIELD_PERIOD] instanceof FHIRDecimal) { - $this->setPeriod($data[self::FIELD_PERIOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD]))); - } + if (isset($data[self::FIELD_PERIOD]) || isset($data[self::FIELD_PERIOD_EXT])) { + if (isset($data[self::FIELD_PERIOD])) { + $value = $data[self::FIELD_PERIOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) { + $ext = $data[self::FIELD_PERIOD_EXT]; } else { - $this->setPeriod(new FHIRDecimal($data[self::FIELD_PERIOD])); - } - } - if (isset($data[self::FIELD_UPPER_LIMIT])) { - $ext = (isset($data[self::FIELD_UPPER_LIMIT_EXT]) && is_array($data[self::FIELD_UPPER_LIMIT_EXT])) - ? $data[self::FIELD_UPPER_LIMIT_EXT] - : null; - if ($data[self::FIELD_UPPER_LIMIT] instanceof FHIRDecimal) { - $this->setUpperLimit($data[self::FIELD_UPPER_LIMIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UPPER_LIMIT])) { - $this->setUpperLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_UPPER_LIMIT]] + $ext)); - } else if (is_array($data[self::FIELD_UPPER_LIMIT])) { - $this->setUpperLimit(new FHIRDecimal(array_merge($ext, $data[self::FIELD_UPPER_LIMIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriod($value); + } else if (is_array($value)) { + $this->setPeriod(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriod(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_UPPER_LIMIT]) || isset($data[self::FIELD_UPPER_LIMIT_EXT])) { + if (isset($data[self::FIELD_UPPER_LIMIT])) { + $value = $data[self::FIELD_UPPER_LIMIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UPPER_LIMIT_EXT]) && is_array($data[self::FIELD_UPPER_LIMIT_EXT])) { + $ext = $data[self::FIELD_UPPER_LIMIT_EXT]; } else { - $this->setUpperLimit(new FHIRDecimal($data[self::FIELD_UPPER_LIMIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setUpperLimit($value); + } else if (is_array($value)) { + $this->setUpperLimit(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setUpperLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUpperLimit(new FHIRDecimal($ext)); } } } @@ -596,8 +638,8 @@ public function setUpperLimit($upperLimit = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -755,29 +797,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSampledDataDataType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSampledDataDataType::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } if (null !== ($v = $this->getDimensions())) { $a[self::FIELD_DIMENSIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DIMENSIONS_EXT] = $enc; } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if (null !== ($v = $this->getLowerLimit())) { $a[self::FIELD_LOWER_LIMIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LOWER_LIMIT_EXT] = $enc; } } @@ -786,18 +836,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_EXT] = $enc; } } if (null !== ($v = $this->getUpperLimit())) { $a[self::FIELD_UPPER_LIMIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_UPPER_LIMIT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledDataDataType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledDataDataType.php index 527fffe609..7299fa3ef0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledDataDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSampledDataDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,10 +76,9 @@ class FHIRSampledDataDataType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRSampledDataDataTypePrimitive @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchEntryMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchEntryMode.php index 65679aa939..fb7aae9770 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchEntryMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchEntryMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRSearchEntryMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_ENTRY_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSearchEntryModeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchModifierCode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchModifierCode.php index 60f1fcb550..6cc92de2cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchModifierCode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchModifierCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSearchModifierCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_MODIFIER_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSearchModifierCodeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchParamType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchParamType.php index 275e66412f..50369f1dc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchParamType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSearchParamType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRSearchParamType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSearchParamTypeList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSignature.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSignature.php index f4a1b86c24..d8b7352ccd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSignature.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSignature.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSignature extends FHIRElement const FIELD_WHO_URI_EXT = '_whoUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -196,36 +196,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BLOB])) { - $ext = (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) - ? $data[self::FIELD_BLOB_EXT] - : null; - if ($data[self::FIELD_BLOB] instanceof FHIRBase64Binary) { - $this->setBlob($data[self::FIELD_BLOB]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_BLOB]] + $ext)); - } else if (is_array($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_BLOB]))); - } + if (isset($data[self::FIELD_BLOB]) || isset($data[self::FIELD_BLOB_EXT])) { + if (isset($data[self::FIELD_BLOB])) { + $value = $data[self::FIELD_BLOB]; } else { - $this->setBlob(new FHIRBase64Binary($data[self::FIELD_BLOB])); + $value = null; } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + if (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) { + $ext = $data[self::FIELD_BLOB_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setBlob($value); + } else if (is_array($value)) { + $this->setBlob(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBlob(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -246,20 +260,27 @@ public function __construct($data = null) $this->addType(new FHIRCoding($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_WHEN])) { - $ext = (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) - ? $data[self::FIELD_WHEN_EXT] - : null; - if ($data[self::FIELD_WHEN] instanceof FHIRInstant) { - $this->setWhen($data[self::FIELD_WHEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_WHEN]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIRInstant(array_merge($ext, $data[self::FIELD_WHEN]))); - } + if (isset($data[self::FIELD_WHEN]) || isset($data[self::FIELD_WHEN_EXT])) { + if (isset($data[self::FIELD_WHEN])) { + $value = $data[self::FIELD_WHEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) { + $ext = $data[self::FIELD_WHEN_EXT]; } else { - $this->setWhen(new FHIRInstant($data[self::FIELD_WHEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setWhen($value); + } else if (is_array($value)) { + $this->setWhen(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setWhen(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhen(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_WHO_REFERENCE])) { @@ -269,20 +290,27 @@ public function __construct($data = null) $this->setWhoReference(new FHIRReference($data[self::FIELD_WHO_REFERENCE])); } } - if (isset($data[self::FIELD_WHO_URI])) { - $ext = (isset($data[self::FIELD_WHO_URI_EXT]) && is_array($data[self::FIELD_WHO_URI_EXT])) - ? $data[self::FIELD_WHO_URI_EXT] - : null; - if ($data[self::FIELD_WHO_URI] instanceof FHIRUri) { - $this->setWhoUri($data[self::FIELD_WHO_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHO_URI])) { - $this->setWhoUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_WHO_URI]] + $ext)); - } else if (is_array($data[self::FIELD_WHO_URI])) { - $this->setWhoUri(new FHIRUri(array_merge($ext, $data[self::FIELD_WHO_URI]))); - } + if (isset($data[self::FIELD_WHO_URI]) || isset($data[self::FIELD_WHO_URI_EXT])) { + if (isset($data[self::FIELD_WHO_URI])) { + $value = $data[self::FIELD_WHO_URI]; } else { - $this->setWhoUri(new FHIRUri($data[self::FIELD_WHO_URI])); + $value = null; + } + if (isset($data[self::FIELD_WHO_URI_EXT]) && is_array($data[self::FIELD_WHO_URI_EXT])) { + $ext = $data[self::FIELD_WHO_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setWhoUri($value); + } else if (is_array($value)) { + $this->setWhoUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setWhoUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhoUri(new FHIRUri($ext)); } } } @@ -570,8 +598,8 @@ public function setWhoUri($whoUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -714,25 +742,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBlob())) { $a[self::FIELD_BLOB] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_BLOB_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if (null !== ($v = $this->getWhen())) { $a[self::FIELD_WHEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_WHEN_EXT] = $enc; } } @@ -741,11 +781,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getWhoUri())) { $a[self::FIELD_WHO_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_WHO_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlicingRules.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlicingRules.php index 3153291094..73c8568dfd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlicingRules.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlicingRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSlicingRules extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLICING_RULES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSlicingRulesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlotStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlotStatus.php index 39f6ea2238..626f98db5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlotStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSlotStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSlotStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLOT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSlotStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSpecimenStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSpecimenStatus.php index b3cc4aac90..44ff5f1868 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSpecimenStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSpecimenStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSpecimenStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPECIMEN_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSpecimenStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRString.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRString.php index bd939b0aa7..66576a2722 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRString.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRString.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRString extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRStructureDefinitionKind.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRStructureDefinitionKind.php index d6bbedaa2b..73bd6a0635 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRStructureDefinitionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRStructureDefinitionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureDefinitionKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRStructureDefinitionKindList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionChannelType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionChannelType.php index 7a65adde05..ba7060f8cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionChannelType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionChannelType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSubscriptionChannelType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_CHANNEL_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSubscriptionChannelTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionStatus.php index d4edc4f9d4..f8a89d7c97 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSubscriptionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSubscriptionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSubscriptionStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyDeliveryStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyDeliveryStatus.php index b4ea18eb50..8722cecfcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyDeliveryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyDeliveryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSupplyDeliveryStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSupplyDeliveryStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyRequestStatus.php index 05352d5964..c6c16abdfa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSupplyRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSupplyRequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSupplyRequestStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSystemRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSystemRestfulInteraction.php index 9bb33c994a..bdb653df95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSystemRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRSystemRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSystemRestfulInteraction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SYSTEM_RESTFUL_INTERACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRSystemRestfulInteractionList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTime.php index 849084ad98..92fd978b23 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRTimePrimitive @@ -175,8 +174,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -259,6 +258,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming.php index 0c5a2222a1..a98a5b0d21 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRTiming extends FHIRElement const FIELD_REPEAT = 'repeat'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -160,33 +160,42 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_EVENT])) { - $ext = (isset($data[self::FIELD_EVENT_EXT]) && is_array($data[self::FIELD_EVENT_EXT])) - ? $data[self::FIELD_EVENT_EXT] - : null; - if (is_array($data[self::FIELD_EVENT])) { - foreach($data[self::FIELD_EVENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDateTime) { - $this->addEvent($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addEvent(new FHIRDateTime(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_EVENT]) || isset($data[self::FIELD_EVENT_EXT])) { + if (isset($data[self::FIELD_EVENT])) { + $value = $data[self::FIELD_EVENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EVENT_EXT]) && is_array($data[self::FIELD_EVENT_EXT])) { + $ext = $data[self::FIELD_EVENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->addEvent($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDateTime) { + $this->addEvent($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addEvent(new FHIRDateTime(array_merge($v, $iext))); + } else { + $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addEvent(new FHIRDateTime($v)); } + } elseif (is_array($value)) { + $this->addEvent(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addEvent(new FHIRDateTime($iext)); } - } elseif ($data[self::FIELD_EVENT] instanceof FHIRDateTime) { - $this->addEvent($data[self::FIELD_EVENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_EVENT])) { - $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EVENT]] + $ext)); - } else { - $this->addEvent(new FHIRDateTime($data[self::FIELD_EVENT])); } } if (isset($data[self::FIELD_REPEAT])) { @@ -366,8 +375,8 @@ public function setRepeat(FHIRTimingRepeat $repeat = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -463,22 +472,33 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getEvent())) { $a[self::FIELD_EVENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_EVENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_EVENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDateTime::FIELD_VALUE]) || array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_EVENT_EXT][] = null; + unset($enc[FHIRDateTime::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_EVENT_EXT] = $encs; + } } if (null !== ($v = $this->getRepeat())) { $a[self::FIELD_REPEAT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming/FHIRTimingRepeat.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming/FHIRTimingRepeat.php index baf16f3474..94bceeb065 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming/FHIRTimingRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTiming/FHIRTimingRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRTimingRepeat extends FHIRElement const FIELD_WHEN_EXT = '_when'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -306,164 +306,234 @@ public function __construct($data = null) $this->setBoundsRange(new FHIRRange($data[self::FIELD_BOUNDS_RANGE])); } } - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRInteger) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; } else { - $this->setCount(new FHIRInteger($data[self::FIELD_COUNT])); + $value = null; } - } - if (isset($data[self::FIELD_DURATION])) { - $ext = (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) - ? $data[self::FIELD_DURATION_EXT] - : null; - if ($data[self::FIELD_DURATION] instanceof FHIRDecimal) { - $this->setDuration($data[self::FIELD_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DURATION]))); - } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; } else { - $this->setDuration(new FHIRDecimal($data[self::FIELD_DURATION])); + $ext = []; } - } - if (isset($data[self::FIELD_DURATION_MAX])) { - $ext = (isset($data[self::FIELD_DURATION_MAX_EXT]) && is_array($data[self::FIELD_DURATION_MAX_EXT])) - ? $data[self::FIELD_DURATION_MAX_EXT] - : null; - if ($data[self::FIELD_DURATION_MAX] instanceof FHIRDecimal) { - $this->setDurationMax($data[self::FIELD_DURATION_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION_MAX])) { - $this->setDurationMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DURATION_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION_MAX])) { - $this->setDurationMax(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DURATION_MAX]))); + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setDurationMax(new FHIRDecimal($data[self::FIELD_DURATION_MAX])); + } else if ([] !== $ext) { + $this->setCount(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_DURATION_UNITS])) { - $ext = (isset($data[self::FIELD_DURATION_UNITS_EXT]) && is_array($data[self::FIELD_DURATION_UNITS_EXT])) - ? $data[self::FIELD_DURATION_UNITS_EXT] - : null; - if ($data[self::FIELD_DURATION_UNITS] instanceof FHIRUnitsOfTime) { - $this->setDurationUnits($data[self::FIELD_DURATION_UNITS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION_UNITS])) { - $this->setDurationUnits(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $data[self::FIELD_DURATION_UNITS]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION_UNITS])) { - $this->setDurationUnits(new FHIRUnitsOfTime(array_merge($ext, $data[self::FIELD_DURATION_UNITS]))); - } + if (isset($data[self::FIELD_DURATION]) || isset($data[self::FIELD_DURATION_EXT])) { + if (isset($data[self::FIELD_DURATION])) { + $value = $data[self::FIELD_DURATION]; } else { - $this->setDurationUnits(new FHIRUnitsOfTime($data[self::FIELD_DURATION_UNITS])); + $value = null; } - } - if (isset($data[self::FIELD_FREQUENCY])) { - $ext = (isset($data[self::FIELD_FREQUENCY_EXT]) && is_array($data[self::FIELD_FREQUENCY_EXT])) - ? $data[self::FIELD_FREQUENCY_EXT] - : null; - if ($data[self::FIELD_FREQUENCY] instanceof FHIRInteger) { - $this->setFrequency($data[self::FIELD_FREQUENCY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FREQUENCY])) { - $this->setFrequency(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_FREQUENCY]] + $ext)); - } else if (is_array($data[self::FIELD_FREQUENCY])) { - $this->setFrequency(new FHIRInteger(array_merge($ext, $data[self::FIELD_FREQUENCY]))); - } + if (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) { + $ext = $data[self::FIELD_DURATION_EXT]; } else { - $this->setFrequency(new FHIRInteger($data[self::FIELD_FREQUENCY])); + $ext = []; } - } - if (isset($data[self::FIELD_FREQUENCY_MAX])) { - $ext = (isset($data[self::FIELD_FREQUENCY_MAX_EXT]) && is_array($data[self::FIELD_FREQUENCY_MAX_EXT])) - ? $data[self::FIELD_FREQUENCY_MAX_EXT] - : null; - if ($data[self::FIELD_FREQUENCY_MAX] instanceof FHIRInteger) { - $this->setFrequencyMax($data[self::FIELD_FREQUENCY_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FREQUENCY_MAX])) { - $this->setFrequencyMax(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_FREQUENCY_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_FREQUENCY_MAX])) { - $this->setFrequencyMax(new FHIRInteger(array_merge($ext, $data[self::FIELD_FREQUENCY_MAX]))); + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDuration($value); + } else if (is_array($value)) { + $this->setDuration(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setFrequencyMax(new FHIRInteger($data[self::FIELD_FREQUENCY_MAX])); + } else if ([] !== $ext) { + $this->setDuration(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_PERIOD])) { - $ext = (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) - ? $data[self::FIELD_PERIOD_EXT] - : null; - if ($data[self::FIELD_PERIOD] instanceof FHIRDecimal) { - $this->setPeriod($data[self::FIELD_PERIOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD]))); + if (isset($data[self::FIELD_DURATION_MAX]) || isset($data[self::FIELD_DURATION_MAX_EXT])) { + if (isset($data[self::FIELD_DURATION_MAX])) { + $value = $data[self::FIELD_DURATION_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DURATION_MAX_EXT]) && is_array($data[self::FIELD_DURATION_MAX_EXT])) { + $ext = $data[self::FIELD_DURATION_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDurationMax($value); + } else if (is_array($value)) { + $this->setDurationMax(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDurationMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDurationMax(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_DURATION_UNITS]) || isset($data[self::FIELD_DURATION_UNITS_EXT])) { + if (isset($data[self::FIELD_DURATION_UNITS])) { + $value = $data[self::FIELD_DURATION_UNITS]; } else { - $this->setPeriod(new FHIRDecimal($data[self::FIELD_PERIOD])); + $value = null; + } + if (isset($data[self::FIELD_DURATION_UNITS_EXT]) && is_array($data[self::FIELD_DURATION_UNITS_EXT])) { + $ext = $data[self::FIELD_DURATION_UNITS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnitsOfTime) { + $this->setDurationUnits($value); + } else if (is_array($value)) { + $this->setDurationUnits(new FHIRUnitsOfTime(array_merge($ext, $value))); + } else { + $this->setDurationUnits(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDurationUnits(new FHIRUnitsOfTime($ext)); } } - if (isset($data[self::FIELD_PERIOD_MAX])) { - $ext = (isset($data[self::FIELD_PERIOD_MAX_EXT]) && is_array($data[self::FIELD_PERIOD_MAX_EXT])) - ? $data[self::FIELD_PERIOD_MAX_EXT] - : null; - if ($data[self::FIELD_PERIOD_MAX] instanceof FHIRDecimal) { - $this->setPeriodMax($data[self::FIELD_PERIOD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD_MAX])) { - $this->setPeriodMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD_MAX])) { - $this->setPeriodMax(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD_MAX]))); + if (isset($data[self::FIELD_FREQUENCY]) || isset($data[self::FIELD_FREQUENCY_EXT])) { + if (isset($data[self::FIELD_FREQUENCY])) { + $value = $data[self::FIELD_FREQUENCY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FREQUENCY_EXT]) && is_array($data[self::FIELD_FREQUENCY_EXT])) { + $ext = $data[self::FIELD_FREQUENCY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setFrequency($value); + } else if (is_array($value)) { + $this->setFrequency(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setFrequency(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFrequency(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_FREQUENCY_MAX]) || isset($data[self::FIELD_FREQUENCY_MAX_EXT])) { + if (isset($data[self::FIELD_FREQUENCY_MAX])) { + $value = $data[self::FIELD_FREQUENCY_MAX]; } else { - $this->setPeriodMax(new FHIRDecimal($data[self::FIELD_PERIOD_MAX])); + $value = null; + } + if (isset($data[self::FIELD_FREQUENCY_MAX_EXT]) && is_array($data[self::FIELD_FREQUENCY_MAX_EXT])) { + $ext = $data[self::FIELD_FREQUENCY_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setFrequencyMax($value); + } else if (is_array($value)) { + $this->setFrequencyMax(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setFrequencyMax(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFrequencyMax(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_PERIOD_UNITS])) { - $ext = (isset($data[self::FIELD_PERIOD_UNITS_EXT]) && is_array($data[self::FIELD_PERIOD_UNITS_EXT])) - ? $data[self::FIELD_PERIOD_UNITS_EXT] - : null; - if ($data[self::FIELD_PERIOD_UNITS] instanceof FHIRUnitsOfTime) { - $this->setPeriodUnits($data[self::FIELD_PERIOD_UNITS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD_UNITS])) { - $this->setPeriodUnits(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $data[self::FIELD_PERIOD_UNITS]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD_UNITS])) { - $this->setPeriodUnits(new FHIRUnitsOfTime(array_merge($ext, $data[self::FIELD_PERIOD_UNITS]))); + if (isset($data[self::FIELD_PERIOD]) || isset($data[self::FIELD_PERIOD_EXT])) { + if (isset($data[self::FIELD_PERIOD])) { + $value = $data[self::FIELD_PERIOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) { + $ext = $data[self::FIELD_PERIOD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriod($value); + } else if (is_array($value)) { + $this->setPeriod(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriod(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_PERIOD_MAX]) || isset($data[self::FIELD_PERIOD_MAX_EXT])) { + if (isset($data[self::FIELD_PERIOD_MAX])) { + $value = $data[self::FIELD_PERIOD_MAX]; } else { - $this->setPeriodUnits(new FHIRUnitsOfTime($data[self::FIELD_PERIOD_UNITS])); + $value = null; + } + if (isset($data[self::FIELD_PERIOD_MAX_EXT]) && is_array($data[self::FIELD_PERIOD_MAX_EXT])) { + $ext = $data[self::FIELD_PERIOD_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriodMax($value); + } else if (is_array($value)) { + $this->setPeriodMax(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriodMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPeriodMax(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_WHEN])) { - $ext = (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) - ? $data[self::FIELD_WHEN_EXT] - : null; - if ($data[self::FIELD_WHEN] instanceof FHIREventTiming) { - $this->setWhen($data[self::FIELD_WHEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $data[self::FIELD_WHEN]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIREventTiming(array_merge($ext, $data[self::FIELD_WHEN]))); + if (isset($data[self::FIELD_PERIOD_UNITS]) || isset($data[self::FIELD_PERIOD_UNITS_EXT])) { + if (isset($data[self::FIELD_PERIOD_UNITS])) { + $value = $data[self::FIELD_PERIOD_UNITS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_UNITS_EXT]) && is_array($data[self::FIELD_PERIOD_UNITS_EXT])) { + $ext = $data[self::FIELD_PERIOD_UNITS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnitsOfTime) { + $this->setPeriodUnits($value); + } else if (is_array($value)) { + $this->setPeriodUnits(new FHIRUnitsOfTime(array_merge($ext, $value))); + } else { + $this->setPeriodUnits(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriodUnits(new FHIRUnitsOfTime($ext)); + } + } + if (isset($data[self::FIELD_WHEN]) || isset($data[self::FIELD_WHEN_EXT])) { + if (isset($data[self::FIELD_WHEN])) { + $value = $data[self::FIELD_WHEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) { + $ext = $data[self::FIELD_WHEN_EXT]; } else { - $this->setWhen(new FHIREventTiming($data[self::FIELD_WHEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventTiming) { + $this->setWhen($value); + } else if (is_array($value)) { + $this->setWhen(new FHIREventTiming(array_merge($ext, $value))); + } else { + $this->setWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhen(new FHIREventTiming($ext)); } } } @@ -949,8 +1019,8 @@ public function setWhen(FHIREventTiming $when = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1161,74 +1231,97 @@ public function jsonSerialize() } if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } if (null !== ($v = $this->getDuration())) { $a[self::FIELD_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DURATION_EXT] = $enc; } } if (null !== ($v = $this->getDurationMax())) { $a[self::FIELD_DURATION_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DURATION_MAX_EXT] = $enc; } } if (null !== ($v = $this->getDurationUnits())) { $a[self::FIELD_DURATION_UNITS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnitsOfTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnitsOfTime::FIELD_VALUE]); $a[self::FIELD_DURATION_UNITS_EXT] = $enc; } } if (null !== ($v = $this->getFrequency())) { $a[self::FIELD_FREQUENCY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_FREQUENCY_EXT] = $enc; } } if (null !== ($v = $this->getFrequencyMax())) { $a[self::FIELD_FREQUENCY_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_FREQUENCY_MAX_EXT] = $enc; } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_EXT] = $enc; } } if (null !== ($v = $this->getPeriodMax())) { $a[self::FIELD_PERIOD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getPeriodUnits())) { $a[self::FIELD_PERIOD_UNITS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnitsOfTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnitsOfTime::FIELD_VALUE]); $a[self::FIELD_PERIOD_UNITS_EXT] = $enc; } } if (null !== ($v = $this->getWhen())) { $a[self::FIELD_WHEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventTiming::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventTiming::FIELD_VALUE]); $a[self::FIELD_WHEN_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTransactionMode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTransactionMode.php index bd16ba2742..defb06871b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTransactionMode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTransactionMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTransactionMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TRANSACTION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRTransactionModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTypeRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTypeRestfulInteraction.php index c5ea01f2e6..4f94364be1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTypeRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRTypeRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTypeRestfulInteraction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_RESTFUL_INTERACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRTypeRestfulInteractionList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnitsOfTime.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnitsOfTime.php index d81a2a20d5..88fa9d711c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnitsOfTime.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnitsOfTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRUnitsOfTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRUnitsOfTimeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnknownContentCode.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnknownContentCode.php index cf76d48105..5ebacee3e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnknownContentCode.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnknownContentCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRUnknownContentCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNKNOWN_CONTENT_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRUnknownContentCodeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnsignedInt.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnsignedInt.php index 8e3620354f..f2a8c575eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnsignedInt.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUnsignedInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRUnsignedInt extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRUnsignedIntPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUri.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUri.php index f61a557587..3eb7f1496e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUri.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUri.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRUri extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URI; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRUriPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUse.php index 9e5243c447..59e3addec2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUuid.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUuid.php index 6eb2bd5429..5410c8d501 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUuid.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRUuid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRUuid extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UUID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRUuidPrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionBase.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionBase.php index edb23131f8..af73ddcac5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRVisionBase extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_BASE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRVisionBaseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionEyes.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionEyes.php index 3db16231f6..7d4169500f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionEyes.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRVisionEyes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRVisionEyes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_EYES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRVisionEyesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRXPathUsageType.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRXPathUsageType.php index 35c15d7885..ef71dca0d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRXPathUsageType.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRElement/FHIRXPathUsageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRXPathUsageType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_XPATH_USAGE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\DSTU2\FHIRStringPrimitive\FHIRXPathUsageTypeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIdPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIdPrimitive.php index 9b10db9600..aa21e619b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIdPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIdPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRIdPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -173,8 +173,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRInstantPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRInstantPrimitive.php index ed95aefed1..afa11d9ce8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRInstantPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRInstantPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRInstantPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -188,8 +188,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIntegerPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIntegerPrimitive.php index b3ad0c388a..07272a1b62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIntegerPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRIntegerPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|integer @@ -185,8 +185,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRMarkdownPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRMarkdownPrimitive.php index 68028ebc25..fcaf82147d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRMarkdownPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRMarkdownPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRMarkdownPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -172,8 +172,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIROidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIROidPrimitive.php index 8791aaa4b8..f8b9dc53d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIROidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIROidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIROidPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -173,8 +173,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRPositiveIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRPositiveIntPrimitive.php index a342f12793..a9a3ad5ae1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRPositiveIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRPositiveIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRPositiveIntPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|integer @@ -185,8 +185,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource.php index 75c39d975d..d2959b7736 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRResource implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInter const FIELD_META = 'meta'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -173,52 +173,73 @@ public function __construct($data = null) $this->_addFHIRComment($data[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS]); } } - if (isset($data[self::FIELD_ID])) { - $ext = (isset($data[self::FIELD_ID_EXT]) && is_array($data[self::FIELD_ID_EXT])) - ? $data[self::FIELD_ID_EXT] - : null; - if ($data[self::FIELD_ID] instanceof FHIRId) { - $this->setId($data[self::FIELD_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ID])) { - $this->setId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ID])) { - $this->setId(new FHIRId(array_merge($ext, $data[self::FIELD_ID]))); - } + if (isset($data[self::FIELD_ID]) || isset($data[self::FIELD_ID_EXT])) { + if (isset($data[self::FIELD_ID])) { + $value = $data[self::FIELD_ID]; } else { - $this->setId(new FHIRId($data[self::FIELD_ID])); + $value = null; } - } - if (isset($data[self::FIELD_IMPLICIT_RULES])) { - $ext = (isset($data[self::FIELD_IMPLICIT_RULES_EXT]) && is_array($data[self::FIELD_IMPLICIT_RULES_EXT])) - ? $data[self::FIELD_IMPLICIT_RULES_EXT] - : null; - if ($data[self::FIELD_IMPLICIT_RULES] instanceof FHIRUri) { - $this->setImplicitRules($data[self::FIELD_IMPLICIT_RULES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IMPLICIT_RULES])) { - $this->setImplicitRules(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IMPLICIT_RULES]] + $ext)); - } else if (is_array($data[self::FIELD_IMPLICIT_RULES])) { - $this->setImplicitRules(new FHIRUri(array_merge($ext, $data[self::FIELD_IMPLICIT_RULES]))); - } + if (isset($data[self::FIELD_ID_EXT]) && is_array($data[self::FIELD_ID_EXT])) { + $ext = $data[self::FIELD_ID_EXT]; } else { - $this->setImplicitRules(new FHIRUri($data[self::FIELD_IMPLICIT_RULES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setId($value); + } else if (is_array($value)) { + $this->setId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setId(new FHIRId($ext)); } } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (isset($data[self::FIELD_IMPLICIT_RULES]) || isset($data[self::FIELD_IMPLICIT_RULES_EXT])) { + if (isset($data[self::FIELD_IMPLICIT_RULES])) { + $value = $data[self::FIELD_IMPLICIT_RULES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPLICIT_RULES_EXT]) && is_array($data[self::FIELD_IMPLICIT_RULES_EXT])) { + $ext = $data[self::FIELD_IMPLICIT_RULES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setImplicitRules($value); + } else if (is_array($value)) { + $this->setImplicitRules(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setImplicitRules(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setImplicitRules(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_META])) { @@ -443,8 +464,8 @@ public function setMeta(FHIRMeta $meta = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** @@ -561,28 +582,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getId())) { $a[self::FIELD_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_ID_EXT] = $enc; } } if (null !== ($v = $this->getImplicitRules())) { $a[self::FIELD_IMPLICIT_RULES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_IMPLICIT_RULES_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getMeta())) { $a[self::FIELD_META] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBinary.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBinary.php index 54b8be7311..bfbe060e8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRBinary extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_CONTENT_TYPE_EXT = '_contentType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONTENT])) { - $ext = (isset($data[self::FIELD_CONTENT_EXT]) && is_array($data[self::FIELD_CONTENT_EXT])) - ? $data[self::FIELD_CONTENT_EXT] - : null; - if ($data[self::FIELD_CONTENT] instanceof FHIRBase64Binary) { - $this->setContent($data[self::FIELD_CONTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT])) { - $this->setContent(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_CONTENT]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT])) { - $this->setContent(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_CONTENT]))); - } + if (isset($data[self::FIELD_CONTENT]) || isset($data[self::FIELD_CONTENT_EXT])) { + if (isset($data[self::FIELD_CONTENT])) { + $value = $data[self::FIELD_CONTENT]; } else { - $this->setContent(new FHIRBase64Binary($data[self::FIELD_CONTENT])); + $value = null; } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + if (isset($data[self::FIELD_CONTENT_EXT]) && is_array($data[self::FIELD_CONTENT_EXT])) { + $ext = $data[self::FIELD_CONTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setContent($value); + } else if (is_array($value)) { + $this->setContent(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setContent(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContent(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); } } } @@ -279,8 +293,8 @@ public function setContentType($contentType = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -376,18 +390,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getContent())) { $a[self::FIELD_CONTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_CONTENT_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBundle.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBundle.php index 36c6f491b4..fdf248ecb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBundle.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRBundle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBundle extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A container for a collection of resources. @@ -214,36 +214,50 @@ public function __construct($data = null) $this->setSignature(new FHIRSignature($data[self::FIELD_SIGNATURE])); } } - if (isset($data[self::FIELD_TOTAL])) { - $ext = (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) - ? $data[self::FIELD_TOTAL_EXT] - : null; - if ($data[self::FIELD_TOTAL] instanceof FHIRUnsignedInt) { - $this->setTotal($data[self::FIELD_TOTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_TOTAL]] + $ext)); - } else if (is_array($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_TOTAL]))); - } + if (isset($data[self::FIELD_TOTAL]) || isset($data[self::FIELD_TOTAL_EXT])) { + if (isset($data[self::FIELD_TOTAL])) { + $value = $data[self::FIELD_TOTAL]; } else { - $this->setTotal(new FHIRUnsignedInt($data[self::FIELD_TOTAL])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRBundleType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBundleType([FHIRBundleType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBundleType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) { + $ext = $data[self::FIELD_TOTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setTotal($value); + } else if (is_array($value)) { + $this->setTotal(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setTotal(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTotal(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRBundleType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBundleType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRBundleType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRBundleType([FHIRBundleType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRBundleType($ext)); } } } @@ -488,8 +502,8 @@ public function setType(FHIRBundleType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -608,28 +622,47 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getSignature())) { $a[self::FIELD_SIGNATURE] = $v; } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_TOTAL_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBundleType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBundleType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource.php index 7c1a06e6d8..0a200e19d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDomainResource extends FHIRResource const FIELD_TEXT = 'text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * These resources do not have an independent existence apart from the resource @@ -517,8 +517,8 @@ public function setText(FHIRNarrative $text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -633,17 +633,38 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContained())) { - $a[self::FIELD_CONTAINED] = $vs; + $a[self::FIELD_CONTAINED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINED][] = $v; + } } if ([] !== ($vs = $this->getExtension())) { - $a[self::FIELD_EXTENSION] = $vs; + $a[self::FIELD_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXTENSION][] = $v; + } } if ([] !== ($vs = $this->getModifierExtension())) { - $a[self::FIELD_MODIFIER_EXTENSION] = $vs; + $a[self::FIELD_MODIFIER_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER_EXTENSION][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAccount.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAccount.php index db55af2d0f..877bfe5a0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAccount.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAccount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRAccount extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -279,20 +279,27 @@ public function __construct($data = null) $this->setCurrency(new FHIRCoding($data[self::FIELD_CURRENCY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -313,20 +320,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OWNER])) { @@ -336,20 +350,27 @@ public function __construct($data = null) $this->setOwner(new FHIRReference($data[self::FIELD_OWNER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRAccountStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAccountStatus([FHIRAccountStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAccountStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRAccountStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAccountStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRAccountStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRAccountStatus([FHIRAccountStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRAccountStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -780,8 +801,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -950,18 +971,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -970,8 +1001,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAccountStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAccountStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -981,6 +1014,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php index 2e3e662524..b5d2d37912 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRAllergyIntolerance extends FHIRDomainResource implements PHPFHIRContai const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Category of an identified Substance. @@ -307,36 +307,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRAllergyIntoleranceCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRAllergyIntoleranceCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; } else { - $this->setCategory(new FHIRAllergyIntoleranceCategory($data[self::FIELD_CATEGORY])); + $value = null; } - } - if (isset($data[self::FIELD_CRITICALITY])) { - $ext = (isset($data[self::FIELD_CRITICALITY_EXT]) && is_array($data[self::FIELD_CRITICALITY_EXT])) - ? $data[self::FIELD_CRITICALITY_EXT] - : null; - if ($data[self::FIELD_CRITICALITY] instanceof FHIRAllergyIntoleranceCriticality) { - $this->setCriticality($data[self::FIELD_CRITICALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITICALITY])) { - $this->setCriticality(new FHIRAllergyIntoleranceCriticality([FHIRAllergyIntoleranceCriticality::FIELD_VALUE => $data[self::FIELD_CRITICALITY]] + $ext)); - } else if (is_array($data[self::FIELD_CRITICALITY])) { - $this->setCriticality(new FHIRAllergyIntoleranceCriticality(array_merge($ext, $data[self::FIELD_CRITICALITY]))); + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRAllergyIntoleranceCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCategory(new FHIRAllergyIntoleranceCategory($ext)); + } + } + if (isset($data[self::FIELD_CRITICALITY]) || isset($data[self::FIELD_CRITICALITY_EXT])) { + if (isset($data[self::FIELD_CRITICALITY])) { + $value = $data[self::FIELD_CRITICALITY]; } else { - $this->setCriticality(new FHIRAllergyIntoleranceCriticality($data[self::FIELD_CRITICALITY])); + $value = null; + } + if (isset($data[self::FIELD_CRITICALITY_EXT]) && is_array($data[self::FIELD_CRITICALITY_EXT])) { + $ext = $data[self::FIELD_CRITICALITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceCriticality) { + $this->setCriticality($value); + } else if (is_array($value)) { + $this->setCriticality(new FHIRAllergyIntoleranceCriticality(array_merge($ext, $value))); + } else { + $this->setCriticality(new FHIRAllergyIntoleranceCriticality([FHIRAllergyIntoleranceCriticality::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCriticality(new FHIRAllergyIntoleranceCriticality($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -357,20 +371,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_LAST_OCCURENCE])) { - $ext = (isset($data[self::FIELD_LAST_OCCURENCE_EXT]) && is_array($data[self::FIELD_LAST_OCCURENCE_EXT])) - ? $data[self::FIELD_LAST_OCCURENCE_EXT] - : null; - if ($data[self::FIELD_LAST_OCCURENCE] instanceof FHIRDateTime) { - $this->setLastOccurence($data[self::FIELD_LAST_OCCURENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_OCCURENCE])) { - $this->setLastOccurence(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_LAST_OCCURENCE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_OCCURENCE])) { - $this->setLastOccurence(new FHIRDateTime(array_merge($ext, $data[self::FIELD_LAST_OCCURENCE]))); - } + if (isset($data[self::FIELD_LAST_OCCURENCE]) || isset($data[self::FIELD_LAST_OCCURENCE_EXT])) { + if (isset($data[self::FIELD_LAST_OCCURENCE])) { + $value = $data[self::FIELD_LAST_OCCURENCE]; } else { - $this->setLastOccurence(new FHIRDateTime($data[self::FIELD_LAST_OCCURENCE])); + $value = null; + } + if (isset($data[self::FIELD_LAST_OCCURENCE_EXT]) && is_array($data[self::FIELD_LAST_OCCURENCE_EXT])) { + $ext = $data[self::FIELD_LAST_OCCURENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setLastOccurence($value); + } else if (is_array($value)) { + $this->setLastOccurence(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setLastOccurence(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastOccurence(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -380,20 +401,27 @@ public function __construct($data = null) $this->setNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_ONSET])) { - $ext = (isset($data[self::FIELD_ONSET_EXT]) && is_array($data[self::FIELD_ONSET_EXT])) - ? $data[self::FIELD_ONSET_EXT] - : null; - if ($data[self::FIELD_ONSET] instanceof FHIRDateTime) { - $this->setOnset($data[self::FIELD_ONSET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET])) { - $this->setOnset(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ONSET]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET])) { - $this->setOnset(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ONSET]))); - } + if (isset($data[self::FIELD_ONSET]) || isset($data[self::FIELD_ONSET_EXT])) { + if (isset($data[self::FIELD_ONSET])) { + $value = $data[self::FIELD_ONSET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_EXT]) && is_array($data[self::FIELD_ONSET_EXT])) { + $ext = $data[self::FIELD_ONSET_EXT]; } else { - $this->setOnset(new FHIRDateTime($data[self::FIELD_ONSET])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOnset($value); + } else if (is_array($value)) { + $this->setOnset(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOnset(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnset(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -421,20 +449,27 @@ public function __construct($data = null) $this->addReaction(new FHIRAllergyIntoleranceReaction($data[self::FIELD_REACTION])); } } - if (isset($data[self::FIELD_RECORDED_DATE])) { - $ext = (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) - ? $data[self::FIELD_RECORDED_DATE_EXT] - : null; - if ($data[self::FIELD_RECORDED_DATE] instanceof FHIRDateTime) { - $this->setRecordedDate($data[self::FIELD_RECORDED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED_DATE]))); - } + if (isset($data[self::FIELD_RECORDED_DATE]) || isset($data[self::FIELD_RECORDED_DATE_EXT])) { + if (isset($data[self::FIELD_RECORDED_DATE])) { + $value = $data[self::FIELD_RECORDED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) { + $ext = $data[self::FIELD_RECORDED_DATE_EXT]; } else { - $this->setRecordedDate(new FHIRDateTime($data[self::FIELD_RECORDED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecordedDate($value); + } else if (is_array($value)) { + $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecordedDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_RECORDER])) { @@ -451,20 +486,27 @@ public function __construct($data = null) $this->setReporter(new FHIRReference($data[self::FIELD_REPORTER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRAllergyIntoleranceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAllergyIntoleranceStatus([FHIRAllergyIntoleranceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAllergyIntoleranceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRAllergyIntoleranceStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRAllergyIntoleranceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRAllergyIntoleranceStatus([FHIRAllergyIntoleranceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRAllergyIntoleranceStatus($ext)); } } if (isset($data[self::FIELD_SUBSTANCE])) { @@ -474,20 +516,27 @@ public function __construct($data = null) $this->setSubstance(new FHIRCodeableConcept($data[self::FIELD_SUBSTANCE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAllergyIntoleranceType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAllergyIntoleranceType([FHIRAllergyIntoleranceType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAllergyIntoleranceType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRAllergyIntoleranceType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAllergyIntoleranceType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAllergyIntoleranceType([FHIRAllergyIntoleranceType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRAllergyIntoleranceType($ext)); } } } @@ -1058,8 +1107,8 @@ public function setType(FHIRAllergyIntoleranceType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1249,25 +1298,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } if (null !== ($v = $this->getCriticality())) { $a[self::FIELD_CRITICALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceCriticality::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceCriticality::FIELD_VALUE]); $a[self::FIELD_CRITICALITY_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLastOccurence())) { $a[self::FIELD_LAST_OCCURENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_LAST_OCCURENCE_EXT] = $enc; } } @@ -1276,8 +1337,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnset())) { $a[self::FIELD_ONSET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ONSET_EXT] = $enc; } } @@ -1285,12 +1348,20 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getReaction())) { - $a[self::FIELD_REACTION] = $vs; + $a[self::FIELD_REACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REACTION][] = $v; + } } if (null !== ($v = $this->getRecordedDate())) { $a[self::FIELD_RECORDED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_DATE_EXT] = $enc; } } @@ -1302,8 +1373,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1312,11 +1385,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointment.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointment.php index 7f49e24e65..5795fdf492 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRAppointment extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -290,52 +290,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -356,20 +377,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MINUTES_DURATION])) { - $ext = (isset($data[self::FIELD_MINUTES_DURATION_EXT]) && is_array($data[self::FIELD_MINUTES_DURATION_EXT])) - ? $data[self::FIELD_MINUTES_DURATION_EXT] - : null; - if ($data[self::FIELD_MINUTES_DURATION] instanceof FHIRPositiveInt) { - $this->setMinutesDuration($data[self::FIELD_MINUTES_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MINUTES_DURATION])) { - $this->setMinutesDuration(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_MINUTES_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_MINUTES_DURATION])) { - $this->setMinutesDuration(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_MINUTES_DURATION]))); - } + if (isset($data[self::FIELD_MINUTES_DURATION]) || isset($data[self::FIELD_MINUTES_DURATION_EXT])) { + if (isset($data[self::FIELD_MINUTES_DURATION])) { + $value = $data[self::FIELD_MINUTES_DURATION]; } else { - $this->setMinutesDuration(new FHIRPositiveInt($data[self::FIELD_MINUTES_DURATION])); + $value = null; + } + if (isset($data[self::FIELD_MINUTES_DURATION_EXT]) && is_array($data[self::FIELD_MINUTES_DURATION_EXT])) { + $ext = $data[self::FIELD_MINUTES_DURATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setMinutesDuration($value); + } else if (is_array($value)) { + $this->setMinutesDuration(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setMinutesDuration(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinutesDuration(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PARTICIPANT])) { @@ -390,20 +418,27 @@ public function __construct($data = null) $this->addParticipant(new FHIRAppointmentParticipant($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRUnsignedInt) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRUnsignedInt($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_REASON])) { @@ -431,36 +466,50 @@ public function __construct($data = null) $this->addSlot(new FHIRReference($data[self::FIELD_SLOT])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInstant) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInstant($data[self::FIELD_START])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRAppointmentStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAppointmentStatus([FHIRAppointmentStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAppointmentStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStart(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRAppointmentStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAppointmentStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRAppointmentStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRAppointmentStatus([FHIRAppointmentStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRAppointmentStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1036,8 +1085,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1246,42 +1295,64 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMinutesDuration())) { $a[self::FIELD_MINUTES_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_MINUTES_DURATION_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } @@ -1289,25 +1360,38 @@ public function jsonSerialize() $a[self::FIELD_REASON] = $v; } if ([] !== ($vs = $this->getSlot())) { - $a[self::FIELD_SLOT] = $vs; + $a[self::FIELD_SLOT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SLOT][] = $v; + } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAppointmentStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAppointmentStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php index b80e422b86..51b773bc6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRAppointmentResponse extends FHIRDomainResource implements PHPFHIRConta const FIELD_START_EXT = '_start'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -238,36 +238,50 @@ public function __construct($data = null) $this->setAppointment(new FHIRReference($data[self::FIELD_APPOINTMENT])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); - } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -288,20 +302,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_PARTICIPANT_STATUS])) { - $ext = (isset($data[self::FIELD_PARTICIPANT_STATUS_EXT]) && is_array($data[self::FIELD_PARTICIPANT_STATUS_EXT])) - ? $data[self::FIELD_PARTICIPANT_STATUS_EXT] - : null; - if ($data[self::FIELD_PARTICIPANT_STATUS] instanceof FHIRParticipantStatus) { - $this->setParticipantStatus($data[self::FIELD_PARTICIPANT_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARTICIPANT_STATUS])) { - $this->setParticipantStatus(new FHIRParticipantStatus([FHIRParticipantStatus::FIELD_VALUE => $data[self::FIELD_PARTICIPANT_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_PARTICIPANT_STATUS])) { - $this->setParticipantStatus(new FHIRParticipantStatus(array_merge($ext, $data[self::FIELD_PARTICIPANT_STATUS]))); - } + if (isset($data[self::FIELD_PARTICIPANT_STATUS]) || isset($data[self::FIELD_PARTICIPANT_STATUS_EXT])) { + if (isset($data[self::FIELD_PARTICIPANT_STATUS])) { + $value = $data[self::FIELD_PARTICIPANT_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARTICIPANT_STATUS_EXT]) && is_array($data[self::FIELD_PARTICIPANT_STATUS_EXT])) { + $ext = $data[self::FIELD_PARTICIPANT_STATUS_EXT]; } else { - $this->setParticipantStatus(new FHIRParticipantStatus($data[self::FIELD_PARTICIPANT_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRParticipantStatus) { + $this->setParticipantStatus($value); + } else if (is_array($value)) { + $this->setParticipantStatus(new FHIRParticipantStatus(array_merge($ext, $value))); + } else { + $this->setParticipantStatus(new FHIRParticipantStatus([FHIRParticipantStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParticipantStatus(new FHIRParticipantStatus($ext)); } } if (isset($data[self::FIELD_PARTICIPANT_TYPE])) { @@ -322,20 +343,27 @@ public function __construct($data = null) $this->addParticipantType(new FHIRCodeableConcept($data[self::FIELD_PARTICIPANT_TYPE])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInstant) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInstant($data[self::FIELD_START])); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRInstant($ext)); } } } @@ -718,8 +746,8 @@ public function setStart($start = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -879,38 +907,61 @@ public function jsonSerialize() } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getParticipantStatus())) { $a[self::FIELD_PARTICIPANT_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRParticipantStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRParticipantStatus::FIELD_VALUE]); $a[self::FIELD_PARTICIPANT_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipantType())) { - $a[self::FIELD_PARTICIPANT_TYPE] = $vs; + $a[self::FIELD_PARTICIPANT_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT_TYPE][] = $v; + } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php index fe1db3537b..a01200ccf4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRAuditEvent extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_SOURCE = 'source'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A record of an event made for purposes of maintaining a security log. Typical @@ -419,8 +419,8 @@ public function setSource(FHIRAuditEventSource $source = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -528,14 +528,29 @@ public function jsonSerialize() $a[self::FIELD_EVENT] = $v; } if ([] !== ($vs = $this->getObject())) { - $a[self::FIELD_OBJECT] = $vs; + $a[self::FIELD_OBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OBJECT][] = $v; + } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBasic.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBasic.php index 649f8a3b93..daf17fe726 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBasic.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBasic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBasic extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -190,20 +190,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDate) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDate(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDate($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -461,8 +468,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -581,17 +588,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBodySite.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBodySite.php index 577c3beefd..15ae2a979f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBodySite.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRBodySite.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRBodySite extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_PATIENT = 'patient'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -194,20 +194,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -580,8 +587,8 @@ public function setPatient(FHIRReference $patient = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -717,23 +724,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getImage())) { - $a[self::FIELD_IMAGE] = $vs; + $a[self::FIELD_IMAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGE][] = $v; + } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCarePlan.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCarePlan.php index 50fff70209..0045daa073 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCarePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCarePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRCarePlan extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_SUPPORT = 'support'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the intention of how one or more practitioners intend to deliver care @@ -408,20 +408,27 @@ public function __construct($data = null) $this->setContext(new FHIRReference($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_GOAL])) { @@ -460,20 +467,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MODIFIED])) { - $ext = (isset($data[self::FIELD_MODIFIED_EXT]) && is_array($data[self::FIELD_MODIFIED_EXT])) - ? $data[self::FIELD_MODIFIED_EXT] - : null; - if ($data[self::FIELD_MODIFIED] instanceof FHIRDateTime) { - $this->setModified($data[self::FIELD_MODIFIED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODIFIED])) { - $this->setModified(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MODIFIED]] + $ext)); - } else if (is_array($data[self::FIELD_MODIFIED])) { - $this->setModified(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MODIFIED]))); - } + if (isset($data[self::FIELD_MODIFIED]) || isset($data[self::FIELD_MODIFIED_EXT])) { + if (isset($data[self::FIELD_MODIFIED])) { + $value = $data[self::FIELD_MODIFIED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODIFIED_EXT]) && is_array($data[self::FIELD_MODIFIED_EXT])) { + $ext = $data[self::FIELD_MODIFIED_EXT]; } else { - $this->setModified(new FHIRDateTime($data[self::FIELD_MODIFIED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setModified($value); + } else if (is_array($value)) { + $this->setModified(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setModified(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setModified(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -526,20 +540,27 @@ public function __construct($data = null) $this->addRelatedPlan(new FHIRCarePlanRelatedPlan($data[self::FIELD_RELATED_PLAN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCarePlanStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanStatus([FHIRCarePlanStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCarePlanStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCarePlanStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCarePlanStatus([FHIRCarePlanStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCarePlanStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1378,8 +1399,8 @@ public function setSupport(array $support = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1621,37 +1642,77 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getActivity())) { - $a[self::FIELD_ACTIVITY] = $vs; + $a[self::FIELD_ACTIVITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTIVITY][] = $v; + } } if ([] !== ($vs = $this->getAddresses())) { - $a[self::FIELD_ADDRESSES] = $vs; + $a[self::FIELD_ADDRESSES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESSES][] = $v; + } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getGoal())) { - $a[self::FIELD_GOAL] = $vs; + $a[self::FIELD_GOAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GOAL][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getModified())) { $a[self::FIELD_MODIFIED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MODIFIED_EXT] = $enc; } } @@ -1659,18 +1720,32 @@ public function jsonSerialize() $a[self::FIELD_NOTE] = $v; } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getRelatedPlan())) { - $a[self::FIELD_RELATED_PLAN] = $vs; + $a[self::FIELD_RELATED_PLAN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_PLAN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1678,7 +1753,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupport())) { - $a[self::FIELD_SUPPORT] = $vs; + $a[self::FIELD_SUPPORT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaim.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaim.php index 7e4cc23de0..9b7e8bc9f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaim.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaim.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRClaim extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -480,20 +480,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACCIDENT])) { - $ext = (isset($data[self::FIELD_ACCIDENT_EXT]) && is_array($data[self::FIELD_ACCIDENT_EXT])) - ? $data[self::FIELD_ACCIDENT_EXT] - : null; - if ($data[self::FIELD_ACCIDENT] instanceof FHIRDate) { - $this->setAccident($data[self::FIELD_ACCIDENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACCIDENT])) { - $this->setAccident(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_ACCIDENT]] + $ext)); - } else if (is_array($data[self::FIELD_ACCIDENT])) { - $this->setAccident(new FHIRDate(array_merge($ext, $data[self::FIELD_ACCIDENT]))); - } + if (isset($data[self::FIELD_ACCIDENT]) || isset($data[self::FIELD_ACCIDENT_EXT])) { + if (isset($data[self::FIELD_ACCIDENT])) { + $value = $data[self::FIELD_ACCIDENT]; } else { - $this->setAccident(new FHIRDate($data[self::FIELD_ACCIDENT])); + $value = null; + } + if (isset($data[self::FIELD_ACCIDENT_EXT]) && is_array($data[self::FIELD_ACCIDENT_EXT])) { + $ext = $data[self::FIELD_ACCIDENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setAccident($value); + } else if (is_array($value)) { + $this->setAccident(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setAccident(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAccident(new FHIRDate($ext)); } } if (isset($data[self::FIELD_ACCIDENT_TYPE])) { @@ -557,20 +564,27 @@ public function __construct($data = null) $this->addCoverage(new FHIRClaimCoverage($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DIAGNOSIS])) { @@ -772,20 +786,27 @@ public function __construct($data = null) $this->setRuleset(new FHIRCoding($data[self::FIELD_RULESET])); } } - if (isset($data[self::FIELD_SCHOOL])) { - $ext = (isset($data[self::FIELD_SCHOOL_EXT]) && is_array($data[self::FIELD_SCHOOL_EXT])) - ? $data[self::FIELD_SCHOOL_EXT] - : null; - if ($data[self::FIELD_SCHOOL] instanceof FHIRString) { - $this->setSchool($data[self::FIELD_SCHOOL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCHOOL])) { - $this->setSchool(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SCHOOL]] + $ext)); - } else if (is_array($data[self::FIELD_SCHOOL])) { - $this->setSchool(new FHIRString(array_merge($ext, $data[self::FIELD_SCHOOL]))); - } + if (isset($data[self::FIELD_SCHOOL]) || isset($data[self::FIELD_SCHOOL_EXT])) { + if (isset($data[self::FIELD_SCHOOL])) { + $value = $data[self::FIELD_SCHOOL]; } else { - $this->setSchool(new FHIRString($data[self::FIELD_SCHOOL])); + $value = null; + } + if (isset($data[self::FIELD_SCHOOL_EXT]) && is_array($data[self::FIELD_SCHOOL_EXT])) { + $ext = $data[self::FIELD_SCHOOL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSchool($value); + } else if (is_array($value)) { + $this->setSchool(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSchool(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSchool(new FHIRString($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -795,36 +816,50 @@ public function __construct($data = null) $this->setTarget(new FHIRReference($data[self::FIELD_TARGET])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRClaimType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRClaimType([FHIRClaimType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRClaimType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRClaimType($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse(array_merge($ext, $data[self::FIELD_USE]))); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRClaimType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRClaimType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRClaimType([FHIRClaimType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRClaimType($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRUse($ext)); } } } @@ -2008,8 +2043,8 @@ public function setUse(FHIRUse $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2338,8 +2373,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAccident())) { $a[self::FIELD_ACCIDENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_ACCIDENT_EXT] = $enc; } } @@ -2347,29 +2384,61 @@ public function jsonSerialize() $a[self::FIELD_ACCIDENT_TYPE] = $v; } if ([] !== ($vs = $this->getAdditionalMaterials())) { - $a[self::FIELD_ADDITIONAL_MATERIALS] = $vs; + $a[self::FIELD_ADDITIONAL_MATERIALS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIONAL_MATERIALS][] = $v; + } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if ([] !== ($vs = $this->getCoverage())) { - $a[self::FIELD_COVERAGE] = $vs; + $a[self::FIELD_COVERAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getEnterer())) { $a[self::FIELD_ENTERER] = $v; } if ([] !== ($vs = $this->getException())) { - $a[self::FIELD_EXCEPTION] = $vs; + $a[self::FIELD_EXCEPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCEPTION][] = $v; + } } if (null !== ($v = $this->getFacility())) { $a[self::FIELD_FACILITY] = $v; @@ -2378,16 +2447,40 @@ public function jsonSerialize() $a[self::FIELD_FUNDS_RESERVE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInterventionException())) { - $a[self::FIELD_INTERVENTION_EXCEPTION] = $vs; + $a[self::FIELD_INTERVENTION_EXCEPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERVENTION_EXCEPTION][] = $v; + } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getMissingTeeth())) { - $a[self::FIELD_MISSING_TEETH] = $vs; + $a[self::FIELD_MISSING_TEETH] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MISSING_TEETH][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -2421,8 +2514,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSchool())) { $a[self::FIELD_SCHOOL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SCHOOL_EXT] = $enc; } } @@ -2431,18 +2526,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRClaimType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRClaimType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php index ba245ccd48..cb08012ac7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRClaimResponse extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_UNALLOC_DEDUCTABLE = 'unallocDeductable'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -455,36 +455,50 @@ public function __construct($data = null) $this->addCoverage(new FHIRClaimResponseCoverage($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); - } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_ERROR])) { @@ -580,20 +594,27 @@ public function __construct($data = null) $this->setOriginalRuleset(new FHIRCoding($data[self::FIELD_ORIGINAL_RULESET])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRCode) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; } else { - $this->setOutcome(new FHIRCode($data[self::FIELD_OUTCOME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PAYEE_TYPE])) { @@ -624,20 +645,27 @@ public function __construct($data = null) $this->setPaymentAmount(new FHIRMoney($data[self::FIELD_PAYMENT_AMOUNT])); } } - if (isset($data[self::FIELD_PAYMENT_DATE])) { - $ext = (isset($data[self::FIELD_PAYMENT_DATE_EXT]) && is_array($data[self::FIELD_PAYMENT_DATE_EXT])) - ? $data[self::FIELD_PAYMENT_DATE_EXT] - : null; - if ($data[self::FIELD_PAYMENT_DATE] instanceof FHIRDate) { - $this->setPaymentDate($data[self::FIELD_PAYMENT_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAYMENT_DATE])) { - $this->setPaymentDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_PAYMENT_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PAYMENT_DATE])) { - $this->setPaymentDate(new FHIRDate(array_merge($ext, $data[self::FIELD_PAYMENT_DATE]))); - } + if (isset($data[self::FIELD_PAYMENT_DATE]) || isset($data[self::FIELD_PAYMENT_DATE_EXT])) { + if (isset($data[self::FIELD_PAYMENT_DATE])) { + $value = $data[self::FIELD_PAYMENT_DATE]; } else { - $this->setPaymentDate(new FHIRDate($data[self::FIELD_PAYMENT_DATE])); + $value = null; + } + if (isset($data[self::FIELD_PAYMENT_DATE_EXT]) && is_array($data[self::FIELD_PAYMENT_DATE_EXT])) { + $ext = $data[self::FIELD_PAYMENT_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setPaymentDate($value); + } else if (is_array($value)) { + $this->setPaymentDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setPaymentDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPaymentDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_PAYMENT_REF])) { @@ -1671,8 +1699,8 @@ public function setUnallocDeductable(FHIRMoney $unallocDeductable = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1969,39 +1997,79 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAddItem())) { - $a[self::FIELD_ADD_ITEM] = $vs; + $a[self::FIELD_ADD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getCoverage())) { - $a[self::FIELD_COVERAGE] = $vs; + $a[self::FIELD_COVERAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getError())) { - $a[self::FIELD_ERROR] = $vs; + $a[self::FIELD_ERROR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ERROR][] = $v; + } } if (null !== ($v = $this->getForm())) { $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -2011,8 +2079,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -2030,8 +2100,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPaymentDate())) { $a[self::FIELD_PAYMENT_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_PAYMENT_DATE_EXT] = $enc; } } @@ -2062,6 +2134,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnallocDeductable())) { $a[self::FIELD_UNALLOC_DEDUCTABLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php index f62f6f8f7e..425c39ac65 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRClinicalImpression extends FHIRDomainResource implements PHPFHIRContai const FIELD_TRIGGER_REFERENCE = 'triggerReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -395,36 +395,50 @@ public function __construct($data = null) $this->setAssessor(new FHIRReference($data[self::FIELD_ASSESSOR])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_FINDING])) { @@ -513,36 +527,50 @@ public function __construct($data = null) $this->addProblem(new FHIRReference($data[self::FIELD_PROBLEM])); } } - if (isset($data[self::FIELD_PROGNOSIS])) { - $ext = (isset($data[self::FIELD_PROGNOSIS_EXT]) && is_array($data[self::FIELD_PROGNOSIS_EXT])) - ? $data[self::FIELD_PROGNOSIS_EXT] - : null; - if ($data[self::FIELD_PROGNOSIS] instanceof FHIRString) { - $this->setPrognosis($data[self::FIELD_PROGNOSIS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROGNOSIS])) { - $this->setPrognosis(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PROGNOSIS]] + $ext)); - } else if (is_array($data[self::FIELD_PROGNOSIS])) { - $this->setPrognosis(new FHIRString(array_merge($ext, $data[self::FIELD_PROGNOSIS]))); - } + if (isset($data[self::FIELD_PROGNOSIS]) || isset($data[self::FIELD_PROGNOSIS_EXT])) { + if (isset($data[self::FIELD_PROGNOSIS])) { + $value = $data[self::FIELD_PROGNOSIS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROGNOSIS_EXT]) && is_array($data[self::FIELD_PROGNOSIS_EXT])) { + $ext = $data[self::FIELD_PROGNOSIS_EXT]; } else { - $this->setPrognosis(new FHIRString($data[self::FIELD_PROGNOSIS])); - } - } - if (isset($data[self::FIELD_PROTOCOL])) { - $ext = (isset($data[self::FIELD_PROTOCOL_EXT]) && is_array($data[self::FIELD_PROTOCOL_EXT])) - ? $data[self::FIELD_PROTOCOL_EXT] - : null; - if ($data[self::FIELD_PROTOCOL] instanceof FHIRUri) { - $this->setProtocol($data[self::FIELD_PROTOCOL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROTOCOL])) { - $this->setProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROTOCOL]] + $ext)); - } else if (is_array($data[self::FIELD_PROTOCOL])) { - $this->setProtocol(new FHIRUri(array_merge($ext, $data[self::FIELD_PROTOCOL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPrognosis($value); + } else if (is_array($value)) { + $this->setPrognosis(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPrognosis(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPrognosis(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PROTOCOL]) || isset($data[self::FIELD_PROTOCOL_EXT])) { + if (isset($data[self::FIELD_PROTOCOL])) { + $value = $data[self::FIELD_PROTOCOL]; } else { - $this->setProtocol(new FHIRUri($data[self::FIELD_PROTOCOL])); + $value = null; + } + if (isset($data[self::FIELD_PROTOCOL_EXT]) && is_array($data[self::FIELD_PROTOCOL_EXT])) { + $ext = $data[self::FIELD_PROTOCOL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setProtocol($value); + } else if (is_array($value)) { + $this->setProtocol(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProtocol(new FHIRUri($ext)); } } if (isset($data[self::FIELD_RESOLVED])) { @@ -581,36 +609,50 @@ public function __construct($data = null) $this->addRuledOut(new FHIRClinicalImpressionRuledOut($data[self::FIELD_RULED_OUT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRClinicalImpressionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRClinicalImpressionStatus([FHIRClinicalImpressionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRClinicalImpressionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRClinicalImpressionStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_SUMMARY])) { - $ext = (isset($data[self::FIELD_SUMMARY_EXT]) && is_array($data[self::FIELD_SUMMARY_EXT])) - ? $data[self::FIELD_SUMMARY_EXT] - : null; - if ($data[self::FIELD_SUMMARY] instanceof FHIRString) { - $this->setSummary($data[self::FIELD_SUMMARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUMMARY])) { - $this->setSummary(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUMMARY]] + $ext)); - } else if (is_array($data[self::FIELD_SUMMARY])) { - $this->setSummary(new FHIRString(array_merge($ext, $data[self::FIELD_SUMMARY]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRClinicalImpressionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRClinicalImpressionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRClinicalImpressionStatus([FHIRClinicalImpressionStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRClinicalImpressionStatus($ext)); + } + } + if (isset($data[self::FIELD_SUMMARY]) || isset($data[self::FIELD_SUMMARY_EXT])) { + if (isset($data[self::FIELD_SUMMARY])) { + $value = $data[self::FIELD_SUMMARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUMMARY_EXT]) && is_array($data[self::FIELD_SUMMARY_EXT])) { + $ext = $data[self::FIELD_SUMMARY_EXT]; } else { - $this->setSummary(new FHIRString($data[self::FIELD_SUMMARY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSummary($value); + } else if (is_array($value)) { + $this->setSummary(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSummary(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSummary(new FHIRString($ext)); } } if (isset($data[self::FIELD_TRIGGER_CODEABLE_CONCEPT])) { @@ -1500,8 +1542,8 @@ public function setTriggerReference(FHIRReference $triggerReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1765,74 +1807,128 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getAssessor())) { $a[self::FIELD_ASSESSOR] = $v; } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getFinding())) { - $a[self::FIELD_FINDING] = $vs; + $a[self::FIELD_FINDING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FINDING][] = $v; + } } if ([] !== ($vs = $this->getInvestigations())) { - $a[self::FIELD_INVESTIGATIONS] = $vs; + $a[self::FIELD_INVESTIGATIONS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INVESTIGATIONS][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getPlan())) { - $a[self::FIELD_PLAN] = $vs; + $a[self::FIELD_PLAN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PLAN][] = $v; + } } if (null !== ($v = $this->getPrevious())) { $a[self::FIELD_PREVIOUS] = $v; } if ([] !== ($vs = $this->getProblem())) { - $a[self::FIELD_PROBLEM] = $vs; + $a[self::FIELD_PROBLEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROBLEM][] = $v; + } } if (null !== ($v = $this->getPrognosis())) { $a[self::FIELD_PROGNOSIS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PROGNOSIS_EXT] = $enc; } } if (null !== ($v = $this->getProtocol())) { $a[self::FIELD_PROTOCOL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PROTOCOL_EXT] = $enc; } } if ([] !== ($vs = $this->getResolved())) { - $a[self::FIELD_RESOLVED] = $vs; + $a[self::FIELD_RESOLVED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOLVED][] = $v; + } } if ([] !== ($vs = $this->getRuledOut())) { - $a[self::FIELD_RULED_OUT] = $vs; + $a[self::FIELD_RULED_OUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULED_OUT][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRClinicalImpressionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRClinicalImpressionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSummary())) { $a[self::FIELD_SUMMARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUMMARY_EXT] = $enc; } } @@ -1842,6 +1938,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTriggerReference())) { $a[self::FIELD_TRIGGER_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunication.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunication.php index e4a3528849..5596df9d25 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRCommunication extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -375,20 +375,27 @@ public function __construct($data = null) $this->addReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_RECEIVED])) { - $ext = (isset($data[self::FIELD_RECEIVED_EXT]) && is_array($data[self::FIELD_RECEIVED_EXT])) - ? $data[self::FIELD_RECEIVED_EXT] - : null; - if ($data[self::FIELD_RECEIVED] instanceof FHIRDateTime) { - $this->setReceived($data[self::FIELD_RECEIVED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECEIVED])) { - $this->setReceived(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECEIVED]] + $ext)); - } else if (is_array($data[self::FIELD_RECEIVED])) { - $this->setReceived(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECEIVED]))); - } + if (isset($data[self::FIELD_RECEIVED]) || isset($data[self::FIELD_RECEIVED_EXT])) { + if (isset($data[self::FIELD_RECEIVED])) { + $value = $data[self::FIELD_RECEIVED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECEIVED_EXT]) && is_array($data[self::FIELD_RECEIVED_EXT])) { + $ext = $data[self::FIELD_RECEIVED_EXT]; } else { - $this->setReceived(new FHIRDateTime($data[self::FIELD_RECEIVED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReceived($value); + } else if (is_array($value)) { + $this->setReceived(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReceived(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReceived(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_RECIPIENT])) { @@ -423,36 +430,50 @@ public function __construct($data = null) $this->setSender(new FHIRReference($data[self::FIELD_SENDER])); } } - if (isset($data[self::FIELD_SENT])) { - $ext = (isset($data[self::FIELD_SENT_EXT]) && is_array($data[self::FIELD_SENT_EXT])) - ? $data[self::FIELD_SENT_EXT] - : null; - if ($data[self::FIELD_SENT] instanceof FHIRDateTime) { - $this->setSent($data[self::FIELD_SENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SENT])) { - $this->setSent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_SENT]] + $ext)); - } else if (is_array($data[self::FIELD_SENT])) { - $this->setSent(new FHIRDateTime(array_merge($ext, $data[self::FIELD_SENT]))); - } + if (isset($data[self::FIELD_SENT]) || isset($data[self::FIELD_SENT_EXT])) { + if (isset($data[self::FIELD_SENT])) { + $value = $data[self::FIELD_SENT]; } else { - $this->setSent(new FHIRDateTime($data[self::FIELD_SENT])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCommunicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCommunicationStatus([FHIRCommunicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCommunicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SENT_EXT]) && is_array($data[self::FIELD_SENT_EXT])) { + $ext = $data[self::FIELD_SENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setSent($value); + } else if (is_array($value)) { + $this->setSent(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setSent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSent(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCommunicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCommunicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCommunicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCommunicationStatus([FHIRCommunicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCommunicationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1079,8 +1100,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1282,26 +1303,58 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getMedium())) { - $a[self::FIELD_MEDIUM] = $vs; + $a[self::FIELD_MEDIUM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEDIUM][] = $v; + } } if ([] !== ($vs = $this->getPayload())) { - $a[self::FIELD_PAYLOAD] = $vs; + $a[self::FIELD_PAYLOAD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYLOAD][] = $v; + } } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if (null !== ($v = $this->getReceived())) { $a[self::FIELD_RECEIVED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECEIVED_EXT] = $enc; } } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if (null !== ($v = $this->getRequestDetail())) { $a[self::FIELD_REQUEST_DETAIL] = $v; @@ -1311,21 +1364,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getSent())) { $a[self::FIELD_SENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_SENT_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCommunicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCommunicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php index fe0b952e19..56e2cc82d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRCommunicationRequest extends FHIRDomainResource implements PHPFHIRCont const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -424,20 +424,27 @@ public function __construct($data = null) $this->addRecipient(new FHIRReference($data[self::FIELD_RECIPIENT])); } } - if (isset($data[self::FIELD_REQUESTED_ON])) { - $ext = (isset($data[self::FIELD_REQUESTED_ON_EXT]) && is_array($data[self::FIELD_REQUESTED_ON_EXT])) - ? $data[self::FIELD_REQUESTED_ON_EXT] - : null; - if ($data[self::FIELD_REQUESTED_ON] instanceof FHIRDateTime) { - $this->setRequestedOn($data[self::FIELD_REQUESTED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUESTED_ON])) { - $this->setRequestedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_REQUESTED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_REQUESTED_ON])) { - $this->setRequestedOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_REQUESTED_ON]))); - } + if (isset($data[self::FIELD_REQUESTED_ON]) || isset($data[self::FIELD_REQUESTED_ON_EXT])) { + if (isset($data[self::FIELD_REQUESTED_ON])) { + $value = $data[self::FIELD_REQUESTED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUESTED_ON_EXT]) && is_array($data[self::FIELD_REQUESTED_ON_EXT])) { + $ext = $data[self::FIELD_REQUESTED_ON_EXT]; } else { - $this->setRequestedOn(new FHIRDateTime($data[self::FIELD_REQUESTED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRequestedOn($value); + } else if (is_array($value)) { + $this->setRequestedOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRequestedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequestedOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_REQUESTER])) { @@ -447,20 +454,27 @@ public function __construct($data = null) $this->setRequester(new FHIRReference($data[self::FIELD_REQUESTER])); } } - if (isset($data[self::FIELD_SCHEDULED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_SCHEDULED_DATE_TIME_EXT]) && is_array($data[self::FIELD_SCHEDULED_DATE_TIME_EXT])) - ? $data[self::FIELD_SCHEDULED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_SCHEDULED_DATE_TIME] instanceof FHIRDateTime) { - $this->setScheduledDateTime($data[self::FIELD_SCHEDULED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCHEDULED_DATE_TIME])) { - $this->setScheduledDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_SCHEDULED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_SCHEDULED_DATE_TIME])) { - $this->setScheduledDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_SCHEDULED_DATE_TIME]))); - } + if (isset($data[self::FIELD_SCHEDULED_DATE_TIME]) || isset($data[self::FIELD_SCHEDULED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_SCHEDULED_DATE_TIME])) { + $value = $data[self::FIELD_SCHEDULED_DATE_TIME]; } else { - $this->setScheduledDateTime(new FHIRDateTime($data[self::FIELD_SCHEDULED_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_SCHEDULED_DATE_TIME_EXT]) && is_array($data[self::FIELD_SCHEDULED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_SCHEDULED_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setScheduledDateTime($value); + } else if (is_array($value)) { + $this->setScheduledDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setScheduledDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScheduledDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SCHEDULED_PERIOD])) { @@ -477,20 +491,27 @@ public function __construct($data = null) $this->setSender(new FHIRReference($data[self::FIELD_SENDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCommunicationRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCommunicationRequestStatus([FHIRCommunicationRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCommunicationRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCommunicationRequestStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCommunicationRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCommunicationRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCommunicationRequestStatus([FHIRCommunicationRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCommunicationRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1170,8 +1191,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1385,27 +1406,59 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getMedium())) { - $a[self::FIELD_MEDIUM] = $vs; + $a[self::FIELD_MEDIUM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEDIUM][] = $v; + } } if ([] !== ($vs = $this->getPayload())) { - $a[self::FIELD_PAYLOAD] = $vs; + $a[self::FIELD_PAYLOAD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYLOAD][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v; } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if (null !== ($v = $this->getRequestedOn())) { $a[self::FIELD_REQUESTED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_REQUESTED_ON_EXT] = $enc; } } @@ -1414,8 +1467,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getScheduledDateTime())) { $a[self::FIELD_SCHEDULED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_SCHEDULED_DATE_TIME_EXT] = $enc; } } @@ -1427,14 +1482,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCommunicationRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCommunicationRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRComposition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRComposition.php index c783755192..14d9155896 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRComposition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRComposition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRComposition extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of healthcare-related information that is assembled together into a single @@ -366,20 +366,27 @@ public function __construct($data = null) $this->setClass(new FHIRCodeableConcept($data[self::FIELD_CLASS])); } } - if (isset($data[self::FIELD_CONFIDENTIALITY])) { - $ext = (isset($data[self::FIELD_CONFIDENTIALITY_EXT]) && is_array($data[self::FIELD_CONFIDENTIALITY_EXT])) - ? $data[self::FIELD_CONFIDENTIALITY_EXT] - : null; - if ($data[self::FIELD_CONFIDENTIALITY] instanceof FHIRCode) { - $this->setConfidentiality($data[self::FIELD_CONFIDENTIALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONFIDENTIALITY])) { - $this->setConfidentiality(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONFIDENTIALITY]] + $ext)); - } else if (is_array($data[self::FIELD_CONFIDENTIALITY])) { - $this->setConfidentiality(new FHIRCode(array_merge($ext, $data[self::FIELD_CONFIDENTIALITY]))); - } + if (isset($data[self::FIELD_CONFIDENTIALITY]) || isset($data[self::FIELD_CONFIDENTIALITY_EXT])) { + if (isset($data[self::FIELD_CONFIDENTIALITY])) { + $value = $data[self::FIELD_CONFIDENTIALITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONFIDENTIALITY_EXT]) && is_array($data[self::FIELD_CONFIDENTIALITY_EXT])) { + $ext = $data[self::FIELD_CONFIDENTIALITY_EXT]; } else { - $this->setConfidentiality(new FHIRCode($data[self::FIELD_CONFIDENTIALITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setConfidentiality($value); + } else if (is_array($value)) { + $this->setConfidentiality(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setConfidentiality(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConfidentiality(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CUSTODIAN])) { @@ -389,20 +396,27 @@ public function __construct($data = null) $this->setCustodian(new FHIRReference($data[self::FIELD_CUSTODIAN])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -455,20 +469,27 @@ public function __construct($data = null) $this->addSection(new FHIRCompositionSection($data[self::FIELD_SECTION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCompositionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCompositionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCompositionStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCompositionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCompositionStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -478,20 +499,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1151,8 +1179,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1355,18 +1383,32 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAttester())) { - $a[self::FIELD_ATTESTER] = $vs; + $a[self::FIELD_ATTESTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ATTESTER][] = $v; + } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v; } if (null !== ($v = $this->getConfidentiality())) { $a[self::FIELD_CONFIDENTIALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONFIDENTIALITY_EXT] = $enc; } } @@ -1375,8 +1417,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1384,18 +1428,32 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getSection())) { - $a[self::FIELD_SECTION] = $vs; + $a[self::FIELD_SECTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECTION][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompositionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompositionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1404,14 +1462,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConceptMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConceptMap.php index 081ec7be7f..3d047c7411 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConceptMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConceptMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRConceptMap extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A statement of relationships from one set of concepts to one or more other @@ -385,52 +385,73 @@ public function __construct($data = null) $this->addContact(new FHIRConceptMapContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRString) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRString($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ELEMENT])) { @@ -451,20 +472,27 @@ public function __construct($data = null) $this->addElement(new FHIRConceptMapElement($data[self::FIELD_ELEMENT])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -474,52 +502,73 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); } } if (isset($data[self::FIELD_SOURCE_REFERENCE])) { @@ -529,36 +578,50 @@ public function __construct($data = null) $this->setSourceReference(new FHIRReference($data[self::FIELD_SOURCE_REFERENCE])); } } - if (isset($data[self::FIELD_SOURCE_URI])) { - $ext = (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) - ? $data[self::FIELD_SOURCE_URI_EXT] - : null; - if ($data[self::FIELD_SOURCE_URI] instanceof FHIRUri) { - $this->setSourceUri($data[self::FIELD_SOURCE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE_URI]))); - } + if (isset($data[self::FIELD_SOURCE_URI]) || isset($data[self::FIELD_SOURCE_URI_EXT])) { + if (isset($data[self::FIELD_SOURCE_URI])) { + $value = $data[self::FIELD_SOURCE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) { + $ext = $data[self::FIELD_SOURCE_URI_EXT]; } else { - $this->setSourceUri(new FHIRUri($data[self::FIELD_SOURCE_URI])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSourceUri($value); + } else if (is_array($value)) { + $this->setSourceUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } if (isset($data[self::FIELD_TARGET_REFERENCE])) { @@ -568,36 +631,50 @@ public function __construct($data = null) $this->setTargetReference(new FHIRReference($data[self::FIELD_TARGET_REFERENCE])); } } - if (isset($data[self::FIELD_TARGET_URI])) { - $ext = (isset($data[self::FIELD_TARGET_URI_EXT]) && is_array($data[self::FIELD_TARGET_URI_EXT])) - ? $data[self::FIELD_TARGET_URI_EXT] - : null; - if ($data[self::FIELD_TARGET_URI] instanceof FHIRUri) { - $this->setTargetUri($data[self::FIELD_TARGET_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_URI])) { - $this->setTargetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_TARGET_URI]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_URI])) { - $this->setTargetUri(new FHIRUri(array_merge($ext, $data[self::FIELD_TARGET_URI]))); - } + if (isset($data[self::FIELD_TARGET_URI]) || isset($data[self::FIELD_TARGET_URI_EXT])) { + if (isset($data[self::FIELD_TARGET_URI])) { + $value = $data[self::FIELD_TARGET_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_URI_EXT]) && is_array($data[self::FIELD_TARGET_URI_EXT])) { + $ext = $data[self::FIELD_TARGET_URI_EXT]; } else { - $this->setTargetUri(new FHIRUri($data[self::FIELD_TARGET_URI])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setTargetUri($value); + } else if (is_array($value)) { + $this->setTargetUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setTargetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTargetUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -618,20 +695,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRCodeableConcept($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1433,8 +1517,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1726,36 +1810,56 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } @@ -1764,22 +1868,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } @@ -1788,15 +1898,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSourceUri())) { $a[self::FIELD_SOURCE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_URI_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1805,28 +1919,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getTargetUri())) { $a[self::FIELD_TARGET_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_TARGET_URI_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCondition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCondition.php index a276e7c251..c4b3139218 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRCondition extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_VERIFICATION_STATUS_EXT = '_verificationStatus'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -464,36 +464,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ABATEMENT_BOOLEAN])) { - $ext = (isset($data[self::FIELD_ABATEMENT_BOOLEAN_EXT]) && is_array($data[self::FIELD_ABATEMENT_BOOLEAN_EXT])) - ? $data[self::FIELD_ABATEMENT_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_BOOLEAN] instanceof FHIRBoolean) { - $this->setAbatementBoolean($data[self::FIELD_ABATEMENT_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_BOOLEAN])) { - $this->setAbatementBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABATEMENT_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_BOOLEAN])) { - $this->setAbatementBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABATEMENT_BOOLEAN]))); - } + if (isset($data[self::FIELD_ABATEMENT_BOOLEAN]) || isset($data[self::FIELD_ABATEMENT_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_BOOLEAN])) { + $value = $data[self::FIELD_ABATEMENT_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABATEMENT_BOOLEAN_EXT]) && is_array($data[self::FIELD_ABATEMENT_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_BOOLEAN_EXT]; } else { - $this->setAbatementBoolean(new FHIRBoolean($data[self::FIELD_ABATEMENT_BOOLEAN])); - } - } - if (isset($data[self::FIELD_ABATEMENT_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ABATEMENT_DATE_TIME_EXT]) && is_array($data[self::FIELD_ABATEMENT_DATE_TIME_EXT])) - ? $data[self::FIELD_ABATEMENT_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_DATE_TIME] instanceof FHIRDateTime) { - $this->setAbatementDateTime($data[self::FIELD_ABATEMENT_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_DATE_TIME])) { - $this->setAbatementDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ABATEMENT_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_DATE_TIME])) { - $this->setAbatementDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ABATEMENT_DATE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbatementBoolean($value); + } else if (is_array($value)) { + $this->setAbatementBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbatementBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbatementBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_ABATEMENT_DATE_TIME]) || isset($data[self::FIELD_ABATEMENT_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_DATE_TIME])) { + $value = $data[self::FIELD_ABATEMENT_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABATEMENT_DATE_TIME_EXT]) && is_array($data[self::FIELD_ABATEMENT_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_DATE_TIME_EXT]; } else { - $this->setAbatementDateTime(new FHIRDateTime($data[self::FIELD_ABATEMENT_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAbatementDateTime($value); + } else if (is_array($value)) { + $this->setAbatementDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAbatementDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAbatementDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ABATEMENT_PERIOD])) { @@ -517,20 +531,27 @@ public function __construct($data = null) $this->setAbatementRange(new FHIRRange($data[self::FIELD_ABATEMENT_RANGE])); } } - if (isset($data[self::FIELD_ABATEMENT_STRING])) { - $ext = (isset($data[self::FIELD_ABATEMENT_STRING_EXT]) && is_array($data[self::FIELD_ABATEMENT_STRING_EXT])) - ? $data[self::FIELD_ABATEMENT_STRING_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_STRING] instanceof FHIRString) { - $this->setAbatementString($data[self::FIELD_ABATEMENT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_STRING])) { - $this->setAbatementString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ABATEMENT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_STRING])) { - $this->setAbatementString(new FHIRString(array_merge($ext, $data[self::FIELD_ABATEMENT_STRING]))); - } + if (isset($data[self::FIELD_ABATEMENT_STRING]) || isset($data[self::FIELD_ABATEMENT_STRING_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_STRING])) { + $value = $data[self::FIELD_ABATEMENT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABATEMENT_STRING_EXT]) && is_array($data[self::FIELD_ABATEMENT_STRING_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_STRING_EXT]; } else { - $this->setAbatementString(new FHIRString($data[self::FIELD_ABATEMENT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAbatementString($value); + } else if (is_array($value)) { + $this->setAbatementString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAbatementString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAbatementString(new FHIRString($ext)); } } if (isset($data[self::FIELD_ASSERTER])) { @@ -565,20 +586,27 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_CLINICAL_STATUS])) { - $ext = (isset($data[self::FIELD_CLINICAL_STATUS_EXT]) && is_array($data[self::FIELD_CLINICAL_STATUS_EXT])) - ? $data[self::FIELD_CLINICAL_STATUS_EXT] - : null; - if ($data[self::FIELD_CLINICAL_STATUS] instanceof FHIRCode) { - $this->setClinicalStatus($data[self::FIELD_CLINICAL_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLINICAL_STATUS])) { - $this->setClinicalStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CLINICAL_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_CLINICAL_STATUS])) { - $this->setClinicalStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_CLINICAL_STATUS]))); - } + if (isset($data[self::FIELD_CLINICAL_STATUS]) || isset($data[self::FIELD_CLINICAL_STATUS_EXT])) { + if (isset($data[self::FIELD_CLINICAL_STATUS])) { + $value = $data[self::FIELD_CLINICAL_STATUS]; } else { - $this->setClinicalStatus(new FHIRCode($data[self::FIELD_CLINICAL_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_CLINICAL_STATUS_EXT]) && is_array($data[self::FIELD_CLINICAL_STATUS_EXT])) { + $ext = $data[self::FIELD_CLINICAL_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setClinicalStatus($value); + } else if (is_array($value)) { + $this->setClinicalStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setClinicalStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setClinicalStatus(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -588,20 +616,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DATE_RECORDED])) { - $ext = (isset($data[self::FIELD_DATE_RECORDED_EXT]) && is_array($data[self::FIELD_DATE_RECORDED_EXT])) - ? $data[self::FIELD_DATE_RECORDED_EXT] - : null; - if ($data[self::FIELD_DATE_RECORDED] instanceof FHIRDate) { - $this->setDateRecorded($data[self::FIELD_DATE_RECORDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_RECORDED])) { - $this->setDateRecorded(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE_RECORDED]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_RECORDED])) { - $this->setDateRecorded(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE_RECORDED]))); - } + if (isset($data[self::FIELD_DATE_RECORDED]) || isset($data[self::FIELD_DATE_RECORDED_EXT])) { + if (isset($data[self::FIELD_DATE_RECORDED])) { + $value = $data[self::FIELD_DATE_RECORDED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_RECORDED_EXT]) && is_array($data[self::FIELD_DATE_RECORDED_EXT])) { + $ext = $data[self::FIELD_DATE_RECORDED_EXT]; } else { - $this->setDateRecorded(new FHIRDate($data[self::FIELD_DATE_RECORDED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDateRecorded($value); + } else if (is_array($value)) { + $this->setDateRecorded(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDateRecorded(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateRecorded(new FHIRDate($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -647,36 +682,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->setNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else if (is_array($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString(array_merge($ext, $data[self::FIELD_NOTES]))); - } + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; } else { - $this->setNotes(new FHIRString($data[self::FIELD_NOTES])); - } - } - if (isset($data[self::FIELD_ONSET_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) - ? $data[self::FIELD_ONSET_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ONSET_DATE_TIME] instanceof FHIRDateTime) { - $this->setOnsetDateTime($data[self::FIELD_ONSET_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ONSET_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ONSET_DATE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNotes($value); + } else if (is_array($value)) { + $this->setNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNotes(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ONSET_DATE_TIME]) || isset($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ONSET_DATE_TIME])) { + $value = $data[self::FIELD_ONSET_DATE_TIME]; } else { - $this->setOnsetDateTime(new FHIRDateTime($data[self::FIELD_ONSET_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ONSET_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOnsetDateTime($value); + } else if (is_array($value)) { + $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ONSET_PERIOD])) { @@ -700,20 +749,27 @@ public function __construct($data = null) $this->setOnsetRange(new FHIRRange($data[self::FIELD_ONSET_RANGE])); } } - if (isset($data[self::FIELD_ONSET_STRING])) { - $ext = (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) - ? $data[self::FIELD_ONSET_STRING_EXT] - : null; - if ($data[self::FIELD_ONSET_STRING] instanceof FHIRString) { - $this->setOnsetString($data[self::FIELD_ONSET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ONSET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString(array_merge($ext, $data[self::FIELD_ONSET_STRING]))); - } + if (isset($data[self::FIELD_ONSET_STRING]) || isset($data[self::FIELD_ONSET_STRING_EXT])) { + if (isset($data[self::FIELD_ONSET_STRING])) { + $value = $data[self::FIELD_ONSET_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) { + $ext = $data[self::FIELD_ONSET_STRING_EXT]; } else { - $this->setOnsetString(new FHIRString($data[self::FIELD_ONSET_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOnsetString($value); + } else if (is_array($value)) { + $this->setOnsetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetString(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -737,20 +793,27 @@ public function __construct($data = null) $this->setStage(new FHIRConditionStage($data[self::FIELD_STAGE])); } } - if (isset($data[self::FIELD_VERIFICATION_STATUS])) { - $ext = (isset($data[self::FIELD_VERIFICATION_STATUS_EXT]) && is_array($data[self::FIELD_VERIFICATION_STATUS_EXT])) - ? $data[self::FIELD_VERIFICATION_STATUS_EXT] - : null; - if ($data[self::FIELD_VERIFICATION_STATUS] instanceof FHIRConditionVerificationStatus) { - $this->setVerificationStatus($data[self::FIELD_VERIFICATION_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERIFICATION_STATUS])) { - $this->setVerificationStatus(new FHIRConditionVerificationStatus([FHIRConditionVerificationStatus::FIELD_VALUE => $data[self::FIELD_VERIFICATION_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_VERIFICATION_STATUS])) { - $this->setVerificationStatus(new FHIRConditionVerificationStatus(array_merge($ext, $data[self::FIELD_VERIFICATION_STATUS]))); - } + if (isset($data[self::FIELD_VERIFICATION_STATUS]) || isset($data[self::FIELD_VERIFICATION_STATUS_EXT])) { + if (isset($data[self::FIELD_VERIFICATION_STATUS])) { + $value = $data[self::FIELD_VERIFICATION_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERIFICATION_STATUS_EXT]) && is_array($data[self::FIELD_VERIFICATION_STATUS_EXT])) { + $ext = $data[self::FIELD_VERIFICATION_STATUS_EXT]; } else { - $this->setVerificationStatus(new FHIRConditionVerificationStatus($data[self::FIELD_VERIFICATION_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionVerificationStatus) { + $this->setVerificationStatus($value); + } else if (is_array($value)) { + $this->setVerificationStatus(new FHIRConditionVerificationStatus(array_merge($ext, $value))); + } else { + $this->setVerificationStatus(new FHIRConditionVerificationStatus([FHIRConditionVerificationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVerificationStatus(new FHIRConditionVerificationStatus($ext)); } } } @@ -1754,8 +1817,8 @@ public function setVerificationStatus(FHIRConditionVerificationStatus $verificat */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2058,15 +2121,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAbatementBoolean())) { $a[self::FIELD_ABATEMENT_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getAbatementDateTime())) { $a[self::FIELD_ABATEMENT_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_DATE_TIME_EXT] = $enc; } } @@ -2081,8 +2148,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAbatementString())) { $a[self::FIELD_ABATEMENT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_STRING_EXT] = $enc; } } @@ -2090,15 +2159,23 @@ public function jsonSerialize() $a[self::FIELD_ASSERTER] = $v; } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if (null !== ($v = $this->getClinicalStatus())) { $a[self::FIELD_CLINICAL_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CLINICAL_STATUS_EXT] = $enc; } } @@ -2107,8 +2184,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDateRecorded())) { $a[self::FIELD_DATE_RECORDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_RECORDED_EXT] = $enc; } } @@ -2116,22 +2195,38 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvidence())) { - $a[self::FIELD_EVIDENCE] = $vs; + $a[self::FIELD_EVIDENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVIDENCE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getNotes())) { $a[self::FIELD_NOTES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTES_EXT] = $enc; } } if (null !== ($v = $this->getOnsetDateTime())) { $a[self::FIELD_ONSET_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ONSET_DATE_TIME_EXT] = $enc; } } @@ -2146,8 +2241,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetString())) { $a[self::FIELD_ONSET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ONSET_STRING_EXT] = $enc; } } @@ -2162,11 +2259,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getVerificationStatus())) { $a[self::FIELD_VERIFICATION_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionVerificationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionVerificationStatus::FIELD_VALUE]); $a[self::FIELD_VERIFICATION_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConformance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConformance.php index 780cff1adb..6ee0ea4493 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConformance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRConformance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRConformance extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A code that indicates whether an application accepts unknown elements or @@ -429,20 +429,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACCEPT_UNKNOWN])) { - $ext = (isset($data[self::FIELD_ACCEPT_UNKNOWN_EXT]) && is_array($data[self::FIELD_ACCEPT_UNKNOWN_EXT])) - ? $data[self::FIELD_ACCEPT_UNKNOWN_EXT] - : null; - if ($data[self::FIELD_ACCEPT_UNKNOWN] instanceof FHIRUnknownContentCode) { - $this->setAcceptUnknown($data[self::FIELD_ACCEPT_UNKNOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACCEPT_UNKNOWN])) { - $this->setAcceptUnknown(new FHIRUnknownContentCode([FHIRUnknownContentCode::FIELD_VALUE => $data[self::FIELD_ACCEPT_UNKNOWN]] + $ext)); - } else if (is_array($data[self::FIELD_ACCEPT_UNKNOWN])) { - $this->setAcceptUnknown(new FHIRUnknownContentCode(array_merge($ext, $data[self::FIELD_ACCEPT_UNKNOWN]))); - } + if (isset($data[self::FIELD_ACCEPT_UNKNOWN]) || isset($data[self::FIELD_ACCEPT_UNKNOWN_EXT])) { + if (isset($data[self::FIELD_ACCEPT_UNKNOWN])) { + $value = $data[self::FIELD_ACCEPT_UNKNOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACCEPT_UNKNOWN_EXT]) && is_array($data[self::FIELD_ACCEPT_UNKNOWN_EXT])) { + $ext = $data[self::FIELD_ACCEPT_UNKNOWN_EXT]; } else { - $this->setAcceptUnknown(new FHIRUnknownContentCode($data[self::FIELD_ACCEPT_UNKNOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnknownContentCode) { + $this->setAcceptUnknown($value); + } else if (is_array($value)) { + $this->setAcceptUnknown(new FHIRUnknownContentCode(array_merge($ext, $value))); + } else { + $this->setAcceptUnknown(new FHIRUnknownContentCode([FHIRUnknownContentCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAcceptUnknown(new FHIRUnknownContentCode($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -463,52 +470,73 @@ public function __construct($data = null) $this->addContact(new FHIRConformanceContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRString) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRString($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOCUMENT])) { @@ -529,65 +557,88 @@ public function __construct($data = null) $this->addDocument(new FHIRConformanceDocument($data[self::FIELD_DOCUMENT])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRId) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; } else { - $this->setFhirVersion(new FHIRId($data[self::FIELD_FHIR_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRId($ext)); } } - if (isset($data[self::FIELD_FORMAT])) { - $ext = (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) - ? $data[self::FIELD_FORMAT_EXT] - : null; - if (is_array($data[self::FIELD_FORMAT])) { - foreach($data[self::FIELD_FORMAT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addFormat($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFormat(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FORMAT]) || isset($data[self::FIELD_FORMAT_EXT])) { + if (isset($data[self::FIELD_FORMAT])) { + $value = $data[self::FIELD_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) { + $ext = $data[self::FIELD_FORMAT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addFormat($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addFormat($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFormat(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFormat(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFormat(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_FORMAT] instanceof FHIRCode) { - $this->addFormat($data[self::FIELD_FORMAT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FORMAT])) { - $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FORMAT]] + $ext)); - } else { - $this->addFormat(new FHIRCode($data[self::FIELD_FORMAT])); } } if (isset($data[self::FIELD_IMPLEMENTATION])) { @@ -597,20 +648,27 @@ public function __construct($data = null) $this->setImplementation(new FHIRConformanceImplementation($data[self::FIELD_IMPLEMENTATION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRConformanceStatementKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRConformanceStatementKind([FHIRConformanceStatementKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRConformanceStatementKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRConformanceStatementKind($data[self::FIELD_KIND])); + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConformanceStatementKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRConformanceStatementKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRConformanceStatementKind([FHIRConformanceStatementKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRConformanceStatementKind($ext)); } } if (isset($data[self::FIELD_MESSAGING])) { @@ -631,20 +689,27 @@ public function __construct($data = null) $this->addMessaging(new FHIRConformanceMessaging($data[self::FIELD_MESSAGING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -665,36 +730,50 @@ public function __construct($data = null) $this->addProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); } } if (isset($data[self::FIELD_REST])) { @@ -722,52 +801,73 @@ public function __construct($data = null) $this->setSoftware(new FHIRConformanceSoftware($data[self::FIELD_SOFTWARE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1771,8 +1871,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2096,131 +2196,198 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAcceptUnknown())) { $a[self::FIELD_ACCEPT_UNKNOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnknownContentCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnknownContentCode::FIELD_VALUE]); $a[self::FIELD_ACCEPT_UNKNOWN_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDocument())) { - $a[self::FIELD_DOCUMENT] = $vs; + $a[self::FIELD_DOCUMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENT][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getFormat())) { $a[self::FIELD_FORMAT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FORMAT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FORMAT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FORMAT_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FORMAT_EXT] = $encs; + } } if (null !== ($v = $this->getImplementation())) { $a[self::FIELD_IMPLEMENTATION] = $v; } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConformanceStatementKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConformanceStatementKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if ([] !== ($vs = $this->getMessaging())) { - $a[self::FIELD_MESSAGING] = $vs; + $a[self::FIELD_MESSAGING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MESSAGING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getProfile())) { - $a[self::FIELD_PROFILE] = $vs; + $a[self::FIELD_PROFILE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROFILE][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if ([] !== ($vs = $this->getRest())) { - $a[self::FIELD_REST] = $vs; + $a[self::FIELD_REST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REST][] = $v; + } } if (null !== ($v = $this->getSoftware())) { $a[self::FIELD_SOFTWARE] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRContract.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRContract.php index 0313e38dd8..45c0eba302 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRContract.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRContract.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRContract extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_VALUED_ITEM = 'valuedItem'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -505,20 +505,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRDateTime) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRDateTime($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_LEGAL])) { @@ -1660,8 +1667,8 @@ public function setValuedItem(array $valuedItem = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1941,19 +1948,43 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if ([] !== ($vs = $this->getActionReason())) { - $a[self::FIELD_ACTION_REASON] = $vs; + $a[self::FIELD_ACTION_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION_REASON][] = $v; + } } if ([] !== ($vs = $this->getActor())) { - $a[self::FIELD_ACTOR] = $vs; + $a[self::FIELD_ACTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTOR][] = $v; + } } if (null !== ($v = $this->getApplies())) { $a[self::FIELD_APPLIES] = $v; } if ([] !== ($vs = $this->getAuthority())) { - $a[self::FIELD_AUTHORITY] = $vs; + $a[self::FIELD_AUTHORITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHORITY][] = $v; + } } if (null !== ($v = $this->getBindingAttachment())) { $a[self::FIELD_BINDING_ATTACHMENT] = $v; @@ -1962,44 +1993,103 @@ public function jsonSerialize() $a[self::FIELD_BINDING_REFERENCE] = $v; } if ([] !== ($vs = $this->getDomain())) { - $a[self::FIELD_DOMAIN] = $vs; + $a[self::FIELD_DOMAIN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOMAIN][] = $v; + } } if ([] !== ($vs = $this->getFriendly())) { - $a[self::FIELD_FRIENDLY] = $vs; + $a[self::FIELD_FRIENDLY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FRIENDLY][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } if ([] !== ($vs = $this->getLegal())) { - $a[self::FIELD_LEGAL] = $vs; + $a[self::FIELD_LEGAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LEGAL][] = $v; + } } if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } } if ([] !== ($vs = $this->getSigner())) { - $a[self::FIELD_SIGNER] = $vs; + $a[self::FIELD_SIGNER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SIGNER][] = $v; + } } if ([] !== ($vs = $this->getSubType())) { - $a[self::FIELD_SUB_TYPE] = $vs; + $a[self::FIELD_SUB_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_TYPE][] = $v; + } } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if ([] !== ($vs = $this->getTerm())) { - $a[self::FIELD_TERM] = $vs; + $a[self::FIELD_TERM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TERM][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getValuedItem())) { - $a[self::FIELD_VALUED_ITEM] = $vs; + $a[self::FIELD_VALUED_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUED_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCoverage.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCoverage.php index 7a023d3648..eab073c283 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRCoverage extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -324,36 +324,50 @@ public function __construct($data = null) $this->addContract(new FHIRReference($data[self::FIELD_CONTRACT])); } } - if (isset($data[self::FIELD_DEPENDENT])) { - $ext = (isset($data[self::FIELD_DEPENDENT_EXT]) && is_array($data[self::FIELD_DEPENDENT_EXT])) - ? $data[self::FIELD_DEPENDENT_EXT] - : null; - if ($data[self::FIELD_DEPENDENT] instanceof FHIRPositiveInt) { - $this->setDependent($data[self::FIELD_DEPENDENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEPENDENT])) { - $this->setDependent(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DEPENDENT]] + $ext)); - } else if (is_array($data[self::FIELD_DEPENDENT])) { - $this->setDependent(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DEPENDENT]))); - } + if (isset($data[self::FIELD_DEPENDENT]) || isset($data[self::FIELD_DEPENDENT_EXT])) { + if (isset($data[self::FIELD_DEPENDENT])) { + $value = $data[self::FIELD_DEPENDENT]; } else { - $this->setDependent(new FHIRPositiveInt($data[self::FIELD_DEPENDENT])); + $value = null; } - } - if (isset($data[self::FIELD_GROUP])) { - $ext = (isset($data[self::FIELD_GROUP_EXT]) && is_array($data[self::FIELD_GROUP_EXT])) - ? $data[self::FIELD_GROUP_EXT] - : null; - if ($data[self::FIELD_GROUP] instanceof FHIRString) { - $this->setGroup($data[self::FIELD_GROUP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUP])) { - $this->setGroup(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GROUP]] + $ext)); - } else if (is_array($data[self::FIELD_GROUP])) { - $this->setGroup(new FHIRString(array_merge($ext, $data[self::FIELD_GROUP]))); + if (isset($data[self::FIELD_DEPENDENT_EXT]) && is_array($data[self::FIELD_DEPENDENT_EXT])) { + $ext = $data[self::FIELD_DEPENDENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDependent($value); + } else if (is_array($value)) { + $this->setDependent(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDependent(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDependent(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_GROUP]) || isset($data[self::FIELD_GROUP_EXT])) { + if (isset($data[self::FIELD_GROUP])) { + $value = $data[self::FIELD_GROUP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GROUP_EXT]) && is_array($data[self::FIELD_GROUP_EXT])) { + $ext = $data[self::FIELD_GROUP_EXT]; } else { - $this->setGroup(new FHIRString($data[self::FIELD_GROUP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setGroup($value); + } else if (is_array($value)) { + $this->setGroup(new FHIRString(array_merge($ext, $value))); + } else { + $this->setGroup(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGroup(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -395,52 +409,73 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_PLAN])) { - $ext = (isset($data[self::FIELD_PLAN_EXT]) && is_array($data[self::FIELD_PLAN_EXT])) - ? $data[self::FIELD_PLAN_EXT] - : null; - if ($data[self::FIELD_PLAN] instanceof FHIRString) { - $this->setPlan($data[self::FIELD_PLAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PLAN])) { - $this->setPlan(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PLAN]] + $ext)); - } else if (is_array($data[self::FIELD_PLAN])) { - $this->setPlan(new FHIRString(array_merge($ext, $data[self::FIELD_PLAN]))); - } + if (isset($data[self::FIELD_PLAN]) || isset($data[self::FIELD_PLAN_EXT])) { + if (isset($data[self::FIELD_PLAN])) { + $value = $data[self::FIELD_PLAN]; } else { - $this->setPlan(new FHIRString($data[self::FIELD_PLAN])); + $value = null; } - } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_PLAN_EXT]) && is_array($data[self::FIELD_PLAN_EXT])) { + $ext = $data[self::FIELD_PLAN_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPlan($value); + } else if (is_array($value)) { + $this->setPlan(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPlan(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPlan(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SUB_PLAN])) { - $ext = (isset($data[self::FIELD_SUB_PLAN_EXT]) && is_array($data[self::FIELD_SUB_PLAN_EXT])) - ? $data[self::FIELD_SUB_PLAN_EXT] - : null; - if ($data[self::FIELD_SUB_PLAN] instanceof FHIRString) { - $this->setSubPlan($data[self::FIELD_SUB_PLAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUB_PLAN])) { - $this->setSubPlan(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUB_PLAN]] + $ext)); - } else if (is_array($data[self::FIELD_SUB_PLAN])) { - $this->setSubPlan(new FHIRString(array_merge($ext, $data[self::FIELD_SUB_PLAN]))); + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SUB_PLAN]) || isset($data[self::FIELD_SUB_PLAN_EXT])) { + if (isset($data[self::FIELD_SUB_PLAN])) { + $value = $data[self::FIELD_SUB_PLAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUB_PLAN_EXT]) && is_array($data[self::FIELD_SUB_PLAN_EXT])) { + $ext = $data[self::FIELD_SUB_PLAN_EXT]; } else { - $this->setSubPlan(new FHIRString($data[self::FIELD_SUB_PLAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubPlan($value); + } else if (is_array($value)) { + $this->setSubPlan(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubPlan(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubPlan(new FHIRString($ext)); } } if (isset($data[self::FIELD_SUBSCRIBER])) { @@ -1043,8 +1078,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1252,24 +1287,40 @@ public function jsonSerialize() $a[self::FIELD_BIN] = $v; } if ([] !== ($vs = $this->getContract())) { - $a[self::FIELD_CONTRACT] = $vs; + $a[self::FIELD_CONTRACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRACT][] = $v; + } } if (null !== ($v = $this->getDependent())) { $a[self::FIELD_DEPENDENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DEPENDENT_EXT] = $enc; } } if (null !== ($v = $this->getGroup())) { $a[self::FIELD_GROUP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_GROUP_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIssuer())) { $a[self::FIELD_ISSUER] = $v; @@ -1282,22 +1333,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPlan())) { $a[self::FIELD_PLAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PLAN_EXT] = $enc; } } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getSubPlan())) { $a[self::FIELD_SUB_PLAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUB_PLAN_EXT] = $enc; } } @@ -1310,6 +1367,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDataElement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDataElement.php index c31236f5ea..d69922de53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDataElement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDataElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRDataElement extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The formal description of a single piece of information that can be gathered and @@ -335,36 +335,50 @@ public function __construct($data = null) $this->addContact(new FHIRDataElementContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRString) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRString($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ELEMENT])) { @@ -385,20 +399,27 @@ public function __construct($data = null) $this->addElement(new FHIRElementDefinition($data[self::FIELD_ELEMENT])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -437,84 +458,119 @@ public function __construct($data = null) $this->addMapping(new FHIRDataElementMapping($data[self::FIELD_MAPPING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_STRINGENCY])) { - $ext = (isset($data[self::FIELD_STRINGENCY_EXT]) && is_array($data[self::FIELD_STRINGENCY_EXT])) - ? $data[self::FIELD_STRINGENCY_EXT] - : null; - if ($data[self::FIELD_STRINGENCY] instanceof FHIRDataElementStringency) { - $this->setStringency($data[self::FIELD_STRINGENCY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRINGENCY])) { - $this->setStringency(new FHIRDataElementStringency([FHIRDataElementStringency::FIELD_VALUE => $data[self::FIELD_STRINGENCY]] + $ext)); - } else if (is_array($data[self::FIELD_STRINGENCY])) { - $this->setStringency(new FHIRDataElementStringency(array_merge($ext, $data[self::FIELD_STRINGENCY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_STRINGENCY]) || isset($data[self::FIELD_STRINGENCY_EXT])) { + if (isset($data[self::FIELD_STRINGENCY])) { + $value = $data[self::FIELD_STRINGENCY]; } else { - $this->setStringency(new FHIRDataElementStringency($data[self::FIELD_STRINGENCY])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_STRINGENCY_EXT]) && is_array($data[self::FIELD_STRINGENCY_EXT])) { + $ext = $data[self::FIELD_STRINGENCY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDataElementStringency) { + $this->setStringency($value); + } else if (is_array($value)) { + $this->setStringency(new FHIRDataElementStringency(array_merge($ext, $value))); + } else { + $this->setStringency(new FHIRDataElementStringency([FHIRDataElementStringency::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStringency(new FHIRDataElementStringency($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -535,20 +591,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRCodeableConcept($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1245,8 +1308,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1496,83 +1559,134 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStringency())) { $a[self::FIELD_STRINGENCY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDataElementStringency::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDataElementStringency::FIELD_VALUE]); $a[self::FIELD_STRINGENCY_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php index 3fc7399be1..5e43a5fdfd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRDetectedIssue extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_SEVERITY_EXT = '_severity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -262,36 +262,50 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DETAIL])) { - $ext = (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) - ? $data[self::FIELD_DETAIL_EXT] - : null; - if ($data[self::FIELD_DETAIL] instanceof FHIRString) { - $this->setDetail($data[self::FIELD_DETAIL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DETAIL]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString(array_merge($ext, $data[self::FIELD_DETAIL]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DETAIL]) || isset($data[self::FIELD_DETAIL_EXT])) { + if (isset($data[self::FIELD_DETAIL])) { + $value = $data[self::FIELD_DETAIL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) { + $ext = $data[self::FIELD_DETAIL_EXT]; } else { - $this->setDetail(new FHIRString($data[self::FIELD_DETAIL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDetail($value); + } else if (is_array($value)) { + $this->setDetail(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetail(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -344,36 +358,50 @@ public function __construct($data = null) $this->setPatient(new FHIRReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRUri) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri(array_merge($ext, $data[self::FIELD_REFERENCE]))); - } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRUri($data[self::FIELD_REFERENCE])); + $value = null; } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRDetectedIssueSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRDetectedIssueSeverity([FHIRDetectedIssueSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRDetectedIssueSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReference(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; } else { - $this->setSeverity(new FHIRDetectedIssueSeverity($data[self::FIELD_SEVERITY])); + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDetectedIssueSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRDetectedIssueSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRDetectedIssueSeverity([FHIRDetectedIssueSeverity::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRDetectedIssueSeverity($ext)); } } } @@ -811,8 +839,8 @@ public function setSeverity(FHIRDetectedIssueSeverity $severity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -984,15 +1012,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DETAIL_EXT] = $enc; } } @@ -1000,28 +1032,47 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getImplicated())) { - $a[self::FIELD_IMPLICATED] = $vs; + $a[self::FIELD_IMPLICATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMPLICATED][] = $v; + } } if ([] !== ($vs = $this->getMitigation())) { - $a[self::FIELD_MITIGATION] = $vs; + $a[self::FIELD_MITIGATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MITIGATION][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDetectedIssueSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDetectedIssueSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDevice.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDevice.php index aa8c17b34b..832fb69be6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRDevice extends FHIRDomainResource implements PHPFHIRContainedTypeInter const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details for all kinds of technology mediated contact points for a person or @@ -358,20 +358,27 @@ public function __construct($data = null) $this->addContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_EXPIRY])) { - $ext = (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) - ? $data[self::FIELD_EXPIRY_EXT] - : null; - if ($data[self::FIELD_EXPIRY] instanceof FHIRDateTime) { - $this->setExpiry($data[self::FIELD_EXPIRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRY]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRY]))); - } + if (isset($data[self::FIELD_EXPIRY]) || isset($data[self::FIELD_EXPIRY_EXT])) { + if (isset($data[self::FIELD_EXPIRY])) { + $value = $data[self::FIELD_EXPIRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) { + $ext = $data[self::FIELD_EXPIRY_EXT]; } else { - $this->setExpiry(new FHIRDateTime($data[self::FIELD_EXPIRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpiry($value); + } else if (is_array($value)) { + $this->setExpiry(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpiry(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -399,68 +406,96 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); - } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); - } - } - if (isset($data[self::FIELD_MANUFACTURE_DATE])) { - $ext = (isset($data[self::FIELD_MANUFACTURE_DATE_EXT]) && is_array($data[self::FIELD_MANUFACTURE_DATE_EXT])) - ? $data[self::FIELD_MANUFACTURE_DATE_EXT] - : null; - if ($data[self::FIELD_MANUFACTURE_DATE] instanceof FHIRDateTime) { - $this->setManufactureDate($data[self::FIELD_MANUFACTURE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MANUFACTURE_DATE])) { - $this->setManufactureDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MANUFACTURE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_MANUFACTURE_DATE])) { - $this->setManufactureDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MANUFACTURE_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MANUFACTURE_DATE]) || isset($data[self::FIELD_MANUFACTURE_DATE_EXT])) { + if (isset($data[self::FIELD_MANUFACTURE_DATE])) { + $value = $data[self::FIELD_MANUFACTURE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MANUFACTURE_DATE_EXT]) && is_array($data[self::FIELD_MANUFACTURE_DATE_EXT])) { + $ext = $data[self::FIELD_MANUFACTURE_DATE_EXT]; } else { - $this->setManufactureDate(new FHIRDateTime($data[self::FIELD_MANUFACTURE_DATE])); - } - } - if (isset($data[self::FIELD_MANUFACTURER])) { - $ext = (isset($data[self::FIELD_MANUFACTURER_EXT]) && is_array($data[self::FIELD_MANUFACTURER_EXT])) - ? $data[self::FIELD_MANUFACTURER_EXT] - : null; - if ($data[self::FIELD_MANUFACTURER] instanceof FHIRString) { - $this->setManufacturer($data[self::FIELD_MANUFACTURER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MANUFACTURER])) { - $this->setManufacturer(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MANUFACTURER]] + $ext)); - } else if (is_array($data[self::FIELD_MANUFACTURER])) { - $this->setManufacturer(new FHIRString(array_merge($ext, $data[self::FIELD_MANUFACTURER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setManufactureDate($value); + } else if (is_array($value)) { + $this->setManufactureDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setManufactureDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setManufactureDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_MANUFACTURER]) || isset($data[self::FIELD_MANUFACTURER_EXT])) { + if (isset($data[self::FIELD_MANUFACTURER])) { + $value = $data[self::FIELD_MANUFACTURER]; } else { - $this->setManufacturer(new FHIRString($data[self::FIELD_MANUFACTURER])); - } - } - if (isset($data[self::FIELD_MODEL])) { - $ext = (isset($data[self::FIELD_MODEL_EXT]) && is_array($data[self::FIELD_MODEL_EXT])) - ? $data[self::FIELD_MODEL_EXT] - : null; - if ($data[self::FIELD_MODEL] instanceof FHIRString) { - $this->setModel($data[self::FIELD_MODEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODEL])) { - $this->setModel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MODEL]] + $ext)); - } else if (is_array($data[self::FIELD_MODEL])) { - $this->setModel(new FHIRString(array_merge($ext, $data[self::FIELD_MODEL]))); + $value = null; + } + if (isset($data[self::FIELD_MANUFACTURER_EXT]) && is_array($data[self::FIELD_MANUFACTURER_EXT])) { + $ext = $data[self::FIELD_MANUFACTURER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setManufacturer($value); + } else if (is_array($value)) { + $this->setManufacturer(new FHIRString(array_merge($ext, $value))); + } else { + $this->setManufacturer(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setManufacturer(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODEL]) || isset($data[self::FIELD_MODEL_EXT])) { + if (isset($data[self::FIELD_MODEL])) { + $value = $data[self::FIELD_MODEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODEL_EXT]) && is_array($data[self::FIELD_MODEL_EXT])) { + $ext = $data[self::FIELD_MODEL_EXT]; } else { - $this->setModel(new FHIRString($data[self::FIELD_MODEL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setModel($value); + } else if (is_array($value)) { + $this->setModel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setModel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setModel(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -495,20 +530,27 @@ public function __construct($data = null) $this->setPatient(new FHIRReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDeviceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDeviceStatus([FHIRDeviceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDeviceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDeviceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDeviceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDeviceStatus([FHIRDeviceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDeviceStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -518,52 +560,73 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_UDI])) { - $ext = (isset($data[self::FIELD_UDI_EXT]) && is_array($data[self::FIELD_UDI_EXT])) - ? $data[self::FIELD_UDI_EXT] - : null; - if ($data[self::FIELD_UDI] instanceof FHIRString) { - $this->setUdi($data[self::FIELD_UDI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UDI])) { - $this->setUdi(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_UDI]] + $ext)); - } else if (is_array($data[self::FIELD_UDI])) { - $this->setUdi(new FHIRString(array_merge($ext, $data[self::FIELD_UDI]))); - } + if (isset($data[self::FIELD_UDI]) || isset($data[self::FIELD_UDI_EXT])) { + if (isset($data[self::FIELD_UDI])) { + $value = $data[self::FIELD_UDI]; } else { - $this->setUdi(new FHIRString($data[self::FIELD_UDI])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_UDI_EXT]) && is_array($data[self::FIELD_UDI_EXT])) { + $ext = $data[self::FIELD_UDI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUdi($value); + } else if (is_array($value)) { + $this->setUdi(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUdi(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUdi(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1269,8 +1332,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1518,51 +1581,79 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getExpiry())) { $a[self::FIELD_EXPIRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRY_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getManufactureDate())) { $a[self::FIELD_MANUFACTURE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MANUFACTURE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getManufacturer())) { $a[self::FIELD_MANUFACTURER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MANUFACTURER_EXT] = $enc; } } if (null !== ($v = $this->getModel())) { $a[self::FIELD_MODEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MODEL_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOwner())) { $a[self::FIELD_OWNER] = $v; @@ -1572,8 +1663,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1582,25 +1675,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getUdi())) { $a[self::FIELD_UDI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_UDI_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php index b977c610e7..5910d48384 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRDeviceComponent extends FHIRDomainResource implements PHPFHIRContained const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -261,36 +261,50 @@ public function __construct($data = null) $this->setLanguageCode(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE_CODE])); } } - if (isset($data[self::FIELD_LAST_SYSTEM_CHANGE])) { - $ext = (isset($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT]) && is_array($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT])) - ? $data[self::FIELD_LAST_SYSTEM_CHANGE_EXT] - : null; - if ($data[self::FIELD_LAST_SYSTEM_CHANGE] instanceof FHIRInstant) { - $this->setLastSystemChange($data[self::FIELD_LAST_SYSTEM_CHANGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_SYSTEM_CHANGE])) { - $this->setLastSystemChange(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_LAST_SYSTEM_CHANGE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_SYSTEM_CHANGE])) { - $this->setLastSystemChange(new FHIRInstant(array_merge($ext, $data[self::FIELD_LAST_SYSTEM_CHANGE]))); - } + if (isset($data[self::FIELD_LAST_SYSTEM_CHANGE]) || isset($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT])) { + if (isset($data[self::FIELD_LAST_SYSTEM_CHANGE])) { + $value = $data[self::FIELD_LAST_SYSTEM_CHANGE]; } else { - $this->setLastSystemChange(new FHIRInstant($data[self::FIELD_LAST_SYSTEM_CHANGE])); + $value = null; } - } - if (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE])) { - $ext = (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT]) && is_array($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT])) - ? $data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT] - : null; - if ($data[self::FIELD_MEASUREMENT_PRINCIPLE] instanceof FHIRMeasmnt_Principle) { - $this->setMeasurementPrinciple($data[self::FIELD_MEASUREMENT_PRINCIPLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEASUREMENT_PRINCIPLE])) { - $this->setMeasurementPrinciple(new FHIRMeasmnt_Principle([FHIRMeasmnt_Principle::FIELD_VALUE => $data[self::FIELD_MEASUREMENT_PRINCIPLE]] + $ext)); - } else if (is_array($data[self::FIELD_MEASUREMENT_PRINCIPLE])) { - $this->setMeasurementPrinciple(new FHIRMeasmnt_Principle(array_merge($ext, $data[self::FIELD_MEASUREMENT_PRINCIPLE]))); + if (isset($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT]) && is_array($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT])) { + $ext = $data[self::FIELD_LAST_SYSTEM_CHANGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setLastSystemChange($value); + } else if (is_array($value)) { + $this->setLastSystemChange(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setLastSystemChange(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastSystemChange(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE]) || isset($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT])) { + if (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE])) { + $value = $data[self::FIELD_MEASUREMENT_PRINCIPLE]; } else { - $this->setMeasurementPrinciple(new FHIRMeasmnt_Principle($data[self::FIELD_MEASUREMENT_PRINCIPLE])); + $value = null; + } + if (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT]) && is_array($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT])) { + $ext = $data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMeasmnt_Principle) { + $this->setMeasurementPrinciple($value); + } else if (is_array($value)) { + $this->setMeasurementPrinciple(new FHIRMeasmnt_Principle(array_merge($ext, $value))); + } else { + $this->setMeasurementPrinciple(new FHIRMeasmnt_Principle([FHIRMeasmnt_Principle::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeasurementPrinciple(new FHIRMeasmnt_Principle($ext)); } } if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { @@ -782,8 +796,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -939,20 +953,30 @@ public function jsonSerialize() } if (null !== ($v = $this->getLastSystemChange())) { $a[self::FIELD_LAST_SYSTEM_CHANGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_LAST_SYSTEM_CHANGE_EXT] = $enc; } } if (null !== ($v = $this->getMeasurementPrinciple())) { $a[self::FIELD_MEASUREMENT_PRINCIPLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMeasmnt_Principle::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMeasmnt_Principle::FIELD_VALUE]); $a[self::FIELD_MEASUREMENT_PRINCIPLE_EXT] = $enc; } } if ([] !== ($vs = $this->getOperationalStatus())) { - $a[self::FIELD_OPERATIONAL_STATUS] = $vs; + $a[self::FIELD_OPERATIONAL_STATUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPERATIONAL_STATUS][] = $v; + } } if (null !== ($v = $this->getParameterGroup())) { $a[self::FIELD_PARAMETER_GROUP] = $v; @@ -961,7 +985,13 @@ public function jsonSerialize() $a[self::FIELD_PARENT] = $v; } if ([] !== ($vs = $this->getProductionSpecification())) { - $a[self::FIELD_PRODUCTION_SPECIFICATION] = $vs; + $a[self::FIELD_PRODUCTION_SPECIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRODUCTION_SPECIFICATION][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v; @@ -969,6 +999,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php index 5e1e79c6f4..9dee084019 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRDeviceMetric extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_UNIT = 'unit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes a measurement, calculation or setting capability of a medical device. @@ -278,36 +278,50 @@ public function __construct($data = null) $this->addCalibration(new FHIRDeviceMetricCalibration($data[self::FIELD_CALIBRATION])); } } - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRDeviceMetricCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRDeviceMetricCategory([FHIRDeviceMetricCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRDeviceMetricCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; } else { - $this->setCategory(new FHIRDeviceMetricCategory($data[self::FIELD_CATEGORY])); + $value = null; } - } - if (isset($data[self::FIELD_COLOR])) { - $ext = (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) - ? $data[self::FIELD_COLOR_EXT] - : null; - if ($data[self::FIELD_COLOR] instanceof FHIRDeviceMetricColor) { - $this->setColor($data[self::FIELD_COLOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRDeviceMetricColor([FHIRDeviceMetricColor::FIELD_VALUE => $data[self::FIELD_COLOR]] + $ext)); - } else if (is_array($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRDeviceMetricColor(array_merge($ext, $data[self::FIELD_COLOR]))); + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRDeviceMetricCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRDeviceMetricCategory([FHIRDeviceMetricCategory::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCategory(new FHIRDeviceMetricCategory($ext)); + } + } + if (isset($data[self::FIELD_COLOR]) || isset($data[self::FIELD_COLOR_EXT])) { + if (isset($data[self::FIELD_COLOR])) { + $value = $data[self::FIELD_COLOR]; } else { - $this->setColor(new FHIRDeviceMetricColor($data[self::FIELD_COLOR])); + $value = null; + } + if (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) { + $ext = $data[self::FIELD_COLOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricColor) { + $this->setColor($value); + } else if (is_array($value)) { + $this->setColor(new FHIRDeviceMetricColor(array_merge($ext, $value))); + } else { + $this->setColor(new FHIRDeviceMetricColor([FHIRDeviceMetricColor::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setColor(new FHIRDeviceMetricColor($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -324,20 +338,27 @@ public function __construct($data = null) $this->setMeasurementPeriod(new FHIRTiming($data[self::FIELD_MEASUREMENT_PERIOD])); } } - if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { - $ext = (isset($data[self::FIELD_OPERATIONAL_STATUS_EXT]) && is_array($data[self::FIELD_OPERATIONAL_STATUS_EXT])) - ? $data[self::FIELD_OPERATIONAL_STATUS_EXT] - : null; - if ($data[self::FIELD_OPERATIONAL_STATUS] instanceof FHIRDeviceMetricOperationalStatus) { - $this->setOperationalStatus($data[self::FIELD_OPERATIONAL_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OPERATIONAL_STATUS])) { - $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus([FHIRDeviceMetricOperationalStatus::FIELD_VALUE => $data[self::FIELD_OPERATIONAL_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_OPERATIONAL_STATUS])) { - $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus(array_merge($ext, $data[self::FIELD_OPERATIONAL_STATUS]))); - } + if (isset($data[self::FIELD_OPERATIONAL_STATUS]) || isset($data[self::FIELD_OPERATIONAL_STATUS_EXT])) { + if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { + $value = $data[self::FIELD_OPERATIONAL_STATUS]; } else { - $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus($data[self::FIELD_OPERATIONAL_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_OPERATIONAL_STATUS_EXT]) && is_array($data[self::FIELD_OPERATIONAL_STATUS_EXT])) { + $ext = $data[self::FIELD_OPERATIONAL_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricOperationalStatus) { + $this->setOperationalStatus($value); + } else if (is_array($value)) { + $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus(array_merge($ext, $value))); + } else { + $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus([FHIRDeviceMetricOperationalStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus($ext)); } } if (isset($data[self::FIELD_PARENT])) { @@ -778,8 +799,8 @@ public function setUnit(FHIRCodeableConcept $unit = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -913,19 +934,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCalibration())) { - $a[self::FIELD_CALIBRATION] = $vs; + $a[self::FIELD_CALIBRATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CALIBRATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } if (null !== ($v = $this->getColor())) { $a[self::FIELD_COLOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricColor::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricColor::FIELD_VALUE]); $a[self::FIELD_COLOR_EXT] = $enc; } } @@ -937,8 +968,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOperationalStatus())) { $a[self::FIELD_OPERATIONAL_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricOperationalStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricOperationalStatus::FIELD_VALUE]); $a[self::FIELD_OPERATIONAL_STATUS_EXT] = $enc; } } @@ -954,6 +987,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequest.php index 10f250723c..ec957a1c4f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRDeviceUseRequest extends FHIRDomainResource implements PHPFHIRContaine const FIELD_TIMING_TIMING = 'timingTiming'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -404,65 +404,88 @@ public function __construct($data = null) $this->addIndication(new FHIRCodeableConcept($data[self::FIELD_INDICATION])); } } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if (is_array($data[self::FIELD_NOTES])) { - foreach($data[self::FIELD_NOTES] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addNotes($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNotes(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNotes(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addNotes($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addNotes($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNotes(new FHIRString(array_merge($v, $iext))); + } else { + $this->addNotes(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNotes(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->addNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNotes(new FHIRString($iext)); } - } elseif ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->addNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTES])) { - $this->addNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else { - $this->addNotes(new FHIRString($data[self::FIELD_NOTES])); } } - if (isset($data[self::FIELD_ORDERED_ON])) { - $ext = (isset($data[self::FIELD_ORDERED_ON_EXT]) && is_array($data[self::FIELD_ORDERED_ON_EXT])) - ? $data[self::FIELD_ORDERED_ON_EXT] - : null; - if ($data[self::FIELD_ORDERED_ON] instanceof FHIRDateTime) { - $this->setOrderedOn($data[self::FIELD_ORDERED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDERED_ON])) { - $this->setOrderedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ORDERED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_ORDERED_ON])) { - $this->setOrderedOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ORDERED_ON]))); - } + if (isset($data[self::FIELD_ORDERED_ON]) || isset($data[self::FIELD_ORDERED_ON_EXT])) { + if (isset($data[self::FIELD_ORDERED_ON])) { + $value = $data[self::FIELD_ORDERED_ON]; } else { - $this->setOrderedOn(new FHIRDateTime($data[self::FIELD_ORDERED_ON])); + $value = null; } - } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRDeviceUseRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRDeviceUseRequestPriority([FHIRDeviceUseRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRDeviceUseRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); + if (isset($data[self::FIELD_ORDERED_ON_EXT]) && is_array($data[self::FIELD_ORDERED_ON_EXT])) { + $ext = $data[self::FIELD_ORDERED_ON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOrderedOn($value); + } else if (is_array($value)) { + $this->setOrderedOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOrderedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOrderedOn(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRDeviceUseRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceUseRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRDeviceUseRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRDeviceUseRequestPriority([FHIRDeviceUseRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRDeviceUseRequestPriority($ext)); } } if (isset($data[self::FIELD_PRN_REASON])) { @@ -483,36 +506,50 @@ public function __construct($data = null) $this->addPrnReason(new FHIRCodeableConcept($data[self::FIELD_PRN_REASON])); } } - if (isset($data[self::FIELD_RECORDED_ON])) { - $ext = (isset($data[self::FIELD_RECORDED_ON_EXT]) && is_array($data[self::FIELD_RECORDED_ON_EXT])) - ? $data[self::FIELD_RECORDED_ON_EXT] - : null; - if ($data[self::FIELD_RECORDED_ON] instanceof FHIRDateTime) { - $this->setRecordedOn($data[self::FIELD_RECORDED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED_ON])) { - $this->setRecordedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED_ON])) { - $this->setRecordedOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED_ON]))); - } + if (isset($data[self::FIELD_RECORDED_ON]) || isset($data[self::FIELD_RECORDED_ON_EXT])) { + if (isset($data[self::FIELD_RECORDED_ON])) { + $value = $data[self::FIELD_RECORDED_ON]; } else { - $this->setRecordedOn(new FHIRDateTime($data[self::FIELD_RECORDED_ON])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDeviceUseRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDeviceUseRequestStatus([FHIRDeviceUseRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDeviceUseRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_RECORDED_ON_EXT]) && is_array($data[self::FIELD_RECORDED_ON_EXT])) { + $ext = $data[self::FIELD_RECORDED_ON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecordedOn($value); + } else if (is_array($value)) { + $this->setRecordedOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecordedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRecordedOn(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDeviceUseRequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceUseRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDeviceUseRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDeviceUseRequestStatus([FHIRDeviceUseRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDeviceUseRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -522,20 +559,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -1264,8 +1308,8 @@ public function setTimingTiming(FHIRTiming $timingTiming = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1492,54 +1536,88 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIndication())) { - $a[self::FIELD_INDICATION] = $vs; + $a[self::FIELD_INDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INDICATION][] = $v; + } } if ([] !== ($vs = $this->getNotes())) { $a[self::FIELD_NOTES] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTES][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTES_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTES_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTES_EXT] = $encs; + } } if (null !== ($v = $this->getOrderedOn())) { $a[self::FIELD_ORDERED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ORDERED_ON_EXT] = $enc; } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceUseRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceUseRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getPrnReason())) { - $a[self::FIELD_PRN_REASON] = $vs; + $a[self::FIELD_PRN_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRN_REASON][] = $v; + } } if (null !== ($v = $this->getRecordedOn())) { $a[self::FIELD_RECORDED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_ON_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceUseRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceUseRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1548,8 +1626,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -1559,6 +1639,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTimingTiming())) { $a[self::FIELD_TIMING_TIMING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php index e470545155..9b274fc9da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRDeviceUseStatement extends FHIRDomainResource implements PHPFHIRContai const FIELD_WHEN_USED = 'whenUsed'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -331,49 +331,65 @@ public function __construct($data = null) $this->addIndication(new FHIRCodeableConcept($data[self::FIELD_INDICATION])); } } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if (is_array($data[self::FIELD_NOTES])) { - foreach($data[self::FIELD_NOTES] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addNotes($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNotes(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNotes(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addNotes($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addNotes($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNotes(new FHIRString(array_merge($v, $iext))); + } else { + $this->addNotes(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNotes(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->addNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNotes(new FHIRString($iext)); } - } elseif ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->addNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTES])) { - $this->addNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else { - $this->addNotes(new FHIRString($data[self::FIELD_NOTES])); } } - if (isset($data[self::FIELD_RECORDED_ON])) { - $ext = (isset($data[self::FIELD_RECORDED_ON_EXT]) && is_array($data[self::FIELD_RECORDED_ON_EXT])) - ? $data[self::FIELD_RECORDED_ON_EXT] - : null; - if ($data[self::FIELD_RECORDED_ON] instanceof FHIRDateTime) { - $this->setRecordedOn($data[self::FIELD_RECORDED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED_ON])) { - $this->setRecordedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED_ON])) { - $this->setRecordedOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED_ON]))); - } + if (isset($data[self::FIELD_RECORDED_ON]) || isset($data[self::FIELD_RECORDED_ON_EXT])) { + if (isset($data[self::FIELD_RECORDED_ON])) { + $value = $data[self::FIELD_RECORDED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_ON_EXT]) && is_array($data[self::FIELD_RECORDED_ON_EXT])) { + $ext = $data[self::FIELD_RECORDED_ON_EXT]; } else { - $this->setRecordedOn(new FHIRDateTime($data[self::FIELD_RECORDED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecordedOn($value); + } else if (is_array($value)) { + $this->setRecordedOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecordedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecordedOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -383,20 +399,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -950,8 +973,8 @@ public function setWhenUsed(FHIRPeriod $whenUsed = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1136,30 +1159,52 @@ public function jsonSerialize() $a[self::FIELD_DEVICE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIndication())) { - $a[self::FIELD_INDICATION] = $vs; + $a[self::FIELD_INDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INDICATION][] = $v; + } } if ([] !== ($vs = $this->getNotes())) { $a[self::FIELD_NOTES] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTES][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTES_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTES_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTES_EXT] = $encs; + } } if (null !== ($v = $this->getRecordedOn())) { $a[self::FIELD_RECORDED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_ON_EXT] = $enc; } } @@ -1168,8 +1213,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -1182,6 +1229,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhenUsed())) { $a[self::FIELD_WHEN_USED] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrder.php index f758b921b5..1585b20260 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRDiagnosticOrder extends FHIRDomainResource implements PHPFHIRContained const FIELD_SUPPORTING_INFORMATION = 'supportingInformation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -355,20 +355,27 @@ public function __construct($data = null) $this->setOrderer(new FHIRReference($data[self::FIELD_ORDERER])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRDiagnosticOrderPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRDiagnosticOrderPriority([FHIRDiagnosticOrderPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRDiagnosticOrderPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRDiagnosticOrderPriority($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticOrderPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRDiagnosticOrderPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRDiagnosticOrderPriority([FHIRDiagnosticOrderPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRDiagnosticOrderPriority($ext)); } } if (isset($data[self::FIELD_REASON])) { @@ -407,20 +414,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticOrderStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRDiagnosticOrderStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticOrderStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticOrderStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticOrderStatus([FHIRDiagnosticOrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticOrderStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1056,8 +1070,8 @@ public function setSupportingInformation(array $supportingInformation = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1248,37 +1262,77 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOrderer())) { $a[self::FIELD_ORDERER] = $v; } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticOrderPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticOrderPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticOrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticOrderStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1286,7 +1340,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php index db20547b29..675faa4cfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRDiagnosticReport extends FHIRDomainResource implements PHPFHIRContaine const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -400,36 +400,50 @@ public function __construct($data = null) $this->addCodedDiagnosis(new FHIRCodeableConcept($data[self::FIELD_CODED_DIAGNOSIS])); } } - if (isset($data[self::FIELD_CONCLUSION])) { - $ext = (isset($data[self::FIELD_CONCLUSION_EXT]) && is_array($data[self::FIELD_CONCLUSION_EXT])) - ? $data[self::FIELD_CONCLUSION_EXT] - : null; - if ($data[self::FIELD_CONCLUSION] instanceof FHIRString) { - $this->setConclusion($data[self::FIELD_CONCLUSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONCLUSION])) { - $this->setConclusion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONCLUSION]] + $ext)); - } else if (is_array($data[self::FIELD_CONCLUSION])) { - $this->setConclusion(new FHIRString(array_merge($ext, $data[self::FIELD_CONCLUSION]))); - } + if (isset($data[self::FIELD_CONCLUSION]) || isset($data[self::FIELD_CONCLUSION_EXT])) { + if (isset($data[self::FIELD_CONCLUSION])) { + $value = $data[self::FIELD_CONCLUSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONCLUSION_EXT]) && is_array($data[self::FIELD_CONCLUSION_EXT])) { + $ext = $data[self::FIELD_CONCLUSION_EXT]; } else { - $this->setConclusion(new FHIRString($data[self::FIELD_CONCLUSION])); - } - } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setConclusion($value); + } else if (is_array($value)) { + $this->setConclusion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setConclusion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConclusion(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -500,20 +514,27 @@ public function __construct($data = null) $this->addImagingStudy(new FHIRReference($data[self::FIELD_IMAGING_STUDY])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRInstant) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRInstant($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -595,20 +616,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticReportStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticReportStatus([FHIRDiagnosticReportStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticReportStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRDiagnosticReportStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticReportStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticReportStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticReportStatus([FHIRDiagnosticReportStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticReportStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1497,8 +1525,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1759,19 +1787,29 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getCodedDiagnosis())) { - $a[self::FIELD_CODED_DIAGNOSIS] = $vs; + $a[self::FIELD_CODED_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODED_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getConclusion())) { $a[self::FIELD_CONCLUSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONCLUSION_EXT] = $enc; } } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -1782,18 +1820,38 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getImage())) { - $a[self::FIELD_IMAGE] = $vs; + $a[self::FIELD_IMAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGE][] = $v; + } } if ([] !== ($vs = $this->getImagingStudy())) { - $a[self::FIELD_IMAGING_STUDY] = $vs; + $a[self::FIELD_IMAGING_STUDY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGING_STUDY][] = $v; + } } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } @@ -1801,27 +1859,56 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getPresentedForm())) { - $a[self::FIELD_PRESENTED_FORM] = $vs; + $a[self::FIELD_PRESENTED_FORM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRESENTED_FORM][] = $v; + } } if ([] !== ($vs = $this->getRequest())) { - $a[self::FIELD_REQUEST] = $vs; + $a[self::FIELD_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUEST][] = $v; + } } if ([] !== ($vs = $this->getResult())) { - $a[self::FIELD_RESULT] = $vs; + $a[self::FIELD_RESULT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESULT][] = $v; + } } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticReportStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticReportStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php index aca57faf98..27e1abc147 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRDocumentManifest extends FHIRDomainResource implements PHPFHIRContaine const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -317,36 +317,50 @@ public function __construct($data = null) $this->addContent(new FHIRDocumentManifestContent($data[self::FIELD_CONTENT])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -410,36 +424,50 @@ public function __construct($data = null) $this->addRelated(new FHIRDocumentManifestRelated($data[self::FIELD_RELATED])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1044,8 +1072,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1251,48 +1279,86 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMasterIdentifier())) { $a[self::FIELD_MASTER_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1302,6 +1368,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php index d4c957d6ee..fa2ef4aedd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRDocumentReference extends FHIRDomainResource implements PHPFHIRContain const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -405,20 +405,27 @@ public function __construct($data = null) $this->setContext(new FHIRDocumentReferenceContext($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_CUSTODIAN])) { @@ -428,20 +435,27 @@ public function __construct($data = null) $this->setCustodian(new FHIRReference($data[self::FIELD_CUSTODIAN])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOC_STATUS])) { @@ -469,20 +483,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INDEXED])) { - $ext = (isset($data[self::FIELD_INDEXED_EXT]) && is_array($data[self::FIELD_INDEXED_EXT])) - ? $data[self::FIELD_INDEXED_EXT] - : null; - if ($data[self::FIELD_INDEXED] instanceof FHIRInstant) { - $this->setIndexed($data[self::FIELD_INDEXED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INDEXED])) { - $this->setIndexed(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_INDEXED]] + $ext)); - } else if (is_array($data[self::FIELD_INDEXED])) { - $this->setIndexed(new FHIRInstant(array_merge($ext, $data[self::FIELD_INDEXED]))); - } + if (isset($data[self::FIELD_INDEXED]) || isset($data[self::FIELD_INDEXED_EXT])) { + if (isset($data[self::FIELD_INDEXED])) { + $value = $data[self::FIELD_INDEXED]; } else { - $this->setIndexed(new FHIRInstant($data[self::FIELD_INDEXED])); + $value = null; + } + if (isset($data[self::FIELD_INDEXED_EXT]) && is_array($data[self::FIELD_INDEXED_EXT])) { + $ext = $data[self::FIELD_INDEXED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIndexed($value); + } else if (is_array($value)) { + $this->setIndexed(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIndexed(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIndexed(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_MASTER_IDENTIFIER])) { @@ -528,20 +549,27 @@ public function __construct($data = null) $this->addSecurityLabel(new FHIRCodeableConcept($data[self::FIELD_SECURITY_LABEL])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1313,8 +1341,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1553,21 +1581,35 @@ public function jsonSerialize() $a[self::FIELD_AUTHENTICATOR] = $v; } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v; } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } @@ -1576,8 +1618,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1585,12 +1629,20 @@ public function jsonSerialize() $a[self::FIELD_DOC_STATUS] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIndexed())) { $a[self::FIELD_INDEXED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_INDEXED_EXT] = $enc; } } @@ -1598,15 +1650,29 @@ public function jsonSerialize() $a[self::FIELD_MASTER_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getRelatesTo())) { - $a[self::FIELD_RELATES_TO] = $vs; + $a[self::FIELD_RELATES_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATES_TO][] = $v; + } } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1616,6 +1682,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php index 8daea1a38a..91a75220d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIREligibilityRequest extends FHIRDomainResource implements PHPFHIRContai const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -199,20 +199,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -557,8 +564,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -683,13 +690,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -706,6 +721,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php index 9a59f7ac76..b8f88d50a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIREligibilityResponse extends FHIRDomainResource implements PHPFHIRConta const FIELD_RULESET = 'ruleset'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -240,36 +240,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -304,20 +318,27 @@ public function __construct($data = null) $this->setOriginalRuleset(new FHIRCoding($data[self::FIELD_ORIGINAL_RULESET])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRCode) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; } else { - $this->setOutcome(new FHIRCode($data[self::FIELD_OUTCOME])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRCode($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -745,8 +766,8 @@ public function setRuleset(FHIRCoding $ruleset = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -905,20 +926,30 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -928,8 +959,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -945,6 +978,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRuleset())) { $a[self::FIELD_RULESET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREncounter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREncounter.php index 6870ecff3a..d357809b9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREncounter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREncounter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIREncounter extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -365,20 +365,27 @@ public function __construct($data = null) $this->setAppointment(new FHIRReference($data[self::FIELD_APPOINTMENT])); } } - if (isset($data[self::FIELD_CLASS])) { - $ext = (isset($data[self::FIELD_CLASS_EXT]) && is_array($data[self::FIELD_CLASS_EXT])) - ? $data[self::FIELD_CLASS_EXT] - : null; - if ($data[self::FIELD_CLASS] instanceof FHIREncounterClass) { - $this->setClass($data[self::FIELD_CLASS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLASS])) { - $this->setClass(new FHIREncounterClass([FHIREncounterClass::FIELD_VALUE => $data[self::FIELD_CLASS]] + $ext)); - } else if (is_array($data[self::FIELD_CLASS])) { - $this->setClass(new FHIREncounterClass(array_merge($ext, $data[self::FIELD_CLASS]))); - } + if (isset($data[self::FIELD_CLASS]) || isset($data[self::FIELD_CLASS_EXT])) { + if (isset($data[self::FIELD_CLASS])) { + $value = $data[self::FIELD_CLASS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CLASS_EXT]) && is_array($data[self::FIELD_CLASS_EXT])) { + $ext = $data[self::FIELD_CLASS_EXT]; } else { - $this->setClass(new FHIREncounterClass($data[self::FIELD_CLASS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterClass) { + $this->setClass($value); + } else if (is_array($value)) { + $this->setClass(new FHIREncounterClass(array_merge($ext, $value))); + } else { + $this->setClass(new FHIREncounterClass([FHIREncounterClass::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setClass(new FHIREncounterClass($ext)); } } if (isset($data[self::FIELD_EPISODE_OF_CARE])) { @@ -556,20 +563,27 @@ public function __construct($data = null) $this->setServiceProvider(new FHIRReference($data[self::FIELD_SERVICE_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterState) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterState([FHIREncounterState::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterState(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREncounterState($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterState) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterState(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterState([FHIREncounterState::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterState($ext)); } } if (isset($data[self::FIELD_STATUS_HISTORY])) { @@ -1483,8 +1497,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1732,37 +1746,75 @@ public function jsonSerialize() } if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterClass::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterClass::FIELD_VALUE]); $a[self::FIELD_CLASS_EXT] = $enc; } } if ([] !== ($vs = $this->getEpisodeOfCare())) { - $a[self::FIELD_EPISODE_OF_CARE] = $vs; + $a[self::FIELD_EPISODE_OF_CARE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EPISODE_OF_CARE][] = $v; + } } if (null !== ($v = $this->getHospitalization())) { $a[self::FIELD_HOSPITALIZATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIncomingReferral())) { - $a[self::FIELD_INCOMING_REFERRAL] = $vs; + $a[self::FIELD_INCOMING_REFERRAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INCOMING_REFERRAL][] = $v; + } } if ([] !== ($vs = $this->getIndication())) { - $a[self::FIELD_INDICATION] = $vs; + $a[self::FIELD_INDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INDICATION][] = $v; + } } if (null !== ($v = $this->getLength())) { $a[self::FIELD_LENGTH] = $v; } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getPartOf())) { $a[self::FIELD_PART_OF] = $v; } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -1774,23 +1826,46 @@ public function jsonSerialize() $a[self::FIELD_PRIORITY] = $v; } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if (null !== ($v = $this->getServiceProvider())) { $a[self::FIELD_SERVICE_PROVIDER] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterState::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterState::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStatusHistory())) { - $a[self::FIELD_STATUS_HISTORY] = $vs; + $a[self::FIELD_STATUS_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STATUS_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php index b031128672..04fa8ee118 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIREnrollmentRequest extends FHIRDomainResource implements PHPFHIRContain const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -242,20 +242,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -704,8 +711,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -851,13 +858,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -880,6 +895,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php index ad35b9cbe8..64011daef7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIREnrollmentResponse extends FHIRDomainResource implements PHPFHIRContai const FIELD_RULESET = 'ruleset'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -240,36 +240,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -304,20 +318,27 @@ public function __construct($data = null) $this->setOriginalRuleset(new FHIRCoding($data[self::FIELD_ORIGINAL_RULESET])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRCode) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; } else { - $this->setOutcome(new FHIRCode($data[self::FIELD_OUTCOME])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRCode($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -745,8 +766,8 @@ public function setRuleset(FHIRCoding $ruleset = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -905,20 +926,30 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -928,8 +959,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -945,6 +978,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRuleset())) { $a[self::FIELD_RULESET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php index 2f4435447f..9bff30aca2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIREpisodeOfCare extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -353,20 +353,27 @@ public function __construct($data = null) $this->addReferralRequest(new FHIRReference($data[self::FIELD_REFERRAL_REQUEST])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREpisodeOfCareStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREpisodeOfCareStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREpisodeOfCareStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREpisodeOfCareStatus($ext)); } } if (isset($data[self::FIELD_STATUS_HISTORY])) { @@ -946,8 +953,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1125,13 +1132,31 @@ public function jsonSerialize() $a[self::FIELD_CARE_MANAGER] = $v; } if ([] !== ($vs = $this->getCareTeam())) { - $a[self::FIELD_CARE_TEAM] = $vs; + $a[self::FIELD_CARE_TEAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CARE_TEAM][] = $v; + } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; @@ -1143,20 +1168,43 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getReferralRequest())) { - $a[self::FIELD_REFERRAL_REQUEST] = $vs; + $a[self::FIELD_REFERRAL_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERRAL_REQUEST][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREpisodeOfCareStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREpisodeOfCareStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStatusHistory())) { - $a[self::FIELD_STATUS_HISTORY] = $vs; + $a[self::FIELD_STATUS_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STATUS_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php index 8693f4295a..75d597c0e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRExplanationOfBenefit extends FHIRDomainResource implements PHPFHIRCont const FIELD_RULESET = 'ruleset'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -241,36 +241,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -305,20 +319,27 @@ public function __construct($data = null) $this->setOriginalRuleset(new FHIRCoding($data[self::FIELD_ORIGINAL_RULESET])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRCode) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; } else { - $this->setOutcome(new FHIRCode($data[self::FIELD_OUTCOME])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRCode($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -746,8 +767,8 @@ public function setRuleset(FHIRCoding $ruleset = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -906,20 +927,30 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -929,8 +960,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -946,6 +979,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRuleset())) { $a[self::FIELD_RULESET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php index f587bd274d..73615932c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRFamilyMemberHistory extends FHIRDomainResource implements PHPFHIRConta const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The actual or approximate age of the relative at the time the family member @@ -399,36 +399,50 @@ public function __construct($data = null) $this->setAgeRange(new FHIRRange($data[self::FIELD_AGE_RANGE])); } } - if (isset($data[self::FIELD_AGE_STRING])) { - $ext = (isset($data[self::FIELD_AGE_STRING_EXT]) && is_array($data[self::FIELD_AGE_STRING_EXT])) - ? $data[self::FIELD_AGE_STRING_EXT] - : null; - if ($data[self::FIELD_AGE_STRING] instanceof FHIRString) { - $this->setAgeString($data[self::FIELD_AGE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AGE_STRING])) { - $this->setAgeString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AGE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AGE_STRING])) { - $this->setAgeString(new FHIRString(array_merge($ext, $data[self::FIELD_AGE_STRING]))); - } + if (isset($data[self::FIELD_AGE_STRING]) || isset($data[self::FIELD_AGE_STRING_EXT])) { + if (isset($data[self::FIELD_AGE_STRING])) { + $value = $data[self::FIELD_AGE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AGE_STRING_EXT]) && is_array($data[self::FIELD_AGE_STRING_EXT])) { + $ext = $data[self::FIELD_AGE_STRING_EXT]; } else { - $this->setAgeString(new FHIRString($data[self::FIELD_AGE_STRING])); - } - } - if (isset($data[self::FIELD_BORN_DATE])) { - $ext = (isset($data[self::FIELD_BORN_DATE_EXT]) && is_array($data[self::FIELD_BORN_DATE_EXT])) - ? $data[self::FIELD_BORN_DATE_EXT] - : null; - if ($data[self::FIELD_BORN_DATE] instanceof FHIRDate) { - $this->setBornDate($data[self::FIELD_BORN_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BORN_DATE])) { - $this->setBornDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BORN_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BORN_DATE])) { - $this->setBornDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BORN_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAgeString($value); + } else if (is_array($value)) { + $this->setAgeString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAgeString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAgeString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_BORN_DATE]) || isset($data[self::FIELD_BORN_DATE_EXT])) { + if (isset($data[self::FIELD_BORN_DATE])) { + $value = $data[self::FIELD_BORN_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BORN_DATE_EXT]) && is_array($data[self::FIELD_BORN_DATE_EXT])) { + $ext = $data[self::FIELD_BORN_DATE_EXT]; } else { - $this->setBornDate(new FHIRDate($data[self::FIELD_BORN_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBornDate($value); + } else if (is_array($value)) { + $this->setBornDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBornDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBornDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_BORN_PERIOD])) { @@ -438,20 +452,27 @@ public function __construct($data = null) $this->setBornPeriod(new FHIRPeriod($data[self::FIELD_BORN_PERIOD])); } } - if (isset($data[self::FIELD_BORN_STRING])) { - $ext = (isset($data[self::FIELD_BORN_STRING_EXT]) && is_array($data[self::FIELD_BORN_STRING_EXT])) - ? $data[self::FIELD_BORN_STRING_EXT] - : null; - if ($data[self::FIELD_BORN_STRING] instanceof FHIRString) { - $this->setBornString($data[self::FIELD_BORN_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BORN_STRING])) { - $this->setBornString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BORN_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_BORN_STRING])) { - $this->setBornString(new FHIRString(array_merge($ext, $data[self::FIELD_BORN_STRING]))); - } + if (isset($data[self::FIELD_BORN_STRING]) || isset($data[self::FIELD_BORN_STRING_EXT])) { + if (isset($data[self::FIELD_BORN_STRING])) { + $value = $data[self::FIELD_BORN_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BORN_STRING_EXT]) && is_array($data[self::FIELD_BORN_STRING_EXT])) { + $ext = $data[self::FIELD_BORN_STRING_EXT]; } else { - $this->setBornString(new FHIRString($data[self::FIELD_BORN_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBornString($value); + } else if (is_array($value)) { + $this->setBornString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBornString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBornString(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONDITION])) { @@ -472,52 +493,73 @@ public function __construct($data = null) $this->addCondition(new FHIRFamilyMemberHistoryCondition($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) - ? $data[self::FIELD_DECEASED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DECEASED_BOOLEAN] instanceof FHIRBoolean) { - $this->setDeceasedBoolean($data[self::FIELD_DECEASED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DECEASED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DECEASED_BOOLEAN]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DECEASED_BOOLEAN]) || isset($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { + $value = $data[self::FIELD_DECEASED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DECEASED_BOOLEAN_EXT]; } else { - $this->setDeceasedBoolean(new FHIRBoolean($data[self::FIELD_DECEASED_BOOLEAN])); - } - } - if (isset($data[self::FIELD_DECEASED_DATE])) { - $ext = (isset($data[self::FIELD_DECEASED_DATE_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_EXT])) - ? $data[self::FIELD_DECEASED_DATE_EXT] - : null; - if ($data[self::FIELD_DECEASED_DATE] instanceof FHIRDate) { - $this->setDeceasedDate($data[self::FIELD_DECEASED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_DATE])) { - $this->setDeceasedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DECEASED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_DATE])) { - $this->setDeceasedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DECEASED_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeceasedBoolean($value); + } else if (is_array($value)) { + $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DECEASED_DATE]) || isset($data[self::FIELD_DECEASED_DATE_EXT])) { + if (isset($data[self::FIELD_DECEASED_DATE])) { + $value = $data[self::FIELD_DECEASED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DECEASED_DATE_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_EXT])) { + $ext = $data[self::FIELD_DECEASED_DATE_EXT]; } else { - $this->setDeceasedDate(new FHIRDate($data[self::FIELD_DECEASED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDeceasedDate($value); + } else if (is_array($value)) { + $this->setDeceasedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDeceasedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeceasedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_DECEASED_QUANTITY])) { @@ -534,36 +576,50 @@ public function __construct($data = null) $this->setDeceasedRange(new FHIRRange($data[self::FIELD_DECEASED_RANGE])); } } - if (isset($data[self::FIELD_DECEASED_STRING])) { - $ext = (isset($data[self::FIELD_DECEASED_STRING_EXT]) && is_array($data[self::FIELD_DECEASED_STRING_EXT])) - ? $data[self::FIELD_DECEASED_STRING_EXT] - : null; - if ($data[self::FIELD_DECEASED_STRING] instanceof FHIRString) { - $this->setDeceasedString($data[self::FIELD_DECEASED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_STRING])) { - $this->setDeceasedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DECEASED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_STRING])) { - $this->setDeceasedString(new FHIRString(array_merge($ext, $data[self::FIELD_DECEASED_STRING]))); - } + if (isset($data[self::FIELD_DECEASED_STRING]) || isset($data[self::FIELD_DECEASED_STRING_EXT])) { + if (isset($data[self::FIELD_DECEASED_STRING])) { + $value = $data[self::FIELD_DECEASED_STRING]; } else { - $this->setDeceasedString(new FHIRString($data[self::FIELD_DECEASED_STRING])); - } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRCode) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode(array_merge($ext, $data[self::FIELD_GENDER]))); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_STRING_EXT]) && is_array($data[self::FIELD_DECEASED_STRING_EXT])) { + $ext = $data[self::FIELD_DECEASED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeceasedString($value); + } else if (is_array($value)) { + $this->setDeceasedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeceasedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRCode($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRCode($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -584,20 +640,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -621,20 +684,27 @@ public function __construct($data = null) $this->setRelationship(new FHIRCodeableConcept($data[self::FIELD_RELATIONSHIP])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFamilyHistoryStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFamilyHistoryStatus([FHIRFamilyHistoryStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFamilyHistoryStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFamilyHistoryStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFamilyHistoryStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFamilyHistoryStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFamilyHistoryStatus([FHIRFamilyHistoryStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFamilyHistoryStatus($ext)); } } } @@ -1433,8 +1503,8 @@ public function setStatus(FHIRFamilyHistoryStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1714,15 +1784,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAgeString())) { $a[self::FIELD_AGE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AGE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getBornDate())) { $a[self::FIELD_BORN_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BORN_DATE_EXT] = $enc; } } @@ -1731,32 +1805,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getBornString())) { $a[self::FIELD_BORN_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BORN_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDeceasedBoolean())) { $a[self::FIELD_DECEASED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DECEASED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDeceasedDate())) { $a[self::FIELD_DECEASED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DECEASED_DATE_EXT] = $enc; } } @@ -1768,25 +1856,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDeceasedString())) { $a[self::FIELD_DECEASED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DECEASED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1801,11 +1901,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFamilyHistoryStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFamilyHistoryStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFlag.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFlag.php index d0742797cc..cb57465407 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFlag.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRFlag.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRFlag extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -265,20 +265,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFlagStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFlagStatus([FHIRFlagStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFlagStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFlagStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFlagStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFlagStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFlagStatus([FHIRFlagStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFlagStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -601,8 +608,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -736,21 +743,32 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFlagStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFlagStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGoal.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGoal.php index 2e8619c026..895c71c992 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRGoal extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_TARGET_QUANTITY = 'targetQuantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -368,20 +368,27 @@ public function __construct($data = null) $this->addCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -452,52 +459,73 @@ public function __construct($data = null) $this->setStartCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_START_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_START_DATE])) { - $ext = (isset($data[self::FIELD_START_DATE_EXT]) && is_array($data[self::FIELD_START_DATE_EXT])) - ? $data[self::FIELD_START_DATE_EXT] - : null; - if ($data[self::FIELD_START_DATE] instanceof FHIRDate) { - $this->setStartDate($data[self::FIELD_START_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START_DATE])) { - $this->setStartDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_START_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_START_DATE])) { - $this->setStartDate(new FHIRDate(array_merge($ext, $data[self::FIELD_START_DATE]))); - } + if (isset($data[self::FIELD_START_DATE]) || isset($data[self::FIELD_START_DATE_EXT])) { + if (isset($data[self::FIELD_START_DATE])) { + $value = $data[self::FIELD_START_DATE]; } else { - $this->setStartDate(new FHIRDate($data[self::FIELD_START_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRGoalStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRGoalStatus([FHIRGoalStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRGoalStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_START_DATE_EXT]) && is_array($data[self::FIELD_START_DATE_EXT])) { + $ext = $data[self::FIELD_START_DATE_EXT]; } else { - $this->setStatus(new FHIRGoalStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setStartDate($value); + } else if (is_array($value)) { + $this->setStartDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setStartDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStartDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_STATUS_DATE])) { - $ext = (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) - ? $data[self::FIELD_STATUS_DATE_EXT] - : null; - if ($data[self::FIELD_STATUS_DATE] instanceof FHIRDate) { - $this->setStatusDate($data[self::FIELD_STATUS_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_STATUS_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDate(array_merge($ext, $data[self::FIELD_STATUS_DATE]))); + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGoalStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRGoalStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRGoalStatus([FHIRGoalStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRGoalStatus($ext)); + } + } + if (isset($data[self::FIELD_STATUS_DATE]) || isset($data[self::FIELD_STATUS_DATE_EXT])) { + if (isset($data[self::FIELD_STATUS_DATE])) { + $value = $data[self::FIELD_STATUS_DATE]; } else { - $this->setStatusDate(new FHIRDate($data[self::FIELD_STATUS_DATE])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) { + $ext = $data[self::FIELD_STATUS_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setStatusDate($value); + } else if (is_array($value)) { + $this->setStatusDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setStatusDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatusDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -514,20 +542,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TARGET_DATE])) { - $ext = (isset($data[self::FIELD_TARGET_DATE_EXT]) && is_array($data[self::FIELD_TARGET_DATE_EXT])) - ? $data[self::FIELD_TARGET_DATE_EXT] - : null; - if ($data[self::FIELD_TARGET_DATE] instanceof FHIRDate) { - $this->setTargetDate($data[self::FIELD_TARGET_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_DATE])) { - $this->setTargetDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_TARGET_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_DATE])) { - $this->setTargetDate(new FHIRDate(array_merge($ext, $data[self::FIELD_TARGET_DATE]))); - } + if (isset($data[self::FIELD_TARGET_DATE]) || isset($data[self::FIELD_TARGET_DATE_EXT])) { + if (isset($data[self::FIELD_TARGET_DATE])) { + $value = $data[self::FIELD_TARGET_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_DATE_EXT]) && is_array($data[self::FIELD_TARGET_DATE_EXT])) { + $ext = $data[self::FIELD_TARGET_DATE_EXT]; } else { - $this->setTargetDate(new FHIRDate($data[self::FIELD_TARGET_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setTargetDate($value); + } else if (is_array($value)) { + $this->setTargetDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setTargetDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTargetDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_TARGET_QUANTITY])) { @@ -1247,8 +1282,8 @@ public function setTargetQuantity(FHIRDuration $targetQuantity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1478,29 +1513,61 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAddresses())) { - $a[self::FIELD_ADDRESSES] = $vs; + $a[self::FIELD_ADDRESSES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESSES][] = $v; + } } if (null !== ($v = $this->getAuthor())) { $a[self::FIELD_AUTHOR] = $v; } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getOutcome())) { - $a[self::FIELD_OUTCOME] = $vs; + $a[self::FIELD_OUTCOME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v; @@ -1510,22 +1577,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getStartDate())) { $a[self::FIELD_START_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_START_DATE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGoalStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGoalStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStatusDate())) { $a[self::FIELD_STATUS_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_STATUS_DATE_EXT] = $enc; } } @@ -1537,14 +1610,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTargetDate())) { $a[self::FIELD_TARGET_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_TARGET_DATE_EXT] = $enc; } } if (null !== ($v = $this->getTargetQuantity())) { $a[self::FIELD_TARGET_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGroup.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGroup.php index dbd393b534..304591b3b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRGroup extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -215,20 +215,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTUAL])) { - $ext = (isset($data[self::FIELD_ACTUAL_EXT]) && is_array($data[self::FIELD_ACTUAL_EXT])) - ? $data[self::FIELD_ACTUAL_EXT] - : null; - if ($data[self::FIELD_ACTUAL] instanceof FHIRBoolean) { - $this->setActual($data[self::FIELD_ACTUAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTUAL])) { - $this->setActual(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTUAL]] + $ext)); - } else if (is_array($data[self::FIELD_ACTUAL])) { - $this->setActual(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTUAL]))); - } + if (isset($data[self::FIELD_ACTUAL]) || isset($data[self::FIELD_ACTUAL_EXT])) { + if (isset($data[self::FIELD_ACTUAL])) { + $value = $data[self::FIELD_ACTUAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTUAL_EXT]) && is_array($data[self::FIELD_ACTUAL_EXT])) { + $ext = $data[self::FIELD_ACTUAL_EXT]; } else { - $this->setActual(new FHIRBoolean($data[self::FIELD_ACTUAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActual($value); + } else if (is_array($value)) { + $this->setActual(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActual(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActual(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CHARACTERISTIC])) { @@ -292,52 +299,73 @@ public function __construct($data = null) $this->addMember(new FHIRGroupMember($data[self::FIELD_MEMBER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_QUANTITY])) { - $ext = (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) - ? $data[self::FIELD_QUANTITY_EXT] - : null; - if ($data[self::FIELD_QUANTITY] instanceof FHIRUnsignedInt) { - $this->setQuantity($data[self::FIELD_QUANTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_QUANTITY]] + $ext)); - } else if (is_array($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_QUANTITY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_QUANTITY]) || isset($data[self::FIELD_QUANTITY_EXT])) { + if (isset($data[self::FIELD_QUANTITY])) { + $value = $data[self::FIELD_QUANTITY]; } else { - $this->setQuantity(new FHIRUnsignedInt($data[self::FIELD_QUANTITY])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRGroupType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGroupType([FHIRGroupType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGroupType(array_merge($ext, $data[self::FIELD_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) { + $ext = $data[self::FIELD_QUANTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setQuantity($value); + } else if (is_array($value)) { + $this->setQuantity(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setQuantity(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setQuantity(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRGroupType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGroupType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRGroupType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRGroupType([FHIRGroupType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRGroupType($ext)); } } } @@ -719,8 +747,8 @@ public function setType(FHIRGroupType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -881,44 +909,73 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActual())) { $a[self::FIELD_ACTUAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTUAL_EXT] = $enc; } } if ([] !== ($vs = $this->getCharacteristic())) { - $a[self::FIELD_CHARACTERISTIC] = $vs; + $a[self::FIELD_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTIC][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getMember())) { - $a[self::FIELD_MEMBER] = $vs; + $a[self::FIELD_MEMBER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEMBER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_QUANTITY_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGroupType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGroupType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php index 9117f05077..039f9c59aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRHealthcareService extends FHIRDomainResource implements PHPFHIRContain const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -400,36 +400,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPOINTMENT_REQUIRED])) { - $ext = (isset($data[self::FIELD_APPOINTMENT_REQUIRED_EXT]) && is_array($data[self::FIELD_APPOINTMENT_REQUIRED_EXT])) - ? $data[self::FIELD_APPOINTMENT_REQUIRED_EXT] - : null; - if ($data[self::FIELD_APPOINTMENT_REQUIRED] instanceof FHIRBoolean) { - $this->setAppointmentRequired($data[self::FIELD_APPOINTMENT_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPOINTMENT_REQUIRED])) { - $this->setAppointmentRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_APPOINTMENT_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_APPOINTMENT_REQUIRED])) { - $this->setAppointmentRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_APPOINTMENT_REQUIRED]))); - } + if (isset($data[self::FIELD_APPOINTMENT_REQUIRED]) || isset($data[self::FIELD_APPOINTMENT_REQUIRED_EXT])) { + if (isset($data[self::FIELD_APPOINTMENT_REQUIRED])) { + $value = $data[self::FIELD_APPOINTMENT_REQUIRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPOINTMENT_REQUIRED_EXT]) && is_array($data[self::FIELD_APPOINTMENT_REQUIRED_EXT])) { + $ext = $data[self::FIELD_APPOINTMENT_REQUIRED_EXT]; } else { - $this->setAppointmentRequired(new FHIRBoolean($data[self::FIELD_APPOINTMENT_REQUIRED])); - } - } - if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY_EXCEPTIONS] instanceof FHIRString) { - $this->setAvailabilityExceptions($data[self::FIELD_AVAILABILITY_EXCEPTIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AVAILABILITY_EXCEPTIONS]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $data[self::FIELD_AVAILABILITY_EXCEPTIONS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAppointmentRequired($value); + } else if (is_array($value)) { + $this->setAppointmentRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAppointmentRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAppointmentRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS]) || isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $value = $data[self::FIELD_AVAILABILITY_EXCEPTIONS]; } else { - $this->setAvailabilityExceptions(new FHIRString($data[self::FIELD_AVAILABILITY_EXCEPTIONS])); + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAvailabilityExceptions($value); + } else if (is_array($value)) { + $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailabilityExceptions(new FHIRString($ext)); } } if (isset($data[self::FIELD_AVAILABLE_TIME])) { @@ -468,20 +482,27 @@ public function __construct($data = null) $this->addCharacteristic(new FHIRCodeableConcept($data[self::FIELD_CHARACTERISTIC])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_COVERAGE_AREA])) { @@ -509,36 +530,50 @@ public function __construct($data = null) $this->setEligibility(new FHIRCodeableConcept($data[self::FIELD_ELIGIBILITY])); } } - if (isset($data[self::FIELD_ELIGIBILITY_NOTE])) { - $ext = (isset($data[self::FIELD_ELIGIBILITY_NOTE_EXT]) && is_array($data[self::FIELD_ELIGIBILITY_NOTE_EXT])) - ? $data[self::FIELD_ELIGIBILITY_NOTE_EXT] - : null; - if ($data[self::FIELD_ELIGIBILITY_NOTE] instanceof FHIRString) { - $this->setEligibilityNote($data[self::FIELD_ELIGIBILITY_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ELIGIBILITY_NOTE])) { - $this->setEligibilityNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ELIGIBILITY_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_ELIGIBILITY_NOTE])) { - $this->setEligibilityNote(new FHIRString(array_merge($ext, $data[self::FIELD_ELIGIBILITY_NOTE]))); - } + if (isset($data[self::FIELD_ELIGIBILITY_NOTE]) || isset($data[self::FIELD_ELIGIBILITY_NOTE_EXT])) { + if (isset($data[self::FIELD_ELIGIBILITY_NOTE])) { + $value = $data[self::FIELD_ELIGIBILITY_NOTE]; } else { - $this->setEligibilityNote(new FHIRString($data[self::FIELD_ELIGIBILITY_NOTE])); - } - } - if (isset($data[self::FIELD_EXTRA_DETAILS])) { - $ext = (isset($data[self::FIELD_EXTRA_DETAILS_EXT]) && is_array($data[self::FIELD_EXTRA_DETAILS_EXT])) - ? $data[self::FIELD_EXTRA_DETAILS_EXT] - : null; - if ($data[self::FIELD_EXTRA_DETAILS] instanceof FHIRString) { - $this->setExtraDetails($data[self::FIELD_EXTRA_DETAILS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXTRA_DETAILS])) { - $this->setExtraDetails(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXTRA_DETAILS]] + $ext)); - } else if (is_array($data[self::FIELD_EXTRA_DETAILS])) { - $this->setExtraDetails(new FHIRString(array_merge($ext, $data[self::FIELD_EXTRA_DETAILS]))); + $value = null; + } + if (isset($data[self::FIELD_ELIGIBILITY_NOTE_EXT]) && is_array($data[self::FIELD_ELIGIBILITY_NOTE_EXT])) { + $ext = $data[self::FIELD_ELIGIBILITY_NOTE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setEligibilityNote($value); + } else if (is_array($value)) { + $this->setEligibilityNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setEligibilityNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEligibilityNote(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXTRA_DETAILS]) || isset($data[self::FIELD_EXTRA_DETAILS_EXT])) { + if (isset($data[self::FIELD_EXTRA_DETAILS])) { + $value = $data[self::FIELD_EXTRA_DETAILS]; } else { - $this->setExtraDetails(new FHIRString($data[self::FIELD_EXTRA_DETAILS])); + $value = null; + } + if (isset($data[self::FIELD_EXTRA_DETAILS_EXT]) && is_array($data[self::FIELD_EXTRA_DETAILS_EXT])) { + $ext = $data[self::FIELD_EXTRA_DETAILS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExtraDetails($value); + } else if (is_array($value)) { + $this->setExtraDetails(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExtraDetails(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExtraDetails(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -591,33 +626,42 @@ public function __construct($data = null) $this->setPhoto(new FHIRAttachment($data[self::FIELD_PHOTO])); } } - if (isset($data[self::FIELD_PROGRAM_NAME])) { - $ext = (isset($data[self::FIELD_PROGRAM_NAME_EXT]) && is_array($data[self::FIELD_PROGRAM_NAME_EXT])) - ? $data[self::FIELD_PROGRAM_NAME_EXT] - : null; - if (is_array($data[self::FIELD_PROGRAM_NAME])) { - foreach($data[self::FIELD_PROGRAM_NAME] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addProgramName($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProgramName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProgramName(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROGRAM_NAME]) || isset($data[self::FIELD_PROGRAM_NAME_EXT])) { + if (isset($data[self::FIELD_PROGRAM_NAME])) { + $value = $data[self::FIELD_PROGRAM_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROGRAM_NAME_EXT]) && is_array($data[self::FIELD_PROGRAM_NAME_EXT])) { + $ext = $data[self::FIELD_PROGRAM_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addProgramName($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addProgramName($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProgramName(new FHIRString(array_merge($v, $iext))); + } else { + $this->addProgramName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProgramName(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addProgramName(new FHIRString(array_merge($ext, $value))); + } else { + $this->addProgramName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProgramName(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PROGRAM_NAME] instanceof FHIRString) { - $this->addProgramName($data[self::FIELD_PROGRAM_NAME]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROGRAM_NAME])) { - $this->addProgramName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PROGRAM_NAME]] + $ext)); - } else { - $this->addProgramName(new FHIRString($data[self::FIELD_PROGRAM_NAME])); } } if (isset($data[self::FIELD_PROVIDED_BY])) { @@ -627,20 +671,27 @@ public function __construct($data = null) $this->setProvidedBy(new FHIRReference($data[self::FIELD_PROVIDED_BY])); } } - if (isset($data[self::FIELD_PUBLIC_KEY])) { - $ext = (isset($data[self::FIELD_PUBLIC_KEY_EXT]) && is_array($data[self::FIELD_PUBLIC_KEY_EXT])) - ? $data[self::FIELD_PUBLIC_KEY_EXT] - : null; - if ($data[self::FIELD_PUBLIC_KEY] instanceof FHIRString) { - $this->setPublicKey($data[self::FIELD_PUBLIC_KEY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLIC_KEY])) { - $this->setPublicKey(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLIC_KEY]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLIC_KEY])) { - $this->setPublicKey(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLIC_KEY]))); - } + if (isset($data[self::FIELD_PUBLIC_KEY]) || isset($data[self::FIELD_PUBLIC_KEY_EXT])) { + if (isset($data[self::FIELD_PUBLIC_KEY])) { + $value = $data[self::FIELD_PUBLIC_KEY]; } else { - $this->setPublicKey(new FHIRString($data[self::FIELD_PUBLIC_KEY])); + $value = null; + } + if (isset($data[self::FIELD_PUBLIC_KEY_EXT]) && is_array($data[self::FIELD_PUBLIC_KEY_EXT])) { + $ext = $data[self::FIELD_PUBLIC_KEY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublicKey($value); + } else if (is_array($value)) { + $this->setPublicKey(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublicKey(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublicKey(new FHIRString($ext)); } } if (isset($data[self::FIELD_REFERRAL_METHOD])) { @@ -668,20 +719,27 @@ public function __construct($data = null) $this->setServiceCategory(new FHIRCodeableConcept($data[self::FIELD_SERVICE_CATEGORY])); } } - if (isset($data[self::FIELD_SERVICE_NAME])) { - $ext = (isset($data[self::FIELD_SERVICE_NAME_EXT]) && is_array($data[self::FIELD_SERVICE_NAME_EXT])) - ? $data[self::FIELD_SERVICE_NAME_EXT] - : null; - if ($data[self::FIELD_SERVICE_NAME] instanceof FHIRString) { - $this->setServiceName($data[self::FIELD_SERVICE_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICE_NAME])) { - $this->setServiceName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERVICE_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICE_NAME])) { - $this->setServiceName(new FHIRString(array_merge($ext, $data[self::FIELD_SERVICE_NAME]))); - } + if (isset($data[self::FIELD_SERVICE_NAME]) || isset($data[self::FIELD_SERVICE_NAME_EXT])) { + if (isset($data[self::FIELD_SERVICE_NAME])) { + $value = $data[self::FIELD_SERVICE_NAME]; } else { - $this->setServiceName(new FHIRString($data[self::FIELD_SERVICE_NAME])); + $value = null; + } + if (isset($data[self::FIELD_SERVICE_NAME_EXT]) && is_array($data[self::FIELD_SERVICE_NAME_EXT])) { + $ext = $data[self::FIELD_SERVICE_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setServiceName($value); + } else if (is_array($value)) { + $this->setServiceName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setServiceName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServiceName(new FHIRString($ext)); } } if (isset($data[self::FIELD_SERVICE_PROVISION_CODE])) { @@ -1787,8 +1845,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2114,109 +2172,188 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAppointmentRequired())) { $a[self::FIELD_APPOINTMENT_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_APPOINTMENT_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getAvailabilityExceptions())) { $a[self::FIELD_AVAILABILITY_EXCEPTIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] = $enc; } } if ([] !== ($vs = $this->getAvailableTime())) { - $a[self::FIELD_AVAILABLE_TIME] = $vs; + $a[self::FIELD_AVAILABLE_TIME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AVAILABLE_TIME][] = $v; + } } if ([] !== ($vs = $this->getCharacteristic())) { - $a[self::FIELD_CHARACTERISTIC] = $vs; + $a[self::FIELD_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTIC][] = $v; + } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getCoverageArea())) { - $a[self::FIELD_COVERAGE_AREA] = $vs; + $a[self::FIELD_COVERAGE_AREA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE_AREA][] = $v; + } } if (null !== ($v = $this->getEligibility())) { $a[self::FIELD_ELIGIBILITY] = $v; } if (null !== ($v = $this->getEligibilityNote())) { $a[self::FIELD_ELIGIBILITY_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ELIGIBILITY_NOTE_EXT] = $enc; } } if (null !== ($v = $this->getExtraDetails())) { $a[self::FIELD_EXTRA_DETAILS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXTRA_DETAILS_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if ([] !== ($vs = $this->getNotAvailable())) { - $a[self::FIELD_NOT_AVAILABLE] = $vs; + $a[self::FIELD_NOT_AVAILABLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOT_AVAILABLE][] = $v; + } } if (null !== ($v = $this->getPhoto())) { $a[self::FIELD_PHOTO] = $v; } if ([] !== ($vs = $this->getProgramName())) { $a[self::FIELD_PROGRAM_NAME] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROGRAM_NAME][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROGRAM_NAME_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROGRAM_NAME_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROGRAM_NAME_EXT] = $encs; + } } if (null !== ($v = $this->getProvidedBy())) { $a[self::FIELD_PROVIDED_BY] = $v; } if (null !== ($v = $this->getPublicKey())) { $a[self::FIELD_PUBLIC_KEY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLIC_KEY_EXT] = $enc; } } if ([] !== ($vs = $this->getReferralMethod())) { - $a[self::FIELD_REFERRAL_METHOD] = $vs; + $a[self::FIELD_REFERRAL_METHOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERRAL_METHOD][] = $v; + } } if (null !== ($v = $this->getServiceCategory())) { $a[self::FIELD_SERVICE_CATEGORY] = $v; } if (null !== ($v = $this->getServiceName())) { $a[self::FIELD_SERVICE_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERVICE_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getServiceProvisionCode())) { - $a[self::FIELD_SERVICE_PROVISION_CODE] = $vs; + $a[self::FIELD_SERVICE_PROVISION_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_PROVISION_CODE][] = $v; + } } if ([] !== ($vs = $this->getServiceType())) { - $a[self::FIELD_SERVICE_TYPE] = $vs; + $a[self::FIELD_SERVICE_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_TYPE][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelection.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelection.php index 362bef1130..994490e8e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelection.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRImagingObjectSelection extends FHIRDomainResource implements PHPFHIRCo const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -242,36 +242,50 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_AUTHORING_TIME])) { - $ext = (isset($data[self::FIELD_AUTHORING_TIME_EXT]) && is_array($data[self::FIELD_AUTHORING_TIME_EXT])) - ? $data[self::FIELD_AUTHORING_TIME_EXT] - : null; - if ($data[self::FIELD_AUTHORING_TIME] instanceof FHIRDateTime) { - $this->setAuthoringTime($data[self::FIELD_AUTHORING_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORING_TIME])) { - $this->setAuthoringTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORING_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORING_TIME])) { - $this->setAuthoringTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORING_TIME]))); - } + if (isset($data[self::FIELD_AUTHORING_TIME]) || isset($data[self::FIELD_AUTHORING_TIME_EXT])) { + if (isset($data[self::FIELD_AUTHORING_TIME])) { + $value = $data[self::FIELD_AUTHORING_TIME]; } else { - $this->setAuthoringTime(new FHIRDateTime($data[self::FIELD_AUTHORING_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_AUTHORING_TIME_EXT]) && is_array($data[self::FIELD_AUTHORING_TIME_EXT])) { + $ext = $data[self::FIELD_AUTHORING_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoringTime($value); + } else if (is_array($value)) { + $this->setAuthoringTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoringTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAuthoringTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -306,20 +320,27 @@ public function __construct($data = null) $this->setTitle(new FHIRCodeableConcept($data[self::FIELD_TITLE])); } } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); - } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); } } } @@ -675,8 +696,8 @@ public function setUid($uid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -820,15 +841,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthoringTime())) { $a[self::FIELD_AUTHORING_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORING_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -836,18 +861,29 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getStudy())) { - $a[self::FIELD_STUDY] = $vs; + $a[self::FIELD_STUDY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STUDY][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v; } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php index 25677daa6a..cc97c35948 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRImagingStudy extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -335,36 +335,50 @@ public function __construct($data = null) $this->setAccession(new FHIRIdentifier($data[self::FIELD_ACCESSION])); } } - if (isset($data[self::FIELD_AVAILABILITY])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY] instanceof FHIRInstanceAvailability) { - $this->setAvailability($data[self::FIELD_AVAILABILITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $data[self::FIELD_AVAILABILITY]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $data[self::FIELD_AVAILABILITY]))); - } + if (isset($data[self::FIELD_AVAILABILITY]) || isset($data[self::FIELD_AVAILABILITY_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY])) { + $value = $data[self::FIELD_AVAILABILITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXT]; } else { - $this->setAvailability(new FHIRInstanceAvailability($data[self::FIELD_AVAILABILITY])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstanceAvailability) { + $this->setAvailability($value); + } else if (is_array($value)) { + $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $value))); + } else { + $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAvailability(new FHIRInstanceAvailability($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -410,36 +424,50 @@ public function __construct($data = null) $this->addModalityList(new FHIRCoding($data[self::FIELD_MODALITY_LIST])); } } - if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) - ? $data[self::FIELD_NUMBER_OF_INSTANCES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_INSTANCES] instanceof FHIRUnsignedInt) { - $this->setNumberOfInstances($data[self::FIELD_NUMBER_OF_INSTANCES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_INSTANCES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_INSTANCES]))); - } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES]) || isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { + $value = $data[self::FIELD_NUMBER_OF_INSTANCES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_INSTANCES_EXT]; } else { - $this->setNumberOfInstances(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_INSTANCES])); - } - } - if (isset($data[self::FIELD_NUMBER_OF_SERIES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_SERIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SERIES_EXT])) - ? $data[self::FIELD_NUMBER_OF_SERIES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_SERIES] instanceof FHIRUnsignedInt) { - $this->setNumberOfSeries($data[self::FIELD_NUMBER_OF_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_SERIES])) { - $this->setNumberOfSeries(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_SERIES])) { - $this->setNumberOfSeries(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_SERIES]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfInstances($value); + } else if (is_array($value)) { + $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumberOfInstances(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_SERIES]) || isset($data[self::FIELD_NUMBER_OF_SERIES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_SERIES])) { + $value = $data[self::FIELD_NUMBER_OF_SERIES]; } else { - $this->setNumberOfSeries(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_SERIES])); + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_SERIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SERIES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_SERIES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfSeries($value); + } else if (is_array($value)) { + $this->setNumberOfSeries(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfSeries(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfSeries(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_ORDER])) { @@ -510,52 +538,73 @@ public function __construct($data = null) $this->addSeries(new FHIRImagingStudySeries($data[self::FIELD_SERIES])); } } - if (isset($data[self::FIELD_STARTED])) { - $ext = (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) - ? $data[self::FIELD_STARTED_EXT] - : null; - if ($data[self::FIELD_STARTED] instanceof FHIRDateTime) { - $this->setStarted($data[self::FIELD_STARTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STARTED]] + $ext)); - } else if (is_array($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STARTED]))); - } + if (isset($data[self::FIELD_STARTED]) || isset($data[self::FIELD_STARTED_EXT])) { + if (isset($data[self::FIELD_STARTED])) { + $value = $data[self::FIELD_STARTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) { + $ext = $data[self::FIELD_STARTED_EXT]; } else { - $this->setStarted(new FHIRDateTime($data[self::FIELD_STARTED])); - } - } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStarted($value); + } else if (is_array($value)) { + $this->setStarted(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStarted(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -1278,8 +1327,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1529,77 +1578,124 @@ public function jsonSerialize() } if (null !== ($v = $this->getAvailability())) { $a[self::FIELD_AVAILABILITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstanceAvailability::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstanceAvailability::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInterpreter())) { $a[self::FIELD_INTERPRETER] = $v; } if ([] !== ($vs = $this->getModalityList())) { - $a[self::FIELD_MODALITY_LIST] = $vs; + $a[self::FIELD_MODALITY_LIST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODALITY_LIST][] = $v; + } } if (null !== ($v = $this->getNumberOfInstances())) { $a[self::FIELD_NUMBER_OF_INSTANCES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_INSTANCES_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfSeries())) { $a[self::FIELD_NUMBER_OF_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_SERIES_EXT] = $enc; } } if ([] !== ($vs = $this->getOrder())) { - $a[self::FIELD_ORDER] = $vs; + $a[self::FIELD_ORDER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ORDER][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getProcedure())) { - $a[self::FIELD_PROCEDURE] = $vs; + $a[self::FIELD_PROCEDURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCEDURE][] = $v; + } } if (null !== ($v = $this->getReferrer())) { $a[self::FIELD_REFERRER] = $v; } if ([] !== ($vs = $this->getSeries())) { - $a[self::FIELD_SERIES] = $vs; + $a[self::FIELD_SERIES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERIES][] = $v; + } } if (null !== ($v = $this->getStarted())) { $a[self::FIELD_STARTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STARTED_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunization.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunization.php index 3cd342e27b..b9f24cd8cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRImmunization extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_WAS_NOT_GIVEN_EXT = '_wasNotGiven'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -384,20 +384,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DOSE_QUANTITY])) { @@ -414,20 +421,27 @@ public function __construct($data = null) $this->setEncounter(new FHIRReference($data[self::FIELD_ENCOUNTER])); } } - if (isset($data[self::FIELD_EXPIRATION_DATE])) { - $ext = (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) - ? $data[self::FIELD_EXPIRATION_DATE_EXT] - : null; - if ($data[self::FIELD_EXPIRATION_DATE] instanceof FHIRDate) { - $this->setExpirationDate($data[self::FIELD_EXPIRATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_EXPIRATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDate(array_merge($ext, $data[self::FIELD_EXPIRATION_DATE]))); - } + if (isset($data[self::FIELD_EXPIRATION_DATE]) || isset($data[self::FIELD_EXPIRATION_DATE_EXT])) { + if (isset($data[self::FIELD_EXPIRATION_DATE])) { + $value = $data[self::FIELD_EXPIRATION_DATE]; } else { - $this->setExpirationDate(new FHIRDate($data[self::FIELD_EXPIRATION_DATE])); + $value = null; + } + if (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) { + $ext = $data[self::FIELD_EXPIRATION_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setExpirationDate($value); + } else if (is_array($value)) { + $this->setExpirationDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setExpirationDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpirationDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_EXPLANATION])) { @@ -462,20 +476,27 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); - } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); } } if (isset($data[self::FIELD_MANUFACTURER])) { @@ -535,20 +556,27 @@ public function __construct($data = null) $this->addReaction(new FHIRImmunizationReaction($data[self::FIELD_REACTION])); } } - if (isset($data[self::FIELD_REPORTED])) { - $ext = (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) - ? $data[self::FIELD_REPORTED_EXT] - : null; - if ($data[self::FIELD_REPORTED] instanceof FHIRBoolean) { - $this->setReported($data[self::FIELD_REPORTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPORTED]] + $ext)); - } else if (is_array($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPORTED]))); - } + if (isset($data[self::FIELD_REPORTED]) || isset($data[self::FIELD_REPORTED_EXT])) { + if (isset($data[self::FIELD_REPORTED])) { + $value = $data[self::FIELD_REPORTED]; } else { - $this->setReported(new FHIRBoolean($data[self::FIELD_REPORTED])); + $value = null; + } + if (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) { + $ext = $data[self::FIELD_REPORTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReported($value); + } else if (is_array($value)) { + $this->setReported(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReported(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_REQUESTER])) { @@ -572,20 +600,27 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VACCINATION_PROTOCOL])) { @@ -613,20 +648,27 @@ public function __construct($data = null) $this->setVaccineCode(new FHIRCodeableConcept($data[self::FIELD_VACCINE_CODE])); } } - if (isset($data[self::FIELD_WAS_NOT_GIVEN])) { - $ext = (isset($data[self::FIELD_WAS_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_GIVEN_EXT])) - ? $data[self::FIELD_WAS_NOT_GIVEN_EXT] - : null; - if ($data[self::FIELD_WAS_NOT_GIVEN] instanceof FHIRBoolean) { - $this->setWasNotGiven($data[self::FIELD_WAS_NOT_GIVEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WAS_NOT_GIVEN])) { - $this->setWasNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WAS_NOT_GIVEN]] + $ext)); - } else if (is_array($data[self::FIELD_WAS_NOT_GIVEN])) { - $this->setWasNotGiven(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WAS_NOT_GIVEN]))); - } + if (isset($data[self::FIELD_WAS_NOT_GIVEN]) || isset($data[self::FIELD_WAS_NOT_GIVEN_EXT])) { + if (isset($data[self::FIELD_WAS_NOT_GIVEN])) { + $value = $data[self::FIELD_WAS_NOT_GIVEN]; } else { - $this->setWasNotGiven(new FHIRBoolean($data[self::FIELD_WAS_NOT_GIVEN])); + $value = null; + } + if (isset($data[self::FIELD_WAS_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_GIVEN_EXT])) { + $ext = $data[self::FIELD_WAS_NOT_GIVEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWasNotGiven($value); + } else if (is_array($value)) { + $this->setWasNotGiven(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWasNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWasNotGiven(new FHIRBoolean($ext)); } } } @@ -1464,8 +1506,8 @@ public function setWasNotGiven($wasNotGiven = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1735,8 +1777,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1748,8 +1792,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExpirationDate())) { $a[self::FIELD_EXPIRATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_EXPIRATION_DATE_EXT] = $enc; } } @@ -1757,15 +1803,23 @@ public function jsonSerialize() $a[self::FIELD_EXPLANATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } @@ -1773,7 +1827,13 @@ public function jsonSerialize() $a[self::FIELD_MANUFACTURER] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -1782,12 +1842,20 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getReaction())) { - $a[self::FIELD_REACTION] = $vs; + $a[self::FIELD_REACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REACTION][] = $v; + } } if (null !== ($v = $this->getReported())) { $a[self::FIELD_REPORTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPORTED_EXT] = $enc; } } @@ -1802,24 +1870,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getVaccinationProtocol())) { - $a[self::FIELD_VACCINATION_PROTOCOL] = $vs; + $a[self::FIELD_VACCINATION_PROTOCOL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VACCINATION_PROTOCOL][] = $v; + } } if (null !== ($v = $this->getVaccineCode())) { $a[self::FIELD_VACCINE_CODE] = $v; } if (null !== ($v = $this->getWasNotGiven())) { $a[self::FIELD_WAS_NOT_GIVEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WAS_NOT_GIVEN_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php index 3c3eaa1e56..33c97211c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRImmunizationRecommendation extends FHIRDomainResource implements PHPFH const FIELD_RECOMMENDATION = 'recommendation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -369,8 +369,8 @@ public function setRecommendation(array $recommendation = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -469,13 +469,28 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getRecommendation())) { - $a[self::FIELD_RECOMMENDATION] = $vs; + $a[self::FIELD_RECOMMENDATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECOMMENDATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php index 3335d1f319..318133e35c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRImplementationGuide extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -367,33 +367,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BINARY])) { - $ext = (isset($data[self::FIELD_BINARY_EXT]) && is_array($data[self::FIELD_BINARY_EXT])) - ? $data[self::FIELD_BINARY_EXT] - : null; - if (is_array($data[self::FIELD_BINARY])) { - foreach($data[self::FIELD_BINARY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addBinary($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addBinary(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addBinary(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_BINARY]) || isset($data[self::FIELD_BINARY_EXT])) { + if (isset($data[self::FIELD_BINARY])) { + $value = $data[self::FIELD_BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BINARY_EXT]) && is_array($data[self::FIELD_BINARY_EXT])) { + $ext = $data[self::FIELD_BINARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addBinary($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addBinary($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addBinary(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addBinary(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addBinary(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addBinary(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addBinary(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addBinary(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_BINARY] instanceof FHIRUri) { - $this->addBinary($data[self::FIELD_BINARY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_BINARY])) { - $this->addBinary(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_BINARY]] + $ext)); - } else { - $this->addBinary(new FHIRUri($data[self::FIELD_BINARY])); } } if (isset($data[self::FIELD_CONTACT])) { @@ -414,36 +423,50 @@ public function __construct($data = null) $this->addContact(new FHIRImplementationGuideContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRString) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRString($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DEPENDENCY])) { @@ -464,52 +487,73 @@ public function __construct($data = null) $this->addDependency(new FHIRImplementationGuideDependency($data[self::FIELD_DEPENDENCY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRId) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; } else { - $this->setFhirVersion(new FHIRId($data[self::FIELD_FHIR_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRId($ext)); } } if (isset($data[self::FIELD_GLOBAL])) { @@ -530,20 +574,27 @@ public function __construct($data = null) $this->addGlobal(new FHIRImplementationGuideGlobal($data[self::FIELD_GLOBAL])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PACKAGE])) { @@ -571,52 +622,73 @@ public function __construct($data = null) $this->setPage(new FHIRImplementationGuidePage($data[self::FIELD_PAGE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -637,20 +709,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRCodeableConcept($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1509,8 +1588,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1802,107 +1881,168 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBinary())) { $a[self::FIELD_BINARY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_BINARY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_BINARY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_BINARY_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_BINARY_EXT] = $encs; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDependency())) { - $a[self::FIELD_DEPENDENCY] = $vs; + $a[self::FIELD_DEPENDENCY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEPENDENCY][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getGlobal())) { - $a[self::FIELD_GLOBAL] = $vs; + $a[self::FIELD_GLOBAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GLOBAL][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPackage())) { - $a[self::FIELD_PACKAGE] = $vs; + $a[self::FIELD_PACKAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PACKAGE][] = $v; + } } if (null !== ($v = $this->getPage())) { $a[self::FIELD_PAGE] = $v; } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRList.php index 6631a6220f..e3a06eeb96 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRList extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -288,20 +288,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EMPTY_REASON])) { @@ -354,36 +361,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRListMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRListMode($data[self::FIELD_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_NOTE])) { - $ext = (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) - ? $data[self::FIELD_NOTE_EXT] - : null; - if ($data[self::FIELD_NOTE] instanceof FHIRString) { - $this->setNote($data[self::FIELD_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString(array_merge($ext, $data[self::FIELD_NOTE]))); + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRListMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRListMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRListMode($ext)); + } + } + if (isset($data[self::FIELD_NOTE]) || isset($data[self::FIELD_NOTE_EXT])) { + if (isset($data[self::FIELD_NOTE])) { + $value = $data[self::FIELD_NOTE]; } else { - $this->setNote(new FHIRString($data[self::FIELD_NOTE])); + $value = null; + } + if (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) { + $ext = $data[self::FIELD_NOTE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNote($value); + } else if (is_array($value)) { + $this->setNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNote(new FHIRString($ext)); } } if (isset($data[self::FIELD_ORDERED_BY])) { @@ -400,20 +421,27 @@ public function __construct($data = null) $this->setSource(new FHIRReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRListStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRListStatus([FHIRListStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRListStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRListStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRListStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRListStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRListStatus([FHIRListStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRListStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -423,20 +451,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -955,8 +990,8 @@ public function setTitle($title = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1143,8 +1178,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1155,22 +1192,38 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRListMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRListMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTE_EXT] = $enc; } } @@ -1182,8 +1235,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRListStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRListStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1192,11 +1247,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRLocation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRLocation.php index 3fa7c2f622..0fe1e98962 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRLocation extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * There is a variety of postal address formats defined around the world. This @@ -277,20 +277,27 @@ public function __construct($data = null) $this->setAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -318,36 +325,50 @@ public function __construct($data = null) $this->setManagingOrganization(new FHIRReference($data[self::FIELD_MANAGING_ORGANIZATION])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRLocationMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRLocationMode([FHIRLocationMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRLocationMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRLocationMode($data[self::FIELD_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLocationMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRLocationMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRLocationMode([FHIRLocationMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRLocationMode($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART_OF])) { @@ -371,20 +392,27 @@ public function __construct($data = null) $this->setPosition(new FHIRLocationPosition($data[self::FIELD_POSITION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRLocationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRLocationStatus([FHIRLocationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRLocationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRLocationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLocationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRLocationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRLocationStatus([FHIRLocationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRLocationStatus($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -892,8 +920,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1066,28 +1094,40 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLocationMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLocationMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1102,17 +1142,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLocationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLocationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedia.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedia.php index dd9d0fc33b..ceec739560 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRMedia extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_WIDTH_EXT = '_width'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -282,68 +282,96 @@ public function __construct($data = null) $this->setContent(new FHIRAttachment($data[self::FIELD_CONTENT])); } } - if (isset($data[self::FIELD_DEVICE_NAME])) { - $ext = (isset($data[self::FIELD_DEVICE_NAME_EXT]) && is_array($data[self::FIELD_DEVICE_NAME_EXT])) - ? $data[self::FIELD_DEVICE_NAME_EXT] - : null; - if ($data[self::FIELD_DEVICE_NAME] instanceof FHIRString) { - $this->setDeviceName($data[self::FIELD_DEVICE_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEVICE_NAME])) { - $this->setDeviceName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEVICE_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_DEVICE_NAME])) { - $this->setDeviceName(new FHIRString(array_merge($ext, $data[self::FIELD_DEVICE_NAME]))); - } + if (isset($data[self::FIELD_DEVICE_NAME]) || isset($data[self::FIELD_DEVICE_NAME_EXT])) { + if (isset($data[self::FIELD_DEVICE_NAME])) { + $value = $data[self::FIELD_DEVICE_NAME]; } else { - $this->setDeviceName(new FHIRString($data[self::FIELD_DEVICE_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_DURATION])) { - $ext = (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) - ? $data[self::FIELD_DURATION_EXT] - : null; - if ($data[self::FIELD_DURATION] instanceof FHIRUnsignedInt) { - $this->setDuration($data[self::FIELD_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_DURATION]))); - } + if (isset($data[self::FIELD_DEVICE_NAME_EXT]) && is_array($data[self::FIELD_DEVICE_NAME_EXT])) { + $ext = $data[self::FIELD_DEVICE_NAME_EXT]; } else { - $this->setDuration(new FHIRUnsignedInt($data[self::FIELD_DURATION])); + $ext = []; } - } - if (isset($data[self::FIELD_FRAMES])) { - $ext = (isset($data[self::FIELD_FRAMES_EXT]) && is_array($data[self::FIELD_FRAMES_EXT])) - ? $data[self::FIELD_FRAMES_EXT] - : null; - if ($data[self::FIELD_FRAMES] instanceof FHIRPositiveInt) { - $this->setFrames($data[self::FIELD_FRAMES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FRAMES])) { - $this->setFrames(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_FRAMES]] + $ext)); - } else if (is_array($data[self::FIELD_FRAMES])) { - $this->setFrames(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_FRAMES]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeviceName($value); + } else if (is_array($value)) { + $this->setDeviceName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeviceName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeviceName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DURATION]) || isset($data[self::FIELD_DURATION_EXT])) { + if (isset($data[self::FIELD_DURATION])) { + $value = $data[self::FIELD_DURATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) { + $ext = $data[self::FIELD_DURATION_EXT]; } else { - $this->setFrames(new FHIRPositiveInt($data[self::FIELD_FRAMES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setDuration($value); + } else if (is_array($value)) { + $this->setDuration(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setDuration(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDuration(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_HEIGHT])) { - $ext = (isset($data[self::FIELD_HEIGHT_EXT]) && is_array($data[self::FIELD_HEIGHT_EXT])) - ? $data[self::FIELD_HEIGHT_EXT] - : null; - if ($data[self::FIELD_HEIGHT] instanceof FHIRPositiveInt) { - $this->setHeight($data[self::FIELD_HEIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEIGHT])) { - $this->setHeight(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_HEIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_HEIGHT])) { - $this->setHeight(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_HEIGHT]))); + if (isset($data[self::FIELD_FRAMES]) || isset($data[self::FIELD_FRAMES_EXT])) { + if (isset($data[self::FIELD_FRAMES])) { + $value = $data[self::FIELD_FRAMES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FRAMES_EXT]) && is_array($data[self::FIELD_FRAMES_EXT])) { + $ext = $data[self::FIELD_FRAMES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setFrames($value); + } else if (is_array($value)) { + $this->setFrames(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setFrames(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFrames(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_HEIGHT]) || isset($data[self::FIELD_HEIGHT_EXT])) { + if (isset($data[self::FIELD_HEIGHT])) { + $value = $data[self::FIELD_HEIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HEIGHT_EXT]) && is_array($data[self::FIELD_HEIGHT_EXT])) { + $ext = $data[self::FIELD_HEIGHT_EXT]; } else { - $this->setHeight(new FHIRPositiveInt($data[self::FIELD_HEIGHT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setHeight($value); + } else if (is_array($value)) { + $this->setHeight(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setHeight(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHeight(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -385,20 +413,27 @@ public function __construct($data = null) $this->setSubtype(new FHIRCodeableConcept($data[self::FIELD_SUBTYPE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRDigitalMediaType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDigitalMediaType([FHIRDigitalMediaType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDigitalMediaType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRDigitalMediaType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDigitalMediaType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRDigitalMediaType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRDigitalMediaType([FHIRDigitalMediaType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRDigitalMediaType($ext)); } } if (isset($data[self::FIELD_VIEW])) { @@ -408,20 +443,27 @@ public function __construct($data = null) $this->setView(new FHIRCodeableConcept($data[self::FIELD_VIEW])); } } - if (isset($data[self::FIELD_WIDTH])) { - $ext = (isset($data[self::FIELD_WIDTH_EXT]) && is_array($data[self::FIELD_WIDTH_EXT])) - ? $data[self::FIELD_WIDTH_EXT] - : null; - if ($data[self::FIELD_WIDTH] instanceof FHIRPositiveInt) { - $this->setWidth($data[self::FIELD_WIDTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WIDTH])) { - $this->setWidth(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_WIDTH]] + $ext)); - } else if (is_array($data[self::FIELD_WIDTH])) { - $this->setWidth(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_WIDTH]))); - } + if (isset($data[self::FIELD_WIDTH]) || isset($data[self::FIELD_WIDTH_EXT])) { + if (isset($data[self::FIELD_WIDTH])) { + $value = $data[self::FIELD_WIDTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WIDTH_EXT]) && is_array($data[self::FIELD_WIDTH_EXT])) { + $ext = $data[self::FIELD_WIDTH_EXT]; } else { - $this->setWidth(new FHIRPositiveInt($data[self::FIELD_WIDTH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setWidth($value); + } else if (is_array($value)) { + $this->setWidth(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setWidth(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWidth(new FHIRPositiveInt($ext)); } } } @@ -911,8 +953,8 @@ public function setWidth($width = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1102,34 +1144,48 @@ public function jsonSerialize() } if (null !== ($v = $this->getDeviceName())) { $a[self::FIELD_DEVICE_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEVICE_NAME_EXT] = $enc; } } if (null !== ($v = $this->getDuration())) { $a[self::FIELD_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_DURATION_EXT] = $enc; } } if (null !== ($v = $this->getFrames())) { $a[self::FIELD_FRAMES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_FRAMES_EXT] = $enc; } } if (null !== ($v = $this->getHeight())) { $a[self::FIELD_HEIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_HEIGHT_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOperator())) { $a[self::FIELD_OPERATOR] = $v; @@ -1142,8 +1198,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDigitalMediaType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDigitalMediaType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } @@ -1152,11 +1210,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getWidth())) { $a[self::FIELD_WIDTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_WIDTH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedication.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedication.php index e09b36dc38..1b3e67d60d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedication.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedication extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_PRODUCT = 'product'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -179,20 +179,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_IS_BRAND])) { - $ext = (isset($data[self::FIELD_IS_BRAND_EXT]) && is_array($data[self::FIELD_IS_BRAND_EXT])) - ? $data[self::FIELD_IS_BRAND_EXT] - : null; - if ($data[self::FIELD_IS_BRAND] instanceof FHIRBoolean) { - $this->setIsBrand($data[self::FIELD_IS_BRAND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_BRAND])) { - $this->setIsBrand(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_BRAND]] + $ext)); - } else if (is_array($data[self::FIELD_IS_BRAND])) { - $this->setIsBrand(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_BRAND]))); - } + if (isset($data[self::FIELD_IS_BRAND]) || isset($data[self::FIELD_IS_BRAND_EXT])) { + if (isset($data[self::FIELD_IS_BRAND])) { + $value = $data[self::FIELD_IS_BRAND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_BRAND_EXT]) && is_array($data[self::FIELD_IS_BRAND_EXT])) { + $ext = $data[self::FIELD_IS_BRAND_EXT]; } else { - $this->setIsBrand(new FHIRBoolean($data[self::FIELD_IS_BRAND])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsBrand($value); + } else if (is_array($value)) { + $this->setIsBrand(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsBrand(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsBrand(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_MANUFACTURER])) { @@ -411,8 +418,8 @@ public function setProduct(FHIRMedicationProduct $product = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -521,8 +528,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getIsBrand())) { $a[self::FIELD_IS_BRAND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_BRAND_EXT] = $enc; } } @@ -535,6 +544,9 @@ public function jsonSerialize() if (null !== ($v = $this->getProduct())) { $a[self::FIELD_PRODUCT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php index 3b5334f893..5052d24b46 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRMedicationAdministration extends FHIRDomainResource implements PHPFHIR const FIELD_WAS_NOT_GIVEN_EXT = '_wasNotGiven'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -368,20 +368,27 @@ public function __construct($data = null) $this->setDosage(new FHIRMedicationAdministrationDosage($data[self::FIELD_DOSAGE])); } } - if (isset($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_TIME_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveTimeDateTime($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME])) { - $this->setEffectiveTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_TIME_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME])) { - $this->setEffectiveTimeDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_TIME_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_TIME_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_TIME_DATE_TIME_EXT]; } else { - $this->setEffectiveTimeDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_TIME_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveTimeDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveTimeDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveTimeDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_TIME_PERIOD])) { @@ -430,20 +437,27 @@ public function __construct($data = null) $this->setMedicationReference(new FHIRReference($data[self::FIELD_MEDICATION_REFERENCE])); } } - if (isset($data[self::FIELD_NOTE])) { - $ext = (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) - ? $data[self::FIELD_NOTE_EXT] - : null; - if ($data[self::FIELD_NOTE] instanceof FHIRString) { - $this->setNote($data[self::FIELD_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString(array_merge($ext, $data[self::FIELD_NOTE]))); - } + if (isset($data[self::FIELD_NOTE]) || isset($data[self::FIELD_NOTE_EXT])) { + if (isset($data[self::FIELD_NOTE])) { + $value = $data[self::FIELD_NOTE]; } else { - $this->setNote(new FHIRString($data[self::FIELD_NOTE])); + $value = null; + } + if (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) { + $ext = $data[self::FIELD_NOTE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNote($value); + } else if (is_array($value)) { + $this->setNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNote(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -503,36 +517,50 @@ public function __construct($data = null) $this->addReasonNotGiven(new FHIRCodeableConcept($data[self::FIELD_REASON_NOT_GIVEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationAdministrationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationAdministrationStatus([FHIRMedicationAdministrationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationAdministrationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRMedicationAdministrationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_WAS_NOT_GIVEN])) { - $ext = (isset($data[self::FIELD_WAS_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_GIVEN_EXT])) - ? $data[self::FIELD_WAS_NOT_GIVEN_EXT] - : null; - if ($data[self::FIELD_WAS_NOT_GIVEN] instanceof FHIRBoolean) { - $this->setWasNotGiven($data[self::FIELD_WAS_NOT_GIVEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WAS_NOT_GIVEN])) { - $this->setWasNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WAS_NOT_GIVEN]] + $ext)); - } else if (is_array($data[self::FIELD_WAS_NOT_GIVEN])) { - $this->setWasNotGiven(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WAS_NOT_GIVEN]))); + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationAdministrationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationAdministrationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationAdministrationStatus([FHIRMedicationAdministrationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationAdministrationStatus($ext)); + } + } + if (isset($data[self::FIELD_WAS_NOT_GIVEN]) || isset($data[self::FIELD_WAS_NOT_GIVEN_EXT])) { + if (isset($data[self::FIELD_WAS_NOT_GIVEN])) { + $value = $data[self::FIELD_WAS_NOT_GIVEN]; } else { - $this->setWasNotGiven(new FHIRBoolean($data[self::FIELD_WAS_NOT_GIVEN])); + $value = null; + } + if (isset($data[self::FIELD_WAS_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_GIVEN_EXT])) { + $ext = $data[self::FIELD_WAS_NOT_GIVEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWasNotGiven($value); + } else if (is_array($value)) { + $this->setWasNotGiven(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWasNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWasNotGiven(new FHIRBoolean($ext)); } } } @@ -1247,8 +1275,8 @@ public function setWasNotGiven($wasNotGiven = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1463,15 +1491,23 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDevice())) { - $a[self::FIELD_DEVICE] = $vs; + $a[self::FIELD_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEVICE][] = $v; + } } if (null !== ($v = $this->getDosage())) { $a[self::FIELD_DOSAGE] = $v; } if (null !== ($v = $this->getEffectiveTimeDateTime())) { $a[self::FIELD_EFFECTIVE_TIME_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_TIME_DATE_TIME_EXT] = $enc; } } @@ -1482,7 +1518,13 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMedicationCodeableConcept())) { $a[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $v; @@ -1492,8 +1534,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTE_EXT] = $enc; } } @@ -1507,25 +1551,44 @@ public function jsonSerialize() $a[self::FIELD_PRESCRIPTION] = $v; } if ([] !== ($vs = $this->getReasonGiven())) { - $a[self::FIELD_REASON_GIVEN] = $vs; + $a[self::FIELD_REASON_GIVEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_GIVEN][] = $v; + } } if ([] !== ($vs = $this->getReasonNotGiven())) { - $a[self::FIELD_REASON_NOT_GIVEN] = $vs; + $a[self::FIELD_REASON_NOT_GIVEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_NOT_GIVEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationAdministrationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationAdministrationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getWasNotGiven())) { $a[self::FIELD_WAS_NOT_GIVEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WAS_NOT_GIVEN_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php index 22699fae29..c742d9982f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRMedicationDispense extends FHIRDomainResource implements PHPFHIRContai const FIELD_WHEN_PREPARED_EXT = '_whenPrepared'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -418,20 +418,27 @@ public function __construct($data = null) $this->setMedicationReference(new FHIRReference($data[self::FIELD_MEDICATION_REFERENCE])); } } - if (isset($data[self::FIELD_NOTE])) { - $ext = (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) - ? $data[self::FIELD_NOTE_EXT] - : null; - if ($data[self::FIELD_NOTE] instanceof FHIRString) { - $this->setNote($data[self::FIELD_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString(array_merge($ext, $data[self::FIELD_NOTE]))); - } + if (isset($data[self::FIELD_NOTE]) || isset($data[self::FIELD_NOTE_EXT])) { + if (isset($data[self::FIELD_NOTE])) { + $value = $data[self::FIELD_NOTE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) { + $ext = $data[self::FIELD_NOTE_EXT]; } else { - $this->setNote(new FHIRString($data[self::FIELD_NOTE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNote($value); + } else if (is_array($value)) { + $this->setNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNote(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -466,20 +473,27 @@ public function __construct($data = null) $this->addReceiver(new FHIRReference($data[self::FIELD_RECEIVER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationDispenseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationDispenseStatus([FHIRMedicationDispenseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationDispenseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationDispenseStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationDispenseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationDispenseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationDispenseStatus([FHIRMedicationDispenseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationDispenseStatus($ext)); } } if (isset($data[self::FIELD_SUBSTITUTION])) { @@ -496,36 +510,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_WHEN_HANDED_OVER])) { - $ext = (isset($data[self::FIELD_WHEN_HANDED_OVER_EXT]) && is_array($data[self::FIELD_WHEN_HANDED_OVER_EXT])) - ? $data[self::FIELD_WHEN_HANDED_OVER_EXT] - : null; - if ($data[self::FIELD_WHEN_HANDED_OVER] instanceof FHIRDateTime) { - $this->setWhenHandedOver($data[self::FIELD_WHEN_HANDED_OVER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN_HANDED_OVER])) { - $this->setWhenHandedOver(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_WHEN_HANDED_OVER]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN_HANDED_OVER])) { - $this->setWhenHandedOver(new FHIRDateTime(array_merge($ext, $data[self::FIELD_WHEN_HANDED_OVER]))); - } + if (isset($data[self::FIELD_WHEN_HANDED_OVER]) || isset($data[self::FIELD_WHEN_HANDED_OVER_EXT])) { + if (isset($data[self::FIELD_WHEN_HANDED_OVER])) { + $value = $data[self::FIELD_WHEN_HANDED_OVER]; } else { - $this->setWhenHandedOver(new FHIRDateTime($data[self::FIELD_WHEN_HANDED_OVER])); + $value = null; } - } - if (isset($data[self::FIELD_WHEN_PREPARED])) { - $ext = (isset($data[self::FIELD_WHEN_PREPARED_EXT]) && is_array($data[self::FIELD_WHEN_PREPARED_EXT])) - ? $data[self::FIELD_WHEN_PREPARED_EXT] - : null; - if ($data[self::FIELD_WHEN_PREPARED] instanceof FHIRDateTime) { - $this->setWhenPrepared($data[self::FIELD_WHEN_PREPARED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN_PREPARED])) { - $this->setWhenPrepared(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_WHEN_PREPARED]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN_PREPARED])) { - $this->setWhenPrepared(new FHIRDateTime(array_merge($ext, $data[self::FIELD_WHEN_PREPARED]))); + if (isset($data[self::FIELD_WHEN_HANDED_OVER_EXT]) && is_array($data[self::FIELD_WHEN_HANDED_OVER_EXT])) { + $ext = $data[self::FIELD_WHEN_HANDED_OVER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setWhenHandedOver($value); + } else if (is_array($value)) { + $this->setWhenHandedOver(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setWhenHandedOver(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setWhenHandedOver(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_WHEN_PREPARED]) || isset($data[self::FIELD_WHEN_PREPARED_EXT])) { + if (isset($data[self::FIELD_WHEN_PREPARED])) { + $value = $data[self::FIELD_WHEN_PREPARED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHEN_PREPARED_EXT]) && is_array($data[self::FIELD_WHEN_PREPARED_EXT])) { + $ext = $data[self::FIELD_WHEN_PREPARED_EXT]; } else { - $this->setWhenPrepared(new FHIRDateTime($data[self::FIELD_WHEN_PREPARED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setWhenPrepared($value); + } else if (is_array($value)) { + $this->setWhenPrepared(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setWhenPrepared(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhenPrepared(new FHIRDateTime($ext)); } } } @@ -1210,8 +1238,8 @@ public function setWhenPrepared($whenPrepared = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1425,7 +1453,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthorizingPrescription())) { - $a[self::FIELD_AUTHORIZING_PRESCRIPTION] = $vs; + $a[self::FIELD_AUTHORIZING_PRESCRIPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHORIZING_PRESCRIPTION][] = $v; + } } if (null !== ($v = $this->getDaysSupply())) { $a[self::FIELD_DAYS_SUPPLY] = $v; @@ -1437,7 +1471,13 @@ public function jsonSerialize() $a[self::FIELD_DISPENSER] = $v; } if ([] !== ($vs = $this->getDosageInstruction())) { - $a[self::FIELD_DOSAGE_INSTRUCTION] = $vs; + $a[self::FIELD_DOSAGE_INSTRUCTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE_INSTRUCTION][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; @@ -1450,8 +1490,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTE_EXT] = $enc; } } @@ -1462,12 +1504,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReceiver())) { - $a[self::FIELD_RECEIVER] = $vs; + $a[self::FIELD_RECEIVER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECEIVER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationDispenseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationDispenseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1479,18 +1529,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getWhenHandedOver())) { $a[self::FIELD_WHEN_HANDED_OVER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_WHEN_HANDED_OVER_EXT] = $enc; } } if (null !== ($v = $this->getWhenPrepared())) { $a[self::FIELD_WHEN_PREPARED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_WHEN_PREPARED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationOrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationOrder.php index 2d2051e06e..f592d925aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRMedicationOrder extends FHIRDomainResource implements PHPFHIRContained const FIELD_SUBSTITUTION = 'substitution'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -358,36 +358,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE_ENDED])) { - $ext = (isset($data[self::FIELD_DATE_ENDED_EXT]) && is_array($data[self::FIELD_DATE_ENDED_EXT])) - ? $data[self::FIELD_DATE_ENDED_EXT] - : null; - if ($data[self::FIELD_DATE_ENDED] instanceof FHIRDateTime) { - $this->setDateEnded($data[self::FIELD_DATE_ENDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_ENDED])) { - $this->setDateEnded(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_ENDED]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_ENDED])) { - $this->setDateEnded(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_ENDED]))); - } + if (isset($data[self::FIELD_DATE_ENDED]) || isset($data[self::FIELD_DATE_ENDED_EXT])) { + if (isset($data[self::FIELD_DATE_ENDED])) { + $value = $data[self::FIELD_DATE_ENDED]; } else { - $this->setDateEnded(new FHIRDateTime($data[self::FIELD_DATE_ENDED])); + $value = null; } - } - if (isset($data[self::FIELD_DATE_WRITTEN])) { - $ext = (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) - ? $data[self::FIELD_DATE_WRITTEN_EXT] - : null; - if ($data[self::FIELD_DATE_WRITTEN] instanceof FHIRDateTime) { - $this->setDateWritten($data[self::FIELD_DATE_WRITTEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_WRITTEN]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_WRITTEN]))); + if (isset($data[self::FIELD_DATE_ENDED_EXT]) && is_array($data[self::FIELD_DATE_ENDED_EXT])) { + $ext = $data[self::FIELD_DATE_ENDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateEnded($value); + } else if (is_array($value)) { + $this->setDateEnded(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateEnded(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDateEnded(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DATE_WRITTEN]) || isset($data[self::FIELD_DATE_WRITTEN_EXT])) { + if (isset($data[self::FIELD_DATE_WRITTEN])) { + $value = $data[self::FIELD_DATE_WRITTEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) { + $ext = $data[self::FIELD_DATE_WRITTEN_EXT]; } else { - $this->setDateWritten(new FHIRDateTime($data[self::FIELD_DATE_WRITTEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateWritten($value); + } else if (is_array($value)) { + $this->setDateWritten(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateWritten(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DISPENSE_REQUEST])) { @@ -454,20 +468,27 @@ public function __construct($data = null) $this->setMedicationReference(new FHIRReference($data[self::FIELD_MEDICATION_REFERENCE])); } } - if (isset($data[self::FIELD_NOTE])) { - $ext = (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) - ? $data[self::FIELD_NOTE_EXT] - : null; - if ($data[self::FIELD_NOTE] instanceof FHIRString) { - $this->setNote($data[self::FIELD_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString(array_merge($ext, $data[self::FIELD_NOTE]))); - } + if (isset($data[self::FIELD_NOTE]) || isset($data[self::FIELD_NOTE_EXT])) { + if (isset($data[self::FIELD_NOTE])) { + $value = $data[self::FIELD_NOTE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) { + $ext = $data[self::FIELD_NOTE_EXT]; } else { - $this->setNote(new FHIRString($data[self::FIELD_NOTE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNote($value); + } else if (is_array($value)) { + $this->setNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNote(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -512,20 +533,27 @@ public function __construct($data = null) $this->setReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationOrderStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationOrderStatus([FHIRMedicationOrderStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationOrderStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRMedicationOrderStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationOrderStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationOrderStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationOrderStatus([FHIRMedicationOrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationOrderStatus($ext)); } } if (isset($data[self::FIELD_SUBSTITUTION])) { @@ -1229,8 +1257,8 @@ public function setSubstitution(FHIRMedicationOrderSubstitution $substitution = */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1438,15 +1466,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDateEnded())) { $a[self::FIELD_DATE_ENDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_ENDED_EXT] = $enc; } } if (null !== ($v = $this->getDateWritten())) { $a[self::FIELD_DATE_WRITTEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_WRITTEN_EXT] = $enc; } } @@ -1454,13 +1486,25 @@ public function jsonSerialize() $a[self::FIELD_DISPENSE_REQUEST] = $v; } if ([] !== ($vs = $this->getDosageInstruction())) { - $a[self::FIELD_DOSAGE_INSTRUCTION] = $vs; + $a[self::FIELD_DOSAGE_INSTRUCTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE_INSTRUCTION][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMedicationCodeableConcept())) { $a[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $v; @@ -1470,8 +1514,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTE_EXT] = $enc; } } @@ -1495,14 +1541,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationOrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationOrderStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubstitution())) { $a[self::FIELD_SUBSTITUTION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php index dccfa9eab2..c4bc875eda 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRMedicationStatement extends FHIRDomainResource implements PHPFHIRConta const FIELD_WAS_NOT_TAKEN_EXT = '_wasNotTaken'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -369,20 +369,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE_ASSERTED])) { - $ext = (isset($data[self::FIELD_DATE_ASSERTED_EXT]) && is_array($data[self::FIELD_DATE_ASSERTED_EXT])) - ? $data[self::FIELD_DATE_ASSERTED_EXT] - : null; - if ($data[self::FIELD_DATE_ASSERTED] instanceof FHIRDateTime) { - $this->setDateAsserted($data[self::FIELD_DATE_ASSERTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_ASSERTED])) { - $this->setDateAsserted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_ASSERTED]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_ASSERTED])) { - $this->setDateAsserted(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_ASSERTED]))); - } + if (isset($data[self::FIELD_DATE_ASSERTED]) || isset($data[self::FIELD_DATE_ASSERTED_EXT])) { + if (isset($data[self::FIELD_DATE_ASSERTED])) { + $value = $data[self::FIELD_DATE_ASSERTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_ASSERTED_EXT]) && is_array($data[self::FIELD_DATE_ASSERTED_EXT])) { + $ext = $data[self::FIELD_DATE_ASSERTED_EXT]; } else { - $this->setDateAsserted(new FHIRDateTime($data[self::FIELD_DATE_ASSERTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateAsserted($value); + } else if (is_array($value)) { + $this->setDateAsserted(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateAsserted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateAsserted(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DOSAGE])) { @@ -403,20 +410,27 @@ public function __construct($data = null) $this->addDosage(new FHIRMedicationStatementDosage($data[self::FIELD_DOSAGE])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -465,20 +479,27 @@ public function __construct($data = null) $this->setMedicationReference(new FHIRReference($data[self::FIELD_MEDICATION_REFERENCE])); } } - if (isset($data[self::FIELD_NOTE])) { - $ext = (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) - ? $data[self::FIELD_NOTE_EXT] - : null; - if ($data[self::FIELD_NOTE] instanceof FHIRString) { - $this->setNote($data[self::FIELD_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_NOTE])) { - $this->setNote(new FHIRString(array_merge($ext, $data[self::FIELD_NOTE]))); - } + if (isset($data[self::FIELD_NOTE]) || isset($data[self::FIELD_NOTE_EXT])) { + if (isset($data[self::FIELD_NOTE])) { + $value = $data[self::FIELD_NOTE]; } else { - $this->setNote(new FHIRString($data[self::FIELD_NOTE])); + $value = null; + } + if (isset($data[self::FIELD_NOTE_EXT]) && is_array($data[self::FIELD_NOTE_EXT])) { + $ext = $data[self::FIELD_NOTE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNote($value); + } else if (is_array($value)) { + $this->setNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNote(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -520,20 +541,27 @@ public function __construct($data = null) $this->addReasonNotTaken(new FHIRCodeableConcept($data[self::FIELD_REASON_NOT_TAKEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationStatementStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatementStatus([FHIRMedicationStatementStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatementStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationStatementStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationStatementStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationStatementStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationStatementStatus([FHIRMedicationStatementStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationStatementStatus($ext)); } } if (isset($data[self::FIELD_SUPPORTING_INFORMATION])) { @@ -554,20 +582,27 @@ public function __construct($data = null) $this->addSupportingInformation(new FHIRReference($data[self::FIELD_SUPPORTING_INFORMATION])); } } - if (isset($data[self::FIELD_WAS_NOT_TAKEN])) { - $ext = (isset($data[self::FIELD_WAS_NOT_TAKEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_TAKEN_EXT])) - ? $data[self::FIELD_WAS_NOT_TAKEN_EXT] - : null; - if ($data[self::FIELD_WAS_NOT_TAKEN] instanceof FHIRBoolean) { - $this->setWasNotTaken($data[self::FIELD_WAS_NOT_TAKEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WAS_NOT_TAKEN])) { - $this->setWasNotTaken(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WAS_NOT_TAKEN]] + $ext)); - } else if (is_array($data[self::FIELD_WAS_NOT_TAKEN])) { - $this->setWasNotTaken(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WAS_NOT_TAKEN]))); - } + if (isset($data[self::FIELD_WAS_NOT_TAKEN]) || isset($data[self::FIELD_WAS_NOT_TAKEN_EXT])) { + if (isset($data[self::FIELD_WAS_NOT_TAKEN])) { + $value = $data[self::FIELD_WAS_NOT_TAKEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WAS_NOT_TAKEN_EXT]) && is_array($data[self::FIELD_WAS_NOT_TAKEN_EXT])) { + $ext = $data[self::FIELD_WAS_NOT_TAKEN_EXT]; } else { - $this->setWasNotTaken(new FHIRBoolean($data[self::FIELD_WAS_NOT_TAKEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWasNotTaken($value); + } else if (is_array($value)) { + $this->setWasNotTaken(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWasNotTaken(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWasNotTaken(new FHIRBoolean($ext)); } } } @@ -1326,8 +1361,8 @@ public function setWasNotTaken($wasNotTaken = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1551,18 +1586,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDateAsserted())) { $a[self::FIELD_DATE_ASSERTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_ASSERTED_EXT] = $enc; } } if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -1570,7 +1615,13 @@ public function jsonSerialize() $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInformationSource())) { $a[self::FIELD_INFORMATION_SOURCE] = $v; @@ -1583,8 +1634,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getNote())) { $a[self::FIELD_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTE_EXT] = $enc; } } @@ -1598,25 +1651,44 @@ public function jsonSerialize() $a[self::FIELD_REASON_FOR_USE_REFERENCE] = $v; } if ([] !== ($vs = $this->getReasonNotTaken())) { - $a[self::FIELD_REASON_NOT_TAKEN] = $vs; + $a[self::FIELD_REASON_NOT_TAKEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_NOT_TAKEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationStatementStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationStatementStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } } if (null !== ($v = $this->getWasNotTaken())) { $a[self::FIELD_WAS_NOT_TAKEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WAS_NOT_TAKEN_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php index 6570d91129..6e4342acfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRMessageHeader extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TIMESTAMP_EXT = '_timestamp'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -357,20 +357,27 @@ public function __construct($data = null) $this->setSource(new FHIRMessageHeaderSource($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_TIMESTAMP])) { - $ext = (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) - ? $data[self::FIELD_TIMESTAMP_EXT] - : null; - if ($data[self::FIELD_TIMESTAMP] instanceof FHIRInstant) { - $this->setTimestamp($data[self::FIELD_TIMESTAMP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_TIMESTAMP]] + $ext)); - } else if (is_array($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant(array_merge($ext, $data[self::FIELD_TIMESTAMP]))); - } + if (isset($data[self::FIELD_TIMESTAMP]) || isset($data[self::FIELD_TIMESTAMP_EXT])) { + if (isset($data[self::FIELD_TIMESTAMP])) { + $value = $data[self::FIELD_TIMESTAMP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) { + $ext = $data[self::FIELD_TIMESTAMP_EXT]; } else { - $this->setTimestamp(new FHIRInstant($data[self::FIELD_TIMESTAMP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setTimestamp($value); + } else if (is_array($value)) { + $this->setTimestamp(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimestamp(new FHIRInstant($ext)); } } } @@ -836,8 +843,8 @@ public function setTimestamp($timestamp = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -995,10 +1002,22 @@ public function jsonSerialize() $a[self::FIELD_AUTHOR] = $v; } if ([] !== ($vs = $this->getData())) { - $a[self::FIELD_DATA] = $vs; + $a[self::FIELD_DATA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA][] = $v; + } } if ([] !== ($vs = $this->getDestination())) { - $a[self::FIELD_DESTINATION] = $vs; + $a[self::FIELD_DESTINATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESTINATION][] = $v; + } } if (null !== ($v = $this->getEnterer())) { $a[self::FIELD_ENTERER] = $v; @@ -1023,11 +1042,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimestamp())) { $a[self::FIELD_TIMESTAMP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_TIMESTAMP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php index 337ae420ca..4fcdbfb842 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRNamingSystem extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_USE_CONTEXT = 'useContext'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A curated namespace that issues unique symbols within that namespace for the @@ -317,84 +317,119 @@ public function __construct($data = null) $this->addContact(new FHIRNamingSystemContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; } - } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRNamingSystemType) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRNamingSystemType([FHIRNamingSystemType::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRNamingSystemType(array_merge($ext, $data[self::FIELD_KIND]))); + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setKind(new FHIRNamingSystemType($data[self::FIELD_KIND])); + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNamingSystemType) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRNamingSystemType(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRNamingSystemType([FHIRNamingSystemType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRNamingSystemType($ext)); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } if (isset($data[self::FIELD_REPLACED_BY])) { @@ -404,36 +439,50 @@ public function __construct($data = null) $this->setReplacedBy(new FHIRReference($data[self::FIELD_REPLACED_BY])); } } - if (isset($data[self::FIELD_RESPONSIBLE])) { - $ext = (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) - ? $data[self::FIELD_RESPONSIBLE_EXT] - : null; - if ($data[self::FIELD_RESPONSIBLE] instanceof FHIRString) { - $this->setResponsible($data[self::FIELD_RESPONSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESPONSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRString(array_merge($ext, $data[self::FIELD_RESPONSIBLE]))); - } + if (isset($data[self::FIELD_RESPONSIBLE]) || isset($data[self::FIELD_RESPONSIBLE_EXT])) { + if (isset($data[self::FIELD_RESPONSIBLE])) { + $value = $data[self::FIELD_RESPONSIBLE]; } else { - $this->setResponsible(new FHIRString($data[self::FIELD_RESPONSIBLE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) { + $ext = $data[self::FIELD_RESPONSIBLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResponsible($value); + } else if (is_array($value)) { + $this->setResponsible(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResponsible(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponsible(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -461,20 +510,27 @@ public function __construct($data = null) $this->addUniqueId(new FHIRNamingSystemUniqueId($data[self::FIELD_UNIQUE_ID])); } } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); - } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1092,8 +1148,8 @@ public function setUseContext(array $useContext = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1315,40 +1371,56 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNamingSystemType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNamingSystemType::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } @@ -1357,15 +1429,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getResponsible())) { $a[self::FIELD_RESPONSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESPONSIBLE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1373,17 +1449,34 @@ public function jsonSerialize() $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getUniqueId())) { - $a[self::FIELD_UNIQUE_ID] = $vs; + $a[self::FIELD_UNIQUE_ID] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UNIQUE_ID][] = $v; + } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php index 5a3e3a4e38..f32ebb7034 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRNutritionOrder extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_SUPPLEMENT = 'supplement'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -297,20 +297,27 @@ public function __construct($data = null) $this->addAllergyIntolerance(new FHIRReference($data[self::FIELD_ALLERGY_INTOLERANCE])); } } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -402,20 +409,27 @@ public function __construct($data = null) $this->setPatient(new FHIRReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRNutritionOrderStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNutritionOrderStatus([FHIRNutritionOrderStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNutritionOrderStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRNutritionOrderStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNutritionOrderStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRNutritionOrderStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRNutritionOrderStatus([FHIRNutritionOrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRNutritionOrderStatus($ext)); } } if (isset($data[self::FIELD_SUPPLEMENT])) { @@ -1024,8 +1038,8 @@ public function setSupplement(array $supplement = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1207,12 +1221,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAllergyIntolerance())) { - $a[self::FIELD_ALLERGY_INTOLERANCE] = $vs; + $a[self::FIELD_ALLERGY_INTOLERANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ALLERGY_INTOLERANCE][] = $v; + } } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } @@ -1223,13 +1245,31 @@ public function jsonSerialize() $a[self::FIELD_ENTERAL_FORMULA] = $v; } if ([] !== ($vs = $this->getExcludeFoodModifier())) { - $a[self::FIELD_EXCLUDE_FOOD_MODIFIER] = $vs; + $a[self::FIELD_EXCLUDE_FOOD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCLUDE_FOOD_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getFoodPreferenceModifier())) { - $a[self::FIELD_FOOD_PREFERENCE_MODIFIER] = $vs; + $a[self::FIELD_FOOD_PREFERENCE_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOOD_PREFERENCE_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOralDiet())) { $a[self::FIELD_ORAL_DIET] = $v; @@ -1242,13 +1282,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNutritionOrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNutritionOrderStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupplement())) { - $a[self::FIELD_SUPPLEMENT] = $vs; + $a[self::FIELD_SUPPLEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPLEMENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRObservation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRObservation.php index 22c5696d8c..e421b34529 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRObservation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRObservation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRObservation extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_VALUE_TIME_EXT = '_valueTime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -563,20 +563,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COMMENTS])) { - $ext = (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) - ? $data[self::FIELD_COMMENTS_EXT] - : null; - if ($data[self::FIELD_COMMENTS] instanceof FHIRString) { - $this->setComments($data[self::FIELD_COMMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENTS])) { - $this->setComments(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENTS]))); - } + if (isset($data[self::FIELD_COMMENTS]) || isset($data[self::FIELD_COMMENTS_EXT])) { + if (isset($data[self::FIELD_COMMENTS])) { + $value = $data[self::FIELD_COMMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENTS_EXT]) && is_array($data[self::FIELD_COMMENTS_EXT])) { + $ext = $data[self::FIELD_COMMENTS_EXT]; } else { - $this->setComments(new FHIRString($data[self::FIELD_COMMENTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComments($value); + } else if (is_array($value)) { + $this->setComments(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComments(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComments(new FHIRString($ext)); } } if (isset($data[self::FIELD_COMPONENT])) { @@ -611,20 +618,27 @@ public function __construct($data = null) $this->setDevice(new FHIRReference($data[self::FIELD_DEVICE])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -666,20 +680,27 @@ public function __construct($data = null) $this->setInterpretation(new FHIRCodeableConcept($data[self::FIELD_INTERPRETATION])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRInstant) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRInstant($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_METHOD])) { @@ -750,20 +771,27 @@ public function __construct($data = null) $this->setSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRObservationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRObservationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRObservationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRObservationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -787,20 +815,27 @@ public function __construct($data = null) $this->setValueCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_VALUE_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -838,36 +873,50 @@ public function __construct($data = null) $this->setValueSampledData(new FHIRSampledData($data[self::FIELD_VALUE_SAMPLED_DATA])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } } @@ -2093,8 +2142,8 @@ public function setValueTime($valueTime = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2434,13 +2483,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getComments())) { $a[self::FIELD_COMMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENTS_EXT] = $enc; } } if ([] !== ($vs = $this->getComponent())) { - $a[self::FIELD_COMPONENT] = $vs; + $a[self::FIELD_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPONENT][] = $v; + } } if (null !== ($v = $this->getDataAbsentReason())) { $a[self::FIELD_DATA_ABSENT_REASON] = $v; @@ -2450,8 +2507,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -2462,15 +2521,23 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInterpretation())) { $a[self::FIELD_INTERPRETATION] = $v; } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } @@ -2478,21 +2545,41 @@ public function jsonSerialize() $a[self::FIELD_METHOD] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getReferenceRange())) { - $a[self::FIELD_REFERENCE_RANGE] = $vs; + $a[self::FIELD_REFERENCE_RANGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_RANGE][] = $v; + } } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getSpecimen())) { $a[self::FIELD_SPECIMEN] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2507,8 +2594,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } @@ -2529,18 +2618,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php index b330d02373..b9284d4235 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIROperationDefinition extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -383,20 +383,27 @@ public function __construct($data = null) $this->setBase(new FHIRReference($data[self::FIELD_BASE])); } } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -417,132 +424,188 @@ public function __construct($data = null) $this->addContact(new FHIROperationDefinitionContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_IDEMPOTENT])) { - $ext = (isset($data[self::FIELD_IDEMPOTENT_EXT]) && is_array($data[self::FIELD_IDEMPOTENT_EXT])) - ? $data[self::FIELD_IDEMPOTENT_EXT] - : null; - if ($data[self::FIELD_IDEMPOTENT] instanceof FHIRBoolean) { - $this->setIdempotent($data[self::FIELD_IDEMPOTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDEMPOTENT])) { - $this->setIdempotent(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IDEMPOTENT]] + $ext)); - } else if (is_array($data[self::FIELD_IDEMPOTENT])) { - $this->setIdempotent(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IDEMPOTENT]))); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_IDEMPOTENT]) || isset($data[self::FIELD_IDEMPOTENT_EXT])) { + if (isset($data[self::FIELD_IDEMPOTENT])) { + $value = $data[self::FIELD_IDEMPOTENT]; } else { - $this->setIdempotent(new FHIRBoolean($data[self::FIELD_IDEMPOTENT])); - } - } - if (isset($data[self::FIELD_INSTANCE])) { - $ext = (isset($data[self::FIELD_INSTANCE_EXT]) && is_array($data[self::FIELD_INSTANCE_EXT])) - ? $data[self::FIELD_INSTANCE_EXT] - : null; - if ($data[self::FIELD_INSTANCE] instanceof FHIRBoolean) { - $this->setInstance($data[self::FIELD_INSTANCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTANCE])) { - $this->setInstance(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INSTANCE]] + $ext)); - } else if (is_array($data[self::FIELD_INSTANCE])) { - $this->setInstance(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INSTANCE]))); + $value = null; + } + if (isset($data[self::FIELD_IDEMPOTENT_EXT]) && is_array($data[self::FIELD_IDEMPOTENT_EXT])) { + $ext = $data[self::FIELD_IDEMPOTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIdempotent($value); + } else if (is_array($value)) { + $this->setIdempotent(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIdempotent(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIdempotent(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_INSTANCE]) || isset($data[self::FIELD_INSTANCE_EXT])) { + if (isset($data[self::FIELD_INSTANCE])) { + $value = $data[self::FIELD_INSTANCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANCE_EXT]) && is_array($data[self::FIELD_INSTANCE_EXT])) { + $ext = $data[self::FIELD_INSTANCE_EXT]; } else { - $this->setInstance(new FHIRBoolean($data[self::FIELD_INSTANCE])); - } - } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIROperationKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIROperationKind([FHIROperationKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIROperationKind(array_merge($ext, $data[self::FIELD_KIND]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInstance($value); + } else if (is_array($value)) { + $this->setInstance(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInstance(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInstance(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setKind(new FHIROperationKind($data[self::FIELD_KIND])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROperationKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIROperationKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIROperationKind([FHIROperationKind::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKind(new FHIROperationKind($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_NOTES])) { - $ext = (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) - ? $data[self::FIELD_NOTES_EXT] - : null; - if ($data[self::FIELD_NOTES] instanceof FHIRString) { - $this->setNotes($data[self::FIELD_NOTES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NOTES]] + $ext)); - } else if (is_array($data[self::FIELD_NOTES])) { - $this->setNotes(new FHIRString(array_merge($ext, $data[self::FIELD_NOTES]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NOTES]) || isset($data[self::FIELD_NOTES_EXT])) { + if (isset($data[self::FIELD_NOTES])) { + $value = $data[self::FIELD_NOTES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTES_EXT]) && is_array($data[self::FIELD_NOTES_EXT])) { + $ext = $data[self::FIELD_NOTES_EXT]; } else { - $this->setNotes(new FHIRString($data[self::FIELD_NOTES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNotes($value); + } else if (is_array($value)) { + $this->setNotes(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNotes(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotes(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -563,129 +626,180 @@ public function __construct($data = null) $this->addParameter(new FHIROperationDefinitionParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRBoolean) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRBoolean(array_merge($ext, $data[self::FIELD_SYSTEM]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setSystem(new FHIRBoolean($data[self::FIELD_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if (is_array($data[self::FIELD_TYPE])) { - foreach($data[self::FIELD_TYPE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addType($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addType(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addType($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addType($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addType(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addType(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->addType($data[self::FIELD_TYPE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TYPE])) { - $this->addType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else { - $this->addType(new FHIRCode($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addType(new FHIRCode($iext)); } + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1528,8 +1642,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1847,130 +1961,183 @@ public function jsonSerialize() } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getIdempotent())) { $a[self::FIELD_IDEMPOTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IDEMPOTENT_EXT] = $enc; } } if (null !== ($v = $this->getInstance())) { $a[self::FIELD_INSTANCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INSTANCE_EXT] = $enc; } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROperationKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIROperationKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getNotes())) { $a[self::FIELD_NOTES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NOTES_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { $a[self::FIELD_TYPE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TYPE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TYPE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TYPE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TYPE_EXT] = $encs; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php index 9d016ed7b6..0d287bcf37 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIROperationOutcome extends FHIRDomainResource implements PHPFHIRContaine const FIELD_ISSUE = 'issue'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A collection of error, warning or information messages that result from a system @@ -227,8 +227,8 @@ public function setIssue(array $issue = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -308,7 +308,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIssue())) { - $a[self::FIELD_ISSUE] = $vs; + $a[self::FIELD_ISSUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ISSUE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrder.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrder.php index 98754680c9..fcdca4a396 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrder.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIROrder extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_WHEN = 'when'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -224,20 +224,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -687,8 +694,8 @@ public function setWhen(FHIROrderWhen $when = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -832,16 +839,30 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getReasonCodeableConcept())) { $a[self::FIELD_REASON_CODEABLE_CONCEPT] = $v; @@ -861,6 +882,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhen())) { $a[self::FIELD_WHEN] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrderResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrderResponse.php index 81103bc6be..60248d1bfa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIROrderResponse extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_WHO = 'who'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -203,36 +203,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_FULFILLMENT])) { @@ -271,20 +285,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_ORDER_STATUS])) { - $ext = (isset($data[self::FIELD_ORDER_STATUS_EXT]) && is_array($data[self::FIELD_ORDER_STATUS_EXT])) - ? $data[self::FIELD_ORDER_STATUS_EXT] - : null; - if ($data[self::FIELD_ORDER_STATUS] instanceof FHIROrderStatus) { - $this->setOrderStatus($data[self::FIELD_ORDER_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDER_STATUS])) { - $this->setOrderStatus(new FHIROrderStatus([FHIROrderStatus::FIELD_VALUE => $data[self::FIELD_ORDER_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_ORDER_STATUS])) { - $this->setOrderStatus(new FHIROrderStatus(array_merge($ext, $data[self::FIELD_ORDER_STATUS]))); - } + if (isset($data[self::FIELD_ORDER_STATUS]) || isset($data[self::FIELD_ORDER_STATUS_EXT])) { + if (isset($data[self::FIELD_ORDER_STATUS])) { + $value = $data[self::FIELD_ORDER_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ORDER_STATUS_EXT]) && is_array($data[self::FIELD_ORDER_STATUS_EXT])) { + $ext = $data[self::FIELD_ORDER_STATUS_EXT]; } else { - $this->setOrderStatus(new FHIROrderStatus($data[self::FIELD_ORDER_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROrderStatus) { + $this->setOrderStatus($value); + } else if (is_array($value)) { + $this->setOrderStatus(new FHIROrderStatus(array_merge($ext, $value))); + } else { + $this->setOrderStatus(new FHIROrderStatus([FHIROrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOrderStatus(new FHIROrderStatus($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -632,8 +653,8 @@ public function setWho(FHIRReference $who = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -773,28 +794,46 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getFulfillment())) { - $a[self::FIELD_FULFILLMENT] = $vs; + $a[self::FIELD_FULFILLMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FULFILLMENT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrderStatus())) { $a[self::FIELD_ORDER_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIROrderStatus::FIELD_VALUE]); $a[self::FIELD_ORDER_STATUS_EXT] = $enc; } } @@ -804,6 +843,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWho())) { $a[self::FIELD_WHO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrganization.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrganization.php index 6d2258ad36..9908b69a1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrganization.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIROrganization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIROrganization extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -217,20 +217,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -287,20 +294,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART_OF])) { @@ -742,8 +756,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -903,24 +917,46 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -928,11 +964,20 @@ public function jsonSerialize() $a[self::FIELD_PART_OF] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPatient.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPatient.php index a6840ed9bf..28d383a999 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPatient.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPatient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRPatient extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -362,20 +362,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -403,20 +410,27 @@ public function __construct($data = null) $this->setAnimal(new FHIRPatientAnimal($data[self::FIELD_ANIMAL])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; + } + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_CARE_PROVIDER])) { @@ -473,52 +487,73 @@ public function __construct($data = null) $this->addContact(new FHIRPatientContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) - ? $data[self::FIELD_DECEASED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DECEASED_BOOLEAN] instanceof FHIRBoolean) { - $this->setDeceasedBoolean($data[self::FIELD_DECEASED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DECEASED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DECEASED_BOOLEAN]))); - } + if (isset($data[self::FIELD_DECEASED_BOOLEAN]) || isset($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { + $value = $data[self::FIELD_DECEASED_BOOLEAN]; } else { - $this->setDeceasedBoolean(new FHIRBoolean($data[self::FIELD_DECEASED_BOOLEAN])); - } - } - if (isset($data[self::FIELD_DECEASED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DECEASED_DATE_TIME_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_TIME_EXT])) - ? $data[self::FIELD_DECEASED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DECEASED_DATE_TIME] instanceof FHIRDateTime) { - $this->setDeceasedDateTime($data[self::FIELD_DECEASED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_DATE_TIME])) { - $this->setDeceasedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DECEASED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_DATE_TIME])) { - $this->setDeceasedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DECEASED_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DECEASED_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeceasedBoolean($value); + } else if (is_array($value)) { + $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DECEASED_DATE_TIME]) || isset($data[self::FIELD_DECEASED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DECEASED_DATE_TIME])) { + $value = $data[self::FIELD_DECEASED_DATE_TIME]; } else { - $this->setDeceasedDateTime(new FHIRDateTime($data[self::FIELD_DECEASED_DATE_TIME])); - } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRCode) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode(array_merge($ext, $data[self::FIELD_GENDER]))); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_DATE_TIME_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DECEASED_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDeceasedDateTime($value); + } else if (is_array($value)) { + $this->setDeceasedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDeceasedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; } else { - $this->setGender(new FHIRCode($data[self::FIELD_GENDER])); + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRCode($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -571,36 +606,50 @@ public function __construct($data = null) $this->setMaritalStatus(new FHIRCodeableConcept($data[self::FIELD_MARITAL_STATUS])); } } - if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $ext = (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) - ? $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] instanceof FHIRBoolean) { - $this->setMultipleBirthBoolean($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $this->setMultipleBirthBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $this->setMultipleBirthBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]))); - } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]) || isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $value = $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]; } else { - $this->setMultipleBirthBoolean(new FHIRBoolean($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])); - } - } - if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $ext = (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) - ? $data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_BIRTH_INTEGER] instanceof FHIRInteger) { - $this->setMultipleBirthInteger($data[self::FIELD_MULTIPLE_BIRTH_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $this->setMultipleBirthInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $this->setMultipleBirthInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]))); + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMultipleBirthBoolean($value); + } else if (is_array($value)) { + $this->setMultipleBirthBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMultipleBirthBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMultipleBirthBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER]) || isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $value = $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]; } else { - $this->setMultipleBirthInteger(new FHIRInteger($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMultipleBirthInteger($value); + } else if (is_array($value)) { + $this->setMultipleBirthInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMultipleBirthInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMultipleBirthInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_NAME])) { @@ -1565,8 +1614,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1867,59 +1916,105 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getAnimal())) { $a[self::FIELD_ANIMAL] = $v; } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCareProvider())) { - $a[self::FIELD_CARE_PROVIDER] = $vs; + $a[self::FIELD_CARE_PROVIDER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CARE_PROVIDER][] = $v; + } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDeceasedBoolean())) { $a[self::FIELD_DECEASED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DECEASED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDeceasedDateTime())) { $a[self::FIELD_DECEASED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DECEASED_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; @@ -1929,26 +2024,51 @@ public function jsonSerialize() } if (null !== ($v = $this->getMultipleBirthBoolean())) { $a[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getMultipleBirthInteger())) { $a[self::FIELD_MULTIPLE_BIRTH_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT] = $enc; } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php index a2352e3191..187bbf35e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRPaymentNotice extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -235,20 +235,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -704,8 +711,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -848,13 +855,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -880,6 +895,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php index 5cf706baea..9c8175673e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRPaymentReconciliation extends FHIRDomainResource implements PHPFHIRCon const FIELD_TOTAL = 'total'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -299,20 +299,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -333,20 +340,27 @@ public function __construct($data = null) $this->addDetail(new FHIRPaymentReconciliationDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); - } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_FORM])) { @@ -406,20 +420,27 @@ public function __construct($data = null) $this->setOriginalRuleset(new FHIRCoding($data[self::FIELD_ORIGINAL_RULESET])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRCode) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRCode(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; } else { - $this->setOutcome(new FHIRCode($data[self::FIELD_OUTCOME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -1051,8 +1072,8 @@ public function setTotal(FHIRMoney $total = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1255,18 +1276,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } @@ -1274,10 +1305,22 @@ public function jsonSerialize() $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -1287,8 +1330,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -1310,6 +1355,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPerson.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPerson.php index 3f8c0724b1..d5b70a56e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRPerson extends FHIRDomainResource implements PHPFHIRContainedTypeInter const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -241,20 +241,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -275,36 +282,50 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRCode) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode(array_merge($ext, $data[self::FIELD_GENDER]))); + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; } else { - $this->setGender(new FHIRCode($data[self::FIELD_GENDER])); + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRCode($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -889,8 +910,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1077,45 +1098,84 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if (null !== ($v = $this->getPhoto())) { $a[self::FIELD_PHOTO] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPractitioner.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPractitioner.php index 53c5325483..6ed318380a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRPractitioner extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -256,20 +256,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -290,20 +297,27 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; + } + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_COMMUNICATION])) { @@ -324,20 +338,27 @@ public function __construct($data = null) $this->addCommunication(new FHIRCodeableConcept($data[self::FIELD_COMMUNICATION])); } } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRCode) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode(array_merge($ext, $data[self::FIELD_GENDER]))); - } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRCode($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRCode($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -1021,8 +1042,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1229,48 +1250,99 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v; } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if ([] !== ($vs = $this->getPractitionerRole())) { - $a[self::FIELD_PRACTITIONER_ROLE] = $vs; + $a[self::FIELD_PRACTITIONER_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRACTITIONER_ROLE][] = $v; + } } if ([] !== ($vs = $this->getQualification())) { - $a[self::FIELD_QUALIFICATION] = $vs; + $a[self::FIELD_QUALIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUALIFICATION][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedure.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedure.php index 3d17afcd9d..173f8ba798 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRProcedure extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_USED = 'used'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -547,20 +547,27 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_NOT_PERFORMED])) { - $ext = (isset($data[self::FIELD_NOT_PERFORMED_EXT]) && is_array($data[self::FIELD_NOT_PERFORMED_EXT])) - ? $data[self::FIELD_NOT_PERFORMED_EXT] - : null; - if ($data[self::FIELD_NOT_PERFORMED] instanceof FHIRBoolean) { - $this->setNotPerformed($data[self::FIELD_NOT_PERFORMED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOT_PERFORMED])) { - $this->setNotPerformed(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NOT_PERFORMED]] + $ext)); - } else if (is_array($data[self::FIELD_NOT_PERFORMED])) { - $this->setNotPerformed(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NOT_PERFORMED]))); - } + if (isset($data[self::FIELD_NOT_PERFORMED]) || isset($data[self::FIELD_NOT_PERFORMED_EXT])) { + if (isset($data[self::FIELD_NOT_PERFORMED])) { + $value = $data[self::FIELD_NOT_PERFORMED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOT_PERFORMED_EXT]) && is_array($data[self::FIELD_NOT_PERFORMED_EXT])) { + $ext = $data[self::FIELD_NOT_PERFORMED_EXT]; } else { - $this->setNotPerformed(new FHIRBoolean($data[self::FIELD_NOT_PERFORMED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNotPerformed($value); + } else if (is_array($value)) { + $this->setNotPerformed(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNotPerformed(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotPerformed(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_NOTES])) { @@ -588,20 +595,27 @@ public function __construct($data = null) $this->setOutcome(new FHIRCodeableConcept($data[self::FIELD_OUTCOME])); } } - if (isset($data[self::FIELD_PERFORMED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_PERFORMED_DATE_TIME_EXT]) && is_array($data[self::FIELD_PERFORMED_DATE_TIME_EXT])) - ? $data[self::FIELD_PERFORMED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_PERFORMED_DATE_TIME] instanceof FHIRDateTime) { - $this->setPerformedDateTime($data[self::FIELD_PERFORMED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERFORMED_DATE_TIME])) { - $this->setPerformedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PERFORMED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PERFORMED_DATE_TIME])) { - $this->setPerformedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PERFORMED_DATE_TIME]))); - } + if (isset($data[self::FIELD_PERFORMED_DATE_TIME]) || isset($data[self::FIELD_PERFORMED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_PERFORMED_DATE_TIME])) { + $value = $data[self::FIELD_PERFORMED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERFORMED_DATE_TIME_EXT]) && is_array($data[self::FIELD_PERFORMED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_PERFORMED_DATE_TIME_EXT]; } else { - $this->setPerformedDateTime(new FHIRDateTime($data[self::FIELD_PERFORMED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPerformedDateTime($value); + } else if (is_array($value)) { + $this->setPerformedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPerformedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPerformedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_PERFORMED_PERIOD])) { @@ -686,20 +700,27 @@ public function __construct($data = null) $this->setRequest(new FHIRReference($data[self::FIELD_REQUEST])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRProcedureStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRProcedureStatus([FHIRProcedureStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRProcedureStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRProcedureStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRProcedureStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRProcedureStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRProcedureStatus([FHIRProcedureStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRProcedureStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1813,8 +1834,8 @@ public function setUsed(array $used = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2105,7 +2126,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -2114,40 +2141,74 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getComplication())) { - $a[self::FIELD_COMPLICATION] = $vs; + $a[self::FIELD_COMPLICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPLICATION][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getFocalDevice())) { - $a[self::FIELD_FOCAL_DEVICE] = $vs; + $a[self::FIELD_FOCAL_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCAL_DEVICE][] = $v; + } } if ([] !== ($vs = $this->getFollowUp())) { - $a[self::FIELD_FOLLOW_UP] = $vs; + $a[self::FIELD_FOLLOW_UP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOLLOW_UP][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getNotPerformed())) { $a[self::FIELD_NOT_PERFORMED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NOT_PERFORMED_EXT] = $enc; } } if ([] !== ($vs = $this->getNotes())) { - $a[self::FIELD_NOTES] = $vs; + $a[self::FIELD_NOTES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTES][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v; } if (null !== ($v = $this->getPerformedDateTime())) { $a[self::FIELD_PERFORMED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PERFORMED_DATE_TIME_EXT] = $enc; } } @@ -2155,27 +2216,47 @@ public function jsonSerialize() $a[self::FIELD_PERFORMED_PERIOD] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getReasonCodeableConcept())) { $a[self::FIELD_REASON_CODEABLE_CONCEPT] = $v; } if ([] !== ($vs = $this->getReasonNotPerformed())) { - $a[self::FIELD_REASON_NOT_PERFORMED] = $vs; + $a[self::FIELD_REASON_NOT_PERFORMED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_NOT_PERFORMED][] = $v; + } } if (null !== ($v = $this->getReasonReference())) { $a[self::FIELD_REASON_REFERENCE] = $v; } if ([] !== ($vs = $this->getReport())) { - $a[self::FIELD_REPORT] = $vs; + $a[self::FIELD_REPORT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPORT][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRProcedureStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRProcedureStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2183,7 +2264,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getUsed())) { - $a[self::FIELD_USED] = $vs; + $a[self::FIELD_USED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USED][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php index 5748d12627..ac6e2fa55f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRProcedureRequest extends FHIRDomainResource implements PHPFHIRContaine const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -362,20 +362,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -453,20 +460,27 @@ public function __construct($data = null) $this->addNotes(new FHIRAnnotation($data[self::FIELD_NOTES])); } } - if (isset($data[self::FIELD_ORDERED_ON])) { - $ext = (isset($data[self::FIELD_ORDERED_ON_EXT]) && is_array($data[self::FIELD_ORDERED_ON_EXT])) - ? $data[self::FIELD_ORDERED_ON_EXT] - : null; - if ($data[self::FIELD_ORDERED_ON] instanceof FHIRDateTime) { - $this->setOrderedOn($data[self::FIELD_ORDERED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDERED_ON])) { - $this->setOrderedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ORDERED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_ORDERED_ON])) { - $this->setOrderedOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ORDERED_ON]))); - } + if (isset($data[self::FIELD_ORDERED_ON]) || isset($data[self::FIELD_ORDERED_ON_EXT])) { + if (isset($data[self::FIELD_ORDERED_ON])) { + $value = $data[self::FIELD_ORDERED_ON]; } else { - $this->setOrderedOn(new FHIRDateTime($data[self::FIELD_ORDERED_ON])); + $value = null; + } + if (isset($data[self::FIELD_ORDERED_ON_EXT]) && is_array($data[self::FIELD_ORDERED_ON_EXT])) { + $ext = $data[self::FIELD_ORDERED_ON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOrderedOn($value); + } else if (is_array($value)) { + $this->setOrderedOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOrderedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOrderedOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ORDERER])) { @@ -483,20 +497,27 @@ public function __construct($data = null) $this->setPerformer(new FHIRReference($data[self::FIELD_PERFORMER])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRProcedureRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRProcedureRequestPriority([FHIRProcedureRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRProcedureRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRProcedureRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRProcedureRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRProcedureRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRProcedureRequestPriority([FHIRProcedureRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRProcedureRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODEABLE_CONCEPT])) { @@ -513,20 +534,27 @@ public function __construct($data = null) $this->setReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_SCHEDULED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_SCHEDULED_DATE_TIME_EXT]) && is_array($data[self::FIELD_SCHEDULED_DATE_TIME_EXT])) - ? $data[self::FIELD_SCHEDULED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_SCHEDULED_DATE_TIME] instanceof FHIRDateTime) { - $this->setScheduledDateTime($data[self::FIELD_SCHEDULED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCHEDULED_DATE_TIME])) { - $this->setScheduledDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_SCHEDULED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_SCHEDULED_DATE_TIME])) { - $this->setScheduledDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_SCHEDULED_DATE_TIME]))); - } + if (isset($data[self::FIELD_SCHEDULED_DATE_TIME]) || isset($data[self::FIELD_SCHEDULED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_SCHEDULED_DATE_TIME])) { + $value = $data[self::FIELD_SCHEDULED_DATE_TIME]; } else { - $this->setScheduledDateTime(new FHIRDateTime($data[self::FIELD_SCHEDULED_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_SCHEDULED_DATE_TIME_EXT]) && is_array($data[self::FIELD_SCHEDULED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_SCHEDULED_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setScheduledDateTime($value); + } else if (is_array($value)) { + $this->setScheduledDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setScheduledDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScheduledDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SCHEDULED_PERIOD])) { @@ -543,20 +571,27 @@ public function __construct($data = null) $this->setScheduledTiming(new FHIRTiming($data[self::FIELD_SCHEDULED_TIMING])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRProcedureRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRProcedureRequestStatus([FHIRProcedureRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRProcedureRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRProcedureRequestStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRProcedureRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRProcedureRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRProcedureRequestStatus([FHIRProcedureRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRProcedureRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1301,8 +1336,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1523,8 +1558,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -1532,7 +1569,13 @@ public function jsonSerialize() $a[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $v; } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -1541,15 +1584,29 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNotes())) { - $a[self::FIELD_NOTES] = $vs; + $a[self::FIELD_NOTES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTES][] = $v; + } } if (null !== ($v = $this->getOrderedOn())) { $a[self::FIELD_ORDERED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ORDERED_ON_EXT] = $enc; } } @@ -1561,8 +1618,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRProcedureRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRProcedureRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } @@ -1574,8 +1633,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getScheduledDateTime())) { $a[self::FIELD_SCHEDULED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_SCHEDULED_DATE_TIME_EXT] = $enc; } } @@ -1587,14 +1648,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRProcedureRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRProcedureRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php index f0eb013c36..fb9c76af39 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRProcessRequest extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * List of allowable action which this resource can request. @@ -318,65 +318,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION])) { - $ext = (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) - ? $data[self::FIELD_ACTION_EXT] - : null; - if ($data[self::FIELD_ACTION] instanceof FHIRActionList) { - $this->setAction($data[self::FIELD_ACTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRActionList([FHIRActionList::FIELD_VALUE => $data[self::FIELD_ACTION]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRActionList(array_merge($ext, $data[self::FIELD_ACTION]))); - } + if (isset($data[self::FIELD_ACTION]) || isset($data[self::FIELD_ACTION_EXT])) { + if (isset($data[self::FIELD_ACTION])) { + $value = $data[self::FIELD_ACTION]; } else { - $this->setAction(new FHIRActionList($data[self::FIELD_ACTION])); + $value = null; } - } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); + if (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) { + $ext = $data[self::FIELD_ACTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionList) { + $this->setAction($value); + } else if (is_array($value)) { + $this->setAction(new FHIRActionList(array_merge($ext, $value))); + } else { + $this->setAction(new FHIRActionList([FHIRActionList::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAction(new FHIRActionList($ext)); + } + } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_EXCLUDE])) { - $ext = (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) - ? $data[self::FIELD_EXCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_EXCLUDE])) { - foreach($data[self::FIELD_EXCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addExclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addExclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addExclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_EXCLUDE]) || isset($data[self::FIELD_EXCLUDE_EXT])) { + if (isset($data[self::FIELD_EXCLUDE])) { + $value = $data[self::FIELD_EXCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addExclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addExclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addExclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addExclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addExclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addExclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addExclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addExclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_EXCLUDE] instanceof FHIRString) { - $this->addExclude($data[self::FIELD_EXCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_EXCLUDE])) { - $this->addExclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXCLUDE]] + $ext)); - } else { - $this->addExclude(new FHIRString($data[self::FIELD_EXCLUDE])); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -397,33 +420,42 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INCLUDE])) { - $ext = (isset($data[self::FIELD_INCLUDE_EXT]) && is_array($data[self::FIELD_INCLUDE_EXT])) - ? $data[self::FIELD_INCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_INCLUDE])) { - foreach($data[self::FIELD_INCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addInclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INCLUDE]) || isset($data[self::FIELD_INCLUDE_EXT])) { + if (isset($data[self::FIELD_INCLUDE])) { + $value = $data[self::FIELD_INCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INCLUDE_EXT]) && is_array($data[self::FIELD_INCLUDE_EXT])) { + $ext = $data[self::FIELD_INCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addInclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addInclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addInclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addInclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_INCLUDE] instanceof FHIRString) { - $this->addInclude($data[self::FIELD_INCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INCLUDE])) { - $this->addInclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INCLUDE]] + $ext)); - } else { - $this->addInclude(new FHIRString($data[self::FIELD_INCLUDE])); } } if (isset($data[self::FIELD_ITEM])) { @@ -444,20 +476,27 @@ public function __construct($data = null) $this->addItem(new FHIRProcessRequestItem($data[self::FIELD_ITEM])); } } - if (isset($data[self::FIELD_NULLIFY])) { - $ext = (isset($data[self::FIELD_NULLIFY_EXT]) && is_array($data[self::FIELD_NULLIFY_EXT])) - ? $data[self::FIELD_NULLIFY_EXT] - : null; - if ($data[self::FIELD_NULLIFY] instanceof FHIRBoolean) { - $this->setNullify($data[self::FIELD_NULLIFY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NULLIFY])) { - $this->setNullify(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NULLIFY]] + $ext)); - } else if (is_array($data[self::FIELD_NULLIFY])) { - $this->setNullify(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NULLIFY]))); - } + if (isset($data[self::FIELD_NULLIFY]) || isset($data[self::FIELD_NULLIFY_EXT])) { + if (isset($data[self::FIELD_NULLIFY])) { + $value = $data[self::FIELD_NULLIFY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NULLIFY_EXT]) && is_array($data[self::FIELD_NULLIFY_EXT])) { + $ext = $data[self::FIELD_NULLIFY_EXT]; } else { - $this->setNullify(new FHIRBoolean($data[self::FIELD_NULLIFY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNullify($value); + } else if (is_array($value)) { + $this->setNullify(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNullify(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNullify(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ORGANIZATION])) { @@ -488,20 +527,27 @@ public function __construct($data = null) $this->setProvider(new FHIRReference($data[self::FIELD_PROVIDER])); } } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRString) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE]))); - } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRString($data[self::FIELD_REFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRString($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -1203,8 +1249,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1420,58 +1466,92 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAction())) { $a[self::FIELD_ACTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionList::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionList::FIELD_VALUE]); $a[self::FIELD_ACTION_EXT] = $enc; } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getExclude())) { $a[self::FIELD_EXCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_EXCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_EXCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_EXCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_EXCLUDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInclude())) { $a[self::FIELD_INCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INCLUDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getNullify())) { $a[self::FIELD_NULLIFY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NULLIFY_EXT] = $enc; } } @@ -1489,8 +1569,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } @@ -1506,6 +1588,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php index fe463af9f6..c02095735e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRProcessResponse extends FHIRDomainResource implements PHPFHIRContained const FIELD_RULESET = 'ruleset'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -274,36 +274,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_ERROR])) { @@ -945,8 +959,8 @@ public function setRuleset(FHIRCoding $ruleset = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1129,29 +1143,51 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getError())) { - $a[self::FIELD_ERROR] = $vs; + $a[self::FIELD_ERROR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ERROR][] = $v; + } } if (null !== ($v = $this->getForm())) { $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNotes())) { - $a[self::FIELD_NOTES] = $vs; + $a[self::FIELD_NOTES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTES][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -1174,6 +1210,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRuleset())) { $a[self::FIELD_RULESET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProvenance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProvenance.php index 38290bf54d..eeb09286e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProvenance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRProvenance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRProvenance extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -332,33 +332,42 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_POLICY])) { - $ext = (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) - ? $data[self::FIELD_POLICY_EXT] - : null; - if (is_array($data[self::FIELD_POLICY])) { - foreach($data[self::FIELD_POLICY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addPolicy($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPolicy(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_POLICY]) || isset($data[self::FIELD_POLICY_EXT])) { + if (isset($data[self::FIELD_POLICY])) { + $value = $data[self::FIELD_POLICY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) { + $ext = $data[self::FIELD_POLICY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addPolicy($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addPolicy($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPolicy(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPolicy(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addPolicy(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPolicy(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_POLICY] instanceof FHIRUri) { - $this->addPolicy($data[self::FIELD_POLICY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_POLICY])) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_POLICY]] + $ext)); - } else { - $this->addPolicy(new FHIRUri($data[self::FIELD_POLICY])); } } if (isset($data[self::FIELD_REASON])) { @@ -379,20 +388,27 @@ public function __construct($data = null) $this->addReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_RECORDED])) { - $ext = (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) - ? $data[self::FIELD_RECORDED_EXT] - : null; - if ($data[self::FIELD_RECORDED] instanceof FHIRInstant) { - $this->setRecorded($data[self::FIELD_RECORDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_RECORDED]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant(array_merge($ext, $data[self::FIELD_RECORDED]))); - } + if (isset($data[self::FIELD_RECORDED]) || isset($data[self::FIELD_RECORDED_EXT])) { + if (isset($data[self::FIELD_RECORDED])) { + $value = $data[self::FIELD_RECORDED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) { + $ext = $data[self::FIELD_RECORDED_EXT]; } else { - $this->setRecorded(new FHIRInstant($data[self::FIELD_RECORDED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setRecorded($value); + } else if (is_array($value)) { + $this->setRecorded(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecorded(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_SIGNATURE])) { @@ -1020,8 +1036,8 @@ public function setTarget(array $target = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1201,10 +1217,22 @@ public function jsonSerialize() $a[self::FIELD_ACTIVITY] = $v; } if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if ([] !== ($vs = $this->getEntity())) { - $a[self::FIELD_ENTITY] = $vs; + $a[self::FIELD_ENTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTITY][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; @@ -1214,34 +1242,65 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPolicy())) { $a[self::FIELD_POLICY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_POLICY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_POLICY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_POLICY_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_POLICY_EXT] = $encs; + } } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if (null !== ($v = $this->getRecorded())) { $a[self::FIELD_RECORDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_RECORDED_EXT] = $enc; } } if ([] !== ($vs = $this->getSignature())) { - $a[self::FIELD_SIGNATURE] = $vs; + $a[self::FIELD_SIGNATURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SIGNATURE][] = $v; + } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php index 31b89b3513..0c40cc5429 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRQuestionnaire extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -224,20 +224,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_GROUP])) { @@ -265,65 +272,88 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRQuestionnaireStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireStatus([FHIRQuestionnaireStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRQuestionnaireStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuestionnaireStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRQuestionnaireStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRQuestionnaireStatus([FHIRQuestionnaireStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRQuestionnaireStatus($ext)); } } - if (isset($data[self::FIELD_SUBJECT_TYPE])) { - $ext = (isset($data[self::FIELD_SUBJECT_TYPE_EXT]) && is_array($data[self::FIELD_SUBJECT_TYPE_EXT])) - ? $data[self::FIELD_SUBJECT_TYPE_EXT] - : null; - if (is_array($data[self::FIELD_SUBJECT_TYPE])) { - foreach($data[self::FIELD_SUBJECT_TYPE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addSubjectType($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSubjectType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSubjectType(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUBJECT_TYPE]) || isset($data[self::FIELD_SUBJECT_TYPE_EXT])) { + if (isset($data[self::FIELD_SUBJECT_TYPE])) { + $value = $data[self::FIELD_SUBJECT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBJECT_TYPE_EXT]) && is_array($data[self::FIELD_SUBJECT_TYPE_EXT])) { + $ext = $data[self::FIELD_SUBJECT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addSubjectType($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addSubjectType($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSubjectType(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addSubjectType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSubjectType(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addSubjectType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addSubjectType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSubjectType(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_SUBJECT_TYPE] instanceof FHIRCode) { - $this->addSubjectType($data[self::FIELD_SUBJECT_TYPE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUBJECT_TYPE])) { - $this->addSubjectType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_SUBJECT_TYPE]] + $ext)); - } else { - $this->addSubjectType(new FHIRCode($data[self::FIELD_SUBJECT_TYPE])); } } if (isset($data[self::FIELD_TELECOM])) { @@ -344,20 +374,27 @@ public function __construct($data = null) $this->addTelecom(new FHIRContactPoint($data[self::FIELD_TELECOM])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -771,8 +808,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -933,8 +970,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -942,47 +981,76 @@ public function jsonSerialize() $a[self::FIELD_GROUP] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuestionnaireStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuestionnaireStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSubjectType())) { $a[self::FIELD_SUBJECT_TYPE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUBJECT_TYPE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUBJECT_TYPE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUBJECT_TYPE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUBJECT_TYPE_EXT] = $encs; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php index 73e94b1383..9947faf2bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRQuestionnaireResponse extends FHIRDomainResource implements PHPFHIRCon const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -239,20 +239,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_AUTHORED])) { - $ext = (isset($data[self::FIELD_AUTHORED_EXT]) && is_array($data[self::FIELD_AUTHORED_EXT])) - ? $data[self::FIELD_AUTHORED_EXT] - : null; - if ($data[self::FIELD_AUTHORED] instanceof FHIRDateTime) { - $this->setAuthored($data[self::FIELD_AUTHORED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED])) { - $this->setAuthored(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED])) { - $this->setAuthored(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED]))); - } + if (isset($data[self::FIELD_AUTHORED]) || isset($data[self::FIELD_AUTHORED_EXT])) { + if (isset($data[self::FIELD_AUTHORED])) { + $value = $data[self::FIELD_AUTHORED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_EXT]) && is_array($data[self::FIELD_AUTHORED_EXT])) { + $ext = $data[self::FIELD_AUTHORED_EXT]; } else { - $this->setAuthored(new FHIRDateTime($data[self::FIELD_AUTHORED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthored($value); + } else if (is_array($value)) { + $this->setAuthored(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthored(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthored(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -290,20 +297,27 @@ public function __construct($data = null) $this->setSource(new FHIRReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRQuestionnaireResponseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireResponseStatus([FHIRQuestionnaireResponseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireResponseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRQuestionnaireResponseStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuestionnaireResponseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRQuestionnaireResponseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRQuestionnaireResponseStatus([FHIRQuestionnaireResponseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRQuestionnaireResponseStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -648,8 +662,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -782,8 +796,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthored())) { $a[self::FIELD_AUTHORED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_EXT] = $enc; } } @@ -804,14 +820,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuestionnaireResponseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuestionnaireResponseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php index 195a59f442..50004677d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRReferralRequest extends FHIRDomainResource implements PHPFHIRContained const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -337,52 +337,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DATE_SENT])) { - $ext = (isset($data[self::FIELD_DATE_SENT_EXT]) && is_array($data[self::FIELD_DATE_SENT_EXT])) - ? $data[self::FIELD_DATE_SENT_EXT] - : null; - if ($data[self::FIELD_DATE_SENT] instanceof FHIRDateTime) { - $this->setDateSent($data[self::FIELD_DATE_SENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_SENT])) { - $this->setDateSent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_SENT]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_SENT])) { - $this->setDateSent(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_SENT]))); - } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDateSent(new FHIRDateTime($data[self::FIELD_DATE_SENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE_SENT]) || isset($data[self::FIELD_DATE_SENT_EXT])) { + if (isset($data[self::FIELD_DATE_SENT])) { + $value = $data[self::FIELD_DATE_SENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_SENT_EXT]) && is_array($data[self::FIELD_DATE_SENT_EXT])) { + $ext = $data[self::FIELD_DATE_SENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateSent($value); + } else if (is_array($value)) { + $this->setDateSent(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateSent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDateSent(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -488,20 +509,27 @@ public function __construct($data = null) $this->setSpecialty(new FHIRCodeableConcept($data[self::FIELD_SPECIALTY])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRReferralStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRReferralStatus([FHIRReferralStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRReferralStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRReferralStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRReferralStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRReferralStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRReferralStatus([FHIRReferralStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRReferralStatus($ext)); } } if (isset($data[self::FIELD_SUPPORTING_INFORMATION])) { @@ -1238,8 +1266,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1455,22 +1483,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDateSent())) { $a[self::FIELD_DATE_SENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_SENT_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1481,7 +1515,13 @@ public function jsonSerialize() $a[self::FIELD_FULFILLMENT_TIME] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -1493,30 +1533,53 @@ public function jsonSerialize() $a[self::FIELD_REASON] = $v; } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; } if ([] !== ($vs = $this->getServiceRequested())) { - $a[self::FIELD_SERVICE_REQUESTED] = $vs; + $a[self::FIELD_SERVICE_REQUESTED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_REQUESTED][] = $v; + } } if (null !== ($v = $this->getSpecialty())) { $a[self::FIELD_SPECIALTY] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRReferralStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRReferralStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php index 6d79d094e4..dd19ea0784 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRRelatedPerson extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * There is a variety of postal address formats defined around the world. This @@ -263,36 +263,50 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRCode) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRCode(array_merge($ext, $data[self::FIELD_GENDER]))); + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRCode($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRCode($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -848,8 +862,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1020,24 +1034,40 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v; @@ -1049,13 +1079,28 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php index a46b1e0a7e..654adedf4f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRRiskAssessment extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -263,20 +263,27 @@ public function __construct($data = null) $this->setCondition(new FHIRReference($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -300,20 +307,27 @@ public function __construct($data = null) $this->setMethod(new FHIRCodeableConcept($data[self::FIELD_METHOD])); } } - if (isset($data[self::FIELD_MITIGATION])) { - $ext = (isset($data[self::FIELD_MITIGATION_EXT]) && is_array($data[self::FIELD_MITIGATION_EXT])) - ? $data[self::FIELD_MITIGATION_EXT] - : null; - if ($data[self::FIELD_MITIGATION] instanceof FHIRString) { - $this->setMitigation($data[self::FIELD_MITIGATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MITIGATION])) { - $this->setMitigation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MITIGATION]] + $ext)); - } else if (is_array($data[self::FIELD_MITIGATION])) { - $this->setMitigation(new FHIRString(array_merge($ext, $data[self::FIELD_MITIGATION]))); - } + if (isset($data[self::FIELD_MITIGATION]) || isset($data[self::FIELD_MITIGATION_EXT])) { + if (isset($data[self::FIELD_MITIGATION])) { + $value = $data[self::FIELD_MITIGATION]; } else { - $this->setMitigation(new FHIRString($data[self::FIELD_MITIGATION])); + $value = null; + } + if (isset($data[self::FIELD_MITIGATION_EXT]) && is_array($data[self::FIELD_MITIGATION_EXT])) { + $ext = $data[self::FIELD_MITIGATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMitigation($value); + } else if (is_array($value)) { + $this->setMitigation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMitigation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMitigation(new FHIRString($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -761,8 +775,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -919,15 +933,23 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasis())) { - $a[self::FIELD_BASIS] = $vs; + $a[self::FIELD_BASIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASIS][] = $v; + } } if (null !== ($v = $this->getCondition())) { $a[self::FIELD_CONDITION] = $v; } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -942,8 +964,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getMitigation())) { $a[self::FIELD_MITIGATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MITIGATION_EXT] = $enc; } } @@ -951,11 +975,20 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getPrediction())) { - $a[self::FIELD_PREDICTION] = $vs; + $a[self::FIELD_PREDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PREDICTION][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSchedule.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSchedule.php index c6ccb72746..6be5676fa8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSchedule extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -186,20 +186,27 @@ public function __construct($data = null) $this->setActor(new FHIRReference($data[self::FIELD_ACTOR])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -510,8 +517,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -634,19 +641,36 @@ public function jsonSerialize() } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPlanningHorizon())) { $a[self::FIELD_PLANNING_HORIZON] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php index 608935f6a6..831e8668b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRSearchParameter extends FHIRDomainResource implements PHPFHIRContained const FIELD_XPATH_USAGE_EXT = '_xpathUsage'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -323,36 +323,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BASE])) { - $ext = (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) - ? $data[self::FIELD_BASE_EXT] - : null; - if ($data[self::FIELD_BASE] instanceof FHIRCode) { - $this->setBase($data[self::FIELD_BASE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE])) { - $this->setBase(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_BASE]] + $ext)); - } else if (is_array($data[self::FIELD_BASE])) { - $this->setBase(new FHIRCode(array_merge($ext, $data[self::FIELD_BASE]))); - } + if (isset($data[self::FIELD_BASE]) || isset($data[self::FIELD_BASE_EXT])) { + if (isset($data[self::FIELD_BASE])) { + $value = $data[self::FIELD_BASE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) { + $ext = $data[self::FIELD_BASE_EXT]; } else { - $this->setBase(new FHIRCode($data[self::FIELD_BASE])); - } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setBase($value); + } else if (is_array($value)) { + $this->setBase(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setBase(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBase(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -373,209 +387,295 @@ public function __construct($data = null) $this->addContact(new FHIRSearchParameterContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_TARGET])) { - $ext = (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) - ? $data[self::FIELD_TARGET_EXT] - : null; - if (is_array($data[self::FIELD_TARGET])) { - foreach($data[self::FIELD_TARGET] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addTarget($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTarget(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TARGET]) || isset($data[self::FIELD_TARGET_EXT])) { + if (isset($data[self::FIELD_TARGET])) { + $value = $data[self::FIELD_TARGET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) { + $ext = $data[self::FIELD_TARGET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addTarget($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addTarget($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTarget(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTarget(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addTarget(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_TARGET] instanceof FHIRCode) { - $this->addTarget($data[self::FIELD_TARGET]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TARGET])) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TARGET]] + $ext)); - } else { - $this->addTarget(new FHIRCode($data[self::FIELD_TARGET])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTarget(new FHIRCode($iext)); } + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_XPATH])) { - $ext = (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) - ? $data[self::FIELD_XPATH_EXT] - : null; - if ($data[self::FIELD_XPATH] instanceof FHIRString) { - $this->setXpath($data[self::FIELD_XPATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_XPATH]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString(array_merge($ext, $data[self::FIELD_XPATH]))); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_XPATH]) || isset($data[self::FIELD_XPATH_EXT])) { + if (isset($data[self::FIELD_XPATH])) { + $value = $data[self::FIELD_XPATH]; } else { - $this->setXpath(new FHIRString($data[self::FIELD_XPATH])); - } - } - if (isset($data[self::FIELD_XPATH_USAGE])) { - $ext = (isset($data[self::FIELD_XPATH_USAGE_EXT]) && is_array($data[self::FIELD_XPATH_USAGE_EXT])) - ? $data[self::FIELD_XPATH_USAGE_EXT] - : null; - if ($data[self::FIELD_XPATH_USAGE] instanceof FHIRXPathUsageType) { - $this->setXpathUsage($data[self::FIELD_XPATH_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH_USAGE])) { - $this->setXpathUsage(new FHIRXPathUsageType([FHIRXPathUsageType::FIELD_VALUE => $data[self::FIELD_XPATH_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH_USAGE])) { - $this->setXpathUsage(new FHIRXPathUsageType(array_merge($ext, $data[self::FIELD_XPATH_USAGE]))); + $value = null; + } + if (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) { + $ext = $data[self::FIELD_XPATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setXpath($value); + } else if (is_array($value)) { + $this->setXpath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setXpath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_XPATH_USAGE]) || isset($data[self::FIELD_XPATH_USAGE_EXT])) { + if (isset($data[self::FIELD_XPATH_USAGE])) { + $value = $data[self::FIELD_XPATH_USAGE]; } else { - $this->setXpathUsage(new FHIRXPathUsageType($data[self::FIELD_XPATH_USAGE])); + $value = null; + } + if (isset($data[self::FIELD_XPATH_USAGE_EXT]) && is_array($data[self::FIELD_XPATH_USAGE_EXT])) { + $ext = $data[self::FIELD_XPATH_USAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRXPathUsageType) { + $this->setXpathUsage($value); + } else if (is_array($value)) { + $this->setXpathUsage(new FHIRXPathUsageType(array_merge($ext, $value))); + } else { + $this->setXpathUsage(new FHIRXPathUsageType([FHIRXPathUsageType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setXpathUsage(new FHIRXPathUsageType($ext)); } } } @@ -1253,8 +1353,8 @@ public function setXpathUsage(FHIRXPathUsageType $xpathUsage = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1522,113 +1622,156 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_BASE_EXT] = $enc; } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { $a[self::FIELD_TARGET] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TARGET][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TARGET_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TARGET_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TARGET_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getXpath())) { $a[self::FIELD_XPATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_XPATH_EXT] = $enc; } } if (null !== ($v = $this->getXpathUsage())) { $a[self::FIELD_XPATH_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRXPathUsageType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRXPathUsageType::FIELD_VALUE]); $a[self::FIELD_XPATH_USAGE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSlot.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSlot.php index 0644bd606c..51cbd156fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSlot.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSlot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRSlot extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -220,52 +220,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); - } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); - } - } - if (isset($data[self::FIELD_FREE_BUSY_TYPE])) { - $ext = (isset($data[self::FIELD_FREE_BUSY_TYPE_EXT]) && is_array($data[self::FIELD_FREE_BUSY_TYPE_EXT])) - ? $data[self::FIELD_FREE_BUSY_TYPE_EXT] - : null; - if ($data[self::FIELD_FREE_BUSY_TYPE] instanceof FHIRSlotStatus) { - $this->setFreeBusyType($data[self::FIELD_FREE_BUSY_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FREE_BUSY_TYPE])) { - $this->setFreeBusyType(new FHIRSlotStatus([FHIRSlotStatus::FIELD_VALUE => $data[self::FIELD_FREE_BUSY_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_FREE_BUSY_TYPE])) { - $this->setFreeBusyType(new FHIRSlotStatus(array_merge($ext, $data[self::FIELD_FREE_BUSY_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_FREE_BUSY_TYPE]) || isset($data[self::FIELD_FREE_BUSY_TYPE_EXT])) { + if (isset($data[self::FIELD_FREE_BUSY_TYPE])) { + $value = $data[self::FIELD_FREE_BUSY_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FREE_BUSY_TYPE_EXT]) && is_array($data[self::FIELD_FREE_BUSY_TYPE_EXT])) { + $ext = $data[self::FIELD_FREE_BUSY_TYPE_EXT]; } else { - $this->setFreeBusyType(new FHIRSlotStatus($data[self::FIELD_FREE_BUSY_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSlotStatus) { + $this->setFreeBusyType($value); + } else if (is_array($value)) { + $this->setFreeBusyType(new FHIRSlotStatus(array_merge($ext, $value))); + } else { + $this->setFreeBusyType(new FHIRSlotStatus([FHIRSlotStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFreeBusyType(new FHIRSlotStatus($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -286,20 +307,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_OVERBOOKED])) { - $ext = (isset($data[self::FIELD_OVERBOOKED_EXT]) && is_array($data[self::FIELD_OVERBOOKED_EXT])) - ? $data[self::FIELD_OVERBOOKED_EXT] - : null; - if ($data[self::FIELD_OVERBOOKED] instanceof FHIRBoolean) { - $this->setOverbooked($data[self::FIELD_OVERBOOKED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OVERBOOKED])) { - $this->setOverbooked(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_OVERBOOKED]] + $ext)); - } else if (is_array($data[self::FIELD_OVERBOOKED])) { - $this->setOverbooked(new FHIRBoolean(array_merge($ext, $data[self::FIELD_OVERBOOKED]))); - } + if (isset($data[self::FIELD_OVERBOOKED]) || isset($data[self::FIELD_OVERBOOKED_EXT])) { + if (isset($data[self::FIELD_OVERBOOKED])) { + $value = $data[self::FIELD_OVERBOOKED]; } else { - $this->setOverbooked(new FHIRBoolean($data[self::FIELD_OVERBOOKED])); + $value = null; + } + if (isset($data[self::FIELD_OVERBOOKED_EXT]) && is_array($data[self::FIELD_OVERBOOKED_EXT])) { + $ext = $data[self::FIELD_OVERBOOKED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOverbooked($value); + } else if (is_array($value)) { + $this->setOverbooked(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOverbooked(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOverbooked(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_SCHEDULE])) { @@ -309,20 +337,27 @@ public function __construct($data = null) $this->setSchedule(new FHIRReference($data[self::FIELD_SCHEDULE])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInstant) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; + } else { + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; } else { - $this->setStart(new FHIRInstant($data[self::FIELD_START])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -681,8 +716,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -837,32 +872,46 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getFreeBusyType())) { $a[self::FIELD_FREE_BUSY_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSlotStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSlotStatus::FIELD_VALUE]); $a[self::FIELD_FREE_BUSY_TYPE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOverbooked())) { $a[self::FIELD_OVERBOOKED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_OVERBOOKED_EXT] = $enc; } } @@ -871,14 +920,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSpecimen.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSpecimen.php index 113e9b73d4..ded8e028eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSpecimen.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSpecimen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRSpecimen extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -304,36 +304,50 @@ public function __construct($data = null) $this->addParent(new FHIRReference($data[self::FIELD_PARENT])); } } - if (isset($data[self::FIELD_RECEIVED_TIME])) { - $ext = (isset($data[self::FIELD_RECEIVED_TIME_EXT]) && is_array($data[self::FIELD_RECEIVED_TIME_EXT])) - ? $data[self::FIELD_RECEIVED_TIME_EXT] - : null; - if ($data[self::FIELD_RECEIVED_TIME] instanceof FHIRDateTime) { - $this->setReceivedTime($data[self::FIELD_RECEIVED_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECEIVED_TIME])) { - $this->setReceivedTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECEIVED_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_RECEIVED_TIME])) { - $this->setReceivedTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECEIVED_TIME]))); - } + if (isset($data[self::FIELD_RECEIVED_TIME]) || isset($data[self::FIELD_RECEIVED_TIME_EXT])) { + if (isset($data[self::FIELD_RECEIVED_TIME])) { + $value = $data[self::FIELD_RECEIVED_TIME]; } else { - $this->setReceivedTime(new FHIRDateTime($data[self::FIELD_RECEIVED_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSpecimenStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSpecimenStatus([FHIRSpecimenStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSpecimenStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_RECEIVED_TIME_EXT]) && is_array($data[self::FIELD_RECEIVED_TIME_EXT])) { + $ext = $data[self::FIELD_RECEIVED_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReceivedTime($value); + } else if (is_array($value)) { + $this->setReceivedTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReceivedTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReceivedTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSpecimenStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSpecimenStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSpecimenStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSpecimenStatus([FHIRSpecimenStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSpecimenStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -817,8 +831,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -987,25 +1001,47 @@ public function jsonSerialize() $a[self::FIELD_COLLECTION] = $v; } if ([] !== ($vs = $this->getContainer())) { - $a[self::FIELD_CONTAINER] = $vs; + $a[self::FIELD_CONTAINER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getParent())) { - $a[self::FIELD_PARENT] = $vs; + $a[self::FIELD_PARENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARENT][] = $v; + } } if (null !== ($v = $this->getReceivedTime())) { $a[self::FIELD_RECEIVED_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECEIVED_TIME_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSpecimenStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSpecimenStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1013,11 +1049,20 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getTreatment())) { - $a[self::FIELD_TREATMENT] = $vs; + $a[self::FIELD_TREATMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TREATMENT][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php index f6e1506b55..21537f3924 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRStructureDefinition extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -476,36 +476,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ABSTRACT])) { - $ext = (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) - ? $data[self::FIELD_ABSTRACT_EXT] - : null; - if ($data[self::FIELD_ABSTRACT] instanceof FHIRBoolean) { - $this->setAbstract($data[self::FIELD_ABSTRACT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABSTRACT]] + $ext)); - } else if (is_array($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABSTRACT]))); - } + if (isset($data[self::FIELD_ABSTRACT]) || isset($data[self::FIELD_ABSTRACT_EXT])) { + if (isset($data[self::FIELD_ABSTRACT])) { + $value = $data[self::FIELD_ABSTRACT]; } else { - $this->setAbstract(new FHIRBoolean($data[self::FIELD_ABSTRACT])); + $value = null; } - } - if (isset($data[self::FIELD_BASE])) { - $ext = (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) - ? $data[self::FIELD_BASE_EXT] - : null; - if ($data[self::FIELD_BASE] instanceof FHIRUri) { - $this->setBase($data[self::FIELD_BASE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE])) { - $this->setBase(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_BASE]] + $ext)); - } else if (is_array($data[self::FIELD_BASE])) { - $this->setBase(new FHIRUri(array_merge($ext, $data[self::FIELD_BASE]))); + if (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) { + $ext = $data[self::FIELD_ABSTRACT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbstract($value); + } else if (is_array($value)) { + $this->setAbstract(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbstract(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_BASE]) || isset($data[self::FIELD_BASE_EXT])) { + if (isset($data[self::FIELD_BASE])) { + $value = $data[self::FIELD_BASE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) { + $ext = $data[self::FIELD_BASE_EXT]; } else { - $this->setBase(new FHIRUri($data[self::FIELD_BASE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setBase($value); + } else if (is_array($value)) { + $this->setBase(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setBase(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBase(new FHIRUri($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -526,20 +540,27 @@ public function __construct($data = null) $this->addCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CONSTRAINED_TYPE])) { - $ext = (isset($data[self::FIELD_CONSTRAINED_TYPE_EXT]) && is_array($data[self::FIELD_CONSTRAINED_TYPE_EXT])) - ? $data[self::FIELD_CONSTRAINED_TYPE_EXT] - : null; - if ($data[self::FIELD_CONSTRAINED_TYPE] instanceof FHIRCode) { - $this->setConstrainedType($data[self::FIELD_CONSTRAINED_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONSTRAINED_TYPE])) { - $this->setConstrainedType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONSTRAINED_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONSTRAINED_TYPE])) { - $this->setConstrainedType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONSTRAINED_TYPE]))); - } + if (isset($data[self::FIELD_CONSTRAINED_TYPE]) || isset($data[self::FIELD_CONSTRAINED_TYPE_EXT])) { + if (isset($data[self::FIELD_CONSTRAINED_TYPE])) { + $value = $data[self::FIELD_CONSTRAINED_TYPE]; } else { - $this->setConstrainedType(new FHIRCode($data[self::FIELD_CONSTRAINED_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_CONSTRAINED_TYPE_EXT]) && is_array($data[self::FIELD_CONSTRAINED_TYPE_EXT])) { + $ext = $data[self::FIELD_CONSTRAINED_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setConstrainedType($value); + } else if (is_array($value)) { + $this->setConstrainedType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setConstrainedType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConstrainedType(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -560,97 +581,134 @@ public function __construct($data = null) $this->addContact(new FHIRStructureDefinitionContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_CONTEXT])) { - $ext = (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) - ? $data[self::FIELD_CONTEXT_EXT] - : null; - if (is_array($data[self::FIELD_CONTEXT])) { - foreach($data[self::FIELD_CONTEXT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addContext($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addContext(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CONTEXT]) || isset($data[self::FIELD_CONTEXT_EXT])) { + if (isset($data[self::FIELD_CONTEXT])) { + $value = $data[self::FIELD_CONTEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) { + $ext = $data[self::FIELD_CONTEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addContext($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addContext($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addContext(new FHIRString(array_merge($v, $iext))); + } else { + $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addContext(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addContext(new FHIRString(array_merge($ext, $value))); + } else { + $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_CONTEXT] instanceof FHIRString) { - $this->addContext($data[self::FIELD_CONTEXT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONTEXT])) { - $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTEXT]] + $ext)); - } else { - $this->addContext(new FHIRString($data[self::FIELD_CONTEXT])); - } - } - if (isset($data[self::FIELD_CONTEXT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) - ? $data[self::FIELD_CONTEXT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTEXT_TYPE] instanceof FHIRExtensionContext) { - $this->setContextType($data[self::FIELD_CONTEXT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRExtensionContext([FHIRExtensionContext::FIELD_VALUE => $data[self::FIELD_CONTEXT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRExtensionContext(array_merge($ext, $data[self::FIELD_CONTEXT_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addContext(new FHIRString($iext)); } - } else { - $this->setContextType(new FHIRExtensionContext($data[self::FIELD_CONTEXT_TYPE])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRString) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_CONTEXT_TYPE]) || isset($data[self::FIELD_CONTEXT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTEXT_TYPE])) { + $value = $data[self::FIELD_CONTEXT_TYPE]; } else { - $this->setCopyright(new FHIRString($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + if (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTEXT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExtensionContext) { + $this->setContextType($value); + } else if (is_array($value)) { + $this->setContextType(new FHIRExtensionContext(array_merge($ext, $value))); + } else { + $this->setContextType(new FHIRExtensionContext([FHIRExtensionContext::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContextType(new FHIRExtensionContext($ext)); + } + } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRString($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DIFFERENTIAL])) { @@ -660,52 +718,73 @@ public function __construct($data = null) $this->setDifferential(new FHIRStructureDefinitionDifferential($data[self::FIELD_DIFFERENTIAL])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRId) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; } else { - $this->setFhirVersion(new FHIRId($data[self::FIELD_FHIR_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRId($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -726,20 +805,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRStructureDefinitionKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRStructureDefinitionKind([FHIRStructureDefinitionKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRStructureDefinitionKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setKind(new FHIRStructureDefinitionKind($data[self::FIELD_KIND])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureDefinitionKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRStructureDefinitionKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRStructureDefinitionKind([FHIRStructureDefinitionKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRStructureDefinitionKind($ext)); } } if (isset($data[self::FIELD_MAPPING])) { @@ -760,52 +846,73 @@ public function __construct($data = null) $this->addMapping(new FHIRStructureDefinitionMapping($data[self::FIELD_MAPPING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); } } if (isset($data[self::FIELD_SNAPSHOT])) { @@ -815,36 +922,50 @@ public function __construct($data = null) $this->setSnapshot(new FHIRStructureDefinitionSnapshot($data[self::FIELD_SNAPSHOT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -865,20 +986,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRCodeableConcept($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2032,8 +2160,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2413,71 +2541,105 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAbstract())) { $a[self::FIELD_ABSTRACT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABSTRACT_EXT] = $enc; } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_BASE_EXT] = $enc; } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getConstrainedType())) { $a[self::FIELD_CONSTRAINED_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONSTRAINED_TYPE_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getContext())) { $a[self::FIELD_CONTEXT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONTEXT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONTEXT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONTEXT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONTEXT_EXT] = $encs; + } } if (null !== ($v = $this->getContextType())) { $a[self::FIELD_CONTEXT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExtensionContext::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExtensionContext::FIELD_VALUE]); $a[self::FIELD_CONTEXT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2486,56 +2648,82 @@ public function jsonSerialize() } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureDefinitionKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureDefinitionKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } @@ -2544,28 +2732,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubscription.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubscription.php index 11ecec0621..295ded7500 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubscription.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubscription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRSubscription extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_TAG = 'tag'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The subscription resource is used to define a push based subscription from a @@ -250,84 +250,119 @@ public function __construct($data = null) $this->addContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_CRITERIA])) { - $ext = (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) - ? $data[self::FIELD_CRITERIA_EXT] - : null; - if ($data[self::FIELD_CRITERIA] instanceof FHIRString) { - $this->setCriteria($data[self::FIELD_CRITERIA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CRITERIA]] + $ext)); - } else if (is_array($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString(array_merge($ext, $data[self::FIELD_CRITERIA]))); - } + if (isset($data[self::FIELD_CRITERIA]) || isset($data[self::FIELD_CRITERIA_EXT])) { + if (isset($data[self::FIELD_CRITERIA])) { + $value = $data[self::FIELD_CRITERIA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) { + $ext = $data[self::FIELD_CRITERIA_EXT]; } else { - $this->setCriteria(new FHIRString($data[self::FIELD_CRITERIA])); - } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCriteria($value); + } else if (is_array($value)) { + $this->setCriteria(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCriteria(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); - } - } - if (isset($data[self::FIELD_ERROR])) { - $ext = (isset($data[self::FIELD_ERROR_EXT]) && is_array($data[self::FIELD_ERROR_EXT])) - ? $data[self::FIELD_ERROR_EXT] - : null; - if ($data[self::FIELD_ERROR] instanceof FHIRString) { - $this->setError($data[self::FIELD_ERROR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ERROR])) { - $this->setError(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ERROR]] + $ext)); - } else if (is_array($data[self::FIELD_ERROR])) { - $this->setError(new FHIRString(array_merge($ext, $data[self::FIELD_ERROR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_ERROR]) || isset($data[self::FIELD_ERROR_EXT])) { + if (isset($data[self::FIELD_ERROR])) { + $value = $data[self::FIELD_ERROR]; } else { - $this->setError(new FHIRString($data[self::FIELD_ERROR])); - } - } - if (isset($data[self::FIELD_REASON])) { - $ext = (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) - ? $data[self::FIELD_REASON_EXT] - : null; - if ($data[self::FIELD_REASON] instanceof FHIRString) { - $this->setReason($data[self::FIELD_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REASON])) { - $this->setReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_REASON])) { - $this->setReason(new FHIRString(array_merge($ext, $data[self::FIELD_REASON]))); + $value = null; + } + if (isset($data[self::FIELD_ERROR_EXT]) && is_array($data[self::FIELD_ERROR_EXT])) { + $ext = $data[self::FIELD_ERROR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setError($value); + } else if (is_array($value)) { + $this->setError(new FHIRString(array_merge($ext, $value))); + } else { + $this->setError(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setError(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REASON]) || isset($data[self::FIELD_REASON_EXT])) { + if (isset($data[self::FIELD_REASON])) { + $value = $data[self::FIELD_REASON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) { + $ext = $data[self::FIELD_REASON_EXT]; } else { - $this->setReason(new FHIRString($data[self::FIELD_REASON])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSubscriptionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSubscriptionStatus([FHIRSubscriptionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSubscriptionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReason($value); + } else if (is_array($value)) { + $this->setReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReason(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSubscriptionStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSubscriptionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSubscriptionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSubscriptionStatus([FHIRSubscriptionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSubscriptionStatus($ext)); } } if (isset($data[self::FIELD_TAG])) { @@ -730,8 +765,8 @@ public function setTag(array $tag = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -895,45 +930,70 @@ public function jsonSerialize() $a[self::FIELD_CHANNEL] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCriteria())) { $a[self::FIELD_CRITERIA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CRITERIA_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getError())) { $a[self::FIELD_ERROR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ERROR_EXT] = $enc; } } if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REASON_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSubscriptionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSubscriptionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTag())) { - $a[self::FIELD_TAG] = $vs; + $a[self::FIELD_TAG] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TAG][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubstance.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubstance.php index e071818179..267b556de2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSubstance extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_INSTANCE = 'instance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -208,20 +208,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -606,8 +613,8 @@ public function setInstance(array $instance = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -746,26 +753,55 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php index 2e9e90390f..71add66423 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRSupplyDelivery extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_WHEN_PREPARED = 'whenPrepared'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -294,20 +294,27 @@ public function __construct($data = null) $this->addReceiver(new FHIRReference($data[self::FIELD_RECEIVER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSupplyDeliveryStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyDeliveryStatus([FHIRSupplyDeliveryStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyDeliveryStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSupplyDeliveryStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSupplyDeliveryStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSupplyDeliveryStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSupplyDeliveryStatus([FHIRSupplyDeliveryStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSupplyDeliveryStatus($ext)); } } if (isset($data[self::FIELD_SUPPLIED_ITEM])) { @@ -324,20 +331,27 @@ public function __construct($data = null) $this->setSupplier(new FHIRReference($data[self::FIELD_SUPPLIER])); } } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRDateTime) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME]))); - } + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; } else { - $this->setTime(new FHIRDateTime($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -759,8 +773,8 @@ public function setWhenPrepared(FHIRPeriod $whenPrepared = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -920,12 +934,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReceiver())) { - $a[self::FIELD_RECEIVER] = $vs; + $a[self::FIELD_RECEIVER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECEIVER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSupplyDeliveryStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSupplyDeliveryStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -937,8 +959,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } @@ -948,6 +972,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhenPrepared())) { $a[self::FIELD_WHEN_PREPARED] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php index 718ead7744..82f70e028c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRSupplyRequest extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_WHEN = 'when'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -250,20 +250,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -315,20 +322,27 @@ public function __construct($data = null) $this->setSource(new FHIRReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSupplyRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyRequestStatus([FHIRSupplyRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSupplyRequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSupplyRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSupplyRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSupplyRequestStatus([FHIRSupplyRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSupplyRequestStatus($ext)); } } if (isset($data[self::FIELD_SUPPLIER])) { @@ -765,8 +779,8 @@ public function setWhen(FHIRSupplyRequestWhen $when = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -915,8 +929,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -943,17 +959,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSupplyRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSupplyRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupplier())) { - $a[self::FIELD_SUPPLIER] = $vs; + $a[self::FIELD_SUPPLIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPLIER][] = $v; + } } if (null !== ($v = $this->getWhen())) { $a[self::FIELD_WHEN] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRTestScript.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRTestScript.php index 9540167515..ece75ed082 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRTestScript.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRTestScript.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRTestScript extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * TestScript is a resource that specifies a suite of tests against a FHIR server @@ -416,68 +416,96 @@ public function __construct($data = null) $this->addContact(new FHIRTestScriptContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRString) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRString($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FIXTURE])) { @@ -512,36 +540,50 @@ public function __construct($data = null) $this->setMetadata(new FHIRTestScriptMetadata($data[self::FIELD_METADATA])); } } - if (isset($data[self::FIELD_MULTISERVER])) { - $ext = (isset($data[self::FIELD_MULTISERVER_EXT]) && is_array($data[self::FIELD_MULTISERVER_EXT])) - ? $data[self::FIELD_MULTISERVER_EXT] - : null; - if ($data[self::FIELD_MULTISERVER] instanceof FHIRBoolean) { - $this->setMultiserver($data[self::FIELD_MULTISERVER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTISERVER])) { - $this->setMultiserver(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MULTISERVER]] + $ext)); - } else if (is_array($data[self::FIELD_MULTISERVER])) { - $this->setMultiserver(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MULTISERVER]))); - } + if (isset($data[self::FIELD_MULTISERVER]) || isset($data[self::FIELD_MULTISERVER_EXT])) { + if (isset($data[self::FIELD_MULTISERVER])) { + $value = $data[self::FIELD_MULTISERVER]; } else { - $this->setMultiserver(new FHIRBoolean($data[self::FIELD_MULTISERVER])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_MULTISERVER_EXT]) && is_array($data[self::FIELD_MULTISERVER_EXT])) { + $ext = $data[self::FIELD_MULTISERVER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMultiserver($value); + } else if (is_array($value)) { + $this->setMultiserver(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMultiserver(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMultiserver(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -562,36 +604,50 @@ public function __construct($data = null) $this->addProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); } } if (isset($data[self::FIELD_SETUP])) { @@ -601,20 +657,27 @@ public function __construct($data = null) $this->setSetup(new FHIRTestScriptSetup($data[self::FIELD_SETUP])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } if (isset($data[self::FIELD_TEARDOWN])) { @@ -642,20 +705,27 @@ public function __construct($data = null) $this->addTest(new FHIRTestScriptTest($data[self::FIELD_TEST])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -694,20 +764,27 @@ public function __construct($data = null) $this->addVariable(new FHIRTestScriptVariable($data[self::FIELD_VARIABLE])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1650,8 +1727,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1974,38 +2051,58 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFixture())) { - $a[self::FIELD_FIXTURE] = $vs; + $a[self::FIELD_FIXTURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FIXTURE][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; @@ -2015,32 +2112,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getMultiserver())) { $a[self::FIELD_MULTISERVER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MULTISERVER_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getProfile())) { - $a[self::FIELD_PROFILE] = $vs; + $a[self::FIELD_PROFILE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROFILE][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } @@ -2049,8 +2160,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2058,28 +2171,53 @@ public function jsonSerialize() $a[self::FIELD_TEARDOWN] = $v; } if ([] !== ($vs = $this->getTest())) { - $a[self::FIELD_TEST] = $vs; + $a[self::FIELD_TEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEST][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if ([] !== ($vs = $this->getVariable())) { - $a[self::FIELD_VARIABLE] = $vs; + $a[self::FIELD_VARIABLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VARIABLE][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRValueSet.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRValueSet.php index e662a5c7eb..1ec4925ba7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRValueSet.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRValueSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRValueSet extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -411,52 +411,73 @@ public function __construct($data = null) $this->addContact(new FHIRValueSetContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRString) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRString(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRString($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_EXPANSION])) { @@ -466,36 +487,50 @@ public function __construct($data = null) $this->setExpansion(new FHIRValueSetExpansion($data[self::FIELD_EXPANSION])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_EXTENSIBLE])) { - $ext = (isset($data[self::FIELD_EXTENSIBLE_EXT]) && is_array($data[self::FIELD_EXTENSIBLE_EXT])) - ? $data[self::FIELD_EXTENSIBLE_EXT] - : null; - if ($data[self::FIELD_EXTENSIBLE] instanceof FHIRBoolean) { - $this->setExtensible($data[self::FIELD_EXTENSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXTENSIBLE])) { - $this->setExtensible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXTENSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_EXTENSIBLE])) { - $this->setExtensible(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXTENSIBLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXTENSIBLE]) || isset($data[self::FIELD_EXTENSIBLE_EXT])) { + if (isset($data[self::FIELD_EXTENSIBLE])) { + $value = $data[self::FIELD_EXTENSIBLE]; } else { - $this->setExtensible(new FHIRBoolean($data[self::FIELD_EXTENSIBLE])); + $value = null; + } + if (isset($data[self::FIELD_EXTENSIBLE_EXT]) && is_array($data[self::FIELD_EXTENSIBLE_EXT])) { + $ext = $data[self::FIELD_EXTENSIBLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExtensible($value); + } else if (is_array($value)) { + $this->setExtensible(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExtensible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExtensible(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -505,116 +540,165 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_IMMUTABLE])) { - $ext = (isset($data[self::FIELD_IMMUTABLE_EXT]) && is_array($data[self::FIELD_IMMUTABLE_EXT])) - ? $data[self::FIELD_IMMUTABLE_EXT] - : null; - if ($data[self::FIELD_IMMUTABLE] instanceof FHIRBoolean) { - $this->setImmutable($data[self::FIELD_IMMUTABLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IMMUTABLE])) { - $this->setImmutable(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IMMUTABLE]] + $ext)); - } else if (is_array($data[self::FIELD_IMMUTABLE])) { - $this->setImmutable(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IMMUTABLE]))); - } + if (isset($data[self::FIELD_IMMUTABLE]) || isset($data[self::FIELD_IMMUTABLE_EXT])) { + if (isset($data[self::FIELD_IMMUTABLE])) { + $value = $data[self::FIELD_IMMUTABLE]; } else { - $this->setImmutable(new FHIRBoolean($data[self::FIELD_IMMUTABLE])); - } - } - if (isset($data[self::FIELD_LOCKED_DATE])) { - $ext = (isset($data[self::FIELD_LOCKED_DATE_EXT]) && is_array($data[self::FIELD_LOCKED_DATE_EXT])) - ? $data[self::FIELD_LOCKED_DATE_EXT] - : null; - if ($data[self::FIELD_LOCKED_DATE] instanceof FHIRDate) { - $this->setLockedDate($data[self::FIELD_LOCKED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOCKED_DATE])) { - $this->setLockedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LOCKED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LOCKED_DATE])) { - $this->setLockedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LOCKED_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_IMMUTABLE_EXT]) && is_array($data[self::FIELD_IMMUTABLE_EXT])) { + $ext = $data[self::FIELD_IMMUTABLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setImmutable($value); + } else if (is_array($value)) { + $this->setImmutable(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setImmutable(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setImmutable(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_LOCKED_DATE]) || isset($data[self::FIELD_LOCKED_DATE_EXT])) { + if (isset($data[self::FIELD_LOCKED_DATE])) { + $value = $data[self::FIELD_LOCKED_DATE]; } else { - $this->setLockedDate(new FHIRDate($data[self::FIELD_LOCKED_DATE])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_LOCKED_DATE_EXT]) && is_array($data[self::FIELD_LOCKED_DATE_EXT])) { + $ext = $data[self::FIELD_LOCKED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLockedDate($value); + } else if (is_array($value)) { + $this->setLockedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLockedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLockedDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -635,20 +719,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRCodeableConcept($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1457,8 +1548,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1763,26 +1854,38 @@ public function jsonSerialize() $a[self::FIELD_COMPOSE] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1791,15 +1894,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getExtensible())) { $a[self::FIELD_EXTENSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXTENSIBLE_EXT] = $enc; } } @@ -1808,63 +1915,88 @@ public function jsonSerialize() } if (null !== ($v = $this->getImmutable())) { $a[self::FIELD_IMMUTABLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IMMUTABLE_EXT] = $enc; } } if (null !== ($v = $this->getLockedDate())) { $a[self::FIELD_LOCKED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LOCKED_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php index aa5b9fd63e..22a0a27f44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRVisionPrescription extends FHIRDomainResource implements PHPFHIRContai const FIELD_REASON_REFERENCE = 'reasonReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -211,20 +211,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE_WRITTEN])) { - $ext = (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) - ? $data[self::FIELD_DATE_WRITTEN_EXT] - : null; - if ($data[self::FIELD_DATE_WRITTEN] instanceof FHIRDateTime) { - $this->setDateWritten($data[self::FIELD_DATE_WRITTEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_WRITTEN]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_WRITTEN]))); - } + if (isset($data[self::FIELD_DATE_WRITTEN]) || isset($data[self::FIELD_DATE_WRITTEN_EXT])) { + if (isset($data[self::FIELD_DATE_WRITTEN])) { + $value = $data[self::FIELD_DATE_WRITTEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) { + $ext = $data[self::FIELD_DATE_WRITTEN_EXT]; } else { - $this->setDateWritten(new FHIRDateTime($data[self::FIELD_DATE_WRITTEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateWritten($value); + } else if (is_array($value)) { + $this->setDateWritten(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateWritten(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DISPENSE])) { @@ -642,8 +649,8 @@ public function setReasonReference(FHIRReference $reasonReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -781,19 +788,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDateWritten())) { $a[self::FIELD_DATE_WRITTEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_WRITTEN_EXT] = $enc; } } if ([] !== ($vs = $this->getDispense())) { - $a[self::FIELD_DISPENSE] = $vs; + $a[self::FIELD_DISPENSE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DISPENSE][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -807,6 +828,9 @@ public function jsonSerialize() if (null !== ($v = $this->getReasonReference())) { $a[self::FIELD_REASON_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRParameters.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRParameters.php index 44e6b7a518..25e14195d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRParameters.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResource/FHIRParameters.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRParameters extends FHIRResource implements PHPFHIRContainedTypeInterfa const FIELD_PARAMETER = 'parameter'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This special resource type is used to represent an operation request and @@ -228,8 +228,8 @@ public function setParameter(array $parameter = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -309,7 +309,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResourceContainer.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResourceContainer.php index 60ebc958d8..1326d09190 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResourceContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRResourceContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -264,7 +264,7 @@ class FHIRResourceContainer implements PHPFHIRCommentContainerInterface, PHPFHIR const FIELD_VISION_PRESCRIPTION = 'VisionPrescription'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A financial tool for tracking value accrued for a particular purpose. In the @@ -1221,7 +1221,6 @@ public function __construct($data = null) } else { $this->setAccount(new FHIRAccount($data[self::FIELD_ACCOUNT])); } - return; } if (isset($data[self::FIELD_ALLERGY_INTOLERANCE])) { if ($data[self::FIELD_ALLERGY_INTOLERANCE] instanceof FHIRAllergyIntolerance) { @@ -1229,7 +1228,6 @@ public function __construct($data = null) } else { $this->setAllergyIntolerance(new FHIRAllergyIntolerance($data[self::FIELD_ALLERGY_INTOLERANCE])); } - return; } if (isset($data[self::FIELD_APPOINTMENT])) { if ($data[self::FIELD_APPOINTMENT] instanceof FHIRAppointment) { @@ -1237,7 +1235,6 @@ public function __construct($data = null) } else { $this->setAppointment(new FHIRAppointment($data[self::FIELD_APPOINTMENT])); } - return; } if (isset($data[self::FIELD_APPOINTMENT_RESPONSE])) { if ($data[self::FIELD_APPOINTMENT_RESPONSE] instanceof FHIRAppointmentResponse) { @@ -1245,7 +1242,6 @@ public function __construct($data = null) } else { $this->setAppointmentResponse(new FHIRAppointmentResponse($data[self::FIELD_APPOINTMENT_RESPONSE])); } - return; } if (isset($data[self::FIELD_AUDIT_EVENT])) { if ($data[self::FIELD_AUDIT_EVENT] instanceof FHIRAuditEvent) { @@ -1253,7 +1249,6 @@ public function __construct($data = null) } else { $this->setAuditEvent(new FHIRAuditEvent($data[self::FIELD_AUDIT_EVENT])); } - return; } if (isset($data[self::FIELD_BASIC])) { if ($data[self::FIELD_BASIC] instanceof FHIRBasic) { @@ -1261,7 +1256,6 @@ public function __construct($data = null) } else { $this->setBasic(new FHIRBasic($data[self::FIELD_BASIC])); } - return; } if (isset($data[self::FIELD_BINARY])) { if ($data[self::FIELD_BINARY] instanceof FHIRBinary) { @@ -1269,7 +1263,6 @@ public function __construct($data = null) } else { $this->setBinary(new FHIRBinary($data[self::FIELD_BINARY])); } - return; } if (isset($data[self::FIELD_BODY_SITE])) { if ($data[self::FIELD_BODY_SITE] instanceof FHIRBodySite) { @@ -1277,7 +1270,6 @@ public function __construct($data = null) } else { $this->setBodySite(new FHIRBodySite($data[self::FIELD_BODY_SITE])); } - return; } if (isset($data[self::FIELD_BUNDLE])) { if ($data[self::FIELD_BUNDLE] instanceof FHIRBundle) { @@ -1285,7 +1277,6 @@ public function __construct($data = null) } else { $this->setBundle(new FHIRBundle($data[self::FIELD_BUNDLE])); } - return; } if (isset($data[self::FIELD_CARE_PLAN])) { if ($data[self::FIELD_CARE_PLAN] instanceof FHIRCarePlan) { @@ -1293,7 +1284,6 @@ public function __construct($data = null) } else { $this->setCarePlan(new FHIRCarePlan($data[self::FIELD_CARE_PLAN])); } - return; } if (isset($data[self::FIELD_CLAIM])) { if ($data[self::FIELD_CLAIM] instanceof FHIRClaim) { @@ -1301,7 +1291,6 @@ public function __construct($data = null) } else { $this->setClaim(new FHIRClaim($data[self::FIELD_CLAIM])); } - return; } if (isset($data[self::FIELD_CLAIM_RESPONSE])) { if ($data[self::FIELD_CLAIM_RESPONSE] instanceof FHIRClaimResponse) { @@ -1309,7 +1298,6 @@ public function __construct($data = null) } else { $this->setClaimResponse(new FHIRClaimResponse($data[self::FIELD_CLAIM_RESPONSE])); } - return; } if (isset($data[self::FIELD_CLINICAL_IMPRESSION])) { if ($data[self::FIELD_CLINICAL_IMPRESSION] instanceof FHIRClinicalImpression) { @@ -1317,7 +1305,6 @@ public function __construct($data = null) } else { $this->setClinicalImpression(new FHIRClinicalImpression($data[self::FIELD_CLINICAL_IMPRESSION])); } - return; } if (isset($data[self::FIELD_COMMUNICATION])) { if ($data[self::FIELD_COMMUNICATION] instanceof FHIRCommunication) { @@ -1325,7 +1312,6 @@ public function __construct($data = null) } else { $this->setCommunication(new FHIRCommunication($data[self::FIELD_COMMUNICATION])); } - return; } if (isset($data[self::FIELD_COMMUNICATION_REQUEST])) { if ($data[self::FIELD_COMMUNICATION_REQUEST] instanceof FHIRCommunicationRequest) { @@ -1333,7 +1319,6 @@ public function __construct($data = null) } else { $this->setCommunicationRequest(new FHIRCommunicationRequest($data[self::FIELD_COMMUNICATION_REQUEST])); } - return; } if (isset($data[self::FIELD_COMPOSITION])) { if ($data[self::FIELD_COMPOSITION] instanceof FHIRComposition) { @@ -1341,7 +1326,6 @@ public function __construct($data = null) } else { $this->setComposition(new FHIRComposition($data[self::FIELD_COMPOSITION])); } - return; } if (isset($data[self::FIELD_CONCEPT_MAP])) { if ($data[self::FIELD_CONCEPT_MAP] instanceof FHIRConceptMap) { @@ -1349,7 +1333,6 @@ public function __construct($data = null) } else { $this->setConceptMap(new FHIRConceptMap($data[self::FIELD_CONCEPT_MAP])); } - return; } if (isset($data[self::FIELD_CONDITION])) { if ($data[self::FIELD_CONDITION] instanceof FHIRCondition) { @@ -1357,7 +1340,6 @@ public function __construct($data = null) } else { $this->setCondition(new FHIRCondition($data[self::FIELD_CONDITION])); } - return; } if (isset($data[self::FIELD_CONFORMANCE])) { if ($data[self::FIELD_CONFORMANCE] instanceof FHIRConformance) { @@ -1365,7 +1347,6 @@ public function __construct($data = null) } else { $this->setConformance(new FHIRConformance($data[self::FIELD_CONFORMANCE])); } - return; } if (isset($data[self::FIELD_CONTRACT])) { if ($data[self::FIELD_CONTRACT] instanceof FHIRContract) { @@ -1373,7 +1354,6 @@ public function __construct($data = null) } else { $this->setContract(new FHIRContract($data[self::FIELD_CONTRACT])); } - return; } if (isset($data[self::FIELD_COVERAGE])) { if ($data[self::FIELD_COVERAGE] instanceof FHIRCoverage) { @@ -1381,7 +1361,6 @@ public function __construct($data = null) } else { $this->setCoverage(new FHIRCoverage($data[self::FIELD_COVERAGE])); } - return; } if (isset($data[self::FIELD_DATA_ELEMENT])) { if ($data[self::FIELD_DATA_ELEMENT] instanceof FHIRDataElement) { @@ -1389,7 +1368,6 @@ public function __construct($data = null) } else { $this->setDataElement(new FHIRDataElement($data[self::FIELD_DATA_ELEMENT])); } - return; } if (isset($data[self::FIELD_DETECTED_ISSUE])) { if ($data[self::FIELD_DETECTED_ISSUE] instanceof FHIRDetectedIssue) { @@ -1397,7 +1375,6 @@ public function __construct($data = null) } else { $this->setDetectedIssue(new FHIRDetectedIssue($data[self::FIELD_DETECTED_ISSUE])); } - return; } if (isset($data[self::FIELD_DEVICE])) { if ($data[self::FIELD_DEVICE] instanceof FHIRDevice) { @@ -1405,7 +1382,6 @@ public function __construct($data = null) } else { $this->setDevice(new FHIRDevice($data[self::FIELD_DEVICE])); } - return; } if (isset($data[self::FIELD_DEVICE_COMPONENT])) { if ($data[self::FIELD_DEVICE_COMPONENT] instanceof FHIRDeviceComponent) { @@ -1413,7 +1389,6 @@ public function __construct($data = null) } else { $this->setDeviceComponent(new FHIRDeviceComponent($data[self::FIELD_DEVICE_COMPONENT])); } - return; } if (isset($data[self::FIELD_DEVICE_METRIC])) { if ($data[self::FIELD_DEVICE_METRIC] instanceof FHIRDeviceMetric) { @@ -1421,7 +1396,6 @@ public function __construct($data = null) } else { $this->setDeviceMetric(new FHIRDeviceMetric($data[self::FIELD_DEVICE_METRIC])); } - return; } if (isset($data[self::FIELD_DEVICE_USE_REQUEST])) { if ($data[self::FIELD_DEVICE_USE_REQUEST] instanceof FHIRDeviceUseRequest) { @@ -1429,7 +1403,6 @@ public function __construct($data = null) } else { $this->setDeviceUseRequest(new FHIRDeviceUseRequest($data[self::FIELD_DEVICE_USE_REQUEST])); } - return; } if (isset($data[self::FIELD_DEVICE_USE_STATEMENT])) { if ($data[self::FIELD_DEVICE_USE_STATEMENT] instanceof FHIRDeviceUseStatement) { @@ -1437,7 +1410,6 @@ public function __construct($data = null) } else { $this->setDeviceUseStatement(new FHIRDeviceUseStatement($data[self::FIELD_DEVICE_USE_STATEMENT])); } - return; } if (isset($data[self::FIELD_DIAGNOSTIC_ORDER])) { if ($data[self::FIELD_DIAGNOSTIC_ORDER] instanceof FHIRDiagnosticOrder) { @@ -1445,7 +1417,6 @@ public function __construct($data = null) } else { $this->setDiagnosticOrder(new FHIRDiagnosticOrder($data[self::FIELD_DIAGNOSTIC_ORDER])); } - return; } if (isset($data[self::FIELD_DIAGNOSTIC_REPORT])) { if ($data[self::FIELD_DIAGNOSTIC_REPORT] instanceof FHIRDiagnosticReport) { @@ -1453,7 +1424,6 @@ public function __construct($data = null) } else { $this->setDiagnosticReport(new FHIRDiagnosticReport($data[self::FIELD_DIAGNOSTIC_REPORT])); } - return; } if (isset($data[self::FIELD_DOCUMENT_MANIFEST])) { if ($data[self::FIELD_DOCUMENT_MANIFEST] instanceof FHIRDocumentManifest) { @@ -1461,7 +1431,6 @@ public function __construct($data = null) } else { $this->setDocumentManifest(new FHIRDocumentManifest($data[self::FIELD_DOCUMENT_MANIFEST])); } - return; } if (isset($data[self::FIELD_DOCUMENT_REFERENCE])) { if ($data[self::FIELD_DOCUMENT_REFERENCE] instanceof FHIRDocumentReference) { @@ -1469,7 +1438,6 @@ public function __construct($data = null) } else { $this->setDocumentReference(new FHIRDocumentReference($data[self::FIELD_DOCUMENT_REFERENCE])); } - return; } if (isset($data[self::FIELD_ELIGIBILITY_REQUEST])) { if ($data[self::FIELD_ELIGIBILITY_REQUEST] instanceof FHIREligibilityRequest) { @@ -1477,7 +1445,6 @@ public function __construct($data = null) } else { $this->setEligibilityRequest(new FHIREligibilityRequest($data[self::FIELD_ELIGIBILITY_REQUEST])); } - return; } if (isset($data[self::FIELD_ELIGIBILITY_RESPONSE])) { if ($data[self::FIELD_ELIGIBILITY_RESPONSE] instanceof FHIREligibilityResponse) { @@ -1485,7 +1452,6 @@ public function __construct($data = null) } else { $this->setEligibilityResponse(new FHIREligibilityResponse($data[self::FIELD_ELIGIBILITY_RESPONSE])); } - return; } if (isset($data[self::FIELD_ENCOUNTER])) { if ($data[self::FIELD_ENCOUNTER] instanceof FHIREncounter) { @@ -1493,7 +1459,6 @@ public function __construct($data = null) } else { $this->setEncounter(new FHIREncounter($data[self::FIELD_ENCOUNTER])); } - return; } if (isset($data[self::FIELD_ENROLLMENT_REQUEST])) { if ($data[self::FIELD_ENROLLMENT_REQUEST] instanceof FHIREnrollmentRequest) { @@ -1501,7 +1466,6 @@ public function __construct($data = null) } else { $this->setEnrollmentRequest(new FHIREnrollmentRequest($data[self::FIELD_ENROLLMENT_REQUEST])); } - return; } if (isset($data[self::FIELD_ENROLLMENT_RESPONSE])) { if ($data[self::FIELD_ENROLLMENT_RESPONSE] instanceof FHIREnrollmentResponse) { @@ -1509,7 +1473,6 @@ public function __construct($data = null) } else { $this->setEnrollmentResponse(new FHIREnrollmentResponse($data[self::FIELD_ENROLLMENT_RESPONSE])); } - return; } if (isset($data[self::FIELD_EPISODE_OF_CARE])) { if ($data[self::FIELD_EPISODE_OF_CARE] instanceof FHIREpisodeOfCare) { @@ -1517,7 +1480,6 @@ public function __construct($data = null) } else { $this->setEpisodeOfCare(new FHIREpisodeOfCare($data[self::FIELD_EPISODE_OF_CARE])); } - return; } if (isset($data[self::FIELD_EXPLANATION_OF_BENEFIT])) { if ($data[self::FIELD_EXPLANATION_OF_BENEFIT] instanceof FHIRExplanationOfBenefit) { @@ -1525,7 +1487,6 @@ public function __construct($data = null) } else { $this->setExplanationOfBenefit(new FHIRExplanationOfBenefit($data[self::FIELD_EXPLANATION_OF_BENEFIT])); } - return; } if (isset($data[self::FIELD_FAMILY_MEMBER_HISTORY])) { if ($data[self::FIELD_FAMILY_MEMBER_HISTORY] instanceof FHIRFamilyMemberHistory) { @@ -1533,7 +1494,6 @@ public function __construct($data = null) } else { $this->setFamilyMemberHistory(new FHIRFamilyMemberHistory($data[self::FIELD_FAMILY_MEMBER_HISTORY])); } - return; } if (isset($data[self::FIELD_FLAG])) { if ($data[self::FIELD_FLAG] instanceof FHIRFlag) { @@ -1541,7 +1501,6 @@ public function __construct($data = null) } else { $this->setFlag(new FHIRFlag($data[self::FIELD_FLAG])); } - return; } if (isset($data[self::FIELD_GOAL])) { if ($data[self::FIELD_GOAL] instanceof FHIRGoal) { @@ -1549,7 +1508,6 @@ public function __construct($data = null) } else { $this->setGoal(new FHIRGoal($data[self::FIELD_GOAL])); } - return; } if (isset($data[self::FIELD_GROUP])) { if ($data[self::FIELD_GROUP] instanceof FHIRGroup) { @@ -1557,7 +1515,6 @@ public function __construct($data = null) } else { $this->setGroup(new FHIRGroup($data[self::FIELD_GROUP])); } - return; } if (isset($data[self::FIELD_HEALTHCARE_SERVICE])) { if ($data[self::FIELD_HEALTHCARE_SERVICE] instanceof FHIRHealthcareService) { @@ -1565,7 +1522,6 @@ public function __construct($data = null) } else { $this->setHealthcareService(new FHIRHealthcareService($data[self::FIELD_HEALTHCARE_SERVICE])); } - return; } if (isset($data[self::FIELD_IMAGING_OBJECT_SELECTION])) { if ($data[self::FIELD_IMAGING_OBJECT_SELECTION] instanceof FHIRImagingObjectSelection) { @@ -1573,7 +1529,6 @@ public function __construct($data = null) } else { $this->setImagingObjectSelection(new FHIRImagingObjectSelection($data[self::FIELD_IMAGING_OBJECT_SELECTION])); } - return; } if (isset($data[self::FIELD_IMAGING_STUDY])) { if ($data[self::FIELD_IMAGING_STUDY] instanceof FHIRImagingStudy) { @@ -1581,7 +1536,6 @@ public function __construct($data = null) } else { $this->setImagingStudy(new FHIRImagingStudy($data[self::FIELD_IMAGING_STUDY])); } - return; } if (isset($data[self::FIELD_IMMUNIZATION])) { if ($data[self::FIELD_IMMUNIZATION] instanceof FHIRImmunization) { @@ -1589,7 +1543,6 @@ public function __construct($data = null) } else { $this->setImmunization(new FHIRImmunization($data[self::FIELD_IMMUNIZATION])); } - return; } if (isset($data[self::FIELD_IMMUNIZATION_RECOMMENDATION])) { if ($data[self::FIELD_IMMUNIZATION_RECOMMENDATION] instanceof FHIRImmunizationRecommendation) { @@ -1597,7 +1550,6 @@ public function __construct($data = null) } else { $this->setImmunizationRecommendation(new FHIRImmunizationRecommendation($data[self::FIELD_IMMUNIZATION_RECOMMENDATION])); } - return; } if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE])) { if ($data[self::FIELD_IMPLEMENTATION_GUIDE] instanceof FHIRImplementationGuide) { @@ -1605,7 +1557,6 @@ public function __construct($data = null) } else { $this->setImplementationGuide(new FHIRImplementationGuide($data[self::FIELD_IMPLEMENTATION_GUIDE])); } - return; } if (isset($data[self::FIELD_LIST])) { if ($data[self::FIELD_LIST] instanceof FHIRList) { @@ -1613,7 +1564,6 @@ public function __construct($data = null) } else { $this->setList(new FHIRList($data[self::FIELD_LIST])); } - return; } if (isset($data[self::FIELD_LOCATION])) { if ($data[self::FIELD_LOCATION] instanceof FHIRLocation) { @@ -1621,7 +1571,6 @@ public function __construct($data = null) } else { $this->setLocation(new FHIRLocation($data[self::FIELD_LOCATION])); } - return; } if (isset($data[self::FIELD_MEDIA])) { if ($data[self::FIELD_MEDIA] instanceof FHIRMedia) { @@ -1629,7 +1578,6 @@ public function __construct($data = null) } else { $this->setMedia(new FHIRMedia($data[self::FIELD_MEDIA])); } - return; } if (isset($data[self::FIELD_MEDICATION])) { if ($data[self::FIELD_MEDICATION] instanceof FHIRMedication) { @@ -1637,7 +1585,6 @@ public function __construct($data = null) } else { $this->setMedication(new FHIRMedication($data[self::FIELD_MEDICATION])); } - return; } if (isset($data[self::FIELD_MEDICATION_ADMINISTRATION])) { if ($data[self::FIELD_MEDICATION_ADMINISTRATION] instanceof FHIRMedicationAdministration) { @@ -1645,7 +1592,6 @@ public function __construct($data = null) } else { $this->setMedicationAdministration(new FHIRMedicationAdministration($data[self::FIELD_MEDICATION_ADMINISTRATION])); } - return; } if (isset($data[self::FIELD_MEDICATION_DISPENSE])) { if ($data[self::FIELD_MEDICATION_DISPENSE] instanceof FHIRMedicationDispense) { @@ -1653,7 +1599,6 @@ public function __construct($data = null) } else { $this->setMedicationDispense(new FHIRMedicationDispense($data[self::FIELD_MEDICATION_DISPENSE])); } - return; } if (isset($data[self::FIELD_MEDICATION_ORDER])) { if ($data[self::FIELD_MEDICATION_ORDER] instanceof FHIRMedicationOrder) { @@ -1661,7 +1606,6 @@ public function __construct($data = null) } else { $this->setMedicationOrder(new FHIRMedicationOrder($data[self::FIELD_MEDICATION_ORDER])); } - return; } if (isset($data[self::FIELD_MEDICATION_STATEMENT])) { if ($data[self::FIELD_MEDICATION_STATEMENT] instanceof FHIRMedicationStatement) { @@ -1669,7 +1613,6 @@ public function __construct($data = null) } else { $this->setMedicationStatement(new FHIRMedicationStatement($data[self::FIELD_MEDICATION_STATEMENT])); } - return; } if (isset($data[self::FIELD_MESSAGE_HEADER])) { if ($data[self::FIELD_MESSAGE_HEADER] instanceof FHIRMessageHeader) { @@ -1677,7 +1620,6 @@ public function __construct($data = null) } else { $this->setMessageHeader(new FHIRMessageHeader($data[self::FIELD_MESSAGE_HEADER])); } - return; } if (isset($data[self::FIELD_NAMING_SYSTEM])) { if ($data[self::FIELD_NAMING_SYSTEM] instanceof FHIRNamingSystem) { @@ -1685,7 +1627,6 @@ public function __construct($data = null) } else { $this->setNamingSystem(new FHIRNamingSystem($data[self::FIELD_NAMING_SYSTEM])); } - return; } if (isset($data[self::FIELD_NUTRITION_ORDER])) { if ($data[self::FIELD_NUTRITION_ORDER] instanceof FHIRNutritionOrder) { @@ -1693,7 +1634,6 @@ public function __construct($data = null) } else { $this->setNutritionOrder(new FHIRNutritionOrder($data[self::FIELD_NUTRITION_ORDER])); } - return; } if (isset($data[self::FIELD_OBSERVATION])) { if ($data[self::FIELD_OBSERVATION] instanceof FHIRObservation) { @@ -1701,7 +1641,6 @@ public function __construct($data = null) } else { $this->setObservation(new FHIRObservation($data[self::FIELD_OBSERVATION])); } - return; } if (isset($data[self::FIELD_OPERATION_DEFINITION])) { if ($data[self::FIELD_OPERATION_DEFINITION] instanceof FHIROperationDefinition) { @@ -1709,7 +1648,6 @@ public function __construct($data = null) } else { $this->setOperationDefinition(new FHIROperationDefinition($data[self::FIELD_OPERATION_DEFINITION])); } - return; } if (isset($data[self::FIELD_OPERATION_OUTCOME])) { if ($data[self::FIELD_OPERATION_OUTCOME] instanceof FHIROperationOutcome) { @@ -1717,7 +1655,6 @@ public function __construct($data = null) } else { $this->setOperationOutcome(new FHIROperationOutcome($data[self::FIELD_OPERATION_OUTCOME])); } - return; } if (isset($data[self::FIELD_ORDER])) { if ($data[self::FIELD_ORDER] instanceof FHIROrder) { @@ -1725,7 +1662,6 @@ public function __construct($data = null) } else { $this->setOrder(new FHIROrder($data[self::FIELD_ORDER])); } - return; } if (isset($data[self::FIELD_ORDER_RESPONSE])) { if ($data[self::FIELD_ORDER_RESPONSE] instanceof FHIROrderResponse) { @@ -1733,7 +1669,6 @@ public function __construct($data = null) } else { $this->setOrderResponse(new FHIROrderResponse($data[self::FIELD_ORDER_RESPONSE])); } - return; } if (isset($data[self::FIELD_ORGANIZATION])) { if ($data[self::FIELD_ORGANIZATION] instanceof FHIROrganization) { @@ -1741,7 +1676,6 @@ public function __construct($data = null) } else { $this->setOrganization(new FHIROrganization($data[self::FIELD_ORGANIZATION])); } - return; } if (isset($data[self::FIELD_PARAMETERS])) { if ($data[self::FIELD_PARAMETERS] instanceof FHIRParameters) { @@ -1749,7 +1683,6 @@ public function __construct($data = null) } else { $this->setParameters(new FHIRParameters($data[self::FIELD_PARAMETERS])); } - return; } if (isset($data[self::FIELD_PATIENT])) { if ($data[self::FIELD_PATIENT] instanceof FHIRPatient) { @@ -1757,7 +1690,6 @@ public function __construct($data = null) } else { $this->setPatient(new FHIRPatient($data[self::FIELD_PATIENT])); } - return; } if (isset($data[self::FIELD_PAYMENT_NOTICE])) { if ($data[self::FIELD_PAYMENT_NOTICE] instanceof FHIRPaymentNotice) { @@ -1765,7 +1697,6 @@ public function __construct($data = null) } else { $this->setPaymentNotice(new FHIRPaymentNotice($data[self::FIELD_PAYMENT_NOTICE])); } - return; } if (isset($data[self::FIELD_PAYMENT_RECONCILIATION])) { if ($data[self::FIELD_PAYMENT_RECONCILIATION] instanceof FHIRPaymentReconciliation) { @@ -1773,7 +1704,6 @@ public function __construct($data = null) } else { $this->setPaymentReconciliation(new FHIRPaymentReconciliation($data[self::FIELD_PAYMENT_RECONCILIATION])); } - return; } if (isset($data[self::FIELD_PERSON])) { if ($data[self::FIELD_PERSON] instanceof FHIRPerson) { @@ -1781,7 +1711,6 @@ public function __construct($data = null) } else { $this->setPerson(new FHIRPerson($data[self::FIELD_PERSON])); } - return; } if (isset($data[self::FIELD_PRACTITIONER])) { if ($data[self::FIELD_PRACTITIONER] instanceof FHIRPractitioner) { @@ -1789,7 +1718,6 @@ public function __construct($data = null) } else { $this->setPractitioner(new FHIRPractitioner($data[self::FIELD_PRACTITIONER])); } - return; } if (isset($data[self::FIELD_PROCEDURE])) { if ($data[self::FIELD_PROCEDURE] instanceof FHIRProcedure) { @@ -1797,7 +1725,6 @@ public function __construct($data = null) } else { $this->setProcedure(new FHIRProcedure($data[self::FIELD_PROCEDURE])); } - return; } if (isset($data[self::FIELD_PROCEDURE_REQUEST])) { if ($data[self::FIELD_PROCEDURE_REQUEST] instanceof FHIRProcedureRequest) { @@ -1805,7 +1732,6 @@ public function __construct($data = null) } else { $this->setProcedureRequest(new FHIRProcedureRequest($data[self::FIELD_PROCEDURE_REQUEST])); } - return; } if (isset($data[self::FIELD_PROCESS_REQUEST])) { if ($data[self::FIELD_PROCESS_REQUEST] instanceof FHIRProcessRequest) { @@ -1813,7 +1739,6 @@ public function __construct($data = null) } else { $this->setProcessRequest(new FHIRProcessRequest($data[self::FIELD_PROCESS_REQUEST])); } - return; } if (isset($data[self::FIELD_PROCESS_RESPONSE])) { if ($data[self::FIELD_PROCESS_RESPONSE] instanceof FHIRProcessResponse) { @@ -1821,7 +1746,6 @@ public function __construct($data = null) } else { $this->setProcessResponse(new FHIRProcessResponse($data[self::FIELD_PROCESS_RESPONSE])); } - return; } if (isset($data[self::FIELD_PROVENANCE])) { if ($data[self::FIELD_PROVENANCE] instanceof FHIRProvenance) { @@ -1829,7 +1753,6 @@ public function __construct($data = null) } else { $this->setProvenance(new FHIRProvenance($data[self::FIELD_PROVENANCE])); } - return; } if (isset($data[self::FIELD_QUESTIONNAIRE])) { if ($data[self::FIELD_QUESTIONNAIRE] instanceof FHIRQuestionnaire) { @@ -1837,7 +1760,6 @@ public function __construct($data = null) } else { $this->setQuestionnaire(new FHIRQuestionnaire($data[self::FIELD_QUESTIONNAIRE])); } - return; } if (isset($data[self::FIELD_QUESTIONNAIRE_RESPONSE])) { if ($data[self::FIELD_QUESTIONNAIRE_RESPONSE] instanceof FHIRQuestionnaireResponse) { @@ -1845,7 +1767,6 @@ public function __construct($data = null) } else { $this->setQuestionnaireResponse(new FHIRQuestionnaireResponse($data[self::FIELD_QUESTIONNAIRE_RESPONSE])); } - return; } if (isset($data[self::FIELD_REFERRAL_REQUEST])) { if ($data[self::FIELD_REFERRAL_REQUEST] instanceof FHIRReferralRequest) { @@ -1853,7 +1774,6 @@ public function __construct($data = null) } else { $this->setReferralRequest(new FHIRReferralRequest($data[self::FIELD_REFERRAL_REQUEST])); } - return; } if (isset($data[self::FIELD_RELATED_PERSON])) { if ($data[self::FIELD_RELATED_PERSON] instanceof FHIRRelatedPerson) { @@ -1861,7 +1781,6 @@ public function __construct($data = null) } else { $this->setRelatedPerson(new FHIRRelatedPerson($data[self::FIELD_RELATED_PERSON])); } - return; } if (isset($data[self::FIELD_RISK_ASSESSMENT])) { if ($data[self::FIELD_RISK_ASSESSMENT] instanceof FHIRRiskAssessment) { @@ -1869,7 +1788,6 @@ public function __construct($data = null) } else { $this->setRiskAssessment(new FHIRRiskAssessment($data[self::FIELD_RISK_ASSESSMENT])); } - return; } if (isset($data[self::FIELD_SCHEDULE])) { if ($data[self::FIELD_SCHEDULE] instanceof FHIRSchedule) { @@ -1877,7 +1795,6 @@ public function __construct($data = null) } else { $this->setSchedule(new FHIRSchedule($data[self::FIELD_SCHEDULE])); } - return; } if (isset($data[self::FIELD_SEARCH_PARAMETER])) { if ($data[self::FIELD_SEARCH_PARAMETER] instanceof FHIRSearchParameter) { @@ -1885,7 +1802,6 @@ public function __construct($data = null) } else { $this->setSearchParameter(new FHIRSearchParameter($data[self::FIELD_SEARCH_PARAMETER])); } - return; } if (isset($data[self::FIELD_SLOT])) { if ($data[self::FIELD_SLOT] instanceof FHIRSlot) { @@ -1893,7 +1809,6 @@ public function __construct($data = null) } else { $this->setSlot(new FHIRSlot($data[self::FIELD_SLOT])); } - return; } if (isset($data[self::FIELD_SPECIMEN])) { if ($data[self::FIELD_SPECIMEN] instanceof FHIRSpecimen) { @@ -1901,7 +1816,6 @@ public function __construct($data = null) } else { $this->setSpecimen(new FHIRSpecimen($data[self::FIELD_SPECIMEN])); } - return; } if (isset($data[self::FIELD_STRUCTURE_DEFINITION])) { if ($data[self::FIELD_STRUCTURE_DEFINITION] instanceof FHIRStructureDefinition) { @@ -1909,7 +1823,6 @@ public function __construct($data = null) } else { $this->setStructureDefinition(new FHIRStructureDefinition($data[self::FIELD_STRUCTURE_DEFINITION])); } - return; } if (isset($data[self::FIELD_SUBSCRIPTION])) { if ($data[self::FIELD_SUBSCRIPTION] instanceof FHIRSubscription) { @@ -1917,7 +1830,6 @@ public function __construct($data = null) } else { $this->setSubscription(new FHIRSubscription($data[self::FIELD_SUBSCRIPTION])); } - return; } if (isset($data[self::FIELD_SUBSTANCE])) { if ($data[self::FIELD_SUBSTANCE] instanceof FHIRSubstance) { @@ -1925,7 +1837,6 @@ public function __construct($data = null) } else { $this->setSubstance(new FHIRSubstance($data[self::FIELD_SUBSTANCE])); } - return; } if (isset($data[self::FIELD_SUPPLY_DELIVERY])) { if ($data[self::FIELD_SUPPLY_DELIVERY] instanceof FHIRSupplyDelivery) { @@ -1933,7 +1844,6 @@ public function __construct($data = null) } else { $this->setSupplyDelivery(new FHIRSupplyDelivery($data[self::FIELD_SUPPLY_DELIVERY])); } - return; } if (isset($data[self::FIELD_SUPPLY_REQUEST])) { if ($data[self::FIELD_SUPPLY_REQUEST] instanceof FHIRSupplyRequest) { @@ -1941,7 +1851,6 @@ public function __construct($data = null) } else { $this->setSupplyRequest(new FHIRSupplyRequest($data[self::FIELD_SUPPLY_REQUEST])); } - return; } if (isset($data[self::FIELD_TEST_SCRIPT])) { if ($data[self::FIELD_TEST_SCRIPT] instanceof FHIRTestScript) { @@ -1949,7 +1858,6 @@ public function __construct($data = null) } else { $this->setTestScript(new FHIRTestScript($data[self::FIELD_TEST_SCRIPT])); } - return; } if (isset($data[self::FIELD_VALUE_SET])) { if ($data[self::FIELD_VALUE_SET] instanceof FHIRValueSet) { @@ -1957,7 +1865,6 @@ public function __construct($data = null) } else { $this->setValueSet(new FHIRValueSet($data[self::FIELD_VALUE_SET])); } - return; } if (isset($data[self::FIELD_VISION_PRESCRIPTION])) { if ($data[self::FIELD_VISION_PRESCRIPTION] instanceof FHIRVisionPrescription) { @@ -1965,7 +1872,6 @@ public function __construct($data = null) } else { $this->setVisionPrescription(new FHIRVisionPrescription($data[self::FIELD_VISION_PRESCRIPTION])); } - return; } } @@ -4612,8 +4518,8 @@ public function setVisionPrescription(FHIRVisionPrescription $VisionPrescription */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRSampledDataDataTypePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRSampledDataDataTypePrimitive.php index 4ce53898af..e3cd209d7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRSampledDataDataTypePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRSampledDataDataTypePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -172,8 +172,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive.php index a6cef67941..0089a0ed72 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRStringPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -172,8 +172,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAccountStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAccountStatusList.php index c7623b1ec7..d65d6a9ca8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAccountStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAccountStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAccountStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACCOUNT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AccountStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRActionListList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRActionListList.php index b746c1dd84..4b2c1f37a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRActionListList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRActionListList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionListList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_LIST_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionList-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressTypeList.php index 728f8a4368..120ebc9fc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAddressTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AddressType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressUseList.php index 2a883b24fe..0ee0dfffce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAddressUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAddressUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AddressUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAdministrativeGenderList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAdministrativeGenderList.php index dcb4352e6b..c29d62914e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAdministrativeGenderList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAdministrativeGenderList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAdministrativeGenderList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADMINISTRATIVE_GENDER_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AdministrativeGender-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAggregationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAggregationModeList.php index 164f8cc037..39827ba5de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAggregationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAggregationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAggregationModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AggregationMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryList.php index cf0606a465..0082363ac4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceCategoryList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceCategory-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyList.php index 305944020d..cff2991b02 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceCertaintyList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CERTAINTY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceCertainty-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityList.php index 211f285bce..c4e695f06a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceCriticalityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CRITICALITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceCriticality-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityList.php index 4f6256a5b1..36ea9d96d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceSeverityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceSeverity-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusList.php index 12ba8ec3d4..1326f54a1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeList.php index d8117a8c54..af052f0769 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAnswerFormatList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAnswerFormatList.php index 98c1f14692..f487c6fa31 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAnswerFormatList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAnswerFormatList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAnswerFormatList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ANSWER_FORMAT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AnswerFormat-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAppointmentStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAppointmentStatusList.php index e25320ca13..ed9511e7cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAppointmentStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAppointmentStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAppointmentStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_APPOINTMENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AppointmentStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionDirectionTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionDirectionTypeList.php index 7ec6631809..7c16c031b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionDirectionTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionDirectionTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAssertionDirectionTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_DIRECTION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AssertionDirectionType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionOperatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionOperatorTypeList.php index 1255ecd3e9..2ead6f8a00 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionOperatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionOperatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAssertionOperatorTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_OPERATOR_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AssertionOperatorType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionResponseTypesList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionResponseTypesList.php index 97decbb7fa..cbe40dd25d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionResponseTypesList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAssertionResponseTypesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAssertionResponseTypesList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_RESPONSE_TYPES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AssertionResponseTypes-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventActionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventActionList.php index 1891e6fd6a..f540244254 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAuditEventActionList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_ACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AuditEventAction-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventOutcomeList.php index a61cdb8e21..f705e2bd67 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAuditEventOutcomeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_OUTCOME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AuditEventOutcome-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeList.php index af9f01495e..515394aa88 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAuditEventParticipantNetworkTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_PARTICIPANT_NETWORK_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AuditEventParticipantNetworkType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBindingStrengthList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBindingStrengthList.php index 78ee5d150e..209e152b6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBindingStrengthList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBindingStrengthList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRBindingStrengthList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINDING_STRENGTH_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BindingStrength-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBundleTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBundleTypeList.php index c79be9e076..7d5b9857bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBundleTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRBundleTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRBundleTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BUNDLE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BundleType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php index 90ba0022c6..0bb2fd53ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanActivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCarePlanActivityStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanActivityStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanRelationshipList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanRelationshipList.php index 6a343b3240..5212d03dd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanRelationshipList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanRelationshipList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCarePlanRelationshipList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_RELATIONSHIP_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanRelationship-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanStatusList.php index ace49c9b9c..6e31d59072 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCarePlanStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCarePlanStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClaimTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClaimTypeList.php index 5d1b8386ca..d34f118b35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClaimTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClaimTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRClaimTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLAIM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ClaimType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClinicalImpressionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClinicalImpressionStatusList.php index 8cb84aa0fb..c6ca9a0dd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClinicalImpressionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRClinicalImpressionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRClinicalImpressionStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ClinicalImpressionStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationRequestStatusList.php index 212a7b5716..92f57a8f24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCommunicationRequestStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMMUNICATION_REQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CommunicationRequestStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationStatusList.php index 1e94723180..f08c692090 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCommunicationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCommunicationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMMUNICATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CommunicationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php index 03c51c9528..5f0a33cb2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionAttestationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCompositionAttestationModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompositionAttestationMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionStatusList.php index 5ed22a733b..7cf4c19b54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRCompositionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCompositionStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompositionStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php index 6c76a67c64..a9915f4a50 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConceptMapEquivalenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConceptMapEquivalenceList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConceptMapEquivalence-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionVerificationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionVerificationStatusList.php index 02735edf32..c395515963 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionVerificationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionVerificationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConditionVerificationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_VERIFICATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionVerificationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionalDeleteStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionalDeleteStatusList.php index e6157ec25a..6f629037f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionalDeleteStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConditionalDeleteStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConditionalDeleteStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_DELETE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionalDeleteStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceEventModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceEventModeList.php index 3ec6159099..144813012a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceEventModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceEventModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConformanceEventModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_EVENT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConformanceEventMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceResourceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceResourceStatusList.php index 415e2fe987..56ceb35bd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceResourceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceResourceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConformanceResourceStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_RESOURCE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConformanceResourceStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceStatementKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceStatementKindList.php index b9bbd90848..d928cc5529 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceStatementKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConformanceStatementKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConformanceStatementKindList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFORMANCE_STATEMENT_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConformanceStatementKind-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConstraintSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConstraintSeverityList.php index d53a103f8f..941503478a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConstraintSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRConstraintSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConstraintSeverityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConstraintSeverity-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointSystemList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointSystemList.php index 61796c9874..afa4f04790 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContactPointSystemList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_SYSTEM_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContactPointSystem-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointUseList.php index 9971a55dda..496f7456ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContactPointUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContactPointUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContactPointUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContentTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContentTypeList.php index a13ca12ef2..6310c4d088 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRContentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContentTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTENT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContentType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDataElementStringencyList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDataElementStringencyList.php index 207eb9de0a..996cd02204 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDataElementStringencyList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDataElementStringencyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDataElementStringencyList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_STRINGENCY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DataElementStringency-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDaysOfWeekList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDaysOfWeekList.php index 62260bb3c8..83c9164651 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDaysOfWeekList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDaysOfWeekList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDaysOfWeekList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DAYS_OF_WEEK_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DaysOfWeek-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDetectedIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDetectedIssueSeverityList.php index c0afe0aff0..41c3eca07f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDetectedIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDetectedIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDetectedIssueSeverityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DetectedIssueSeverity-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateList.php index 88f66a4ae3..7a8cacca51 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricCalibrationStateList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_STATE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricCalibrationState-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeList.php index 2b609a938b..7786131123 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricCalibrationTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricCalibrationType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCategoryList.php index 77ca965e38..8c0911bb91 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricCategoryList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricCategory-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricColorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricColorList.php index 238e701c71..8ef7ce3eca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricColorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricColorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricColorList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_COLOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricColor-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusList.php index 5b1b338a98..89a00ca9b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricOperationalStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_OPERATIONAL_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricOperationalStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceStatusList.php index 0ef3ab7ae8..cb9867d997 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityList.php index da0b693b5b..d6fb4653e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceUseRequestPriorityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST_PRIORITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceUseRequestPriority-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestStatusList.php index 602117740f..f44114f436 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDeviceUseRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceUseRequestStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_USE_REQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceUseRequestStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php index 079989a43b..d5106980fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDiagnosticOrderPriorityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_PRIORITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiagnosticOrderPriority-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php index b7021cda10..5935a5a421 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDiagnosticOrderStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_ORDER_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiagnosticOrderStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php index 996bb4d4ed..bd92ee8604 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDiagnosticReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDiagnosticReportStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiagnosticReportStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDigitalMediaTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDigitalMediaTypeList.php index aa243e2d5a..7af34a43dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDigitalMediaTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDigitalMediaTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDigitalMediaTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIGITAL_MEDIA_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DigitalMediaType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentModeList.php index b1646fe9e7..52e6abeaa1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDocumentModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php index 80a45979b0..43ee96618a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentReferenceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDocumentReferenceStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentReferenceStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php index c25535d69a..64dc0c7711 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRDocumentRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDocumentRelationshipTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentRelationshipType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterClassList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterClassList.php index f47cf25cb7..014df8bcd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterClassList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterClassList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREncounterClassList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_CLASS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EncounterClass-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterLocationStatusList.php index 3c8f3b7e95..c227e0c1f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREncounterLocationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_LOCATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EncounterLocationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterStateList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterStateList.php index abf042e289..d298fad9a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREncounterStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREncounterStateList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EncounterState-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREpisodeOfCareStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREpisodeOfCareStatusList.php index 3ad4748ff3..6984a4e0e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREpisodeOfCareStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREpisodeOfCareStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREpisodeOfCareStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EpisodeOfCareStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREventTimingList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREventTimingList.php index ac17264dc5..f12044f2f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREventTimingList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIREventTimingList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREventTimingList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_TIMING_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EventTiming-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRExtensionContextList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRExtensionContextList.php index 6350e7eed5..531cdf142f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRExtensionContextList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRExtensionContextList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRExtensionContextList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExtensionContext-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFamilyHistoryStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFamilyHistoryStatusList.php index bed88ac785..c7af6887b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFamilyHistoryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFamilyHistoryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFamilyHistoryStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FamilyHistoryStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFilterOperatorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFilterOperatorList.php index ef6970ae26..bb77e5f637 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFilterOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFilterOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFilterOperatorList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FilterOperator-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFlagStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFlagStatusList.php index af7a5c9dba..bd56085c63 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFlagStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRFlagStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFlagStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FLAG_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FlagStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGoalStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGoalStatusList.php index fb5311222f..5384814ba5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGoalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGoalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGoalStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GOAL_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GoalStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGroupTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGroupTypeList.php index 16a98ea9a2..f7aff3f908 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGroupTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGroupTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGroupTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GroupType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideDependencyTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideDependencyTypeList.php index b171ce5918..f86f7609f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideDependencyTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideDependencyTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGuideDependencyTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_DEPENDENCY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GuideDependencyType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuidePageKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuidePageKindList.php index dca4f69756..8a4630aef7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuidePageKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuidePageKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGuidePageKindList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_PAGE_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GuidePageKind-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideResourcePurposeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideResourcePurposeList.php index 06c2d3e220..46d92e1760 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideResourcePurposeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRGuideResourcePurposeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGuideResourcePurposeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_RESOURCE_PURPOSE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GuideResourcePurpose-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRHTTPVerbList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRHTTPVerbList.php index 3a23befe27..8678c537c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRHTTPVerbList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRHTTPVerbList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRHTTPVerbList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_HTTPVERB_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type HTTPVerb-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentifierUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentifierUseList.php index 83b06de260..1a8f178c7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentifierUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentifierUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIdentifierUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IdentifierUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentityAssuranceLevelList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentityAssuranceLevelList.php index 2de707606c..8f13b838e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentityAssuranceLevelList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIdentityAssuranceLevelList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIdentityAssuranceLevelList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTITY_ASSURANCE_LEVEL_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IdentityAssuranceLevel-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php index a048a9b825..2bffa86027 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRInstanceAvailabilityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRInstanceAvailabilityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANCE_AVAILABILITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type InstanceAvailability-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueSeverityList.php index 8da39a5c7d..f8a66c4a47 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIssueSeverityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IssueSeverity-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueTypeList.php index 417b97eacc..bbe31891b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRIssueTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIssueTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IssueType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLinkTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLinkTypeList.php index d092a1742b..983eed3070 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLinkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLinkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLinkTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINK_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LinkType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListModeList.php index b18b033a1a..e22f7d78b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRListModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ListMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListStatusList.php index fd50bc67fc..84b98ebc7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRListStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRListStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ListStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationModeList.php index e293e759d1..6b04e1d1b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLocationModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LocationMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationStatusList.php index 6c7e9eff4b..8b735e281c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLocationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LocationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMeasmnt_PrincipleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMeasmnt_PrincipleList.php index 17665fbadb..c3ee43322e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMeasmnt_PrincipleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMeasmnt_PrincipleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMeasmnt_PrincipleList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASMNT_HYPHEN_PRINCIPLE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Measmnt-Principle-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php index 4a95090c65..51800187b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationAdministrationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationAdministrationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationAdministrationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php index 7370deca2f..792ddd1455 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationDispenseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationDispenseStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationDispenseStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationOrderStatusList.php index b758f90bac..d49234d200 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationOrderStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_ORDER_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationOrderStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationStatementStatusList.php index 70cd9c5a16..496932f3e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMedicationStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationStatementStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationStatementStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php index 1272d9d454..3eb2aa2cf9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRMessageSignificanceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMessageSignificanceCategoryList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MessageSignificanceCategory-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNameUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNameUseList.php index 2970d886c5..13bf3ac760 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNameUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNameUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNameUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAME_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NameUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeList.php index 13cea14fac..618f58fdb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNamingSystemIdentifierTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_IDENTIFIER_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NamingSystemIdentifierType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemTypeList.php index 200b81b2b6..d5060986f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNamingSystemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNamingSystemTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NamingSystemType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNarrativeStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNarrativeStatusList.php index e80469d400..45965900ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNarrativeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNarrativeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNarrativeStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NarrativeStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNoteTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNoteTypeList.php index 935d347ad3..aaee426941 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNoteTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNoteTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNoteTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NOTE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NoteType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNutritionOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNutritionOrderStatusList.php index b42e63df84..2c1a4c4b58 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNutritionOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRNutritionOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNutritionOrderStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NutritionOrderStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php index 8498fd420f..a8513888ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRObservationRelationshipTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationRelationshipType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationStatusList.php index 95f841b72c..cdc9252a19 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRObservationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRObservationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationKindList.php index bd1c0e18e7..69c0944d75 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIROperationKindList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type OperationKind-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationParameterUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationParameterUseList.php index 6a067e5406..78136d746e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationParameterUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROperationParameterUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIROperationParameterUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_PARAMETER_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type OperationParameterUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROrderStatusList.php index b940f2e143..34c465fbc8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIROrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIROrderStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ORDER_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type OrderStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantRequiredList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantRequiredList.php index b6acf03d91..87794beb81 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantRequiredList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantRequiredList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRParticipantRequiredList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPANT_REQUIRED_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ParticipantRequired-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantStatusList.php index 756a0664a3..257b0e5f62 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipantStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRParticipantStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPANT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ParticipantStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipationStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipationStatusList.php index edb67cc5db..e7d8d2b388 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRParticipationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRParticipationStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ParticipationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestPriorityList.php index c9c4afbe21..1f60a1e78e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRProcedureRequestPriorityList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST_PRIORITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ProcedureRequestPriority-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestStatusList.php index d626fccf58..2a2e165e3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRProcedureRequestStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROCEDURE_REQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ProcedureRequestStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureStatusList.php index f855ba30e3..845900af43 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProcedureStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRProcedureStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROCEDURE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ProcedureStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRPropertyRepresentationList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRPropertyRepresentationList.php index 80a1c51f42..2edc82f871 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRPropertyRepresentationList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRPropertyRepresentationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRPropertyRepresentationList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type PropertyRepresentation-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php index ea77eb156a..7eb967a0a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRProvenanceEntityRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRProvenanceEntityRoleList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ProvenanceEntityRole-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuantityComparatorList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuantityComparatorList.php index a84dc3f1d5..431b661dbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuantityComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuantityComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuantityComparatorList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuantityComparator-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusList.php index c0622708fd..4d851f9e5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuestionnaireResponseStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuestionnaireResponseStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php index 39b3407388..b18bebb03c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRQuestionnaireStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuestionnaireStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuestionnaireStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRReferralStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRReferralStatusList.php index 3eb1623882..d10bee3b0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRReferralStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRReferralStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRReferralStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERRAL_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ReferralStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRemittanceOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRemittanceOutcomeList.php index 463438f1b5..2f15c64170 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRemittanceOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRemittanceOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRemittanceOutcomeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REMITTANCE_OUTCOME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RemittanceOutcome-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResourceVersionPolicyList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResourceVersionPolicyList.php index 964981beb9..23bcc3a0db 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResourceVersionPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResourceVersionPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResourceVersionPolicyList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_VERSION_POLICY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResourceVersionPolicy-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResponseTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResponseTypeList.php index 287832b006..889ddf9ba8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResponseTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRResponseTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResponseTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResponseType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php index 148562d5e2..a6eab52f87 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRRestfulConformanceModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRestfulConformanceModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_CONFORMANCE_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RestfulConformanceMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchEntryModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchEntryModeList.php index ece521f097..f4676dca53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchEntryModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchEntryModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchEntryModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_ENTRY_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchEntryMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchModifierCodeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchModifierCodeList.php index 03897b42f5..c614442ba1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchModifierCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchModifierCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchModifierCodeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_MODIFIER_CODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchModifierCode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchParamTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchParamTypeList.php index d23ea9eb70..aca3356e57 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchParamTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSearchParamTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchParamTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchParamType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlicingRulesList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlicingRulesList.php index 50c458ba75..a29da36cae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlicingRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlicingRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSlicingRulesList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLICING_RULES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SlicingRules-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlotStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlotStatusList.php index 0b18336bbb..08c057e702 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlotStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSlotStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSlotStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLOT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SlotStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSpecimenStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSpecimenStatusList.php index c287f17337..060da066d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSpecimenStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSpecimenStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSpecimenStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPECIMEN_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SpecimenStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRStructureDefinitionKindList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRStructureDefinitionKindList.php index 8872938981..2930ee3cdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRStructureDefinitionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRStructureDefinitionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureDefinitionKindList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureDefinitionKind-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionChannelTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionChannelTypeList.php index bf6cfbb019..63ed766fcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionChannelTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionChannelTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSubscriptionChannelTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_CHANNEL_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SubscriptionChannelType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionStatusList.php index a2159e1bca..d5d3c6632e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSubscriptionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSubscriptionStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SubscriptionStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyDeliveryStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyDeliveryStatusList.php index 72ccfccb22..c645dbc56c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyDeliveryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyDeliveryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSupplyDeliveryStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SupplyDeliveryStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyRequestStatusList.php index eae77e7ae4..5011680c08 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSupplyRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSupplyRequestStatusList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SupplyRequestStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSystemRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSystemRestfulInteractionList.php index d68f1bb750..ba969b3bd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSystemRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRSystemRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSystemRestfulInteractionList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SYSTEM_RESTFUL_INTERACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SystemRestfulInteraction-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTransactionModeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTransactionModeList.php index dab2517cc9..b9984cce24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTransactionModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTransactionModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTransactionModeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TRANSACTION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TransactionMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTypeRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTypeRestfulInteractionList.php index 5fe2951688..d8543f6245 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTypeRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRTypeRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTypeRestfulInteractionList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_RESTFUL_INTERACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TypeRestfulInteraction-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnitsOfTimeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnitsOfTimeList.php index d6382e8293..0bab44f091 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnitsOfTimeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnitsOfTimeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUnitsOfTimeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type UnitsOfTime-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnknownContentCodeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnknownContentCodeList.php index f57bc32fa1..43de64b0b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnknownContentCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUnknownContentCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUnknownContentCodeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNKNOWN_CONTENT_CODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type UnknownContentCode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUseList.php index 2a7eeac1d1..0530b57699 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Use-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionBaseList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionBaseList.php index 540f15995b..1161d24dd3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionBaseList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionBaseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRVisionBaseList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_BASE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type VisionBase-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionEyesList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionEyesList.php index f9fac5b5a0..5a631a104f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionEyesList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRVisionEyesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRVisionEyesList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_EYES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type VisionEyes-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRXPathUsageTypeList.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRXPathUsageTypeList.php index fa3912f4f7..20a400f401 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRXPathUsageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRStringPrimitive/FHIRXPathUsageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRXPathUsageTypeList extends FHIRStringPrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_XPATH_USAGE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type XPathUsageType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRTimePrimitive.php index 42bf0d2eed..2085d74876 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRTimePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -192,8 +192,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUnsignedIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUnsignedIntPrimitive.php index 9dd1414f55..98f1af10c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUnsignedIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUnsignedIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUnsignedIntPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -185,8 +185,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUriPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUriPrimitive.php index 23d499efde..453f907ebc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUriPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUriPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUriPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -168,8 +168,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUuidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUuidPrimitive.php index 888c683539..7e5068195a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUuidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/FHIRUuidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUuidPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -173,8 +173,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRAutoloader.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRAutoloader.php index d82959aa00..3d762cce4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRAutoloader.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRAutoloader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerInterface.php index 88a60796f6..25fc4996be 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerTrait.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerTrait.php index 93eac5af1e..ef5376ddfa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerTrait.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRCommentContainerTrait.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -69,7 +69,7 @@ trait PHPFHIRCommentContainerTrait { /** @var array */ - protected $_fhirComments = []; + private $_fhirComments = []; /** * Arbitrary comments of a hopefully useful nature diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRConstants.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRConstants.php index a35559853d..7bfb691bf6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRConstants.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRConstants.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ abstract class PHPFHIRConstants const SOURCE_GENERATION_DATE = 'Sat, Oct 24, 2015 07:41+1100'; // PHPFHIR - const CODE_GENERATION_DATE = 'November 30th, 2019 23:37+0000'; + const CODE_GENERATION_DATE = 'December 7th, 2019 16:36+0000'; // Common const JSON_FIELD_RESOURCE_TYPE = 'resourceType'; diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRContainedTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRContainedTypeInterface.php index 2ff7398fbf..9fb93aa80a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRContainedTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRContainedTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParser.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParser.php index 3f564eaf05..44a9613c8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParser.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParser.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParserConfig.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParserConfig.php index f01e69b895..6a2016c40e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParserConfig.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRResponseParserConfig.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php index 66666ff242..9c7940eb74 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBooleanPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBooleanPrimitiveTest.php index 182c045432..c2a5fbd053 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBooleanPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRBooleanPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRCodePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRCodePrimitiveTest.php index 32769c5abe..efeb44fc50 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRCodePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRCodePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDatePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDatePrimitiveTest.php index f81dbe1e7e..feee619f90 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDatePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDatePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDateTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDateTimePrimitiveTest.php index 09c9e33021..73757eabcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDateTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDateTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDecimalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDecimalPrimitiveTest.php index d02cb787b4..20d924acd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDecimalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRDecimalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php index c4cecd1109..e68494476b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRActionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRActionListTest.php index 5a903fe66e..f0b0a6e423 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTest.php index e08eac6208..bd7618c6dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php index f1c44b606f..86fb45b2b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php index 5701308784..9d09c2130f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php index a7393bd8e3..5495fda7b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php index 97a88b5e2b..b107aa56c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php index 9705d46a56..d81f6191e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCertaintyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCertaintyTest.php index 4598534985..96900c65dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCertaintyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCertaintyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php index b055ce0848..898fddc280 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php index 965ef1b2fe..0f3d9e7561 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceStatusTest.php index ade21b33e0..2c15841352 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php index fd85d95083..5b5ddd2d2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php index 1eacedcb57..2701de71c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnswerFormatTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnswerFormatTest.php index abccd8a89f..8705907fdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnswerFormatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAnswerFormatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php index 05bf0e4b9b..eadcd6ec55 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php index 0bd8e6fa1e..810b0f42b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php index 22e3a0e03b..7dd09c2c23 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php index 5e678f3541..a76f8718ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php index 867b724e64..0a03043d4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php index 6904c9238e..baa1d1e6c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php index 971c9eb37f..7ec0061d14 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventParticipantNetworkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventParticipantNetworkTypeTest.php index 9189b087e2..c4ce104e74 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventParticipantNetworkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRAuditEventParticipantNetworkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php index f7f9790b7e..8f2d8f762f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php index dc94c4cc33..86b8f6fc43 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php index 34cb8d2daf..29cf342be8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEventTest.php index c6f650e49a..71d1191fea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php index 7200401c93..12a8c88926 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObjectTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObjectTest.php index be71f6322e..21c6be4772 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventObjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipantTest.php index 2580439a5a..1dfb17c881 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php index e654cab800..21d54e76a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php index 414163b335..deeabb24e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php index 13a30ac230..6455511200 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php index 0f08f9cdea..730da34d3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php index 639d9ed6d2..16e6348a27 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php index ef017a3346..4e30f10496 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php index 73c7c57980..873714b13c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php index f12f5fd21d..136ec62095 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php index 03a3ef13ce..c4713d411f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlanTest.php index e65b3d1eb2..316cb50e5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanRelatedPlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverageTest.php index c24881882d..c54dcda6d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php index 7446541668..3a6876a297 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php index a7f5969e7a..f444737521 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php index e1df860b94..70d9365526 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeethTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeethTest.php index 2847d72175..0c9d76757e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeethTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimMissingTeethTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php index 60667fce75..1de9016451 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesisTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesisTest.php index cfcd59f41a..2822dda75a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProsthesisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php index d53cf609db..d813268b5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php index aaa66ac2e2..4fd7341a3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1Test.php index 2d1a50b41b..04fe3473ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2Test.php index cd39a442cc..5a72a885a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3Test.php index e346e6d305..e47ad23181 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication3Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4Test.php index ca2581be25..124c36feae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication4Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php index 06d065b4ef..9c0847db9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverageTest.php index f528d426f9..d8266410ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php index d24eb7f8cf..c2486b7ec4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php index 2afefa2543..3074b07574 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php index 6979434548..157471b90a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php index a343a13536..ff017498d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNoteTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNoteTest.php index 70e241237a..26fb857a99 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php index 07ba51088c..201428a5bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php index 05d6e4ca77..8a24c76266 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationsTest.php index b9d6a1e5d4..0916feaa5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOutTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOutTest.php index c08f91d0fd..8134b099b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOutTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionRuledOutTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php index 81f8725693..99b4df0d3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php index b3436edc92..354e2e4ccb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php index 39b0df57cc..8abf525718 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php index f916056a78..75a6c153c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php index deb3f2d9f0..4c4133394c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContactTest.php index 42bdc92b3a..fe39d1ab6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php index 61addcc703..999362bc65 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php index be2cd54e82..02bd363151 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php index e011eeb277..a206ab6e33 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php index 2691e6e8f7..bf75a6c017 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php index e1ff159889..ccef6b671a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php index 900931ab1e..b687073c2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceCertificateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContactTest.php index 094ff2d529..e61a457419 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php index fcfa1b42ab..9175cb47cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceDocumentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpointTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpointTest.php index c95e19e149..b7b8889bb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php index 63f4c42713..6c0b6dc6eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php index da55df87d4..e0d45b4ed3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1Test.php index 448ebe8659..f813525699 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteraction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteractionTest.php index ecc41dcc19..5669dcaec1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php index 6794c7d00d..4d4d69f259 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceMessagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php index f2c0762202..9354b751b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php index 1995709dcf..f5865b67ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php index 569dc53073..3e92373e69 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceRestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php index 6209df93fd..c68ebb60ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php index 9de2db22f4..af119f916d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSecurityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php index 76e1e7fb3d..ec71ea803b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConformance/FHIRConformanceSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1Test.php index f21673f1e0..0c3d10e82a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActor1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActorTest.php index 844a101ccd..2ea39326cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php index 827d45a53f..4f4e47e897 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php index d98f9d81f5..382c2e3884 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php index d99466370d..26ce4865b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php index 84f00cdaed..1bf31bace7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php index 1bcd88aef9..82fce33486 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php index 0961d17834..0ba68e62ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php index 3ec6f292e8..6cf99a052c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContactTest.php index c81bed2d53..f44f98e6a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php index 12c75af4d5..88175ce1bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php index cd673df696..aa3b906f35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php index 9fe2989074..83696a336e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php index 98526baaa2..9f21a10e25 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php index 55a0e19c59..f8f23f20c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php index 62a46e9e0a..05b3275682 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticOrder/FHIRDiagnosticOrderItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php index b1a40028ff..3ef1cef29b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php index 4f0eac62b0..7d9d8a391e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php index fe972009aa..0a0dfd3b91 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php index 58ab676c80..d6349ef068 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php index 86e177b424..db5dc1c486 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php index c8f2517cfd..eb6b110a4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php index 99127c8aa4..2c53b9ef5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php index 84bcbac3c9..97aad68795 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php index a9a21ff1e9..e946355bbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php index 0e8dff4e9d..1fc9349af0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php index 8b1d477d06..a8b6fb3e41 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeamTest.php index 9080e3a413..c640260056 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php index c70eb1f335..00674129b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php index 0dc062bd45..ddcd99644f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcomeTest.php index 6388a24790..bb811cd106 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php index 21236ead2a..db225822b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php index 939f1b6e0f..2066952d32 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php index dab5ca4c82..0dc07cfbea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php index 864f706574..9877787507 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceTypeTest.php index c7ff0b2d45..3d28f084fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceServiceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFramesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFramesTest.php index b467dfb4d4..51fab99074 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFramesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionFramesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstanceTest.php index 09b6c0c58c..55f92f951b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeriesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeriesTest.php index 55c07c1567..47b0fbbed9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionSeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudyTest.php index a3f29679ac..1cd0c3e9ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingObjectSelection/FHIRImagingObjectSelectionStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php index 79966045ef..14f88326d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php index 4c7118b073..7dc94aaa58 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php index e269ed1bd0..596ce13429 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php index 3d55abc023..9b611603ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php index 768b6eb366..0863003941 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php index 9cb4fbd1ca..26598d87da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php index 04402f175a..547d1103b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php index f9e41182fe..c49e5cc9f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContactTest.php index b6dee5dd8f..a24b1bf944 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php index 36a281e353..ebc7192ef4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php index fa8dc7c3db..0dc231a608 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php index de5f3115f8..7ad10e27ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php index 4c20eb9428..1d2669c7ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php index d0b67b3506..7033081af7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php index b46b2594cb..c8ce035d2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php index 4cbd1d8530..416290c619 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php index 20c5222e7c..77f647e1ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php index 28c8eeb426..589338be44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php index 3a09145feb..5ae6fb43af 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php index e51e390521..85342742b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php index 8c9dbeca84..273247a26a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationProductTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php index e9a912f04c..a9ef0ccb5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstructionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstructionTest.php index e8c6b7af19..6a486bf8e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstructionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseDosageInstructionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php index 5fa052c883..b4f294461c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequestTest.php index 386d48999e..748668ca71 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDispenseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstructionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstructionTest.php index 29636f32cb..b9ac35a2ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstructionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderDosageInstructionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitutionTest.php index dcdd0475f1..ec4e0d8a25 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationOrder/FHIRMedicationOrderSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php index 24732b578c..d360db68b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationStatement/FHIRMedicationStatementDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php index d23a867b64..f96e02fe00 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php index 547b740eed..f85f2bbb17 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php index c3a73741a6..6907066fa8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContactTest.php index 68dbdf7480..b68c757d5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php index e6447ff342..a99ef338ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php index 14bdb39405..5d20989fa0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php index daf134d775..2a5b6cbf14 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php index c0f9de1ab7..8ca0df5981 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php index 8e36cfaad7..0046ffb00e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php index 5d3b3c6553..7b17b781c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php index 027028e258..4fb864e442 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php index af4504eece..40e36d77ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php index bb63e04d68..14f0714ddf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php index 031456967a..b0373cde06 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php index c316538b6d..cabfe8c684 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContactTest.php index 4c488623fa..53d2d533b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php index b0fa1214d7..682d2964ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php index 728341e3b1..5a39e116f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php index 3f19dccb6f..eb6904a9bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrder/FHIROrderWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php index ea074d64d3..bacf959e0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php index a265207b4e..cfa039ae0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php index 90061c3c76..d7d24c3fb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php index 9472c24f96..a1cd872284 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php index 950d7bf52d..16ac1e581b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php index cfd55d4faa..cd427ba91c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php index f79f720d76..3374f45f67 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNoteTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNoteTest.php index 4e7008e906..c8df02bdb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php index 30579bccf9..f06ac99f80 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRoleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRoleTest.php index 8485913f0b..28a2c85d01 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerPractitionerRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php index eb247c2cde..83b2138e24 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php index fd18f36ec5..a0f660e862 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php index e721e5e109..ae1e3251ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php index 374c1ef60d..2bf306130a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotesTest.php index a0c197caba..ae1386766f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseNotesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php index 3ad49c2ecb..2519e9757d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php index 593948d3e2..9413694e28 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgentTest.php index 345c1e65b8..d297a462d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceRelatedAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php index 62776e0089..9fdd6e10a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php index 4d7417165d..81c9555d31 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireQuestionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php index ad61a9664e..79a342a7db 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroupTest.php index 2128e855e6..3d24eb1c7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestionTest.php index 93b4190eba..48585b4a35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseQuestionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php index f10a44c75f..09eb78b41d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContactTest.php index bd61cc888d..3a26a946bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php index 4af0475768..2b51c229ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php index ae21555a99..8de07ab907 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php index f843d08e90..138eb6b68e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenTreatmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContactTest.php index cabfe02e90..74a39382c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php index 89a803addc..f1eb7908d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php index b5a171fb88..e6ae3f98f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php index 51f3adcad5..bdeff11e9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php index c204d3142a..3108b03902 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php index 69cbdeb74e..418a1e6a51 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php index 1c134fa9b6..d78e4c80c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhenTest.php index ad4a1d06ee..0ee6e27a18 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php index 354055d766..ce35d8ea97 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php index 2375afa3d5..461e0c7d0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php index 26bf5bf20c..a6ca4367c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php index 40cb476171..a66e7f1661 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php index ff3086a40a..e37017ca08 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContactTest.php index b5064a4246..875e6724c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php index 37e7005b86..882ea42ac3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php index 4f83cf19bf..2284882405 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php index e1547a6e57..7f4ed8564e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php index 48ac9a4048..389e776573 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php index 9317b8e09b..9153495800 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php index 517c551596..d3dbcbf297 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php index fde536d22b..6c43964dcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php index a7819cf1cf..834db355f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php index b5ee6a6467..45999fab54 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystemTest.php index 61223a64bb..4150f304d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCodeSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php index ddcf1fcf94..a3fa69976f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1Test.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1Test.php index 46c3516484..0e53ea289c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php index 20d20db6f5..641cd4d3a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContactTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContactTest.php index d6ed7f620c..db854dbfbd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php index 0b8fb98146..eb2288898b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php index 4321ef2c06..d3ed5713cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php index e9fd3ccffc..908c1b204a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php index 3afef6c4b7..cace76bcbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php index 1c5a240db2..bd04649395 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php index 187da34743..2e892e8144 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php index 8e5cec1022..c100202cdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php index bf2b3d11c6..3ee7351a5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php index d4346c61a9..cea51588e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php index 8864e4fb40..c8efa95327 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php index bd809025a1..1ebf769026 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php index 395f3ef905..47295e0498 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php index 5163e47d5b..fee776d879 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanRelationshipTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanRelationshipTest.php index 2eb5ae8971..63d7db8778 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanRelationshipTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanRelationshipTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php index be18f5f8fe..e783ffb037 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClaimTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClaimTypeTest.php index e2aef772ab..2f5acb812b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClaimTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClaimTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php index b293ceb12d..ccf5700990 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeTest.php index ecd697ad80..b68418f921 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php index d910bcbc5b..d73cc1dd6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodingTest.php index e97d627d3f..4d89ab8e06 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCodingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationRequestStatusTest.php index c72f882707..593c810cd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationStatusTest.php index 8426332eb5..e80f67be2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCommunicationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php index 9a20730a99..afaf58ef48 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php index 7716943572..a26d14d92f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php index a1c3cdf40a..138ef3ce11 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php index c9a28240c9..ceac01f6d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php index 4894db9aaf..f7d94a2d56 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php index 5c064ef86e..ce838b435c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceEventModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceResourceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceResourceStatusTest.php index 9f85fa68d8..a8c1d4504d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceResourceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceResourceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceStatementKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceStatementKindTest.php index 84030b98a2..dce44c6dfd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceStatementKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConformanceStatementKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php index 5b3d3e1242..979af3a535 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php index 5cef5702cf..e925cbda88 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php index 71ac4a73e3..15d74dd4c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php index c9ecc9a995..19a8f143bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php index 2ee3a20ffa..6551e46579 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php index cfe2876de0..4a27f03582 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTest.php index 2160a00f96..6949f44d02 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php index 987322b142..9b08b56d73 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php index b74d72e943..a7875001e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php index f72abd9102..c60d00df83 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php index 062ad15bff..e0eb61f0a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php index f9cdfa4034..74ad890e5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php index d8fe1d4fad..e39f8e75a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php index 682a225e01..e832d6549a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php index 1e1af3b3ce..f742f85545 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php index 0e09e8e8fd..d110f5c6cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceStatusTest.php index 0911111151..c94129fbdf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestPriorityTest.php index 0c9ed9397e..f1fbdb2d2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestStatusTest.php index 237ee754ed..a5e80238e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDeviceUseRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php index 17576c5eea..c1eddc05ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php index 26ac020310..da2274172d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php index 6ad4d73d28..2ef6c65ca3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php index 9c884ef3de..75d2b806d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php index 363aac68da..825ef6e680 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php index 18ef394da8..0100461867 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php index 3f67262cab..fdb295d7a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php index 519f37895f..2417333033 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php index 02d8f3782d..32d8218713 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php index fa7e81ae8d..98fe62383e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php index 4dc3fe6684..3ddff1e5da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php index bd44391a76..dc9ee806c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php index d1617413db..a6d9eba5f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php index 64b1b4ac5a..8b0d47ade3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php index fabc44f165..156b6bfb44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterClassTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php index e975346bc6..8dfaafbee1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php index 76625cc489..705996476d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREncounterStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php index 1c496c9a1d..e8631f06bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php index d1da511056..2cf1a09586 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php index 37e0089ec3..415c371106 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php index aa882fe21c..5f1fdb9521 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php index f00fe8c549..7ccdfebacb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php index 426f2a047b..34bc08badf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php index 9ae0a6440d..823226dc26 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php index a5c48a66aa..aa41ffb045 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php index b59c27de29..92ca59f5b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php index 31935f7f9e..58d45fcc04 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php index 228ca60d6e..824aabe3a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideResourcePurposeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideResourcePurposeTest.php index 2a9271013c..4bbdc4a4d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideResourcePurposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRGuideResourcePurposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php index 8cf60e5754..200bd1ff40 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php index 680ad67fb0..c08790f7dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdTest.php index ef95bc6913..ff906540e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php index 4d6dd51bdd..a03f12ac35 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php index 83a472a968..8e968b9015 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php index 6789717d8b..57a6d97477 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php index 15b1592e40..fb11ae5769 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstantTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstantTest.php index 2cac9d704a..45ee1476bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRInstantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php index 9ae202dc30..4bc73bb4f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php index 5bfda95d1d..6457951183 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php index a90bd3336d..f69d23ebb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php index a0dcef12f9..d622c8f454 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListModeTest.php index 99ba01e2ba..aea24ab784 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php index b32e2a3ba2..ef0793b775 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php index 8ed00d6b66..9271272695 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php index c9fea56db7..0edfd0b8ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php index 48df4ba75a..a665b42a9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMeasmnt_PrincipleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMeasmnt_PrincipleTest.php index 6ada82d510..b01bc5fe70 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMeasmnt_PrincipleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMeasmnt_PrincipleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php index 3b68fb9a6b..3acc0c2634 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php index 65a3de9296..da7e306a91 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationOrderStatusTest.php index d94f6a87e5..c40ba21379 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php index f1c4225df6..fd1573b3cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php index 5444b57350..9635af8ef5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMetaTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMetaTest.php index 17a8e59ceb..d71360e6e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMetaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRMetaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php index 8823e751c8..c1853283ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php index 94752d3a35..5028c2aa83 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php index 5eabaa93dc..17417be644 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php index 26f5ba6113..5428a429c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php index e63b4647cd..49d43c4141 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php index a8bd5ab4ae..43586a90cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php index cc81142795..f06533814f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php index a0a87b05cd..493566247d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php index 5c445fd924..32665d4eb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROidTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROidTest.php index a08c1f0c5d..6800aad2f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php index 023ab50718..2d1abf98d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php index 21daecbe16..0a0f8b09ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROrderStatusTest.php index 55e9ab5638..90308d7243 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIROrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php index a93a023fbf..eaf9843f79 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantStatusTest.php index 3dd3c2359d..08e229cc9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipantStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php index d4c8543b8d..a4a491e6ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php index e38bb9b0ac..91cc1cf888 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php index eba2f75224..863e81ef2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestPriorityTest.php index 6cd7f85f57..75bda4eabd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestStatusTest.php index c6724da2f2..db603a6624 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureStatusTest.php index 1bbef930e0..76ea2ef678 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProcedureStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php index c3edc06d5f..836f0fd3a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php index dffc2763ba..a3d1f73fa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php index fe12c9623d..21e1414e52 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php index a6df0227f4..0b41104ce3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php index 035cb34ef1..07f17f6824 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php index 4f15dd0071..57b22fc2d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php index 1cdf56af09..b0387b6f73 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRSimpleQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRSimpleQuantityTest.php index 0d05d508bf..7a16e17b4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRSimpleQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRSimpleQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php index faeba74b6d..1c99f64c27 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php index dd1a50581a..41df63eaf2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php index 26d0e117ae..e645d464f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php index 975ae9718f..a0a65600f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRQuestionnaireStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRangeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRangeTest.php index 81ac1661ea..da5dcdcf87 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRatioTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRatioTest.php index 6457151696..5d28667ff5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRatioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRatioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php index 2640b6e97b..960da4aadf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferralStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferralStatusTest.php index b58eb1fde8..8d3835828c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferralStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRReferralStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php index 22d174a215..dab8352b7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php index 9f3bca5347..97251304f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php index 5c897fbedb..eaf6c14968 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php index 9e839ed400..20f6c9a422 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRRestfulConformanceModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php index 0a757b2672..4c46507d3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php index 015ebdd6bc..df22942a59 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php index 3533026070..25deee26e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php index 1a111db7e1..4da2afe41d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php index 802519fe35..9697eb2b34 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php index ae77138f35..5cc8f53109 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php index e9fa812c0d..985cf4be23 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php index 8295d09adf..f1cae617a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php index 355f4811b1..7181e895a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStringTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStringTest.php index 96f6ae2c61..e58d8aec8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStringTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStringTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php index 820699b41c..3f9372a330 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php index d524938c5f..536deafcdf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php index fd83e5ce8d..f33026c606 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php index 902fdb9031..4f594e816d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php index d6d98e3b96..cc6787d9fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php index 78ed2ad868..cd078247f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimeTest.php index ca9ff2d3a9..d09a00b042 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php index c61b471100..d22cad6854 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimingTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimingTest.php index eaaa99897e..8b646d58d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTransactionModeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTransactionModeTest.php index 59244dfa20..749ddc725b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTransactionModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTransactionModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php index 9745023a78..17be4650d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php index d845cce870..12706e6d67 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php index 34e286c7e3..b34a10cf76 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php index 744a66572b..cb56ec0ce6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUriTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUriTest.php index 6c9ce2320f..d07335b230 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUriTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUriTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUseTest.php index 70722f7df3..0b59259512 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUuidTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUuidTest.php index d2434a1a4f..7818ad4c68 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUuidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRUuidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php index c44928c6f2..11d768174e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php index 91f7fa26f9..2b5a15cb04 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php index 20cc2b3b7e..e59eeb5052 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElementTest.php index 1edc4a6dd1..d7a4fd331d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIdPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIdPrimitiveTest.php index 1c849e52f5..f14d3167a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIdPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIdPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRInstantPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRInstantPrimitiveTest.php index 9b2b7612c2..a61dc75920 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRInstantPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRInstantPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIntegerPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIntegerPrimitiveTest.php index d6d6c495ee..9c2bd9aca8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIntegerPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRIntegerPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php index 940bcaac97..8dc182f5bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIROidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIROidPrimitiveTest.php index c77c335a37..f451fa5358 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIROidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIROidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php index 23b3fb796d..81f95fb885 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php index 2ff01594b0..edfa354860 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBundleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBundleTest.php index 28491bd8c7..025a038046 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBundleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRBundleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php index cb998c018b..b2b5f219a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Account/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Account/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAccount($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Account" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAccount\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php index 655ff45625..ffdfcd0362 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/AllergyIntolerance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/AllergyIntolerance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAllergyIntolerance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AllergyIntolerance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAllergyIntolerance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php index 6d993436f1..c543ef7ba0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/AppointmentResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/AppointmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAppointmentResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AppointmentResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAppointmentResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php index 12681729a9..2813393143 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Appointment/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Appointment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAppointment($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Appointment" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAppointment\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php index cd8ff43351..030ef6eae1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/AuditEvent/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/AuditEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAuditEvent($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AuditEvent" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAuditEvent\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php index 6d0f2d1f59..bbdf03448c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Basic/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Basic/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRBasic($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Basic" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRBasic\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php index 7f780e91f2..ec01da786a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/BodySite/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/BodySite/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRBodySite($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "BodySite" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRBodySite\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php index 528d109df2..7d46354c7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/CarePlan/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/CarePlan/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCarePlan($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CarePlan" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCarePlan\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php index 96e589614c..113d7cda3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ClaimResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ClaimResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRClaimResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ClaimResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRClaimResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php index 94583c6aa6..5f872259ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Claim/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Claim/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRClaim($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Claim" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRClaim\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php index 0f94ad8faa..a30f7e086b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ClinicalImpression/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ClinicalImpression/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRClinicalImpression($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ClinicalImpression" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRClinicalImpression\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php index 1e49cdaa0a..80a70bc808 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/CommunicationRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/CommunicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCommunicationRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CommunicationRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCommunicationRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php index e77468cd05..ec30048647 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Communication/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Communication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCommunication($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Communication" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCommunication\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php index 1c359987dc..8492423e50 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Composition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Composition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRComposition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Composition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRComposition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php index 4b0c2dc970..9ee21b06a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ConceptMap/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ConceptMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRConceptMap($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ConceptMap" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRConceptMap\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php index 6195d2a205..c4de99826a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Condition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Condition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCondition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Condition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCondition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConformanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConformanceTest.php index 986551bf6c..a9b5925ae0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConformanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConformanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Conformance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Conformance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRConformance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Conformance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRConformance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php index b9169492d7..1816ee28a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Contract/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Contract/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRContract($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Contract" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRContract\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php index a246b78166..f62d340113 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Coverage/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Coverage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCoverage($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Coverage" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCoverage\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php index a69edefc3f..28af3a04fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DataElement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DataElement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDataElement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DataElement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDataElement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php index cf34b1c3ce..4deac95f60 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DetectedIssue/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DetectedIssue/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDetectedIssue($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DetectedIssue" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDetectedIssue\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php index 68db83778d..616843c599 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceComponent/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceComponent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceComponent($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceComponent" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceComponent\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php index 7677cabc4e..376a12c501 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceMetric/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceMetric/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceMetric($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceMetric" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceMetric\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php index 225022dd3d..282644f747 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Device/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Device/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDevice($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Device" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDevice\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequestTest.php index d85ee6c386..5527203c94 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceUseRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceUseRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceUseRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceUseRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceUseRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php index a27f51356a..5212bb6938 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceUseStatement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DeviceUseStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceUseStatement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceUseStatement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceUseStatement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrderTest.php index de31db7e46..bc19d7012a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DiagnosticOrder/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DiagnosticOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDiagnosticOrder($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DiagnosticOrder" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDiagnosticOrder\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php index ff3f5b9161..3331babacc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DiagnosticReport/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DiagnosticReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDiagnosticReport($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DiagnosticReport" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDiagnosticReport\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php index bf07a987d1..6610ab390e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DocumentManifest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DocumentManifest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDocumentManifest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DocumentManifest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDocumentManifest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php index 8cc84770b1..ec7a2d5249 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/DocumentReference/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/DocumentReference/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDocumentReference($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DocumentReference" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDocumentReference\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php index 037bb3193c..de953cf98f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/EligibilityRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/EligibilityRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREligibilityRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EligibilityRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREligibilityRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php index 6efaf80745..495d8d483a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/EligibilityResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/EligibilityResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREligibilityResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EligibilityResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREligibilityResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php index a657846db3..f55486b802 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Encounter/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Encounter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREncounter($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Encounter" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREncounter\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php index 17f2d9804f..6d36ef6940 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/EnrollmentRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/EnrollmentRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREnrollmentRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EnrollmentRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREnrollmentRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php index 1638bc9439..03e1b556b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/EnrollmentResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/EnrollmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREnrollmentResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EnrollmentResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREnrollmentResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php index 1a6a8cf218..d849c64b2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/EpisodeOfCare/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/EpisodeOfCare/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREpisodeOfCare($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EpisodeOfCare" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREpisodeOfCare\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php index a1e357caa5..05466ff94d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ExplanationOfBenefit/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ExplanationOfBenefit/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRExplanationOfBenefit($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ExplanationOfBenefit" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRExplanationOfBenefit\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php index ccd8a31b30..d84f84609a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/FamilyMemberHistory/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/FamilyMemberHistory/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRFamilyMemberHistory($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "FamilyMemberHistory" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRFamilyMemberHistory\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php index e9c7716794..dedf328bb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Flag/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Flag/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRFlag($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Flag" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRFlag\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php index 30493cb694..ab72f7bc66 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Goal/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Goal/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGoal($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Goal" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGoal\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php index 77309e8a47..c5ba4d07f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Group/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Group/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGroup($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Group" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGroup\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php index 374d882ae0..767d074b3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/HealthcareService/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/HealthcareService/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRHealthcareService($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "HealthcareService" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRHealthcareService\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelectionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelectionTest.php index d8341dc697..7f26e53a7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingObjectSelectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ImagingObjectSelection/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ImagingObjectSelection/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImagingObjectSelection($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImagingObjectSelection" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImagingObjectSelection\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php index b4e0745f87..e01dfef272 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ImagingStudy/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ImagingStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImagingStudy($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImagingStudy" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImagingStudy\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php index 20bbc21883..9b3c2727c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ImmunizationRecommendation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ImmunizationRecommendation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImmunizationRecommendation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImmunizationRecommendation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImmunizationRecommendation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php index daf51e2525..15076c22f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Immunization/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Immunization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImmunization($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Immunization" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImmunization\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php index e08e2ebdaf..7c9b2180d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ImplementationGuide/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ImplementationGuide/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImplementationGuide($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImplementationGuide" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImplementationGuide\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php index ae5fb5b605..85afcc71e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/List/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/List/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRList($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "List" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRList\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php index c112d64514..115fb473b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Location/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Location/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRLocation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Location" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRLocation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php index 9e4486d8fd..329d07f7f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Media/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Media/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedia($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Media" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedia\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php index e195f02bbb..c13235c57b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationAdministration/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationAdministration/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationAdministration($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationAdministration" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationAdministration\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php index 9a38ae5c1b..ee425bf683 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationDispense/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationDispense/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationDispense($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationDispense" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationDispense\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationOrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationOrderTest.php index 5038e4e97c..81a66da8de 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationOrder/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationOrder($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationOrder" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationOrder\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php index 362e9dff14..312bd81cf4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationStatement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/MedicationStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationStatement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationStatement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationStatement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php index e151536f30..56dd2ea651 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Medication/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Medication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedication($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Medication" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedication\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php index 3df02dcf64..96881100e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/MessageHeader/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/MessageHeader/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMessageHeader($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MessageHeader" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMessageHeader\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php index a4e2d28fde..e687127cb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/NamingSystem/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/NamingSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRNamingSystem($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "NamingSystem" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRNamingSystem\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php index e04ed088f0..74af2543f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/NutritionOrder/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/NutritionOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRNutritionOrder($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "NutritionOrder" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRNutritionOrder\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php index 45c3a5da37..f50f7652ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Observation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Observation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRObservation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Observation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRObservation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php index dc96ce2289..947cc0426c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/OperationDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/OperationDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROperationDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "OperationDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROperationDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php index 34e1ab2d63..b512e549ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/OperationOutcome/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/OperationOutcome/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROperationOutcome($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "OperationOutcome" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROperationOutcome\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderResponseTest.php index 09803887f3..79aef1e188 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/OrderResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/OrderResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROrderResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "OrderResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROrderResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderTest.php index 15d2e98c0d..e8613fc825 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Order/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Order/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROrder($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Order" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROrder\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php index 3579e9eeeb..47cfc319c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Organization/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Organization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROrganization($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Organization" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROrganization\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php index 6935becd88..39c697d9ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Patient/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Patient/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPatient($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Patient" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPatient\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php index d0ba5974d7..d79ba88f51 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/PaymentNotice/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/PaymentNotice/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPaymentNotice($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PaymentNotice" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPaymentNotice\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php index 02f99c2065..c65e016a02 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/PaymentReconciliation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/PaymentReconciliation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPaymentReconciliation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PaymentReconciliation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPaymentReconciliation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php index dd31b4c1ce..218dadf76a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Person/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Person/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPerson($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Person" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPerson\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php index a395a73181..94295aec09 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Practitioner/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Practitioner/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPractitioner($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Practitioner" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPractitioner\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php index f973d2d581..43c33960d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ProcedureRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ProcedureRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProcedureRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ProcedureRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProcedureRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php index 9d70482643..00009c9b46 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Procedure/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Procedure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProcedure($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Procedure" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProcedure\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php index 812841bcdc..5d4887c2e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ProcessRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ProcessRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProcessRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ProcessRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProcessRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php index 99206864dd..b9170b5844 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ProcessResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ProcessResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProcessResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ProcessResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProcessResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php index 88d0f1a357..f07920f591 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Provenance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Provenance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProvenance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Provenance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProvenance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php index 2d362dfb85..be262ccb0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/QuestionnaireResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/QuestionnaireResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRQuestionnaireResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "QuestionnaireResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRQuestionnaireResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php index 8ca41dfb73..30de01e7fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Questionnaire/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Questionnaire/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRQuestionnaire($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Questionnaire" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRQuestionnaire\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php index 5ea56e2ac6..515a2fc576 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ReferralRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ReferralRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRReferralRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ReferralRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRReferralRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php index c5445cfe28..aeb8189786 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/RelatedPerson/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/RelatedPerson/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRRelatedPerson($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "RelatedPerson" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRRelatedPerson\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php index facade3bdd..24e7caed39 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/RiskAssessment/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/RiskAssessment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRRiskAssessment($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "RiskAssessment" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRRiskAssessment\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php index a2ee3ecce1..4dbc33e438 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Schedule/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Schedule/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSchedule($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Schedule" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSchedule\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php index 494e0867f1..65811829dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/SearchParameter/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/SearchParameter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSearchParameter($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SearchParameter" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSearchParameter\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php index 6dd067548f..5bac06e632 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Slot/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Slot/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSlot($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Slot" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSlot\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php index db4efa2968..1e6b0c2d6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Specimen/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Specimen/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSpecimen($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Specimen" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSpecimen\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php index 9fc4f95f37..756f6b24a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/StructureDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/StructureDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRStructureDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "StructureDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRStructureDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php index a2235f2eca..8791fce44a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Subscription/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Subscription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubscription($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Subscription" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubscription\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php index 0ce355af9b..65e14625cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/Substance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/Substance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubstance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Substance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubstance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php index 43c2642d5e..70e317d5f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/SupplyDelivery/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/SupplyDelivery/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSupplyDelivery($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SupplyDelivery" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSupplyDelivery\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php index 68f61b5834..5f16c9b7d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/SupplyRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/SupplyRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSupplyRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SupplyRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSupplyRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php index 40ee0fc7a0..7b5cd116f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/TestScript/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/TestScript/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRTestScript($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "TestScript" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRTestScript\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php index 94b966ca33..a2b2aed3f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/ValueSet/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/ValueSet/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRValueSet($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ValueSet" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRValueSet\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php index 86da8e6d9d..42a6e7bc15 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu2/VisionPrescription/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu2/VisionPrescription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRVisionPrescription($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "VisionPrescription" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRVisionPrescription\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php index 3ffc33fdad..3a0016de7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRParametersTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRParametersTest.php index 025d5d5a56..2073e0c258 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRParametersTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResource/FHIRParametersTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceContainerTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceContainerTest.php index 7d6b3ed8c2..6f1c7f8442 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceTest.php index 57946a8bbc..a28f9a1b41 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php index 86e65a500d..04e7b49395 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAccountStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAccountStatusListTest.php index 8de9299c7d..3c710c5f4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAccountStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAccountStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRActionListListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRActionListListTest.php index e1dfb868aa..5ff45de40c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRActionListListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRActionListListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressTypeListTest.php index 791148f8f6..c63c5aed0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php index 0392e6e908..7c215cfee7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAddressUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAdministrativeGenderListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAdministrativeGenderListTest.php index c2300d2d09..6f2ab83b1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAdministrativeGenderListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAdministrativeGenderListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php index b0f3567b5f..3753c7b19c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAggregationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryListTest.php index d552928d8d..fd50609951 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyListTest.php index 87c8775520..266c6c76a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCertaintyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityListTest.php index ff5ab0d66a..2495e4cece 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceCriticalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityListTest.php index 773c6fedfd..232f013b5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusListTest.php index ac979c057a..86f38448a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeListTest.php index eba29e2631..f9b676a6b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAllergyIntoleranceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAnswerFormatListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAnswerFormatListTest.php index 8b7b256d04..fb35960ab8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAnswerFormatListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAnswerFormatListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAppointmentStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAppointmentStatusListTest.php index c1bf5e42bb..60b9f5fa82 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAppointmentStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAppointmentStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionDirectionTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionDirectionTypeListTest.php index d20b7ca9bb..ddb0da3f78 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionDirectionTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionDirectionTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionOperatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionOperatorTypeListTest.php index 3296c64d44..b47fdc9def 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionOperatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionOperatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionResponseTypesListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionResponseTypesListTest.php index ce11f959d1..289826a3b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionResponseTypesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAssertionResponseTypesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventActionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventActionListTest.php index b8b6751800..ec7493bc1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventOutcomeListTest.php index 60525276b9..63e29b8de1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeListTest.php index 0d4e6ff108..53b218c9a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRAuditEventParticipantNetworkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingStrengthListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingStrengthListTest.php index c8cef9f227..cc90772e5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingStrengthListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBindingStrengthListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBundleTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBundleTypeListTest.php index 9f88aeabbf..cf8cc99f87 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBundleTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRBundleTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php index 80d2716a96..80b26e79da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanActivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanRelationshipListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanRelationshipListTest.php index b26b0f34f2..6bf1de36b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanRelationshipListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanRelationshipListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php index 6fbdcdfd5e..47c3cbd9c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCarePlanStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClaimTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClaimTypeListTest.php index 5c90aac51b..9b0ac86bde 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClaimTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClaimTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClinicalImpressionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClinicalImpressionStatusListTest.php index a31ceda958..c506049cc1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClinicalImpressionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRClinicalImpressionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationRequestStatusListTest.php index d04c863628..83c11000ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationStatusListTest.php index 6822eeb688..81ab93387a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCommunicationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php index 15e5acceb0..db73543b29 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionAttestationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php index 96f8d04787..979b3f833c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRCompositionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php index 7724900c47..410d5bcadc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConceptMapEquivalenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionVerificationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionVerificationStatusListTest.php index da2de8f2ca..bae9ff958c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionVerificationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionVerificationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionalDeleteStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionalDeleteStatusListTest.php index f04e05c591..31ebb7063e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionalDeleteStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConditionalDeleteStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php index cfec2840db..3ba98ab62e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceEventModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceResourceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceResourceStatusListTest.php index 6c1d61af94..2823fdb480 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceResourceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceResourceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementKindListTest.php index 9fd9506c8f..22dbe962ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConformanceStatementKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php index dbeb6b540a..f20d10d426 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRConstraintSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointSystemListTest.php index e94fe1e3ea..6ba0822017 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointUseListTest.php index 1eb58b7393..4876a24b88 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContactPointUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContentTypeListTest.php index 55d3fa8df1..543335497e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRContentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDataElementStringencyListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDataElementStringencyListTest.php index be02058f21..81eab40572 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDataElementStringencyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDataElementStringencyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDaysOfWeekListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDaysOfWeekListTest.php index 5cbbe335a0..2a38e8c1b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDaysOfWeekListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDaysOfWeekListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDetectedIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDetectedIssueSeverityListTest.php index 57e7b26e44..7b03de17e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDetectedIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDetectedIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateListTest.php index 81995fd8ba..109b172268 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeListTest.php index 033595cf84..01fba35d4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCalibrationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCategoryListTest.php index 5443e9c46d..de857e1067 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricColorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricColorListTest.php index 5f5d0b2ec3..67660f5190 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricColorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricColorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusListTest.php index 832c23dc41..e0e8888d8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceMetricOperationalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceStatusListTest.php index 63b12dfee7..22a65c0c7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityListTest.php index b0fff978ad..95f0494f2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestStatusListTest.php index 741643b4de..296b01857b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDeviceUseRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php index 34d8400a02..885ef313ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php index 0adc9d9f4e..d8b67757e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php index d411647f2e..78a20b28ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDiagnosticReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDigitalMediaTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDigitalMediaTypeListTest.php index f2840c023b..809c22a702 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDigitalMediaTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDigitalMediaTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php index edf54c801f..e699e75222 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php index a1828dc5a4..c8c7f7969c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentReferenceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php index 1fcbbce81f..38cfdad252 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRDocumentRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php index 6ce1fd955b..181d2d2450 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterClassListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterLocationStatusListTest.php index bc47f9962c..5b269601d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php index d458a8332a..3a6a34cec6 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREncounterStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREpisodeOfCareStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREpisodeOfCareStatusListTest.php index f60b406c7b..872dffdce4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREpisodeOfCareStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREpisodeOfCareStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php index 2943cfc84d..beda621998 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIREventTimingListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php index 3c1c2916c0..87a4d1e38e 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRExtensionContextListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFamilyHistoryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFamilyHistoryStatusListTest.php index 8ea0c40139..35d69242c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFamilyHistoryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFamilyHistoryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php index 75f06c578b..bc656e1f33 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFilterOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFlagStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFlagStatusListTest.php index f02c1669ba..db47afe579 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFlagStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRFlagStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGoalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGoalStatusListTest.php index 6de5ee12fc..7209138257 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGoalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGoalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php index 996e7c27c5..e16731c805 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGroupTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideDependencyTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideDependencyTypeListTest.php index ee03d3ce69..fe80438654 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideDependencyTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideDependencyTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuidePageKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuidePageKindListTest.php index 41978087ff..865d81d1bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuidePageKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuidePageKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideResourcePurposeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideResourcePurposeListTest.php index 70f0dd8660..2bce40b630 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideResourcePurposeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRGuideResourcePurposeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRHTTPVerbListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRHTTPVerbListTest.php index 4566ebc993..d460528840 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRHTTPVerbListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRHTTPVerbListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php index c1038c9e22..c11d0585a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentifierUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentityAssuranceLevelListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentityAssuranceLevelListTest.php index fd639b8055..cc9bd5c9dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentityAssuranceLevelListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIdentityAssuranceLevelListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php index 2bb5387856..ed48449c93 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRInstanceAvailabilityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php index be818ee280..3a1c995747 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueTypeListTest.php index 2113f95f50..6694752af9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRIssueTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php index 6710909054..0a0ae5aa91 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLinkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php index 2c891c1fc9..9250078f95 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListStatusListTest.php index 50b1bd0353..8cd33eeb53 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRListStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php index 696acf7074..114bf7605a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php index 3bfdfb6066..fe33a930c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMeasmnt_PrincipleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMeasmnt_PrincipleListTest.php index 900b8da085..a81e728e85 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMeasmnt_PrincipleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMeasmnt_PrincipleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php index 7856c3e973..2782a3f2df 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationAdministrationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php index e862b62d3a..a5af1809fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationDispenseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationOrderStatusListTest.php index 0374ff1eaf..0e2c1291da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationStatementStatusListTest.php index 334550b2a1..c3e70dbca2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMedicationStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php index 6dc57f3c7e..0c28f187a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRMessageSignificanceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php index 8d10c57ffa..ac2ded6985 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNameUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeListTest.php index efda8cec95..f6c9493c6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemIdentifierTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemTypeListTest.php index 87609c0e31..dfd7eb07d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNamingSystemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php index d4479217e4..81e314d7e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNarrativeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNoteTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNoteTypeListTest.php index 118824f64f..ada02ea7bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNoteTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNoteTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNutritionOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNutritionOrderStatusListTest.php index 40c3d90926..e17d972196 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNutritionOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRNutritionOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php index c4c891fbb0..2a671fedfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php index edcf6bdc98..469d3751f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRObservationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationKindListTest.php index 904ff25bcf..bdd025aa5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationParameterUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationParameterUseListTest.php index 2111090277..365adfeb51 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationParameterUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROperationParameterUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROrderStatusListTest.php index f6b3385c0e..34b6018978 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIROrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantRequiredListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantRequiredListTest.php index 011c761b8d..35bbd6af61 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantRequiredListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantRequiredListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantStatusListTest.php index 902610b4ba..a125d1b59b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipantStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipationStatusListTest.php index be3817fa5f..763f6eda12 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRParticipationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestPriorityListTest.php index 7d37a033b4..4ffe9bb4dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestStatusListTest.php index eb98fba759..0e3a281b74 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureStatusListTest.php index 5d9530a7c1..6492c60c10 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProcedureStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php index fb8bd31bb7..e57d8c35d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRPropertyRepresentationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php index 5ec4d00119..9c2a06d7f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRProvenanceEntityRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityComparatorListTest.php index 051b6077c3..debac4b287 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuantityComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusListTest.php index bb125aeffe..01d23f39b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php index 98715ca1fd..ea0b6391b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRQuestionnaireStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRReferralStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRReferralStatusListTest.php index 5ecc87207b..f6ca293ea3 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRReferralStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRReferralStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRemittanceOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRemittanceOutcomeListTest.php index b693abaff9..5b6b1859da 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRemittanceOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRemittanceOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceVersionPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceVersionPolicyListTest.php index 66c7f6d075..fa3d3706f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceVersionPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResourceVersionPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php index 674537e8dc..788e41bfd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRResponseTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php index cab2a8b698..2f3e904aad 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRRestfulConformanceModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchEntryModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchEntryModeListTest.php index 457d57b4fa..48219d1f7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchEntryModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchEntryModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchModifierCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchModifierCodeListTest.php index 3af8326796..0443cd26e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchModifierCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchModifierCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php index 0ce703a83a..6bcfcb721a 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSearchParamTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php index ba171400e1..b4ba6c1b50 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlicingRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlotStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlotStatusListTest.php index 3e5a41297c..58343128bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlotStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSlotStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSpecimenStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSpecimenStatusListTest.php index 19df838adb..7c12ea75c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSpecimenStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSpecimenStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRStructureDefinitionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRStructureDefinitionKindListTest.php index 6d1864cb20..b4b4c10c44 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRStructureDefinitionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRStructureDefinitionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionChannelTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionChannelTypeListTest.php index 1c48db3f56..a186b10bcf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionChannelTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionChannelTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionStatusListTest.php index 64bda63e0a..9016174373 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSubscriptionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDeliveryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDeliveryStatusListTest.php index 75b07e618c..0e020cb19b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDeliveryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyDeliveryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyRequestStatusListTest.php index 3fa3775f2f..73a9452a08 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSupplyRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSystemRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSystemRestfulInteractionListTest.php index b8eb2e6fc3..13e822bb8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSystemRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRSystemRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTransactionModeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTransactionModeListTest.php index 267a630aa3..7f13cdfedb 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTransactionModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTransactionModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTypeRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTypeRestfulInteractionListTest.php index 81f4de1f62..411a035553 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTypeRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRTypeRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php index b9a4fc43b5..f4e6285047 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnitsOfTimeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnknownContentCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnknownContentCodeListTest.php index 8bb3deb1bc..ee6d3d225b 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnknownContentCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUnknownContentCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUseListTest.php index 33c255df8e..4650879c6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionBaseListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionBaseListTest.php index 6265dcca1c..ccf709a5dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionBaseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionBaseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionEyesListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionEyesListTest.php index 961492aa7e..918be56061 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionEyesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRVisionEyesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRXPathUsageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRXPathUsageTypeListTest.php index 905fe63f00..3506b332ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRXPathUsageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitive/FHIRXPathUsageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitiveTest.php index 6f80f6a154..a4ca43c773 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRStringPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRTimePrimitiveTest.php index e014268a6a..f6ef9f3ee8 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php index fda6694a04..631d6f1c86 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUriPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUriPrimitiveTest.php index b0cc056a7a..d0b6fb72d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUriPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUriPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUuidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUuidPrimitiveTest.php index aade8a15eb..b4bc11bbcf 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUuidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/FHIRUuidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRConstantsTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRConstantsTest.php index e741cad4cd..1236aab9ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRConstantsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRConstantsTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRTypeMapTest.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRTypeMapTest.php index 708c11e7b3..e9b8950b4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRTypeMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTests/PHPFHIRTypeMapTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeInterface.php index 32627c0b15..56d8ae3bf9 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeMap.php b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeMap.php index 349b452098..8e37fea400 100644 --- a/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeMap.php +++ b/src/DCarbone/PHPFHIRGenerated/DSTU2/PHPFHIRTypeMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:36+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRBase64BinaryPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRBase64BinaryPrimitive.php index 8cc7bfdcdf..40d2d8139f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRBase64BinaryPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRBase64BinaryPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRBooleanPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRBooleanPrimitive.php index d27620a439..36d690477f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRBooleanPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRBooleanPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|boolean diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCanonicalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCanonicalPrimitive.php index 57d2a807ae..c783be6377 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCanonicalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCanonicalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRCanonicalPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive.php index 2ac66979b0..b9878a1b46 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRCodePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAccountStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAccountStatusList.php index d4c6860968..dc80ad2788 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAccountStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAccountStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAccountStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACCOUNT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AccountStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php index 3a0507a556..8d9c50186d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionCardinalityBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_CARDINALITY_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionCardinalityBehavior-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionConditionKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionConditionKindList.php index a7924458d4..b7a7db5e01 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionConditionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionConditionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionConditionKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_CONDITION_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionConditionKind-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php index 7673187439..d5d2c4e419 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionGroupingBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_GROUPING_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionGroupingBehavior-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionParticipantTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionParticipantTypeList.php index 51b7334ff1..9ed18f06db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionParticipantTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionParticipantTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionParticipantTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_PARTICIPANT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionParticipantType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php index ed1a35bdde..2d16f6833b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionPrecheckBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_PRECHECK_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionPrecheckBehavior-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php index a47b849411..0b5e14d3ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionRelationshipTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionRelationshipType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php index 1cf0cbe745..e41a564d8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionRequiredBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_REQUIRED_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionRequiredBehavior-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php index d4cd15901b..dbfa8a7cd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionSelectionBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_SELECTION_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionSelectionBehavior-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressTypeList.php index 7f8bb19ffa..745f8a6e6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAddressTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AddressType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressUseList.php index e1c96b8309..834277458c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAddressUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAddressUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AddressUse-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdministrativeGenderList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdministrativeGenderList.php index 9caf3bea14..f412b61823 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdministrativeGenderList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdministrativeGenderList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAdministrativeGenderList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADMINISTRATIVE_GENDER_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AdministrativeGender-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdverseEventActualityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdverseEventActualityList.php index 176f9b4176..b4c4d93b9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdverseEventActualityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAdverseEventActualityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAdverseEventActualityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_ACTUALITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AdverseEventActuality-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAggregationModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAggregationModeList.php index 8c27d85dbe..8da4ce3903 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAggregationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAggregationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAggregationModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AggregationMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php index e4b7becbb7..00fb5f65eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceCategoryList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceCategory-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php index d0b3a82b80..10c3845d63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceCriticalityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CRITICALITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceCriticality-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php index 05c5163029..106acde4c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceSeverityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceSeverity-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php index 330762272c..ddc381f579 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAppointmentStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAppointmentStatusList.php index 6d62bb0531..3dd86cee39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAppointmentStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAppointmentStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAppointmentStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_APPOINTMENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AppointmentStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php index 49902e2722..056236b031 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAssertionDirectionTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_DIRECTION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AssertionDirectionType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php index 71e9806411..d6b48fdf2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAssertionOperatorTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_OPERATOR_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AssertionOperatorType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php index 7efe4fd0ce..2974037ba5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAssertionResponseTypesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_RESPONSE_TYPES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AssertionResponseTypes-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventActionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventActionList.php index 71813ce6fb..88e256987a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAuditEventActionList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_ACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AuditEventAction-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php index dd38dc25e2..f51b04e132 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAuditEventAgentNetworkTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_AGENT_NETWORK_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AuditEventAgentNetworkType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php index 63771cd207..8444fa1f0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAuditEventOutcomeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_OUTCOME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AuditEventOutcome-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBindingStrengthList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBindingStrengthList.php index 401f03ba74..f8fe392069 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBindingStrengthList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBindingStrengthList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRBindingStrengthList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINDING_STRENGTH_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BindingStrength-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryList.php index 19c72a94c7..0f7bd9cc0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRBiologicallyDerivedProductCategoryList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BiologicallyDerivedProductCategory-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusList.php index c5697f37f8..62414529a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRBiologicallyDerivedProductStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BiologicallyDerivedProductStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleList.php index a0114b2467..d29d52caa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRBiologicallyDerivedProductStorageScaleList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_STORAGE_SCALE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BiologicallyDerivedProductStorageScale-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBundleTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBundleTypeList.php index 14dfe675cc..15a04aae09 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBundleTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRBundleTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRBundleTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BUNDLE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BundleType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php index cd1c262aca..3e1b0c9194 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCapabilityStatementKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CapabilityStatementKind-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityKindList.php index a37731f279..6bd8ad4ff4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCarePlanActivityKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanActivityKind-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php index 9640c628aa..12b288869b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCarePlanActivityStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanActivityStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanIntentList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanIntentList.php index 6ca4129aad..4f4bc9bcc8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCarePlanIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCarePlanIntentList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_INTENT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanIntent-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCareTeamStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCareTeamStatusList.php index 382eb6b60c..7910ceb6f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCareTeamStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCareTeamStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCareTeamStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_TEAM_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CareTeamStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeList.php index 25f89e9c37..7e613f39d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCatalogEntryRelationTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY_RELATION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CatalogEntryRelationType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRChargeItemStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRChargeItemStatusList.php index f99623046c..541a5f1b5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRChargeItemStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRChargeItemStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRChargeItemStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ChargeItemStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClaimProcessingCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClaimProcessingCodesList.php index 7badf41978..dc953dfff1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClaimProcessingCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClaimProcessingCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRClaimProcessingCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLAIM_PROCESSING_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ClaimProcessingCodes-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php index aa0dc33d9b..ab483a0b3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRClinicalImpressionStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ClinicalImpressionStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSearchSupportList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSearchSupportList.php index 25d7390198..59267afb97 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSearchSupportList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSearchSupportList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCodeSearchSupportList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SEARCH_SUPPORT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CodeSearchSupport-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php index 90aae7e621..944b7b557a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCodeSystemContentModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_CONTENT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CodeSystemContentMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php index 84987eb4a7..0495293e6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCodeSystemHierarchyMeaningList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_HIERARCHY_MEANING_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CodeSystemHierarchyMeaning-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompartmentTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompartmentTypeList.php index 5144d0b59d..cbe5a06748 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompartmentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompartmentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCompartmentTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPARTMENT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompartmentType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php index 8c06be3e18..7c922acc0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCompositionAttestationModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompositionAttestationMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionStatusList.php index f56348db4a..de79c348ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRCompositionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCompositionStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompositionStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php index e8daaf1631..6e40492530 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConceptMapEquivalenceList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConceptMapEquivalence-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php index 4d08ee2c16..67b60176da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConceptMapGroupUnmappedModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_GROUP_UNMAPPED_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConceptMapGroupUnmappedMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php index a1cc3081a6..dc04c2c75a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConditionalDeleteStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_DELETE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionalDeleteStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalReadStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalReadStatusList.php index 7751ebd2b4..846b96e803 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalReadStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConditionalReadStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConditionalReadStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_READ_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionalReadStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentDataMeaningList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentDataMeaningList.php index 02a6c09c53..1720164b4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentDataMeaningList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentDataMeaningList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConsentDataMeaningList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_DATA_MEANING_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConsentDataMeaning-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentProvisionTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentProvisionTypeList.php index c1c7d5b8b2..87da0317db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentProvisionTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentProvisionTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConsentProvisionTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_PROVISION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConsentProvisionType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentStateList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentStateList.php index 437524d9b7..16bf446c73 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConsentStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConsentStateList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_STATE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConsentState-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConstraintSeverityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConstraintSeverityList.php index 51568b005a..a8f33bf08f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConstraintSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRConstraintSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConstraintSeverityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConstraintSeverity-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointSystemList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointSystemList.php index 680564533d..2e2f83d367 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContactPointSystemList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_SYSTEM_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContactPointSystem-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointUseList.php index c21929fbb6..388c9b39f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContactPointUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContactPointUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContactPointUse-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesList.php index ab6b642d9d..48d0134994 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContractResourcePublicationStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRACT_RESOURCE_PUBLICATION_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContractResourcePublicationStatusCodes-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php index 1a1c3db16a..28adc907ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContractResourceStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRACT_RESOURCE_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContractResourceStatusCodes-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContributorTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContributorTypeList.php index dfba85aff8..9857b7a029 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContributorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRContributorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContributorTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContributorType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDaysOfWeekList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDaysOfWeekList.php index 9194528c38..ec36102402 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDaysOfWeekList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDaysOfWeekList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDaysOfWeekList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DAYS_OF_WEEK_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DaysOfWeek-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php index 9727f6c029..53848c481e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDetectedIssueSeverityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DetectedIssueSeverity-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php index 4a83304586..60d474d209 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricCalibrationStateList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_STATE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricCalibrationState-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php index e8506f538b..8110168c3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricCalibrationTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricCalibrationType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php index 7428e9f179..bd6b154d96 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricCategoryList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricCategory-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricColorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricColorList.php index 13dd8ef6d0..31ff9d98c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricColorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricColorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricColorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_COLOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricColor-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php index 37c16fe444..4d7cf7fbb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricOperationalStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_OPERATIONAL_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricOperationalStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceNameTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceNameTypeList.php index e7a59d0c9c..6abf3dc28e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceNameTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceNameTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceNameTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_NAME_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceNameType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php index a19040f417..f81e9355c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceUseStatementStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceUseStatementStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php index 34cb944686..61d0dfc3b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDiagnosticReportStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiagnosticReportStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php index 8f0ce8a2db..6913abcd04 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDiscriminatorTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DISCRIMINATOR_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiscriminatorType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentModeList.php index 33cdc972f4..a5f9f7ab1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDocumentModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php index 035bcf9f5b..dedf84e5ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDocumentReferenceStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentReferenceStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php index 043113df65..b9bdec478e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDocumentRelationshipTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentRelationshipType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityRequestPurposeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityRequestPurposeList.php index bed82122be..30fa51de00 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityRequestPurposeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityRequestPurposeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREligibilityRequestPurposeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST_PURPOSE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EligibilityRequestPurpose-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityResponsePurposeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityResponsePurposeList.php index 438731887a..9882dd3e35 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityResponsePurposeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREligibilityResponsePurposeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREligibilityResponsePurposeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_PURPOSE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EligibilityResponsePurpose-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREnableWhenBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREnableWhenBehaviorList.php index 6360322f01..2749b411b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREnableWhenBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREnableWhenBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREnableWhenBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENABLE_WHEN_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EnableWhenBehavior-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterLocationStatusList.php index d4f98fa82b..e2254e089f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREncounterLocationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_LOCATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EncounterLocationStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterStatusList.php index 2ac130626e..75608b2deb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREncounterStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREncounterStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EncounterStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREndpointStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREndpointStatusList.php index c56488a7d5..5d3b801a4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREndpointStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREndpointStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREndpointStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENDPOINT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EndpointStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php index 61af7bdde7..6135fac47f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREpisodeOfCareStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EpisodeOfCareStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventCapabilityModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventCapabilityModeList.php index 10b27ccf38..a48d0b2535 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventCapabilityModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventCapabilityModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREventCapabilityModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_CAPABILITY_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EventCapabilityMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventStatusList.php index d20f37eb39..cc229b47a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREventStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EventStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventTimingList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventTimingList.php index 80a52d7ad6..743801e779 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventTimingList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREventTimingList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREventTimingList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_TIMING_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EventTiming-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREvidenceVariableTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREvidenceVariableTypeList.php index bb3263b6dc..3c7e5e89cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREvidenceVariableTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIREvidenceVariableTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREvidenceVariableTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EvidenceVariableType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExampleScenarioActorTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExampleScenarioActorTypeList.php index c394abc9da..c38711943a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExampleScenarioActorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExampleScenarioActorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRExampleScenarioActorTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_ACTOR_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExampleScenarioActorType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php index 51464133b2..267ee1b97b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRExplanationOfBenefitStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExplanationOfBenefitStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExposureStateList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExposureStateList.php index e4b327537b..2dd5993c17 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExposureStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExposureStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRExposureStateList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPOSURE_STATE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExposureState-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExpressionLanguageList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExpressionLanguageList.php index 26b797cbb5..a22f60f487 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExpressionLanguageList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExpressionLanguageList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRExpressionLanguageList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPRESSION_LANGUAGE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExpressionLanguage-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExtensionContextTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExtensionContextTypeList.php index 8f0cf070fc..2e904227a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExtensionContextTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRExtensionContextTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRExtensionContextTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExtensionContextType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php index 40b2aef7c7..73faf0dadd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFHIRDeviceStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRDEVICE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FHIRDeviceStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php index 96fb9e8dec..d95719dfd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFHIRSubstanceStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRSUBSTANCE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FHIRSubstanceStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRVersionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRVersionList.php index 396146e35e..f70866e514 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRVersionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFHIRVersionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFHIRVersionList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRVERSION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FHIRVersion-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php index ae6d9f4fab..d72b763904 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFamilyHistoryStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FamilyHistoryStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFilterOperatorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFilterOperatorList.php index 5a254267da..2c448374fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFilterOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFilterOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFilterOperatorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FilterOperator-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php index 8e12d4667b..5999de2054 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFinancialResourceStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FINANCIAL_RESOURCE_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FinancialResourceStatusCodes-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFlagStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFlagStatusList.php index c047179e55..1b61c1f618 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFlagStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRFlagStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFlagStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FLAG_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FlagStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGoalLifecycleStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGoalLifecycleStatusList.php index 589466744c..a55f32dc8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGoalLifecycleStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGoalLifecycleStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGoalLifecycleStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GOAL_LIFECYCLE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GoalLifecycleStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php index c8312c94ed..ade468ff1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGraphCompartmentRuleList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GRAPH_COMPARTMENT_RULE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GraphCompartmentRule-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentUseList.php index 7d27f5569d..2906dad83b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGraphCompartmentUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGraphCompartmentUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GRAPH_COMPARTMENT_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GraphCompartmentUse-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupMeasureList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupMeasureList.php index 5eec09a832..31e4738cb5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupMeasureList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupMeasureList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGroupMeasureList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_MEASURE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GroupMeasure-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupTypeList.php index 42fa6f0cec..a582cde052 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGroupTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGroupTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GroupType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php index 5976f8f99d..1a244613cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGuidanceResponseStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GuidanceResponseStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidePageGenerationList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidePageGenerationList.php index add71b07e0..9e8ad97387 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidePageGenerationList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuidePageGenerationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGuidePageGenerationList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_PAGE_GENERATION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GuidePageGeneration-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuideParameterCodeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuideParameterCodeList.php index eca8bba8e8..cc6e498648 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuideParameterCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRGuideParameterCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGuideParameterCodeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_PARAMETER_CODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GuideParameterCode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRHTTPVerbList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRHTTPVerbList.php index 66773547ce..2e80089949 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRHTTPVerbList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRHTTPVerbList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRHTTPVerbList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_HTTPVERB_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type HTTPVerb-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentifierUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentifierUseList.php index 77fb2e3574..371007a630 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentifierUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentifierUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIdentifierUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IdentifierUse-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php index 4b92f152e9..6275387c05 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIdentityAssuranceLevelList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTITY_ASSURANCE_LEVEL_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IdentityAssuranceLevel-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImagingStudyStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImagingStudyStatusList.php index 5097b21673..c74bd0e6d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImagingStudyStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImagingStudyStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRImagingStudyStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ImagingStudyStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesList.php index f75ed4fa15..0977841d4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRImmunizationEvaluationStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ImmunizationEvaluationStatusCodes-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php index f974a6185e..ce3f8c5179 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRImmunizationStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ImmunizationStatusCodes-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeList.php index 08840c48f8..14d7f4adf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRInvoicePriceComponentTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INVOICE_PRICE_COMPONENT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type InvoicePriceComponentType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoiceStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoiceStatusList.php index fa31988972..99314388f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoiceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRInvoiceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRInvoiceStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INVOICE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type InvoiceStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueSeverityList.php index 7d6221b7d3..1094195ee1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIssueSeverityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IssueSeverity-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueTypeList.php index 9f689b5253..08e6216453 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRIssueTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIssueTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IssueType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkTypeList.php index 32bd4e6b17..1a7db93d0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLinkTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINK_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LinkType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkageTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkageTypeList.php index 905253034c..c175953f53 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLinkageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLinkageTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINKAGE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LinkageType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListModeList.php index e7d892c36c..db2e977161 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRListModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ListMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListStatusList.php index aada196196..c8532b44c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRListStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRListStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ListStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationModeList.php index 4f2ccf18b8..1df9fb69ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLocationModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LocationMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationStatusList.php index 25c53a4b5a..c317420b1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLocationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LocationStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportStatusList.php index acbb31bd69..2e0bc71f58 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMeasureReportStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MeasureReportStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportTypeList.php index 482e78c4bb..586b64637b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMeasureReportTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMeasureReportTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MeasureReportType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php index beb0469863..40beb563e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationRequestIntentList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_INTENT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type medicationRequestIntent-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationStatusCodesList.php index 45a7ed6a00..b5384f20a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationStatusCodes-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationrequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationrequestStatusList.php index 1900088f7f..cdce57a653 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationrequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMedicationrequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationrequestStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATIONREQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type medicationrequestStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php index 16523f1c9f..fdba07fd31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMessageSignificanceCategoryList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MessageSignificanceCategory-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageheaderResponseRequestList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageheaderResponseRequestList.php index f335ba18db..6e433aeda8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageheaderResponseRequestList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRMessageheaderResponseRequestList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMessageheaderResponseRequestList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGEHEADER_RESPONSE_REQUEST_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type messageheaderResponseRequest-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNameUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNameUseList.php index bc832745dd..85688b833f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNameUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNameUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNameUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAME_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NameUse-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php index 65b2465833..ac92d158ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNamingSystemIdentifierTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_IDENTIFIER_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NamingSystemIdentifierType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemTypeList.php index ac4f0818eb..bd570707cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNamingSystemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNamingSystemTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NamingSystemType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNarrativeStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNarrativeStatusList.php index 7be7261915..fba5795cad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNarrativeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNarrativeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNarrativeStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NarrativeStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNoteTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNoteTypeList.php index 9c6c958c98..8543622a8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNoteTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRNoteTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNoteTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NOTE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NoteType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationDataTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationDataTypeList.php index 0da5a912aa..4d795e9693 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationDataTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationDataTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRObservationDataTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_DATA_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationDataType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationRangeCategoryList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationRangeCategoryList.php index 74e023a9d0..d51354b12c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationRangeCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationRangeCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRObservationRangeCategoryList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RANGE_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationRangeCategory-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationStatusList.php index 4d58cf5f19..f393fec362 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRObservationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRObservationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationKindList.php index 4c0401cecc..f59e30d21c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIROperationKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type OperationKind-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationParameterUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationParameterUseList.php index a1cf87b8cf..54c751671a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationParameterUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROperationParameterUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIROperationParameterUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_PARAMETER_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type OperationParameterUse-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROrientationTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROrientationTypeList.php index b0b23af763..05ef1dac84 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROrientationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIROrientationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIROrientationTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ORIENTATION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type orientationType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipantRequiredList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipantRequiredList.php index eb55f861ba..01dbbd342f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipantRequiredList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipantRequiredList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRParticipantRequiredList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPANT_REQUIRED_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ParticipantRequired-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipationStatusList.php index f7b88058cf..a8d8ee47b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRParticipationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRParticipationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ParticipationStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyRepresentationList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyRepresentationList.php index e5f8ca7d63..ee47f8841d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyRepresentationList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyRepresentationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRPropertyRepresentationList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type PropertyRepresentation-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyTypeList.php index e1b60c08c0..4673719bb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPropertyTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRPropertyTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type PropertyType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php index d55cba80f1..5be5dc9aa8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRProvenanceEntityRoleList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ProvenanceEntityRole-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPublicationStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPublicationStatusList.php index a98c8df7f8..6312f13feb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPublicationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRPublicationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRPublicationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PUBLICATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type PublicationStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQualityTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQualityTypeList.php index a9c0d27365..0083f55970 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQualityTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQualityTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQualityTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUALITY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type qualityType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuantityComparatorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuantityComparatorList.php index b17e7c3ac8..e80951c5a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuantityComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuantityComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuantityComparatorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuantityComparator-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorList.php index 314110de20..c067d88050 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuestionnaireItemOperatorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_ITEM_OPERATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuestionnaireItemOperator-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php index f81d37a9a4..ef41534375 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuestionnaireItemTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_ITEM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuestionnaireItemType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php index dad0b122c9..09587c3fd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuestionnaireResponseStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuestionnaireResponseStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php index 237ebd30eb..bb45aca0c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRReferenceHandlingPolicyList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERENCE_HANDLING_POLICY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ReferenceHandlingPolicy-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php index d42cd00d76..57f7cd5883 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRReferenceVersionRulesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERENCE_VERSION_RULES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ReferenceVersionRules-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php index 39e123996e..1c16c5fdc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRelatedArtifactTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RelatedArtifactType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php index 5d8fe73a91..afcd1e17f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRemittanceOutcomeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REMITTANCE_OUTCOME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RemittanceOutcome-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRepositoryTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRepositoryTypeList.php index bd40615a59..41d98d891b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRepositoryTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRepositoryTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRepositoryTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REPOSITORY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type repositoryType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestIntentList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestIntentList.php index 60df2876dc..fc7d50a218 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRequestIntentList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_INTENT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RequestIntent-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestPriorityList.php index 3947a77aa8..f5caf1dde3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRequestPriorityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_PRIORITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RequestPriority-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestResourceTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestResourceTypeList.php index aad101cd4e..f577537cd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestResourceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestResourceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRequestResourceTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_RESOURCE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RequestResourceType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestStatusList.php index af07b6ede3..fd2d7b6920 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRequestStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RequestStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchElementTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchElementTypeList.php index 5c0e93b703..10bc76146d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchElementTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchElementTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResearchElementTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResearchElementType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchStudyStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchStudyStatusList.php index 5d6504f481..2466efd346 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchStudyStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchStudyStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResearchStudyStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResearchStudyStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php index 729b37229e..cfd34b17a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResearchSubjectStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResearchSubjectStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceTypeList.php index 37db0abd09..7008a3bdfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResourceTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResourceType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php index d4956b3845..2ca629cb3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResourceVersionPolicyList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_VERSION_POLICY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResourceVersionPolicy-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResponseTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResponseTypeList.php index 3ca34b316a..fada088212 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResponseTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRResponseTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResponseTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResponseType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php index f4f755dc83..a7a2abc38b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRestfulCapabilityModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_CAPABILITY_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RestfulCapabilityMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSPDXLicenseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSPDXLicenseList.php index b48bfdc91c..cda271d357 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSPDXLicenseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSPDXLicenseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSPDXLicenseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPDXLICENSE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SPDXLicense-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchComparatorList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchComparatorList.php index f3d0c16ae0..818ac64087 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchComparatorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_COMPARATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchComparator-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchEntryModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchEntryModeList.php index e723c43a36..d5c92177b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchEntryModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchEntryModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchEntryModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_ENTRY_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchEntryMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchModifierCodeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchModifierCodeList.php index a2ef37717a..490916762c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchModifierCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchModifierCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchModifierCodeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_MODIFIER_CODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchModifierCode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchParamTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchParamTypeList.php index 011870c14a..8dc08b3d4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchParamTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSearchParamTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchParamTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchParamType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSequenceTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSequenceTypeList.php index 16fb8ca81d..da8607c00e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSequenceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSequenceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSequenceTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEQUENCE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type sequenceType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlicingRulesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlicingRulesList.php index 6b9724547d..b51f73bec8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlicingRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlicingRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSlicingRulesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLICING_RULES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SlicingRules-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlotStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlotStatusList.php index 2d62dfeec0..8c931c6110 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlotStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSlotStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSlotStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLOT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SlotStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSortDirectionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSortDirectionList.php index 30a0b38088..cc92010252 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSortDirectionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSortDirectionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSortDirectionList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SORT_DIRECTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SortDirection-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceList.php index 244d7e3a6f..7b13371971 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSpecimenContainedPreferenceList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPECIMEN_CONTAINED_PREFERENCE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SpecimenContainedPreference-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenStatusList.php index 7f1aa90993..9133ac34af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSpecimenStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSpecimenStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPECIMEN_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SpecimenStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStatusList.php index fe8334d284..357db64ae7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type status-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStrandTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStrandTypeList.php index 34e5bfa94c..8a918b212a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStrandTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStrandTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStrandTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRAND_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type strandType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php index fd54567f38..c78b56b124 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureDefinitionKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureDefinitionKind-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php index 6d2fc5e35b..4335655530 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapContextTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_CONTEXT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapContextType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php index f2655e202f..d141ec8521 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapGroupTypeModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_GROUP_TYPE_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapGroupTypeMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapInputModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapInputModeList.php index 7f17bff27d..17faf7db16 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapInputModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapInputModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapInputModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_INPUT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapInputMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapModelModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapModelModeList.php index c7f9c925ec..c5c53aefee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapModelModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapModelModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapModelModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_MODEL_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapModelMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php index 30b6043370..ce32a6f265 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapSourceListModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_SOURCE_LIST_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapSourceListMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php index a993a9db57..5020840e9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapTargetListModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TARGET_LIST_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapTargetListMode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTransformList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTransformList.php index fcddf8d2eb..bd82806d61 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTransformList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRStructureMapTransformList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapTransformList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TRANSFORM_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapTransform-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php index b4a4444068..92bb718543 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSubscriptionChannelTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_CHANNEL_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SubscriptionChannelType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionStatusList.php index 5e4657dd2d..ab5ea93522 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSubscriptionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSubscriptionStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SubscriptionStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php index e2d0252458..d0357584af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSupplyDeliveryStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SupplyDeliveryStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php index 26e302afd5..eb96a1394a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSupplyRequestStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SupplyRequestStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php index da51a7f50a..78233ff232 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSystemRestfulInteractionList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SYSTEM_RESTFUL_INTERACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SystemRestfulInteraction-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskIntentList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskIntentList.php index 02f665c70e..f1f3e32687 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTaskIntentList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TASK_INTENT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TaskIntent-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskStatusList.php index 3fc6c3e1ab..a23df9d843 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTaskStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTaskStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TASK_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TaskStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportActionResultList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportActionResultList.php index 802a9543b2..aeab37627e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportActionResultList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportActionResultList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestReportActionResultList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_ACTION_RESULT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestReportActionResult-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php index d1d867da68..0f7fd7725a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestReportParticipantTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_PARTICIPANT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestReportParticipantType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportResultList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportResultList.php index bde5ea8691..2d5b969654 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportResultList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportResultList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestReportResultList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_RESULT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestReportResult-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportStatusList.php index 3163fdf506..8741a8b99b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestReportStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestReportStatus-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php index 1abd8d0ded..5d5c7341fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestScriptRequestMethodCodeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_REQUEST_METHOD_CODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestScriptRequestMethodCode-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTriggerTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTriggerTypeList.php index a9bf1720fe..e8b87e0605 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTriggerTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTriggerTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTriggerTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TRIGGER_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TriggerType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php index f7a5ae27e4..37ebc105ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTypeDerivationRuleList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_DERIVATION_RULE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TypeDerivationRule-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php index d98b5ff01e..0d6849e533 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTypeRestfulInteractionList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_RESTFUL_INTERACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TypeRestfulInteraction-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUDIEntryTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUDIEntryTypeList.php index cde3629c36..ba0f596966 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUDIEntryTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUDIEntryTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUDIEntryTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UDIENTRY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type UDIEntryType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUnitsOfTimeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUnitsOfTimeList.php index 807c589e01..2078315105 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUnitsOfTimeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUnitsOfTimeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUnitsOfTimeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type UnitsOfTime-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUseList.php index 654419ccd5..864e74ead0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Use-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVConfidentialityClassificationList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVConfidentialityClassificationList.php index 76bca2edae..5715a3e2dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVConfidentialityClassificationList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVConfidentialityClassificationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRVConfidentialityClassificationList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_V_CONFIDENTIALITY_CLASSIFICATION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type vConfidentialityClassification-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVariableTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVariableTypeList.php index 00fa36e073..153f888372 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVariableTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVariableTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRVariableTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VARIABLE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type VariableType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionBaseList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionBaseList.php index ffc6543dbd..d7223bc50d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionBaseList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionBaseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRVisionBaseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_BASE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type VisionBase-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionEyesList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionEyesList.php index c05fffd1ea..63a724f06d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionEyesList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRVisionEyesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRVisionEyesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_EYES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type VisionEyes-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRXPathUsageTypeList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRXPathUsageTypeList.php index f1dd90b591..adfe0adcfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRXPathUsageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRCodePrimitive/FHIRXPathUsageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRXPathUsageTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_XPATH_USAGE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type XPathUsageType-list diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDatePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDatePrimitive.php index 10f922b119..efeb1aaf60 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDatePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDatePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRDatePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDateTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDateTimePrimitive.php index 78314f5e31..5834dea0fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDateTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDateTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDecimalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDecimalPrimitive.php index dd63fd6a3b..f367b34d66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRDecimalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRDecimalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|double diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement.php index 6d37e42ba8..e9e9a64ad5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterf const FIELD_EXTENSION = 'extension'; const FIELD_ID = 'id'; - const FIELD_ID_EXT = '_id'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Optional Extension Element - found in all resources. @@ -396,11 +395,18 @@ public function jsonSerialize() $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } if ([] !== ($vs = $this->getExtension())) { - $a[self::FIELD_EXTENSION] = $vs; + $a[self::FIELD_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXTENSION][] = $v; + } } if (null !== ($v = $this->getId())) { $a[self::FIELD_ID] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAccountStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAccountStatus.php index 4987cd89bd..a3655c181a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAccountStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAccountStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAccountStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACCOUNT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAccountStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionCardinalityBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionCardinalityBehavior.php index 2cebede0b9..18a62f5148 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionCardinalityBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionCardinalityBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRActionCardinalityBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_CARDINALITY_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRActionCardinalityBehaviorList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionConditionKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionConditionKind.php index 7a1fd4869f..fe6efccb30 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionConditionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionConditionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionConditionKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_CONDITION_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRActionConditionKindList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionGroupingBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionGroupingBehavior.php index 7ee062e899..6494ca9853 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionGroupingBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionGroupingBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionGroupingBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_GROUPING_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRActionGroupingBehaviorList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionParticipantType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionParticipantType.php index 15440084a3..93536b06a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionParticipantType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionParticipantType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionParticipantType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_PARTICIPANT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRActionParticipantTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionPrecheckBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionPrecheckBehavior.php index 610940ab6d..a5c2033afb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionPrecheckBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionPrecheckBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionPrecheckBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_PRECHECK_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRActionPrecheckBehaviorList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRelationshipType.php index 7512db0ef8..0987ed60b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRActionRelationshipTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRequiredBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRequiredBehavior.php index 0f90c1e121..02aa128285 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRequiredBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionRequiredBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionRequiredBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_REQUIRED_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRActionRequiredBehaviorList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionSelectionBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionSelectionBehavior.php index 3e81a01238..66d6c3e71f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionSelectionBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRActionSelectionBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionSelectionBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_SELECTION_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRActionSelectionBehaviorList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddress.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddress.php index 19d668e459..56c372a5dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddress.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddress.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRAddress extends FHIRElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -240,81 +240,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CITY])) { - $ext = (isset($data[self::FIELD_CITY_EXT]) && is_array($data[self::FIELD_CITY_EXT])) - ? $data[self::FIELD_CITY_EXT] - : null; - if ($data[self::FIELD_CITY] instanceof FHIRString) { - $this->setCity($data[self::FIELD_CITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CITY])) { - $this->setCity(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CITY]] + $ext)); - } else if (is_array($data[self::FIELD_CITY])) { - $this->setCity(new FHIRString(array_merge($ext, $data[self::FIELD_CITY]))); - } + if (isset($data[self::FIELD_CITY]) || isset($data[self::FIELD_CITY_EXT])) { + if (isset($data[self::FIELD_CITY])) { + $value = $data[self::FIELD_CITY]; } else { - $this->setCity(new FHIRString($data[self::FIELD_CITY])); + $value = null; } - } - if (isset($data[self::FIELD_COUNTRY])) { - $ext = (isset($data[self::FIELD_COUNTRY_EXT]) && is_array($data[self::FIELD_COUNTRY_EXT])) - ? $data[self::FIELD_COUNTRY_EXT] - : null; - if ($data[self::FIELD_COUNTRY] instanceof FHIRString) { - $this->setCountry($data[self::FIELD_COUNTRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNTRY])) { - $this->setCountry(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COUNTRY]] + $ext)); - } else if (is_array($data[self::FIELD_COUNTRY])) { - $this->setCountry(new FHIRString(array_merge($ext, $data[self::FIELD_COUNTRY]))); - } + if (isset($data[self::FIELD_CITY_EXT]) && is_array($data[self::FIELD_CITY_EXT])) { + $ext = $data[self::FIELD_CITY_EXT]; } else { - $this->setCountry(new FHIRString($data[self::FIELD_COUNTRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCity($value); + } else if (is_array($value)) { + $this->setCity(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCity(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCity(new FHIRString($ext)); } } - if (isset($data[self::FIELD_DISTRICT])) { - $ext = (isset($data[self::FIELD_DISTRICT_EXT]) && is_array($data[self::FIELD_DISTRICT_EXT])) - ? $data[self::FIELD_DISTRICT_EXT] - : null; - if ($data[self::FIELD_DISTRICT] instanceof FHIRString) { - $this->setDistrict($data[self::FIELD_DISTRICT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISTRICT])) { - $this->setDistrict(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISTRICT]] + $ext)); - } else if (is_array($data[self::FIELD_DISTRICT])) { - $this->setDistrict(new FHIRString(array_merge($ext, $data[self::FIELD_DISTRICT]))); + if (isset($data[self::FIELD_COUNTRY]) || isset($data[self::FIELD_COUNTRY_EXT])) { + if (isset($data[self::FIELD_COUNTRY])) { + $value = $data[self::FIELD_COUNTRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNTRY_EXT]) && is_array($data[self::FIELD_COUNTRY_EXT])) { + $ext = $data[self::FIELD_COUNTRY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCountry($value); + } else if (is_array($value)) { + $this->setCountry(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCountry(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCountry(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DISTRICT]) || isset($data[self::FIELD_DISTRICT_EXT])) { + if (isset($data[self::FIELD_DISTRICT])) { + $value = $data[self::FIELD_DISTRICT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISTRICT_EXT]) && is_array($data[self::FIELD_DISTRICT_EXT])) { + $ext = $data[self::FIELD_DISTRICT_EXT]; } else { - $this->setDistrict(new FHIRString($data[self::FIELD_DISTRICT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDistrict($value); + } else if (is_array($value)) { + $this->setDistrict(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDistrict(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDistrict(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LINE])) { - $ext = (isset($data[self::FIELD_LINE_EXT]) && is_array($data[self::FIELD_LINE_EXT])) - ? $data[self::FIELD_LINE_EXT] - : null; - if (is_array($data[self::FIELD_LINE])) { - foreach($data[self::FIELD_LINE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLine($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLine(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINE]) || isset($data[self::FIELD_LINE_EXT])) { + if (isset($data[self::FIELD_LINE])) { + $value = $data[self::FIELD_LINE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINE_EXT]) && is_array($data[self::FIELD_LINE_EXT])) { + $ext = $data[self::FIELD_LINE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLine($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLine($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLine(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLine(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLine(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLine(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LINE] instanceof FHIRString) { - $this->addLine($data[self::FIELD_LINE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINE])) { - $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINE]] + $ext)); - } else { - $this->addLine(new FHIRString($data[self::FIELD_LINE])); } } if (isset($data[self::FIELD_PERIOD])) { @@ -324,84 +354,119 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_POSTAL_CODE])) { - $ext = (isset($data[self::FIELD_POSTAL_CODE_EXT]) && is_array($data[self::FIELD_POSTAL_CODE_EXT])) - ? $data[self::FIELD_POSTAL_CODE_EXT] - : null; - if ($data[self::FIELD_POSTAL_CODE] instanceof FHIRString) { - $this->setPostalCode($data[self::FIELD_POSTAL_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POSTAL_CODE])) { - $this->setPostalCode(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_POSTAL_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_POSTAL_CODE])) { - $this->setPostalCode(new FHIRString(array_merge($ext, $data[self::FIELD_POSTAL_CODE]))); - } + if (isset($data[self::FIELD_POSTAL_CODE]) || isset($data[self::FIELD_POSTAL_CODE_EXT])) { + if (isset($data[self::FIELD_POSTAL_CODE])) { + $value = $data[self::FIELD_POSTAL_CODE]; } else { - $this->setPostalCode(new FHIRString($data[self::FIELD_POSTAL_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_STATE])) { - $ext = (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) - ? $data[self::FIELD_STATE_EXT] - : null; - if ($data[self::FIELD_STATE] instanceof FHIRString) { - $this->setState($data[self::FIELD_STATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATE])) { - $this->setState(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATE])) { - $this->setState(new FHIRString(array_merge($ext, $data[self::FIELD_STATE]))); - } + if (isset($data[self::FIELD_POSTAL_CODE_EXT]) && is_array($data[self::FIELD_POSTAL_CODE_EXT])) { + $ext = $data[self::FIELD_POSTAL_CODE_EXT]; } else { - $this->setState(new FHIRString($data[self::FIELD_STATE])); + $ext = []; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPostalCode($value); + } else if (is_array($value)) { + $this->setPostalCode(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPostalCode(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + } else if ([] !== $ext) { + $this->setPostalCode(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAddressType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAddressType([FHIRAddressType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAddressType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_STATE]) || isset($data[self::FIELD_STATE_EXT])) { + if (isset($data[self::FIELD_STATE])) { + $value = $data[self::FIELD_STATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) { + $ext = $data[self::FIELD_STATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setState($value); + } else if (is_array($value)) { + $this->setState(new FHIRString(array_merge($ext, $value))); + } else { + $this->setState(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setState(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setType(new FHIRAddressType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRAddressUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRAddressUse([FHIRAddressUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRAddressUse(array_merge($ext, $data[self::FIELD_USE]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAddressType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAddressType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAddressType([FHIRAddressType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRAddressType($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRAddressUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAddressUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRAddressUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRAddressUse([FHIRAddressUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRAddressUse($ext)); } } } @@ -1004,78 +1069,105 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCity())) { $a[self::FIELD_CITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CITY_EXT] = $enc; } } if (null !== ($v = $this->getCountry())) { $a[self::FIELD_COUNTRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COUNTRY_EXT] = $enc; } } if (null !== ($v = $this->getDistrict())) { $a[self::FIELD_DISTRICT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISTRICT_EXT] = $enc; } } if ([] !== ($vs = $this->getLine())) { $a[self::FIELD_LINE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINE_EXT] = $encs; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if (null !== ($v = $this->getPostalCode())) { $a[self::FIELD_POSTAL_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_POSTAL_CODE_EXT] = $enc; } } if (null !== ($v = $this->getState())) { $a[self::FIELD_STATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATE_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAddressType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAddressType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAddressUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAddressUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressType.php index 54f4b90f70..933913af16 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAddressType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAddressTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressUse.php index 3f8aebe453..6a74666ee4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAddressUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAddressUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAddressUseList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdministrativeGender.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdministrativeGender.php index 1d82279e8d..79a7d1100e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdministrativeGender.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdministrativeGender.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRAdministrativeGender extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADMINISTRATIVE_GENDER; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAdministrativeGenderList @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdverseEventActuality.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdverseEventActuality.php index d6df4f59c7..f1538b70ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdverseEventActuality.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAdverseEventActuality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAdverseEventActuality extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_ACTUALITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAdverseEventActualityList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAggregationMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAggregationMode.php index f0354a1c28..2a36479b18 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAggregationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAggregationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAggregationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAggregationModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCategory.php index 540843eff9..2ef39754c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAllergyIntoleranceCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAllergyIntoleranceCategoryList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCriticality.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCriticality.php index 64f7584a92..9424f85cb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCriticality.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceCriticality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAllergyIntoleranceCriticality extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CRITICALITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAllergyIntoleranceCriticalityList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceSeverity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceSeverity.php index 36946a5e32..e51a998c7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAllergyIntoleranceSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAllergyIntoleranceSeverityList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceType.php index 098ac3e24a..afac532a6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAllergyIntoleranceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAllergyIntoleranceType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAllergyIntoleranceTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAnnotation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAnnotation.php index baed7d8df3..a520cd12fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAnnotation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAnnotation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRAnnotation extends FHIRElement const FIELD_TIME_EXT = '_time'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -172,52 +172,73 @@ public function __construct($data = null) $this->setAuthorReference(new FHIRReference($data[self::FIELD_AUTHOR_REFERENCE])); } } - if (isset($data[self::FIELD_AUTHOR_STRING])) { - $ext = (isset($data[self::FIELD_AUTHOR_STRING_EXT]) && is_array($data[self::FIELD_AUTHOR_STRING_EXT])) - ? $data[self::FIELD_AUTHOR_STRING_EXT] - : null; - if ($data[self::FIELD_AUTHOR_STRING] instanceof FHIRString) { - $this->setAuthorString($data[self::FIELD_AUTHOR_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHOR_STRING])) { - $this->setAuthorString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AUTHOR_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHOR_STRING])) { - $this->setAuthorString(new FHIRString(array_merge($ext, $data[self::FIELD_AUTHOR_STRING]))); - } + if (isset($data[self::FIELD_AUTHOR_STRING]) || isset($data[self::FIELD_AUTHOR_STRING_EXT])) { + if (isset($data[self::FIELD_AUTHOR_STRING])) { + $value = $data[self::FIELD_AUTHOR_STRING]; } else { - $this->setAuthorString(new FHIRString($data[self::FIELD_AUTHOR_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRMarkdown) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_AUTHOR_STRING_EXT]) && is_array($data[self::FIELD_AUTHOR_STRING_EXT])) { + $ext = $data[self::FIELD_AUTHOR_STRING_EXT]; } else { - $this->setText(new FHIRMarkdown($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAuthorString($value); + } else if (is_array($value)) { + $this->setAuthorString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAuthorString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthorString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRDateTime) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME]))); + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setText(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; } else { - $this->setTime(new FHIRDateTime($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTime(new FHIRDateTime($ext)); } } } @@ -529,25 +550,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthorString())) { $a[self::FIELD_AUTHOR_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AUTHOR_STRING_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAppointmentStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAppointmentStatus.php index 32cf152d03..74d8ec3474 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAppointmentStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAppointmentStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAppointmentStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_APPOINTMENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAppointmentStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionDirectionType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionDirectionType.php index 26d4221503..3dae5b115d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionDirectionType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionDirectionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAssertionDirectionType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_DIRECTION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAssertionDirectionTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionOperatorType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionOperatorType.php index ce8416f302..7d270ede9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionOperatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionOperatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAssertionOperatorType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_OPERATOR_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAssertionOperatorTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionResponseTypes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionResponseTypes.php index 8dd92f30d6..af43be1daa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionResponseTypes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAssertionResponseTypes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAssertionResponseTypes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_RESPONSE_TYPES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAssertionResponseTypesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAttachment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAttachment.php index ee9ceebacf..a197fc1e88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAttachment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAttachment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRAttachment extends FHIRElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -217,132 +217,188 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); - } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_CREATION])) { - $ext = (isset($data[self::FIELD_CREATION_EXT]) && is_array($data[self::FIELD_CREATION_EXT])) - ? $data[self::FIELD_CREATION_EXT] - : null; - if ($data[self::FIELD_CREATION] instanceof FHIRDateTime) { - $this->setCreation($data[self::FIELD_CREATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATION])) { - $this->setCreation(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATION]] + $ext)); - } else if (is_array($data[self::FIELD_CREATION])) { - $this->setCreation(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_CREATION]) || isset($data[self::FIELD_CREATION_EXT])) { + if (isset($data[self::FIELD_CREATION])) { + $value = $data[self::FIELD_CREATION]; } else { - $this->setCreation(new FHIRDateTime($data[self::FIELD_CREATION])); - } - } - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRBase64Binary) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DATA]))); + $value = null; + } + if (isset($data[self::FIELD_CREATION_EXT]) && is_array($data[self::FIELD_CREATION_EXT])) { + $ext = $data[self::FIELD_CREATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreation($value); + } else if (is_array($value)) { + $this->setCreation(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreation(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreation(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; } else { - $this->setData(new FHIRBase64Binary($data[self::FIELD_DATA])); - } - } - if (isset($data[self::FIELD_HASH])) { - $ext = (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) - ? $data[self::FIELD_HASH_EXT] - : null; - if ($data[self::FIELD_HASH] instanceof FHIRBase64Binary) { - $this->setHash($data[self::FIELD_HASH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HASH])) { - $this->setHash(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_HASH]] + $ext)); - } else if (is_array($data[self::FIELD_HASH])) { - $this->setHash(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_HASH]))); + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setData(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_HASH]) || isset($data[self::FIELD_HASH_EXT])) { + if (isset($data[self::FIELD_HASH])) { + $value = $data[self::FIELD_HASH]; } else { - $this->setHash(new FHIRBase64Binary($data[self::FIELD_HASH])); - } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + $value = null; + } + if (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) { + $ext = $data[self::FIELD_HASH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setHash($value); + } else if (is_array($value)) { + $this->setHash(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setHash(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHash(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); - } - } - if (isset($data[self::FIELD_SIZE])) { - $ext = (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) - ? $data[self::FIELD_SIZE_EXT] - : null; - if ($data[self::FIELD_SIZE] instanceof FHIRUnsignedInt) { - $this->setSize($data[self::FIELD_SIZE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_SIZE]] + $ext)); - } else if (is_array($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_SIZE]))); + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_SIZE]) || isset($data[self::FIELD_SIZE_EXT])) { + if (isset($data[self::FIELD_SIZE])) { + $value = $data[self::FIELD_SIZE]; } else { - $this->setSize(new FHIRUnsignedInt($data[self::FIELD_SIZE])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) { + $ext = $data[self::FIELD_SIZE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setSize($value); + } else if (is_array($value)) { + $this->setSize(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setSize(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSize(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUrl) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUrl($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUrl($ext)); } } } @@ -875,60 +931,79 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getCreation())) { $a[self::FIELD_CREATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATION_EXT] = $enc; } } if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } if (null !== ($v = $this->getHash())) { $a[self::FIELD_HASH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_HASH_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getSize())) { $a[self::FIELD_SIZE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_SIZE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAction.php index b3da6a2ec3..d95e011784 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAuditEventAction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_ACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAuditEventActionList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAgentNetworkType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAgentNetworkType.php index d01ba57043..ad6e6a6afc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAgentNetworkType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventAgentNetworkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAuditEventAgentNetworkType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_AGENT_NETWORK_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAuditEventAgentNetworkTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventOutcome.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventOutcome.php index 74e8ab023b..f634d147fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRAuditEventOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAuditEventOutcome extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_OUTCOME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRAuditEventOutcomeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement.php index e0a36fe39c..2a81c4cf4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBackboneElement extends FHIRElement const FIELD_MODIFIER_EXTENSION = 'modifierExtension'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Optional Extension Element - found in all resources. @@ -339,7 +339,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getModifierExtension())) { - $a[self::FIELD_MODIFIER_EXTENSION] = $vs; + $a[self::FIELD_MODIFIER_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER_EXTENSION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php index 82fa6fe889..cdcb0ffad0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRAccountCoverage extends FHIRBackboneElement const FIELD_PRIORITY_EXT = '_priority'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -140,20 +140,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRPositiveInt) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRPositiveInt($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRPositiveInt($ext)); } } } @@ -349,11 +356,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php index e6d3eaf35f..6089548597 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRAccountGuarantor extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -143,20 +143,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ON_HOLD])) { - $ext = (isset($data[self::FIELD_ON_HOLD_EXT]) && is_array($data[self::FIELD_ON_HOLD_EXT])) - ? $data[self::FIELD_ON_HOLD_EXT] - : null; - if ($data[self::FIELD_ON_HOLD] instanceof FHIRBoolean) { - $this->setOnHold($data[self::FIELD_ON_HOLD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ON_HOLD])) { - $this->setOnHold(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ON_HOLD]] + $ext)); - } else if (is_array($data[self::FIELD_ON_HOLD])) { - $this->setOnHold(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ON_HOLD]))); - } + if (isset($data[self::FIELD_ON_HOLD]) || isset($data[self::FIELD_ON_HOLD_EXT])) { + if (isset($data[self::FIELD_ON_HOLD])) { + $value = $data[self::FIELD_ON_HOLD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ON_HOLD_EXT]) && is_array($data[self::FIELD_ON_HOLD_EXT])) { + $ext = $data[self::FIELD_ON_HOLD_EXT]; } else { - $this->setOnHold(new FHIRBoolean($data[self::FIELD_ON_HOLD])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOnHold($value); + } else if (is_array($value)) { + $this->setOnHold(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOnHold(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnHold(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PARTY])) { @@ -393,8 +400,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getOnHold())) { $a[self::FIELD_ON_HOLD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ON_HOLD_EXT] = $enc; } } @@ -404,6 +413,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php index 8e7dea0850..f2f5f9c9bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRActivityDefinitionDynamicValue extends FHIRBackboneElement const FIELD_PATH_EXT = '_path'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A expression that is evaluated in a specified context and returns a value. The @@ -146,20 +146,27 @@ public function __construct($data = null) $this->setExpression(new FHIRExpression($data[self::FIELD_EXPRESSION])); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } } @@ -367,11 +374,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php index 1339959e62..cca8b0cec2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRActivityDefinitionParticipant extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -137,20 +137,27 @@ public function __construct($data = null) $this->setRole(new FHIRCodeableConcept($data[self::FIELD_ROLE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRActionParticipantType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRActionParticipantType([FHIRActionParticipantType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRActionParticipantType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRActionParticipantType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionParticipantType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRActionParticipantType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRActionParticipantType([FHIRActionParticipantType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRActionParticipantType($ext)); } } } @@ -324,11 +331,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionParticipantType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionParticipantType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausality.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausality.php index 5bc2d748cb..f571dbcba8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausality.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRAdverseEventCausality extends FHIRBackboneElement const FIELD_PRODUCT_RELATEDNESS_EXT = '_productRelatedness'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -180,20 +180,27 @@ public function __construct($data = null) $this->setMethod(new FHIRCodeableConcept($data[self::FIELD_METHOD])); } } - if (isset($data[self::FIELD_PRODUCT_RELATEDNESS])) { - $ext = (isset($data[self::FIELD_PRODUCT_RELATEDNESS_EXT]) && is_array($data[self::FIELD_PRODUCT_RELATEDNESS_EXT])) - ? $data[self::FIELD_PRODUCT_RELATEDNESS_EXT] - : null; - if ($data[self::FIELD_PRODUCT_RELATEDNESS] instanceof FHIRString) { - $this->setProductRelatedness($data[self::FIELD_PRODUCT_RELATEDNESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRODUCT_RELATEDNESS])) { - $this->setProductRelatedness(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRODUCT_RELATEDNESS]] + $ext)); - } else if (is_array($data[self::FIELD_PRODUCT_RELATEDNESS])) { - $this->setProductRelatedness(new FHIRString(array_merge($ext, $data[self::FIELD_PRODUCT_RELATEDNESS]))); - } + if (isset($data[self::FIELD_PRODUCT_RELATEDNESS]) || isset($data[self::FIELD_PRODUCT_RELATEDNESS_EXT])) { + if (isset($data[self::FIELD_PRODUCT_RELATEDNESS])) { + $value = $data[self::FIELD_PRODUCT_RELATEDNESS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRODUCT_RELATEDNESS_EXT]) && is_array($data[self::FIELD_PRODUCT_RELATEDNESS_EXT])) { + $ext = $data[self::FIELD_PRODUCT_RELATEDNESS_EXT]; } else { - $this->setProductRelatedness(new FHIRString($data[self::FIELD_PRODUCT_RELATEDNESS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setProductRelatedness($value); + } else if (is_array($value)) { + $this->setProductRelatedness(new FHIRString(array_merge($ext, $value))); + } else { + $this->setProductRelatedness(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProductRelatedness(new FHIRString($ext)); } } } @@ -465,11 +472,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getProductRelatedness())) { $a[self::FIELD_PRODUCT_RELATEDNESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PRODUCT_RELATEDNESS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php index cff0d5624d..bb38ca4be1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRAdverseEventSuspectEntity extends FHIRBackboneElement const FIELD_INSTANCE = 'instance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Actual or potential/avoided event causing unintended physical injury resulting @@ -365,11 +365,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCausality())) { - $a[self::FIELD_CAUSALITY] = $vs; + $a[self::FIELD_CAUSALITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CAUSALITY][] = $v; + } } if (null !== ($v = $this->getInstance())) { $a[self::FIELD_INSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php index c95b4f64c2..43aba1ff6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRAllergyIntoleranceReaction extends FHIRBackboneElement const FIELD_SUBSTANCE = 'substance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -218,20 +218,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_EXPOSURE_ROUTE])) { @@ -277,36 +284,50 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_ONSET])) { - $ext = (isset($data[self::FIELD_ONSET_EXT]) && is_array($data[self::FIELD_ONSET_EXT])) - ? $data[self::FIELD_ONSET_EXT] - : null; - if ($data[self::FIELD_ONSET] instanceof FHIRDateTime) { - $this->setOnset($data[self::FIELD_ONSET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET])) { - $this->setOnset(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ONSET]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET])) { - $this->setOnset(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ONSET]))); - } + if (isset($data[self::FIELD_ONSET]) || isset($data[self::FIELD_ONSET_EXT])) { + if (isset($data[self::FIELD_ONSET])) { + $value = $data[self::FIELD_ONSET]; } else { - $this->setOnset(new FHIRDateTime($data[self::FIELD_ONSET])); + $value = null; } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRAllergyIntoleranceSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRAllergyIntoleranceSeverity([FHIRAllergyIntoleranceSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRAllergyIntoleranceSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + if (isset($data[self::FIELD_ONSET_EXT]) && is_array($data[self::FIELD_ONSET_EXT])) { + $ext = $data[self::FIELD_ONSET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOnset($value); + } else if (is_array($value)) { + $this->setOnset(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOnset(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOnset(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; } else { - $this->setSeverity(new FHIRAllergyIntoleranceSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRAllergyIntoleranceSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRAllergyIntoleranceSeverity([FHIRAllergyIntoleranceSeverity::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRAllergyIntoleranceSeverity($ext)); } } if (isset($data[self::FIELD_SUBSTANCE])) { @@ -803,8 +824,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -812,28 +835,47 @@ public function jsonSerialize() $a[self::FIELD_EXPOSURE_ROUTE] = $v; } if ([] !== ($vs = $this->getManifestation())) { - $a[self::FIELD_MANIFESTATION] = $vs; + $a[self::FIELD_MANIFESTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANIFESTATION][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOnset())) { $a[self::FIELD_ONSET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ONSET_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getSubstance())) { $a[self::FIELD_SUBSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php index 2cadf922da..fb6d483a46 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRAppointmentParticipant extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -187,36 +187,50 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRParticipantRequired) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRParticipantRequired([FHIRParticipantRequired::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRParticipantRequired(array_merge($ext, $data[self::FIELD_REQUIRED]))); - } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; } else { - $this->setRequired(new FHIRParticipantRequired($data[self::FIELD_REQUIRED])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRParticipationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRParticipationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRParticipantRequired) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRParticipantRequired(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRParticipantRequired([FHIRParticipantRequired::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRParticipantRequired($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRParticipationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRParticipationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRParticipationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRParticipationStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -557,20 +571,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRParticipantRequired::FIELD_VALUE, $enc)))) { + unset($enc[FHIRParticipantRequired::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRParticipationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRParticipationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php index 495ae8b80d..35609e5adc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRAuditEventAgent extends FHIRBackboneElement const FIELD_WHO = 'who'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -259,20 +259,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALT_ID])) { - $ext = (isset($data[self::FIELD_ALT_ID_EXT]) && is_array($data[self::FIELD_ALT_ID_EXT])) - ? $data[self::FIELD_ALT_ID_EXT] - : null; - if ($data[self::FIELD_ALT_ID] instanceof FHIRString) { - $this->setAltId($data[self::FIELD_ALT_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALT_ID])) { - $this->setAltId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALT_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ALT_ID])) { - $this->setAltId(new FHIRString(array_merge($ext, $data[self::FIELD_ALT_ID]))); - } + if (isset($data[self::FIELD_ALT_ID]) || isset($data[self::FIELD_ALT_ID_EXT])) { + if (isset($data[self::FIELD_ALT_ID])) { + $value = $data[self::FIELD_ALT_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALT_ID_EXT]) && is_array($data[self::FIELD_ALT_ID_EXT])) { + $ext = $data[self::FIELD_ALT_ID_EXT]; } else { - $this->setAltId(new FHIRString($data[self::FIELD_ALT_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAltId($value); + } else if (is_array($value)) { + $this->setAltId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAltId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAltId(new FHIRString($ext)); } } if (isset($data[self::FIELD_LOCATION])) { @@ -289,20 +296,27 @@ public function __construct($data = null) $this->setMedia(new FHIRCoding($data[self::FIELD_MEDIA])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NETWORK])) { @@ -312,33 +326,42 @@ public function __construct($data = null) $this->setNetwork(new FHIRAuditEventNetwork($data[self::FIELD_NETWORK])); } } - if (isset($data[self::FIELD_POLICY])) { - $ext = (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) - ? $data[self::FIELD_POLICY_EXT] - : null; - if (is_array($data[self::FIELD_POLICY])) { - foreach($data[self::FIELD_POLICY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addPolicy($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPolicy(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_POLICY]) || isset($data[self::FIELD_POLICY_EXT])) { + if (isset($data[self::FIELD_POLICY])) { + $value = $data[self::FIELD_POLICY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) { + $ext = $data[self::FIELD_POLICY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addPolicy($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addPolicy($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPolicy(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPolicy(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addPolicy(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPolicy(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_POLICY] instanceof FHIRUri) { - $this->addPolicy($data[self::FIELD_POLICY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_POLICY])) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_POLICY]] + $ext)); - } else { - $this->addPolicy(new FHIRUri($data[self::FIELD_POLICY])); } } if (isset($data[self::FIELD_PURPOSE_OF_USE])) { @@ -359,20 +382,27 @@ public function __construct($data = null) $this->addPurposeOfUse(new FHIRCodeableConcept($data[self::FIELD_PURPOSE_OF_USE])); } } - if (isset($data[self::FIELD_REQUESTOR])) { - $ext = (isset($data[self::FIELD_REQUESTOR_EXT]) && is_array($data[self::FIELD_REQUESTOR_EXT])) - ? $data[self::FIELD_REQUESTOR_EXT] - : null; - if ($data[self::FIELD_REQUESTOR] instanceof FHIRBoolean) { - $this->setRequestor($data[self::FIELD_REQUESTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUESTOR])) { - $this->setRequestor(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUESTOR]] + $ext)); - } else if (is_array($data[self::FIELD_REQUESTOR])) { - $this->setRequestor(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUESTOR]))); - } + if (isset($data[self::FIELD_REQUESTOR]) || isset($data[self::FIELD_REQUESTOR_EXT])) { + if (isset($data[self::FIELD_REQUESTOR])) { + $value = $data[self::FIELD_REQUESTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUESTOR_EXT]) && is_array($data[self::FIELD_REQUESTOR_EXT])) { + $ext = $data[self::FIELD_REQUESTOR_EXT]; } else { - $this->setRequestor(new FHIRBoolean($data[self::FIELD_REQUESTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequestor($value); + } else if (is_array($value)) { + $this->setRequestor(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequestor(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequestor(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -1087,8 +1117,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAltId())) { $a[self::FIELD_ALT_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALT_ID_EXT] = $enc; } } @@ -1100,8 +1132,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1110,31 +1144,53 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPolicy())) { $a[self::FIELD_POLICY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_POLICY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_POLICY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_POLICY_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_POLICY_EXT] = $encs; + } } if ([] !== ($vs = $this->getPurposeOfUse())) { - $a[self::FIELD_PURPOSE_OF_USE] = $vs; + $a[self::FIELD_PURPOSE_OF_USE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PURPOSE_OF_USE][] = $v; + } } if (null !== ($v = $this->getRequestor())) { $a[self::FIELD_REQUESTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUESTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; @@ -1142,6 +1198,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWho())) { $a[self::FIELD_WHO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php index d1e0c0b8bb..f42cd7aa97 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRAuditEventDetail extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -145,52 +145,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -445,25 +466,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php index 4f20fc38fa..853ce3c042 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRAuditEventEntity extends FHIRBackboneElement const FIELD_WHAT = 'what'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -220,20 +220,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -261,36 +268,50 @@ public function __construct($data = null) $this->setLifecycle(new FHIRCoding($data[self::FIELD_LIFECYCLE])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_QUERY])) { - $ext = (isset($data[self::FIELD_QUERY_EXT]) && is_array($data[self::FIELD_QUERY_EXT])) - ? $data[self::FIELD_QUERY_EXT] - : null; - if ($data[self::FIELD_QUERY] instanceof FHIRBase64Binary) { - $this->setQuery($data[self::FIELD_QUERY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUERY])) { - $this->setQuery(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_QUERY]] + $ext)); - } else if (is_array($data[self::FIELD_QUERY])) { - $this->setQuery(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_QUERY]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_QUERY]) || isset($data[self::FIELD_QUERY_EXT])) { + if (isset($data[self::FIELD_QUERY])) { + $value = $data[self::FIELD_QUERY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUERY_EXT]) && is_array($data[self::FIELD_QUERY_EXT])) { + $ext = $data[self::FIELD_QUERY_EXT]; } else { - $this->setQuery(new FHIRBase64Binary($data[self::FIELD_QUERY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setQuery($value); + } else if (is_array($value)) { + $this->setQuery(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setQuery(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQuery(new FHIRBase64Binary($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -868,28 +889,40 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getLifecycle())) { $a[self::FIELD_LIFECYCLE] = $v; } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getQuery())) { $a[self::FIELD_QUERY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_QUERY_EXT] = $enc; } } @@ -897,7 +930,13 @@ public function jsonSerialize() $a[self::FIELD_ROLE] = $v; } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; @@ -905,6 +944,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhat())) { $a[self::FIELD_WHAT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php index 5657ff8264..71eb98c9dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRAuditEventNetwork extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDRESS])) { - $ext = (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) - ? $data[self::FIELD_ADDRESS_EXT] - : null; - if ($data[self::FIELD_ADDRESS] instanceof FHIRString) { - $this->setAddress($data[self::FIELD_ADDRESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADDRESS]] + $ext)); - } else if (is_array($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRString(array_merge($ext, $data[self::FIELD_ADDRESS]))); - } + if (isset($data[self::FIELD_ADDRESS]) || isset($data[self::FIELD_ADDRESS_EXT])) { + if (isset($data[self::FIELD_ADDRESS])) { + $value = $data[self::FIELD_ADDRESS]; } else { - $this->setAddress(new FHIRString($data[self::FIELD_ADDRESS])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAuditEventAgentNetworkType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAuditEventAgentNetworkType([FHIRAuditEventAgentNetworkType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAuditEventAgentNetworkType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) { + $ext = $data[self::FIELD_ADDRESS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAddress($value); + } else if (is_array($value)) { + $this->setAddress(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAddress(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAddress(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRAuditEventAgentNetworkType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAuditEventAgentNetworkType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAuditEventAgentNetworkType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAuditEventAgentNetworkType([FHIRAuditEventAgentNetworkType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRAuditEventAgentNetworkType($ext)); } } } @@ -351,18 +365,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAddress())) { $a[self::FIELD_ADDRESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADDRESS_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAuditEventAgentNetworkType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAuditEventAgentNetworkType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php index d75a67b3f7..21f40cbce4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRAuditEventSource extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -152,20 +152,27 @@ public function __construct($data = null) $this->setObserver(new FHIRReference($data[self::FIELD_OBSERVER])); } } - if (isset($data[self::FIELD_SITE])) { - $ext = (isset($data[self::FIELD_SITE_EXT]) && is_array($data[self::FIELD_SITE_EXT])) - ? $data[self::FIELD_SITE_EXT] - : null; - if ($data[self::FIELD_SITE] instanceof FHIRString) { - $this->setSite($data[self::FIELD_SITE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SITE])) { - $this->setSite(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SITE]] + $ext)); - } else if (is_array($data[self::FIELD_SITE])) { - $this->setSite(new FHIRString(array_merge($ext, $data[self::FIELD_SITE]))); - } + if (isset($data[self::FIELD_SITE]) || isset($data[self::FIELD_SITE_EXT])) { + if (isset($data[self::FIELD_SITE])) { + $value = $data[self::FIELD_SITE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SITE_EXT]) && is_array($data[self::FIELD_SITE_EXT])) { + $ext = $data[self::FIELD_SITE_EXT]; } else { - $this->setSite(new FHIRString($data[self::FIELD_SITE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSite($value); + } else if (is_array($value)) { + $this->setSite(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSite(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSite(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -444,13 +451,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getSite())) { $a[self::FIELD_SITE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SITE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollection.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollection.php index a4a0e8244a..a89f05a1e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRBiologicallyDerivedProductCollection extends FHIRBackboneElement const FIELD_SOURCE = 'source'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -159,20 +159,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) - ? $data[self::FIELD_COLLECTED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_COLLECTED_DATE_TIME] instanceof FHIRDateTime) { - $this->setCollectedDateTime($data[self::FIELD_COLLECTED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_COLLECTED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_COLLECTED_DATE_TIME]))); - } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME]) || isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { + $value = $data[self::FIELD_COLLECTED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_COLLECTED_DATE_TIME_EXT]; } else { - $this->setCollectedDateTime(new FHIRDateTime($data[self::FIELD_COLLECTED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCollectedDateTime($value); + } else if (is_array($value)) { + $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCollectedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_COLLECTED_PERIOD])) { @@ -460,8 +467,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCollectedDateTime())) { $a[self::FIELD_COLLECTED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_COLLECTED_DATE_TIME_EXT] = $enc; } } @@ -474,6 +483,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulation.php index 41cba15114..d496f8c239 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRBiologicallyDerivedProductManipulation extends FHIRBackboneElement const FIELD_TIME_PERIOD = 'timePeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -147,36 +147,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_TIME_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIME_DATE_TIME_EXT])) - ? $data[self::FIELD_TIME_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIME_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimeDateTime($data[self::FIELD_TIME_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME_DATE_TIME])) { - $this->setTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME_DATE_TIME])) { - $this->setTimeDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME_DATE_TIME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TIME_DATE_TIME]) || isset($data[self::FIELD_TIME_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIME_DATE_TIME])) { + $value = $data[self::FIELD_TIME_DATE_TIME]; } else { - $this->setTimeDateTime(new FHIRDateTime($data[self::FIELD_TIME_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIME_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimeDateTime($value); + } else if (is_array($value)) { + $this->setTimeDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimeDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIME_PERIOD])) { @@ -428,21 +442,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getTimeDateTime())) { $a[self::FIELD_TIME_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getTimePeriod())) { $a[self::FIELD_TIME_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessing.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessing.php index 331d6d9deb..cf71a4419f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessing.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRBiologicallyDerivedProductProcessing extends FHIRBackboneElement const FIELD_TIME_PERIOD = 'timePeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -181,20 +181,27 @@ public function __construct($data = null) $this->setAdditive(new FHIRReference($data[self::FIELD_ADDITIVE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROCEDURE])) { @@ -204,20 +211,27 @@ public function __construct($data = null) $this->setProcedure(new FHIRCodeableConcept($data[self::FIELD_PROCEDURE])); } } - if (isset($data[self::FIELD_TIME_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIME_DATE_TIME_EXT])) - ? $data[self::FIELD_TIME_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIME_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimeDateTime($data[self::FIELD_TIME_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME_DATE_TIME])) { - $this->setTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME_DATE_TIME])) { - $this->setTimeDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIME_DATE_TIME]) || isset($data[self::FIELD_TIME_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIME_DATE_TIME])) { + $value = $data[self::FIELD_TIME_DATE_TIME]; } else { - $this->setTimeDateTime(new FHIRDateTime($data[self::FIELD_TIME_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIME_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimeDateTime($value); + } else if (is_array($value)) { + $this->setTimeDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimeDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIME_PERIOD])) { @@ -546,8 +560,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -556,14 +572,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimeDateTime())) { $a[self::FIELD_TIME_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getTimePeriod())) { $a[self::FIELD_TIME_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorage.php index 7576a164fe..a25b99b956 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRBiologicallyDerivedProductStorage extends FHIRBackboneElement const FIELD_TEMPERATURE_EXT = '_temperature'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -158,20 +158,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DURATION])) { @@ -181,36 +188,50 @@ public function __construct($data = null) $this->setDuration(new FHIRPeriod($data[self::FIELD_DURATION])); } } - if (isset($data[self::FIELD_SCALE])) { - $ext = (isset($data[self::FIELD_SCALE_EXT]) && is_array($data[self::FIELD_SCALE_EXT])) - ? $data[self::FIELD_SCALE_EXT] - : null; - if ($data[self::FIELD_SCALE] instanceof FHIRBiologicallyDerivedProductStorageScale) { - $this->setScale($data[self::FIELD_SCALE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCALE])) { - $this->setScale(new FHIRBiologicallyDerivedProductStorageScale([FHIRBiologicallyDerivedProductStorageScale::FIELD_VALUE => $data[self::FIELD_SCALE]] + $ext)); - } else if (is_array($data[self::FIELD_SCALE])) { - $this->setScale(new FHIRBiologicallyDerivedProductStorageScale(array_merge($ext, $data[self::FIELD_SCALE]))); - } + if (isset($data[self::FIELD_SCALE]) || isset($data[self::FIELD_SCALE_EXT])) { + if (isset($data[self::FIELD_SCALE])) { + $value = $data[self::FIELD_SCALE]; } else { - $this->setScale(new FHIRBiologicallyDerivedProductStorageScale($data[self::FIELD_SCALE])); + $value = null; } - } - if (isset($data[self::FIELD_TEMPERATURE])) { - $ext = (isset($data[self::FIELD_TEMPERATURE_EXT]) && is_array($data[self::FIELD_TEMPERATURE_EXT])) - ? $data[self::FIELD_TEMPERATURE_EXT] - : null; - if ($data[self::FIELD_TEMPERATURE] instanceof FHIRDecimal) { - $this->setTemperature($data[self::FIELD_TEMPERATURE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEMPERATURE])) { - $this->setTemperature(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_TEMPERATURE]] + $ext)); - } else if (is_array($data[self::FIELD_TEMPERATURE])) { - $this->setTemperature(new FHIRDecimal(array_merge($ext, $data[self::FIELD_TEMPERATURE]))); + if (isset($data[self::FIELD_SCALE_EXT]) && is_array($data[self::FIELD_SCALE_EXT])) { + $ext = $data[self::FIELD_SCALE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBiologicallyDerivedProductStorageScale) { + $this->setScale($value); + } else if (is_array($value)) { + $this->setScale(new FHIRBiologicallyDerivedProductStorageScale(array_merge($ext, $value))); + } else { + $this->setScale(new FHIRBiologicallyDerivedProductStorageScale([FHIRBiologicallyDerivedProductStorageScale::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setScale(new FHIRBiologicallyDerivedProductStorageScale($ext)); + } + } + if (isset($data[self::FIELD_TEMPERATURE]) || isset($data[self::FIELD_TEMPERATURE_EXT])) { + if (isset($data[self::FIELD_TEMPERATURE])) { + $value = $data[self::FIELD_TEMPERATURE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEMPERATURE_EXT]) && is_array($data[self::FIELD_TEMPERATURE_EXT])) { + $ext = $data[self::FIELD_TEMPERATURE_EXT]; } else { - $this->setTemperature(new FHIRDecimal($data[self::FIELD_TEMPERATURE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setTemperature($value); + } else if (is_array($value)) { + $this->setTemperature(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setTemperature(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTemperature(new FHIRDecimal($ext)); } } } @@ -485,8 +506,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -495,18 +518,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getScale())) { $a[self::FIELD_SCALE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBiologicallyDerivedProductStorageScale::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBiologicallyDerivedProductStorageScale::FIELD_VALUE]); $a[self::FIELD_SCALE_EXT] = $enc; } } if (null !== ($v = $this->getTemperature())) { $a[self::FIELD_TEMPERATURE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_TEMPERATURE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php index 790ffc3dba..4b50beb2e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRBundleEntry extends FHIRBackboneElement const FIELD_SEARCH = 'search'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -179,20 +179,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FULL_URL])) { - $ext = (isset($data[self::FIELD_FULL_URL_EXT]) && is_array($data[self::FIELD_FULL_URL_EXT])) - ? $data[self::FIELD_FULL_URL_EXT] - : null; - if ($data[self::FIELD_FULL_URL] instanceof FHIRUri) { - $this->setFullUrl($data[self::FIELD_FULL_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FULL_URL])) { - $this->setFullUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_FULL_URL]] + $ext)); - } else if (is_array($data[self::FIELD_FULL_URL])) { - $this->setFullUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_FULL_URL]))); - } + if (isset($data[self::FIELD_FULL_URL]) || isset($data[self::FIELD_FULL_URL_EXT])) { + if (isset($data[self::FIELD_FULL_URL])) { + $value = $data[self::FIELD_FULL_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FULL_URL_EXT]) && is_array($data[self::FIELD_FULL_URL_EXT])) { + $ext = $data[self::FIELD_FULL_URL_EXT]; } else { - $this->setFullUrl(new FHIRUri($data[self::FIELD_FULL_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setFullUrl($value); + } else if (is_array($value)) { + $this->setFullUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setFullUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFullUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_LINK])) { @@ -627,13 +634,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFullUrl())) { $a[self::FIELD_FULL_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_FULL_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -647,6 +662,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSearch())) { $a[self::FIELD_SEARCH] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php index 07679b9827..ef81956cf3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRBundleLink extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_RELATION])) { - $ext = (isset($data[self::FIELD_RELATION_EXT]) && is_array($data[self::FIELD_RELATION_EXT])) - ? $data[self::FIELD_RELATION_EXT] - : null; - if ($data[self::FIELD_RELATION] instanceof FHIRString) { - $this->setRelation($data[self::FIELD_RELATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATION])) { - $this->setRelation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RELATION]] + $ext)); - } else if (is_array($data[self::FIELD_RELATION])) { - $this->setRelation(new FHIRString(array_merge($ext, $data[self::FIELD_RELATION]))); - } + if (isset($data[self::FIELD_RELATION]) || isset($data[self::FIELD_RELATION_EXT])) { + if (isset($data[self::FIELD_RELATION])) { + $value = $data[self::FIELD_RELATION]; } else { - $this->setRelation(new FHIRString($data[self::FIELD_RELATION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_RELATION_EXT]) && is_array($data[self::FIELD_RELATION_EXT])) { + $ext = $data[self::FIELD_RELATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRelation($value); + } else if (is_array($value)) { + $this->setRelation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRelation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRelation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -365,18 +379,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getRelation())) { $a[self::FIELD_RELATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RELATION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php index 5d99127996..b5f913b2e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRBundleRequest extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -195,100 +195,142 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IF_MATCH])) { - $ext = (isset($data[self::FIELD_IF_MATCH_EXT]) && is_array($data[self::FIELD_IF_MATCH_EXT])) - ? $data[self::FIELD_IF_MATCH_EXT] - : null; - if ($data[self::FIELD_IF_MATCH] instanceof FHIRString) { - $this->setIfMatch($data[self::FIELD_IF_MATCH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_MATCH])) { - $this->setIfMatch(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IF_MATCH]] + $ext)); - } else if (is_array($data[self::FIELD_IF_MATCH])) { - $this->setIfMatch(new FHIRString(array_merge($ext, $data[self::FIELD_IF_MATCH]))); - } + if (isset($data[self::FIELD_IF_MATCH]) || isset($data[self::FIELD_IF_MATCH_EXT])) { + if (isset($data[self::FIELD_IF_MATCH])) { + $value = $data[self::FIELD_IF_MATCH]; } else { - $this->setIfMatch(new FHIRString($data[self::FIELD_IF_MATCH])); + $value = null; } - } - if (isset($data[self::FIELD_IF_MODIFIED_SINCE])) { - $ext = (isset($data[self::FIELD_IF_MODIFIED_SINCE_EXT]) && is_array($data[self::FIELD_IF_MODIFIED_SINCE_EXT])) - ? $data[self::FIELD_IF_MODIFIED_SINCE_EXT] - : null; - if ($data[self::FIELD_IF_MODIFIED_SINCE] instanceof FHIRInstant) { - $this->setIfModifiedSince($data[self::FIELD_IF_MODIFIED_SINCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_MODIFIED_SINCE])) { - $this->setIfModifiedSince(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_IF_MODIFIED_SINCE]] + $ext)); - } else if (is_array($data[self::FIELD_IF_MODIFIED_SINCE])) { - $this->setIfModifiedSince(new FHIRInstant(array_merge($ext, $data[self::FIELD_IF_MODIFIED_SINCE]))); - } + if (isset($data[self::FIELD_IF_MATCH_EXT]) && is_array($data[self::FIELD_IF_MATCH_EXT])) { + $ext = $data[self::FIELD_IF_MATCH_EXT]; } else { - $this->setIfModifiedSince(new FHIRInstant($data[self::FIELD_IF_MODIFIED_SINCE])); + $ext = []; } - } - if (isset($data[self::FIELD_IF_NONE_EXIST])) { - $ext = (isset($data[self::FIELD_IF_NONE_EXIST_EXT]) && is_array($data[self::FIELD_IF_NONE_EXIST_EXT])) - ? $data[self::FIELD_IF_NONE_EXIST_EXT] - : null; - if ($data[self::FIELD_IF_NONE_EXIST] instanceof FHIRString) { - $this->setIfNoneExist($data[self::FIELD_IF_NONE_EXIST]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_NONE_EXIST])) { - $this->setIfNoneExist(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IF_NONE_EXIST]] + $ext)); - } else if (is_array($data[self::FIELD_IF_NONE_EXIST])) { - $this->setIfNoneExist(new FHIRString(array_merge($ext, $data[self::FIELD_IF_NONE_EXIST]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIfMatch($value); + } else if (is_array($value)) { + $this->setIfMatch(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIfMatch(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setIfNoneExist(new FHIRString($data[self::FIELD_IF_NONE_EXIST])); + } else if ([] !== $ext) { + $this->setIfMatch(new FHIRString($ext)); } } - if (isset($data[self::FIELD_IF_NONE_MATCH])) { - $ext = (isset($data[self::FIELD_IF_NONE_MATCH_EXT]) && is_array($data[self::FIELD_IF_NONE_MATCH_EXT])) - ? $data[self::FIELD_IF_NONE_MATCH_EXT] - : null; - if ($data[self::FIELD_IF_NONE_MATCH] instanceof FHIRString) { - $this->setIfNoneMatch($data[self::FIELD_IF_NONE_MATCH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_NONE_MATCH])) { - $this->setIfNoneMatch(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IF_NONE_MATCH]] + $ext)); - } else if (is_array($data[self::FIELD_IF_NONE_MATCH])) { - $this->setIfNoneMatch(new FHIRString(array_merge($ext, $data[self::FIELD_IF_NONE_MATCH]))); - } + if (isset($data[self::FIELD_IF_MODIFIED_SINCE]) || isset($data[self::FIELD_IF_MODIFIED_SINCE_EXT])) { + if (isset($data[self::FIELD_IF_MODIFIED_SINCE])) { + $value = $data[self::FIELD_IF_MODIFIED_SINCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IF_MODIFIED_SINCE_EXT]) && is_array($data[self::FIELD_IF_MODIFIED_SINCE_EXT])) { + $ext = $data[self::FIELD_IF_MODIFIED_SINCE_EXT]; } else { - $this->setIfNoneMatch(new FHIRString($data[self::FIELD_IF_NONE_MATCH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIfModifiedSince($value); + } else if (is_array($value)) { + $this->setIfModifiedSince(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIfModifiedSince(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIfModifiedSince(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_METHOD])) { - $ext = (isset($data[self::FIELD_METHOD_EXT]) && is_array($data[self::FIELD_METHOD_EXT])) - ? $data[self::FIELD_METHOD_EXT] - : null; - if ($data[self::FIELD_METHOD] instanceof FHIRHTTPVerb) { - $this->setMethod($data[self::FIELD_METHOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_METHOD])) { - $this->setMethod(new FHIRHTTPVerb([FHIRHTTPVerb::FIELD_VALUE => $data[self::FIELD_METHOD]] + $ext)); - } else if (is_array($data[self::FIELD_METHOD])) { - $this->setMethod(new FHIRHTTPVerb(array_merge($ext, $data[self::FIELD_METHOD]))); + if (isset($data[self::FIELD_IF_NONE_EXIST]) || isset($data[self::FIELD_IF_NONE_EXIST_EXT])) { + if (isset($data[self::FIELD_IF_NONE_EXIST])) { + $value = $data[self::FIELD_IF_NONE_EXIST]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IF_NONE_EXIST_EXT]) && is_array($data[self::FIELD_IF_NONE_EXIST_EXT])) { + $ext = $data[self::FIELD_IF_NONE_EXIST_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIfNoneExist($value); + } else if (is_array($value)) { + $this->setIfNoneExist(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIfNoneExist(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIfNoneExist(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IF_NONE_MATCH]) || isset($data[self::FIELD_IF_NONE_MATCH_EXT])) { + if (isset($data[self::FIELD_IF_NONE_MATCH])) { + $value = $data[self::FIELD_IF_NONE_MATCH]; } else { - $this->setMethod(new FHIRHTTPVerb($data[self::FIELD_METHOD])); + $value = null; + } + if (isset($data[self::FIELD_IF_NONE_MATCH_EXT]) && is_array($data[self::FIELD_IF_NONE_MATCH_EXT])) { + $ext = $data[self::FIELD_IF_NONE_MATCH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIfNoneMatch($value); + } else if (is_array($value)) { + $this->setIfNoneMatch(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIfNoneMatch(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIfNoneMatch(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_METHOD]) || isset($data[self::FIELD_METHOD_EXT])) { + if (isset($data[self::FIELD_METHOD])) { + $value = $data[self::FIELD_METHOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_METHOD_EXT]) && is_array($data[self::FIELD_METHOD_EXT])) { + $ext = $data[self::FIELD_METHOD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRHTTPVerb) { + $this->setMethod($value); + } else if (is_array($value)) { + $this->setMethod(new FHIRHTTPVerb(array_merge($ext, $value))); + } else { + $this->setMethod(new FHIRHTTPVerb([FHIRHTTPVerb::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMethod(new FHIRHTTPVerb($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -705,46 +747,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIfMatch())) { $a[self::FIELD_IF_MATCH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IF_MATCH_EXT] = $enc; } } if (null !== ($v = $this->getIfModifiedSince())) { $a[self::FIELD_IF_MODIFIED_SINCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_IF_MODIFIED_SINCE_EXT] = $enc; } } if (null !== ($v = $this->getIfNoneExist())) { $a[self::FIELD_IF_NONE_EXIST] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IF_NONE_EXIST_EXT] = $enc; } } if (null !== ($v = $this->getIfNoneMatch())) { $a[self::FIELD_IF_NONE_MATCH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IF_NONE_MATCH_EXT] = $enc; } } if (null !== ($v = $this->getMethod())) { $a[self::FIELD_METHOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRHTTPVerb::FIELD_VALUE, $enc)))) { + unset($enc[FHIRHTTPVerb::FIELD_VALUE]); $a[self::FIELD_METHOD_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php index 19b25d0a00..b5a693002c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBundleResponse extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -178,52 +178,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ETAG])) { - $ext = (isset($data[self::FIELD_ETAG_EXT]) && is_array($data[self::FIELD_ETAG_EXT])) - ? $data[self::FIELD_ETAG_EXT] - : null; - if ($data[self::FIELD_ETAG] instanceof FHIRString) { - $this->setEtag($data[self::FIELD_ETAG]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ETAG])) { - $this->setEtag(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ETAG]] + $ext)); - } else if (is_array($data[self::FIELD_ETAG])) { - $this->setEtag(new FHIRString(array_merge($ext, $data[self::FIELD_ETAG]))); - } + if (isset($data[self::FIELD_ETAG]) || isset($data[self::FIELD_ETAG_EXT])) { + if (isset($data[self::FIELD_ETAG])) { + $value = $data[self::FIELD_ETAG]; } else { - $this->setEtag(new FHIRString($data[self::FIELD_ETAG])); + $value = null; } - } - if (isset($data[self::FIELD_LAST_MODIFIED])) { - $ext = (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) - ? $data[self::FIELD_LAST_MODIFIED_EXT] - : null; - if ($data[self::FIELD_LAST_MODIFIED] instanceof FHIRInstant) { - $this->setLastModified($data[self::FIELD_LAST_MODIFIED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_LAST_MODIFIED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRInstant(array_merge($ext, $data[self::FIELD_LAST_MODIFIED]))); - } + if (isset($data[self::FIELD_ETAG_EXT]) && is_array($data[self::FIELD_ETAG_EXT])) { + $ext = $data[self::FIELD_ETAG_EXT]; } else { - $this->setLastModified(new FHIRInstant($data[self::FIELD_LAST_MODIFIED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setEtag($value); + } else if (is_array($value)) { + $this->setEtag(new FHIRString(array_merge($ext, $value))); + } else { + $this->setEtag(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEtag(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LOCATION])) { - $ext = (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) - ? $data[self::FIELD_LOCATION_EXT] - : null; - if ($data[self::FIELD_LOCATION] instanceof FHIRUri) { - $this->setLocation($data[self::FIELD_LOCATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOCATION])) { - $this->setLocation(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_LOCATION]] + $ext)); - } else if (is_array($data[self::FIELD_LOCATION])) { - $this->setLocation(new FHIRUri(array_merge($ext, $data[self::FIELD_LOCATION]))); + if (isset($data[self::FIELD_LAST_MODIFIED]) || isset($data[self::FIELD_LAST_MODIFIED_EXT])) { + if (isset($data[self::FIELD_LAST_MODIFIED])) { + $value = $data[self::FIELD_LAST_MODIFIED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) { + $ext = $data[self::FIELD_LAST_MODIFIED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setLastModified($value); + } else if (is_array($value)) { + $this->setLastModified(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setLastModified(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastModified(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_LOCATION]) || isset($data[self::FIELD_LOCATION_EXT])) { + if (isset($data[self::FIELD_LOCATION])) { + $value = $data[self::FIELD_LOCATION]; } else { - $this->setLocation(new FHIRUri($data[self::FIELD_LOCATION])); + $value = null; + } + if (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) { + $ext = $data[self::FIELD_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setLocation($value); + } else if (is_array($value)) { + $this->setLocation(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setLocation(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLocation(new FHIRUri($ext)); } } if (isset($data[self::FIELD_OUTCOME])) { @@ -252,20 +273,27 @@ public function __construct($data = null) )); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRString) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRString(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRString($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRString(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRString($ext)); } } } @@ -628,22 +656,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEtag())) { $a[self::FIELD_ETAG] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ETAG_EXT] = $enc; } } if (null !== ($v = $this->getLastModified())) { $a[self::FIELD_LAST_MODIFIED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_LAST_MODIFIED_EXT] = $enc; } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_LOCATION_EXT] = $enc; } } @@ -652,11 +686,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php index 55bf512326..6186d31200 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRBundleSearch extends FHIRBackboneElement const FIELD_SCORE_EXT = '_score'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Why an entry is in the result set - whether it's included as a match or because @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRSearchEntryMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRSearchEntryMode([FHIRSearchEntryMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRSearchEntryMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRSearchEntryMode($data[self::FIELD_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_SCORE])) { - $ext = (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) - ? $data[self::FIELD_SCORE_EXT] - : null; - if ($data[self::FIELD_SCORE] instanceof FHIRDecimal) { - $this->setScore($data[self::FIELD_SCORE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_SCORE]] + $ext)); - } else if (is_array($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal(array_merge($ext, $data[self::FIELD_SCORE]))); + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchEntryMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRSearchEntryMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRSearchEntryMode([FHIRSearchEntryMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRSearchEntryMode($ext)); + } + } + if (isset($data[self::FIELD_SCORE]) || isset($data[self::FIELD_SCORE_EXT])) { + if (isset($data[self::FIELD_SCORE])) { + $value = $data[self::FIELD_SCORE]; } else { - $this->setScore(new FHIRDecimal($data[self::FIELD_SCORE])); + $value = null; + } + if (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) { + $ext = $data[self::FIELD_SCORE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setScore($value); + } else if (is_array($value)) { + $this->setScore(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScore(new FHIRDecimal($ext)); } } } @@ -358,18 +372,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchEntryMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchEntryMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getScore())) { $a[self::FIELD_SCORE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_SCORE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php index 604ce6c2a6..2d26325294 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCapabilityStatementDocument extends FHIRBackboneElement const FIELD_PROFILE_EXT = '_profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string that may contain Github Flavored Markdown syntax for optional @@ -155,52 +155,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRMarkdown) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRMarkdown($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRDocumentMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRDocumentMode([FHIRDocumentMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRDocumentMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setMode(new FHIRDocumentMode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_PROFILE]))); + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRDocumentMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRDocumentMode([FHIRDocumentMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRDocumentMode($ext)); + } + } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; } else { - $this->setProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProfile(new FHIRCanonical($ext)); } } } @@ -455,25 +476,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php index 93705e88ea..e2b9d5b950 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCapabilityStatementEndpoint extends FHIRBackboneElement const FIELD_PROTOCOL = 'protocol'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a literal reference @@ -134,20 +134,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDRESS])) { - $ext = (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) - ? $data[self::FIELD_ADDRESS_EXT] - : null; - if ($data[self::FIELD_ADDRESS] instanceof FHIRUrl) { - $this->setAddress($data[self::FIELD_ADDRESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_ADDRESS]] + $ext)); - } else if (is_array($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUrl(array_merge($ext, $data[self::FIELD_ADDRESS]))); - } + if (isset($data[self::FIELD_ADDRESS]) || isset($data[self::FIELD_ADDRESS_EXT])) { + if (isset($data[self::FIELD_ADDRESS])) { + $value = $data[self::FIELD_ADDRESS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) { + $ext = $data[self::FIELD_ADDRESS_EXT]; } else { - $this->setAddress(new FHIRUrl($data[self::FIELD_ADDRESS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setAddress($value); + } else if (is_array($value)) { + $this->setAddress(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setAddress(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAddress(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_PROTOCOL])) { @@ -345,14 +352,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAddress())) { $a[self::FIELD_ADDRESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_ADDRESS_EXT] = $enc; } } if (null !== ($v = $this->getProtocol())) { $a[self::FIELD_PROTOCOL] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php index a4b1d3b8f2..c516ab3458 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRCapabilityStatementImplementation extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -156,36 +156,50 @@ public function __construct($data = null) $this->setCustodian(new FHIRReference($data[self::FIELD_CUSTODIAN])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUrl) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUrl($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUrl($ext)); } } } @@ -433,18 +447,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php index ef0efd3450..9bcc877a02 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCapabilityStatementInteraction extends FHIRBackboneElement const FIELD_DOCUMENTATION_EXT = '_documentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Operations supported by REST at the type or instance level. @@ -138,36 +138,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRTypeRestfulInteraction) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRTypeRestfulInteraction([FHIRTypeRestfulInteraction::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRTypeRestfulInteraction(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRTypeRestfulInteraction($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRMarkdown) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTypeRestfulInteraction) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRTypeRestfulInteraction(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRTypeRestfulInteraction([FHIRTypeRestfulInteraction::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRTypeRestfulInteraction($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRMarkdown($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRMarkdown($ext)); } } } @@ -364,18 +378,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTypeRestfulInteraction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTypeRestfulInteraction::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php index 55db68c974..76b2a76cb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCapabilityStatementInteraction1 extends FHIRBackboneElement const FIELD_DOCUMENTATION_EXT = '_documentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Operations supported by REST at the system level. @@ -138,36 +138,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRSystemRestfulInteraction) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRSystemRestfulInteraction([FHIRSystemRestfulInteraction::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRSystemRestfulInteraction(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRSystemRestfulInteraction($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRMarkdown) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSystemRestfulInteraction) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRSystemRestfulInteraction(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRSystemRestfulInteraction([FHIRSystemRestfulInteraction::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRSystemRestfulInteraction($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRMarkdown($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRMarkdown($ext)); } } } @@ -364,18 +378,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSystemRestfulInteraction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSystemRestfulInteraction::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php index 14099705b8..3f027ef5ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRCapabilityStatementMessaging extends FHIRBackboneElement const FIELD_SUPPORTED_MESSAGE = 'supportedMessage'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string that may contain Github Flavored Markdown syntax for optional @@ -167,20 +167,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRMarkdown) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRMarkdown($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_ENDPOINT])) { @@ -201,20 +208,27 @@ public function __construct($data = null) $this->addEndpoint(new FHIRCapabilityStatementEndpoint($data[self::FIELD_ENDPOINT])); } } - if (isset($data[self::FIELD_RELIABLE_CACHE])) { - $ext = (isset($data[self::FIELD_RELIABLE_CACHE_EXT]) && is_array($data[self::FIELD_RELIABLE_CACHE_EXT])) - ? $data[self::FIELD_RELIABLE_CACHE_EXT] - : null; - if ($data[self::FIELD_RELIABLE_CACHE] instanceof FHIRUnsignedInt) { - $this->setReliableCache($data[self::FIELD_RELIABLE_CACHE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELIABLE_CACHE])) { - $this->setReliableCache(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_RELIABLE_CACHE]] + $ext)); - } else if (is_array($data[self::FIELD_RELIABLE_CACHE])) { - $this->setReliableCache(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_RELIABLE_CACHE]))); - } + if (isset($data[self::FIELD_RELIABLE_CACHE]) || isset($data[self::FIELD_RELIABLE_CACHE_EXT])) { + if (isset($data[self::FIELD_RELIABLE_CACHE])) { + $value = $data[self::FIELD_RELIABLE_CACHE]; } else { - $this->setReliableCache(new FHIRUnsignedInt($data[self::FIELD_RELIABLE_CACHE])); + $value = null; + } + if (isset($data[self::FIELD_RELIABLE_CACHE_EXT]) && is_array($data[self::FIELD_RELIABLE_CACHE_EXT])) { + $ext = $data[self::FIELD_RELIABLE_CACHE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setReliableCache($value); + } else if (is_array($value)) { + $this->setReliableCache(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setReliableCache(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReliableCache(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_SUPPORTED_MESSAGE])) { @@ -596,23 +610,42 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if (null !== ($v = $this->getReliableCache())) { $a[self::FIELD_RELIABLE_CACHE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_RELIABLE_CACHE_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportedMessage())) { - $a[self::FIELD_SUPPORTED_MESSAGE] = $vs; + $a[self::FIELD_SUPPORTED_MESSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTED_MESSAGE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php index 5063efafbe..9317173504 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCapabilityStatementOperation extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -162,52 +162,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRCanonical) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; } else { - $this->setDefinition(new FHIRCanonical($data[self::FIELD_DEFINITION])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRMarkdown) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDocumentation(new FHIRMarkdown($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRCanonical($ext)); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -492,25 +513,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php index 74a3814ee9..e041972874 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRCapabilityStatementResource extends FHIRBackboneElement const FIELD_VERSIONING_EXT = '_versioning'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -356,84 +356,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONDITIONAL_CREATE])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_CREATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_CREATE_EXT])) - ? $data[self::FIELD_CONDITIONAL_CREATE_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_CREATE] instanceof FHIRBoolean) { - $this->setConditionalCreate($data[self::FIELD_CONDITIONAL_CREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_CREATE])) { - $this->setConditionalCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_CREATE]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_CREATE])) { - $this->setConditionalCreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CONDITIONAL_CREATE]))); - } + if (isset($data[self::FIELD_CONDITIONAL_CREATE]) || isset($data[self::FIELD_CONDITIONAL_CREATE_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_CREATE])) { + $value = $data[self::FIELD_CONDITIONAL_CREATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_CREATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_CREATE_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_CREATE_EXT]; } else { - $this->setConditionalCreate(new FHIRBoolean($data[self::FIELD_CONDITIONAL_CREATE])); - } - } - if (isset($data[self::FIELD_CONDITIONAL_DELETE])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_DELETE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_DELETE_EXT])) - ? $data[self::FIELD_CONDITIONAL_DELETE_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_DELETE] instanceof FHIRConditionalDeleteStatus) { - $this->setConditionalDelete($data[self::FIELD_CONDITIONAL_DELETE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_DELETE])) { - $this->setConditionalDelete(new FHIRConditionalDeleteStatus([FHIRConditionalDeleteStatus::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_DELETE]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_DELETE])) { - $this->setConditionalDelete(new FHIRConditionalDeleteStatus(array_merge($ext, $data[self::FIELD_CONDITIONAL_DELETE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setConditionalCreate($value); + } else if (is_array($value)) { + $this->setConditionalCreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setConditionalCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConditionalCreate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_CONDITIONAL_DELETE]) || isset($data[self::FIELD_CONDITIONAL_DELETE_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_DELETE])) { + $value = $data[self::FIELD_CONDITIONAL_DELETE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_DELETE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_DELETE_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_DELETE_EXT]; } else { - $this->setConditionalDelete(new FHIRConditionalDeleteStatus($data[self::FIELD_CONDITIONAL_DELETE])); - } - } - if (isset($data[self::FIELD_CONDITIONAL_READ])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_READ_EXT]) && is_array($data[self::FIELD_CONDITIONAL_READ_EXT])) - ? $data[self::FIELD_CONDITIONAL_READ_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_READ] instanceof FHIRConditionalReadStatus) { - $this->setConditionalRead($data[self::FIELD_CONDITIONAL_READ]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_READ])) { - $this->setConditionalRead(new FHIRConditionalReadStatus([FHIRConditionalReadStatus::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_READ]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_READ])) { - $this->setConditionalRead(new FHIRConditionalReadStatus(array_merge($ext, $data[self::FIELD_CONDITIONAL_READ]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionalDeleteStatus) { + $this->setConditionalDelete($value); + } else if (is_array($value)) { + $this->setConditionalDelete(new FHIRConditionalDeleteStatus(array_merge($ext, $value))); + } else { + $this->setConditionalDelete(new FHIRConditionalDeleteStatus([FHIRConditionalDeleteStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConditionalDelete(new FHIRConditionalDeleteStatus($ext)); + } + } + if (isset($data[self::FIELD_CONDITIONAL_READ]) || isset($data[self::FIELD_CONDITIONAL_READ_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_READ])) { + $value = $data[self::FIELD_CONDITIONAL_READ]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_READ_EXT]) && is_array($data[self::FIELD_CONDITIONAL_READ_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_READ_EXT]; } else { - $this->setConditionalRead(new FHIRConditionalReadStatus($data[self::FIELD_CONDITIONAL_READ])); - } - } - if (isset($data[self::FIELD_CONDITIONAL_UPDATE])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_UPDATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_UPDATE_EXT])) - ? $data[self::FIELD_CONDITIONAL_UPDATE_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_UPDATE] instanceof FHIRBoolean) { - $this->setConditionalUpdate($data[self::FIELD_CONDITIONAL_UPDATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_UPDATE])) { - $this->setConditionalUpdate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_UPDATE]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_UPDATE])) { - $this->setConditionalUpdate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CONDITIONAL_UPDATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionalReadStatus) { + $this->setConditionalRead($value); + } else if (is_array($value)) { + $this->setConditionalRead(new FHIRConditionalReadStatus(array_merge($ext, $value))); + } else { + $this->setConditionalRead(new FHIRConditionalReadStatus([FHIRConditionalReadStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConditionalRead(new FHIRConditionalReadStatus($ext)); + } + } + if (isset($data[self::FIELD_CONDITIONAL_UPDATE]) || isset($data[self::FIELD_CONDITIONAL_UPDATE_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_UPDATE])) { + $value = $data[self::FIELD_CONDITIONAL_UPDATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_UPDATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_UPDATE_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_UPDATE_EXT]; } else { - $this->setConditionalUpdate(new FHIRBoolean($data[self::FIELD_CONDITIONAL_UPDATE])); - } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRMarkdown) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setConditionalUpdate($value); + } else if (is_array($value)) { + $this->setConditionalUpdate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setConditionalUpdate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConditionalUpdate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRMarkdown($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_INTERACTION])) { @@ -472,94 +507,126 @@ public function __construct($data = null) $this->addOperation(new FHIRCapabilityStatementOperation($data[self::FIELD_OPERATION])); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_PROFILE]))); - } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; } else { - $this->setProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); - } - } - if (isset($data[self::FIELD_READ_HISTORY])) { - $ext = (isset($data[self::FIELD_READ_HISTORY_EXT]) && is_array($data[self::FIELD_READ_HISTORY_EXT])) - ? $data[self::FIELD_READ_HISTORY_EXT] - : null; - if ($data[self::FIELD_READ_HISTORY] instanceof FHIRBoolean) { - $this->setReadHistory($data[self::FIELD_READ_HISTORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READ_HISTORY])) { - $this->setReadHistory(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_READ_HISTORY]] + $ext)); - } else if (is_array($data[self::FIELD_READ_HISTORY])) { - $this->setReadHistory(new FHIRBoolean(array_merge($ext, $data[self::FIELD_READ_HISTORY]))); + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProfile(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_READ_HISTORY]) || isset($data[self::FIELD_READ_HISTORY_EXT])) { + if (isset($data[self::FIELD_READ_HISTORY])) { + $value = $data[self::FIELD_READ_HISTORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_READ_HISTORY_EXT]) && is_array($data[self::FIELD_READ_HISTORY_EXT])) { + $ext = $data[self::FIELD_READ_HISTORY_EXT]; } else { - $this->setReadHistory(new FHIRBoolean($data[self::FIELD_READ_HISTORY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReadHistory($value); + } else if (is_array($value)) { + $this->setReadHistory(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReadHistory(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReadHistory(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_REFERENCE_POLICY])) { - $ext = (isset($data[self::FIELD_REFERENCE_POLICY_EXT]) && is_array($data[self::FIELD_REFERENCE_POLICY_EXT])) - ? $data[self::FIELD_REFERENCE_POLICY_EXT] - : null; - if (is_array($data[self::FIELD_REFERENCE_POLICY])) { - foreach($data[self::FIELD_REFERENCE_POLICY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRReferenceHandlingPolicy) { - $this->addReferencePolicy($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy([FHIRReferenceHandlingPolicy::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_REFERENCE_POLICY]) || isset($data[self::FIELD_REFERENCE_POLICY_EXT])) { + if (isset($data[self::FIELD_REFERENCE_POLICY])) { + $value = $data[self::FIELD_REFERENCE_POLICY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_POLICY_EXT]) && is_array($data[self::FIELD_REFERENCE_POLICY_EXT])) { + $ext = $data[self::FIELD_REFERENCE_POLICY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRReferenceHandlingPolicy) { + $this->addReferencePolicy($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRReferenceHandlingPolicy) { + $this->addReferencePolicy($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy(array_merge($v, $iext))); + } else { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy([FHIRReferenceHandlingPolicy::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy($v)); } + } elseif (is_array($value)) { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy(array_merge($ext, $value))); + } else { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy([FHIRReferenceHandlingPolicy::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy($iext)); } - } elseif ($data[self::FIELD_REFERENCE_POLICY] instanceof FHIRReferenceHandlingPolicy) { - $this->addReferencePolicy($data[self::FIELD_REFERENCE_POLICY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REFERENCE_POLICY])) { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy([FHIRReferenceHandlingPolicy::FIELD_VALUE => $data[self::FIELD_REFERENCE_POLICY]] + $ext)); - } else { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy($data[self::FIELD_REFERENCE_POLICY])); } } - if (isset($data[self::FIELD_SEARCH_INCLUDE])) { - $ext = (isset($data[self::FIELD_SEARCH_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_INCLUDE_EXT])) - ? $data[self::FIELD_SEARCH_INCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_SEARCH_INCLUDE])) { - foreach($data[self::FIELD_SEARCH_INCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSearchInclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSearchInclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEARCH_INCLUDE]) || isset($data[self::FIELD_SEARCH_INCLUDE_EXT])) { + if (isset($data[self::FIELD_SEARCH_INCLUDE])) { + $value = $data[self::FIELD_SEARCH_INCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_INCLUDE_EXT])) { + $ext = $data[self::FIELD_SEARCH_INCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSearchInclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSearchInclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSearchInclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSearchInclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSearchInclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSearchInclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_SEARCH_INCLUDE] instanceof FHIRString) { - $this->addSearchInclude($data[self::FIELD_SEARCH_INCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEARCH_INCLUDE])) { - $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEARCH_INCLUDE]] + $ext)); - } else { - $this->addSearchInclude(new FHIRString($data[self::FIELD_SEARCH_INCLUDE])); } } if (isset($data[self::FIELD_SEARCH_PARAM])) { @@ -580,110 +647,149 @@ public function __construct($data = null) $this->addSearchParam(new FHIRCapabilityStatementSearchParam($data[self::FIELD_SEARCH_PARAM])); } } - if (isset($data[self::FIELD_SEARCH_REV_INCLUDE])) { - $ext = (isset($data[self::FIELD_SEARCH_REV_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_REV_INCLUDE_EXT])) - ? $data[self::FIELD_SEARCH_REV_INCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_SEARCH_REV_INCLUDE])) { - foreach($data[self::FIELD_SEARCH_REV_INCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSearchRevInclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSearchRevInclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEARCH_REV_INCLUDE]) || isset($data[self::FIELD_SEARCH_REV_INCLUDE_EXT])) { + if (isset($data[self::FIELD_SEARCH_REV_INCLUDE])) { + $value = $data[self::FIELD_SEARCH_REV_INCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_REV_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_REV_INCLUDE_EXT])) { + $ext = $data[self::FIELD_SEARCH_REV_INCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSearchRevInclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSearchRevInclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSearchRevInclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSearchRevInclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSearchRevInclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSearchRevInclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_SEARCH_REV_INCLUDE] instanceof FHIRString) { - $this->addSearchRevInclude($data[self::FIELD_SEARCH_REV_INCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEARCH_REV_INCLUDE])) { - $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEARCH_REV_INCLUDE]] + $ext)); - } else { - $this->addSearchRevInclude(new FHIRString($data[self::FIELD_SEARCH_REV_INCLUDE])); } } - if (isset($data[self::FIELD_SUPPORTED_PROFILE])) { - $ext = (isset($data[self::FIELD_SUPPORTED_PROFILE_EXT]) && is_array($data[self::FIELD_SUPPORTED_PROFILE_EXT])) - ? $data[self::FIELD_SUPPORTED_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_SUPPORTED_PROFILE])) { - foreach($data[self::FIELD_SUPPORTED_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addSupportedProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSupportedProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSupportedProfile(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUPPORTED_PROFILE]) || isset($data[self::FIELD_SUPPORTED_PROFILE_EXT])) { + if (isset($data[self::FIELD_SUPPORTED_PROFILE])) { + $value = $data[self::FIELD_SUPPORTED_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUPPORTED_PROFILE_EXT]) && is_array($data[self::FIELD_SUPPORTED_PROFILE_EXT])) { + $ext = $data[self::FIELD_SUPPORTED_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addSupportedProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addSupportedProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSupportedProfile(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addSupportedProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSupportedProfile(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addSupportedProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addSupportedProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_SUPPORTED_PROFILE] instanceof FHIRCanonical) { - $this->addSupportedProfile($data[self::FIELD_SUPPORTED_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUPPORTED_PROFILE])) { - $this->addSupportedProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_SUPPORTED_PROFILE]] + $ext)); - } else { - $this->addSupportedProfile(new FHIRCanonical($data[self::FIELD_SUPPORTED_PROFILE])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSupportedProfile(new FHIRCanonical($iext)); } + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_UPDATE_CREATE])) { - $ext = (isset($data[self::FIELD_UPDATE_CREATE_EXT]) && is_array($data[self::FIELD_UPDATE_CREATE_EXT])) - ? $data[self::FIELD_UPDATE_CREATE_EXT] - : null; - if ($data[self::FIELD_UPDATE_CREATE] instanceof FHIRBoolean) { - $this->setUpdateCreate($data[self::FIELD_UPDATE_CREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UPDATE_CREATE])) { - $this->setUpdateCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_UPDATE_CREATE]] + $ext)); - } else if (is_array($data[self::FIELD_UPDATE_CREATE])) { - $this->setUpdateCreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_UPDATE_CREATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_UPDATE_CREATE]) || isset($data[self::FIELD_UPDATE_CREATE_EXT])) { + if (isset($data[self::FIELD_UPDATE_CREATE])) { + $value = $data[self::FIELD_UPDATE_CREATE]; } else { - $this->setUpdateCreate(new FHIRBoolean($data[self::FIELD_UPDATE_CREATE])); - } - } - if (isset($data[self::FIELD_VERSIONING])) { - $ext = (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) - ? $data[self::FIELD_VERSIONING_EXT] - : null; - if ($data[self::FIELD_VERSIONING] instanceof FHIRResourceVersionPolicy) { - $this->setVersioning($data[self::FIELD_VERSIONING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRResourceVersionPolicy([FHIRResourceVersionPolicy::FIELD_VALUE => $data[self::FIELD_VERSIONING]] + $ext)); - } else if (is_array($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRResourceVersionPolicy(array_merge($ext, $data[self::FIELD_VERSIONING]))); + $value = null; + } + if (isset($data[self::FIELD_UPDATE_CREATE_EXT]) && is_array($data[self::FIELD_UPDATE_CREATE_EXT])) { + $ext = $data[self::FIELD_UPDATE_CREATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setUpdateCreate($value); + } else if (is_array($value)) { + $this->setUpdateCreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setUpdateCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUpdateCreate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VERSIONING]) || isset($data[self::FIELD_VERSIONING_EXT])) { + if (isset($data[self::FIELD_VERSIONING])) { + $value = $data[self::FIELD_VERSIONING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) { + $ext = $data[self::FIELD_VERSIONING_EXT]; } else { - $this->setVersioning(new FHIRResourceVersionPolicy($data[self::FIELD_VERSIONING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceVersionPolicy) { + $this->setVersioning($value); + } else if (is_array($value)) { + $this->setVersioning(new FHIRResourceVersionPolicy(array_merge($ext, $value))); + } else { + $this->setVersioning(new FHIRResourceVersionPolicy([FHIRResourceVersionPolicy::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersioning(new FHIRResourceVersionPolicy($ext)); } } } @@ -1822,143 +1928,216 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getConditionalCreate())) { $a[self::FIELD_CONDITIONAL_CREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_CREATE_EXT] = $enc; } } if (null !== ($v = $this->getConditionalDelete())) { $a[self::FIELD_CONDITIONAL_DELETE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionalDeleteStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionalDeleteStatus::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_DELETE_EXT] = $enc; } } if (null !== ($v = $this->getConditionalRead())) { $a[self::FIELD_CONDITIONAL_READ] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionalReadStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionalReadStatus::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_READ_EXT] = $enc; } } if (null !== ($v = $this->getConditionalUpdate())) { $a[self::FIELD_CONDITIONAL_UPDATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_UPDATE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getInteraction())) { - $a[self::FIELD_INTERACTION] = $vs; + $a[self::FIELD_INTERACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERACTION][] = $v; + } } if ([] !== ($vs = $this->getOperation())) { - $a[self::FIELD_OPERATION] = $vs; + $a[self::FIELD_OPERATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPERATION][] = $v; + } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getReadHistory())) { $a[self::FIELD_READ_HISTORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_READ_HISTORY_EXT] = $enc; } } if ([] !== ($vs = $this->getReferencePolicy())) { $a[self::FIELD_REFERENCE_POLICY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REFERENCE_POLICY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REFERENCE_POLICY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRReferenceHandlingPolicy::FIELD_VALUE]) || array_key_exists(FHIRReferenceHandlingPolicy::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REFERENCE_POLICY_EXT][] = null; + unset($enc[FHIRReferenceHandlingPolicy::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REFERENCE_POLICY_EXT] = $encs; + } } if ([] !== ($vs = $this->getSearchInclude())) { $a[self::FIELD_SEARCH_INCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEARCH_INCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEARCH_INCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEARCH_INCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEARCH_INCLUDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSearchParam())) { - $a[self::FIELD_SEARCH_PARAM] = $vs; + $a[self::FIELD_SEARCH_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SEARCH_PARAM][] = $v; + } } if ([] !== ($vs = $this->getSearchRevInclude())) { $a[self::FIELD_SEARCH_REV_INCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEARCH_REV_INCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEARCH_REV_INCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEARCH_REV_INCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEARCH_REV_INCLUDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSupportedProfile())) { $a[self::FIELD_SUPPORTED_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUPPORTED_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUPPORTED_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUPPORTED_PROFILE_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUPPORTED_PROFILE_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUpdateCreate())) { $a[self::FIELD_UPDATE_CREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_UPDATE_CREATE_EXT] = $enc; } } if (null !== ($v = $this->getVersioning())) { $a[self::FIELD_VERSIONING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceVersionPolicy::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceVersionPolicy::FIELD_VALUE]); $a[self::FIELD_VERSIONING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php index 4103f0d39d..becf8c9606 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRCapabilityStatementRest extends FHIRBackboneElement const FIELD_SECURITY = 'security'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -226,49 +226,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMPARTMENT])) { - $ext = (isset($data[self::FIELD_COMPARTMENT_EXT]) && is_array($data[self::FIELD_COMPARTMENT_EXT])) - ? $data[self::FIELD_COMPARTMENT_EXT] - : null; - if (is_array($data[self::FIELD_COMPARTMENT])) { - foreach($data[self::FIELD_COMPARTMENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addCompartment($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCompartment(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCompartment(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMPARTMENT]) || isset($data[self::FIELD_COMPARTMENT_EXT])) { + if (isset($data[self::FIELD_COMPARTMENT])) { + $value = $data[self::FIELD_COMPARTMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARTMENT_EXT]) && is_array($data[self::FIELD_COMPARTMENT_EXT])) { + $ext = $data[self::FIELD_COMPARTMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addCompartment($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addCompartment($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCompartment(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addCompartment(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCompartment(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addCompartment(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addCompartment(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCompartment(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_COMPARTMENT] instanceof FHIRCanonical) { - $this->addCompartment($data[self::FIELD_COMPARTMENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COMPARTMENT])) { - $this->addCompartment(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_COMPARTMENT]] + $ext)); - } else { - $this->addCompartment(new FHIRCanonical($data[self::FIELD_COMPARTMENT])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRMarkdown) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRMarkdown($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_INTERACTION])) { @@ -289,20 +305,27 @@ public function __construct($data = null) $this->addInteraction(new FHIRCapabilityStatementInteraction1($data[self::FIELD_INTERACTION])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRRestfulCapabilityMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRRestfulCapabilityMode([FHIRRestfulCapabilityMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRRestfulCapabilityMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRRestfulCapabilityMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRestfulCapabilityMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRRestfulCapabilityMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRRestfulCapabilityMode([FHIRRestfulCapabilityMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRRestfulCapabilityMode($ext)); } } if (isset($data[self::FIELD_OPERATION])) { @@ -989,48 +1012,87 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCompartment())) { $a[self::FIELD_COMPARTMENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COMPARTMENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COMPARTMENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COMPARTMENT_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COMPARTMENT_EXT] = $encs; + } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getInteraction())) { - $a[self::FIELD_INTERACTION] = $vs; + $a[self::FIELD_INTERACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERACTION][] = $v; + } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRestfulCapabilityMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRestfulCapabilityMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if ([] !== ($vs = $this->getOperation())) { - $a[self::FIELD_OPERATION] = $vs; + $a[self::FIELD_OPERATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPERATION][] = $v; + } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } } if ([] !== ($vs = $this->getSearchParam())) { - $a[self::FIELD_SEARCH_PARAM] = $vs; + $a[self::FIELD_SEARCH_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SEARCH_PARAM][] = $v; + } } if (null !== ($v = $this->getSecurity())) { $a[self::FIELD_SECURITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php index 7994270ab7..d816a664ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCapabilityStatementSearchParam extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -170,68 +170,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRCanonical) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; } else { - $this->setDefinition(new FHIRCanonical($data[self::FIELD_DEFINITION])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRMarkdown) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDocumentation(new FHIRMarkdown($data[self::FIELD_DOCUMENTATION])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSearchParamType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRSearchParamType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchParamType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSearchParamType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRSearchParamType($ext)); } } } @@ -540,32 +568,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchParamType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchParamType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php index a280ea2c92..77561d3ff7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRCapabilityStatementSecurity extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -151,36 +151,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CORS])) { - $ext = (isset($data[self::FIELD_CORS_EXT]) && is_array($data[self::FIELD_CORS_EXT])) - ? $data[self::FIELD_CORS_EXT] - : null; - if ($data[self::FIELD_CORS] instanceof FHIRBoolean) { - $this->setCors($data[self::FIELD_CORS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CORS])) { - $this->setCors(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CORS]] + $ext)); - } else if (is_array($data[self::FIELD_CORS])) { - $this->setCors(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CORS]))); - } + if (isset($data[self::FIELD_CORS]) || isset($data[self::FIELD_CORS_EXT])) { + if (isset($data[self::FIELD_CORS])) { + $value = $data[self::FIELD_CORS]; } else { - $this->setCors(new FHIRBoolean($data[self::FIELD_CORS])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CORS_EXT]) && is_array($data[self::FIELD_CORS_EXT])) { + $ext = $data[self::FIELD_CORS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCors($value); + } else if (is_array($value)) { + $this->setCors(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCors(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCors(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -481,20 +495,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCors())) { $a[self::FIELD_CORS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CORS_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getService())) { - $a[self::FIELD_SERVICE] = $vs; + $a[self::FIELD_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php index 2d115d4528..5e762cd3fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRCapabilityStatementSoftware extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -149,52 +149,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_RELEASE_DATE])) { - $ext = (isset($data[self::FIELD_RELEASE_DATE_EXT]) && is_array($data[self::FIELD_RELEASE_DATE_EXT])) - ? $data[self::FIELD_RELEASE_DATE_EXT] - : null; - if ($data[self::FIELD_RELEASE_DATE] instanceof FHIRDateTime) { - $this->setReleaseDate($data[self::FIELD_RELEASE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELEASE_DATE])) { - $this->setReleaseDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RELEASE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RELEASE_DATE])) { - $this->setReleaseDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RELEASE_DATE]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setReleaseDate(new FHIRDateTime($data[self::FIELD_RELEASE_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_RELEASE_DATE]) || isset($data[self::FIELD_RELEASE_DATE_EXT])) { + if (isset($data[self::FIELD_RELEASE_DATE])) { + $value = $data[self::FIELD_RELEASE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELEASE_DATE_EXT]) && is_array($data[self::FIELD_RELEASE_DATE_EXT])) { + $ext = $data[self::FIELD_RELEASE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReleaseDate($value); + } else if (is_array($value)) { + $this->setReleaseDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReleaseDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReleaseDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -455,25 +476,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getReleaseDate())) { $a[self::FIELD_RELEASE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RELEASE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php index 1b65b5ebcf..4914798666 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCapabilityStatementSupportedMessage extends FHIRBackboneElement const FIELD_MODE_EXT = '_mode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRCanonical) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; } else { - $this->setDefinition(new FHIRCanonical($data[self::FIELD_DEFINITION])); + $value = null; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIREventCapabilityMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIREventCapabilityMode([FHIREventCapabilityMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIREventCapabilityMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIREventCapabilityMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventCapabilityMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIREventCapabilityMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIREventCapabilityMode([FHIREventCapabilityMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIREventCapabilityMode($ext)); } } } @@ -352,18 +366,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventCapabilityMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventCapabilityMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php index e1f18fb4f6..0ceb3cbe6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRCarePlanActivity extends FHIRBackboneElement const FIELD_REFERENCE = 'reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the intention of how one or more practitioners intend to deliver care @@ -650,17 +650,38 @@ public function jsonSerialize() $a[self::FIELD_DETAIL] = $v; } if ([] !== ($vs = $this->getOutcomeCodeableConcept())) { - $a[self::FIELD_OUTCOME_CODEABLE_CONCEPT] = $vs; + $a[self::FIELD_OUTCOME_CODEABLE_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME_CODEABLE_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getOutcomeReference())) { - $a[self::FIELD_OUTCOME_REFERENCE] = $vs; + $a[self::FIELD_OUTCOME_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getProgress())) { - $a[self::FIELD_PROGRESS] = $vs; + $a[self::FIELD_PROGRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRESS][] = $v; + } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php index 07181d9aac..f660086b10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRCarePlanDetail extends FHIRBackboneElement const FIELD_STATUS_REASON = 'statusReason'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -412,36 +412,50 @@ public function __construct($data = null) $this->setDailyAmount(new FHIRQuantity($data[self::FIELD_DAILY_AMOUNT])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DO_NOT_PERFORM])) { - $ext = (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) - ? $data[self::FIELD_DO_NOT_PERFORM_EXT] - : null; - if ($data[self::FIELD_DO_NOT_PERFORM] instanceof FHIRBoolean) { - $this->setDoNotPerform($data[self::FIELD_DO_NOT_PERFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DO_NOT_PERFORM]] + $ext)); - } else if (is_array($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DO_NOT_PERFORM]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DO_NOT_PERFORM]) || isset($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + if (isset($data[self::FIELD_DO_NOT_PERFORM])) { + $value = $data[self::FIELD_DO_NOT_PERFORM]; } else { - $this->setDoNotPerform(new FHIRBoolean($data[self::FIELD_DO_NOT_PERFORM])); + $value = null; + } + if (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + $ext = $data[self::FIELD_DO_NOT_PERFORM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDoNotPerform($value); + } else if (is_array($value)) { + $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoNotPerform(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_GOAL])) { @@ -462,78 +476,103 @@ public function __construct($data = null) $this->addGoal(new FHIRReference($data[self::FIELD_GOAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); - } - } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRCarePlanActivityKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRCarePlanActivityKind([FHIRCarePlanActivityKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRCarePlanActivityKind(array_merge($ext, $data[self::FIELD_KIND]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setKind(new FHIRCarePlanActivityKind($data[self::FIELD_KIND])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanActivityKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRCarePlanActivityKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRCarePlanActivityKind([FHIRCarePlanActivityKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRCarePlanActivityKind($ext)); } } if (isset($data[self::FIELD_LOCATION])) { @@ -625,20 +664,27 @@ public function __construct($data = null) $this->setScheduledPeriod(new FHIRPeriod($data[self::FIELD_SCHEDULED_PERIOD])); } } - if (isset($data[self::FIELD_SCHEDULED_STRING])) { - $ext = (isset($data[self::FIELD_SCHEDULED_STRING_EXT]) && is_array($data[self::FIELD_SCHEDULED_STRING_EXT])) - ? $data[self::FIELD_SCHEDULED_STRING_EXT] - : null; - if ($data[self::FIELD_SCHEDULED_STRING] instanceof FHIRString) { - $this->setScheduledString($data[self::FIELD_SCHEDULED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCHEDULED_STRING])) { - $this->setScheduledString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SCHEDULED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_SCHEDULED_STRING])) { - $this->setScheduledString(new FHIRString(array_merge($ext, $data[self::FIELD_SCHEDULED_STRING]))); - } + if (isset($data[self::FIELD_SCHEDULED_STRING]) || isset($data[self::FIELD_SCHEDULED_STRING_EXT])) { + if (isset($data[self::FIELD_SCHEDULED_STRING])) { + $value = $data[self::FIELD_SCHEDULED_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SCHEDULED_STRING_EXT]) && is_array($data[self::FIELD_SCHEDULED_STRING_EXT])) { + $ext = $data[self::FIELD_SCHEDULED_STRING_EXT]; } else { - $this->setScheduledString(new FHIRString($data[self::FIELD_SCHEDULED_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setScheduledString($value); + } else if (is_array($value)) { + $this->setScheduledString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setScheduledString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScheduledString(new FHIRString($ext)); } } if (isset($data[self::FIELD_SCHEDULED_TIMING])) { @@ -648,20 +694,27 @@ public function __construct($data = null) $this->setScheduledTiming(new FHIRTiming($data[self::FIELD_SCHEDULED_TIMING])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCarePlanActivityStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanActivityStatus([FHIRCarePlanActivityStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanActivityStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCarePlanActivityStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanActivityStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCarePlanActivityStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCarePlanActivityStatus([FHIRCarePlanActivityStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCarePlanActivityStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -1836,55 +1889,83 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoNotPerform())) { $a[self::FIELD_DO_NOT_PERFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DO_NOT_PERFORM_EXT] = $enc; } } if ([] !== ($vs = $this->getGoal())) { - $a[self::FIELD_GOAL] = $vs; + $a[self::FIELD_GOAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GOAL][] = $v; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanActivityKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanActivityKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } @@ -1892,7 +1973,13 @@ public function jsonSerialize() $a[self::FIELD_LOCATION] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getProductCodeableConcept())) { $a[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $v; @@ -1904,18 +1991,32 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getScheduledPeriod())) { $a[self::FIELD_SCHEDULED_PERIOD] = $v; } if (null !== ($v = $this->getScheduledString())) { $a[self::FIELD_SCHEDULED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SCHEDULED_STRING_EXT] = $enc; } } @@ -1924,14 +2025,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanActivityStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanActivityStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStatusReason())) { $a[self::FIELD_STATUS_REASON] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php index eda2391c06..1dfd176052 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCareTeamParticipant extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -488,7 +488,16 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntry.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntry.php index 487305f4a8..e1a835135c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRCatalogEntryRelatedEntry extends FHIRBackboneElement const FIELD_RELATIONTYPE_EXT = '_relationtype'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -136,20 +136,27 @@ public function __construct($data = null) $this->setItem(new FHIRReference($data[self::FIELD_ITEM])); } } - if (isset($data[self::FIELD_RELATIONTYPE])) { - $ext = (isset($data[self::FIELD_RELATIONTYPE_EXT]) && is_array($data[self::FIELD_RELATIONTYPE_EXT])) - ? $data[self::FIELD_RELATIONTYPE_EXT] - : null; - if ($data[self::FIELD_RELATIONTYPE] instanceof FHIRCatalogEntryRelationType) { - $this->setRelationtype($data[self::FIELD_RELATIONTYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIONTYPE])) { - $this->setRelationtype(new FHIRCatalogEntryRelationType([FHIRCatalogEntryRelationType::FIELD_VALUE => $data[self::FIELD_RELATIONTYPE]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIONTYPE])) { - $this->setRelationtype(new FHIRCatalogEntryRelationType(array_merge($ext, $data[self::FIELD_RELATIONTYPE]))); - } + if (isset($data[self::FIELD_RELATIONTYPE]) || isset($data[self::FIELD_RELATIONTYPE_EXT])) { + if (isset($data[self::FIELD_RELATIONTYPE])) { + $value = $data[self::FIELD_RELATIONTYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELATIONTYPE_EXT]) && is_array($data[self::FIELD_RELATIONTYPE_EXT])) { + $ext = $data[self::FIELD_RELATIONTYPE_EXT]; } else { - $this->setRelationtype(new FHIRCatalogEntryRelationType($data[self::FIELD_RELATIONTYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCatalogEntryRelationType) { + $this->setRelationtype($value); + } else if (is_array($value)) { + $this->setRelationtype(new FHIRCatalogEntryRelationType(array_merge($ext, $value))); + } else { + $this->setRelationtype(new FHIRCatalogEntryRelationType([FHIRCatalogEntryRelationType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelationtype(new FHIRCatalogEntryRelationType($ext)); } } } @@ -323,11 +330,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getRelationtype())) { $a[self::FIELD_RELATIONTYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCatalogEntryRelationType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCatalogEntryRelationType::FIELD_VALUE]); $a[self::FIELD_RELATIONTYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformer.php index 182aa2115f..133319f527 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRChargeItemPerformer extends FHIRBackboneElement const FIELD_FUNCTION = 'function'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getFunction())) { $a[self::FIELD_FUNCTION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicability.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicability.php index 176cb718ff..018fcc4406 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicability.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRChargeItemDefinitionApplicability extends FHIRBackboneElement const FIELD_LANGUAGE_EXT = '_language'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -150,52 +150,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRString) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRString($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRString($ext)); } } } @@ -460,25 +481,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponent.php index 461f123a3c..c20196b0a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRChargeItemDefinitionPriceComponent extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -176,36 +176,50 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRInvoicePriceComponentType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRInvoicePriceComponentType([FHIRInvoicePriceComponentType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRInvoicePriceComponentType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRInvoicePriceComponentType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInvoicePriceComponentType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRInvoicePriceComponentType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRInvoicePriceComponentType([FHIRInvoicePriceComponentType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRInvoicePriceComponentType($ext)); } } } @@ -476,18 +490,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInvoicePriceComponentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInvoicePriceComponentType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroup.php index 3708e6414b..3144266751 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRChargeItemDefinitionPropertyGroup extends FHIRBackboneElement const FIELD_PRICE_COMPONENT = 'priceComponent'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The ChargeItemDefinition resource provides the properties that apply to the @@ -426,10 +426,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getApplicability())) { - $a[self::FIELD_APPLICABILITY] = $vs; + $a[self::FIELD_APPLICABILITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_APPLICABILITY][] = $v; + } } if ([] !== ($vs = $this->getPriceComponent())) { - $a[self::FIELD_PRICE_COMPONENT] = $vs; + $a[self::FIELD_PRICE_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRICE_COMPONENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php index c3c520fb47..26ffba12cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRClaimAccident extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -168,20 +168,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -483,8 +490,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -497,6 +506,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php index 3542bf48ac..27fff735a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRClaimCareTeam extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -187,20 +187,27 @@ public function __construct($data = null) $this->setQualification(new FHIRCodeableConcept($data[self::FIELD_QUALIFICATION])); } } - if (isset($data[self::FIELD_RESPONSIBLE])) { - $ext = (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) - ? $data[self::FIELD_RESPONSIBLE_EXT] - : null; - if ($data[self::FIELD_RESPONSIBLE] instanceof FHIRBoolean) { - $this->setResponsible($data[self::FIELD_RESPONSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_RESPONSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRBoolean(array_merge($ext, $data[self::FIELD_RESPONSIBLE]))); - } + if (isset($data[self::FIELD_RESPONSIBLE]) || isset($data[self::FIELD_RESPONSIBLE_EXT])) { + if (isset($data[self::FIELD_RESPONSIBLE])) { + $value = $data[self::FIELD_RESPONSIBLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) { + $ext = $data[self::FIELD_RESPONSIBLE_EXT]; } else { - $this->setResponsible(new FHIRBoolean($data[self::FIELD_RESPONSIBLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setResponsible($value); + } else if (is_array($value)) { + $this->setResponsible(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setResponsible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResponsible(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -210,20 +217,27 @@ public function __construct($data = null) $this->setRole(new FHIRCodeableConcept($data[self::FIELD_ROLE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -546,8 +560,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getResponsible())) { $a[self::FIELD_RESPONSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_RESPONSIBLE_EXT] = $enc; } } @@ -556,11 +572,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php index b75b636701..7defc3ab87 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRClaimDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -280,20 +280,27 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -360,20 +367,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SUB_DETAIL])) { @@ -1152,13 +1166,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; @@ -1167,7 +1189,13 @@ public function jsonSerialize() $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -1177,20 +1205,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php index 4bec06e9fe..5769c7da0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRClaimDiagnosis extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -216,20 +216,27 @@ public function __construct($data = null) $this->setPackageCode(new FHIRCodeableConcept($data[self::FIELD_PACKAGE_CODE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -640,13 +647,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php index 2e538f5795..8850313c66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRClaimInsurance extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -206,20 +206,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $ext = (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) - ? $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT] - : null; - if ($data[self::FIELD_BUSINESS_ARRANGEMENT] instanceof FHIRString) { - $this->setBusinessArrangement($data[self::FIELD_BUSINESS_ARRANGEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BUSINESS_ARRANGEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString(array_merge($ext, $data[self::FIELD_BUSINESS_ARRANGEMENT]))); - } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT]) || isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { + $value = $data[self::FIELD_BUSINESS_ARRANGEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + $ext = $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]; } else { - $this->setBusinessArrangement(new FHIRString($data[self::FIELD_BUSINESS_ARRANGEMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBusinessArrangement($value); + } else if (is_array($value)) { + $this->setBusinessArrangement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBusinessArrangement(new FHIRString($ext)); } } if (isset($data[self::FIELD_CLAIM_RESPONSE])) { @@ -236,20 +243,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_FOCAL])) { - $ext = (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) - ? $data[self::FIELD_FOCAL_EXT] - : null; - if ($data[self::FIELD_FOCAL] instanceof FHIRBoolean) { - $this->setFocal($data[self::FIELD_FOCAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FOCAL]] + $ext)); - } else if (is_array($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FOCAL]))); - } + if (isset($data[self::FIELD_FOCAL]) || isset($data[self::FIELD_FOCAL_EXT])) { + if (isset($data[self::FIELD_FOCAL])) { + $value = $data[self::FIELD_FOCAL]; } else { - $this->setFocal(new FHIRBoolean($data[self::FIELD_FOCAL])); + $value = null; + } + if (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) { + $ext = $data[self::FIELD_FOCAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFocal($value); + } else if (is_array($value)) { + $this->setFocal(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFocal(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -259,49 +273,65 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - foreach($data[self::FIELD_PRE_AUTH_REF] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPreAuthRef($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPreAuthRef(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPreAuthRef($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPreAuthRef($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPreAuthRef(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPreAuthRef(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPreAuthRef(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->addPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else { - $this->addPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -761,8 +791,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBusinessArrangement())) { $a[self::FIELD_BUSINESS_ARRANGEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BUSINESS_ARRANGEMENT_EXT] = $enc; } } @@ -774,8 +806,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFocal())) { $a[self::FIELD_FOCAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FOCAL_EXT] = $enc; } } @@ -784,26 +818,39 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PRE_AUTH_REF][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PRE_AUTH_REF_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PRE_AUTH_REF_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PRE_AUTH_REF_EXT] = $encs; + } } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php index 3c64254b4e..fd93969ddb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRClaimItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -447,33 +447,42 @@ public function __construct($data = null) $this->setBodySite(new FHIRCodeableConcept($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_CARE_TEAM_SEQUENCE])) { - $ext = (isset($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT]) && is_array($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT])) - ? $data[self::FIELD_CARE_TEAM_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_CARE_TEAM_SEQUENCE])) { - foreach($data[self::FIELD_CARE_TEAM_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addCareTeamSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCareTeamSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCareTeamSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CARE_TEAM_SEQUENCE]) || isset($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_CARE_TEAM_SEQUENCE])) { + $value = $data[self::FIELD_CARE_TEAM_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT]) && is_array($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_CARE_TEAM_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addCareTeamSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addCareTeamSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCareTeamSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addCareTeamSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCareTeamSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addCareTeamSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addCareTeamSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCareTeamSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_CARE_TEAM_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addCareTeamSequence($data[self::FIELD_CARE_TEAM_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CARE_TEAM_SEQUENCE])) { - $this->addCareTeamSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_CARE_TEAM_SEQUENCE]] + $ext)); - } else { - $this->addCareTeamSequence(new FHIRPositiveInt($data[self::FIELD_CARE_TEAM_SEQUENCE])); } } if (isset($data[self::FIELD_CATEGORY])) { @@ -501,33 +510,42 @@ public function __construct($data = null) $this->addDetail(new FHIRClaimDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT])) - ? $data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_DIAGNOSIS_SEQUENCE])) { - foreach($data[self::FIELD_DIAGNOSIS_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addDiagnosisSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDiagnosisSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDiagnosisSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE]) || isset($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE])) { + $value = $data[self::FIELD_DIAGNOSIS_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addDiagnosisSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addDiagnosisSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDiagnosisSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addDiagnosisSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDiagnosisSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addDiagnosisSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addDiagnosisSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDiagnosisSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_DIAGNOSIS_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addDiagnosisSequence($data[self::FIELD_DIAGNOSIS_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DIAGNOSIS_SEQUENCE])) { - $this->addDiagnosisSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DIAGNOSIS_SEQUENCE]] + $ext)); - } else { - $this->addDiagnosisSequence(new FHIRPositiveInt($data[self::FIELD_DIAGNOSIS_SEQUENCE])); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -548,49 +566,65 @@ public function __construct($data = null) $this->addEncounter(new FHIRReference($data[self::FIELD_ENCOUNTER])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_INFORMATION_SEQUENCE])) { - $ext = (isset($data[self::FIELD_INFORMATION_SEQUENCE_EXT]) && is_array($data[self::FIELD_INFORMATION_SEQUENCE_EXT])) - ? $data[self::FIELD_INFORMATION_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_INFORMATION_SEQUENCE])) { - foreach($data[self::FIELD_INFORMATION_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addInformationSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInformationSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInformationSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INFORMATION_SEQUENCE]) || isset($data[self::FIELD_INFORMATION_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_INFORMATION_SEQUENCE])) { + $value = $data[self::FIELD_INFORMATION_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INFORMATION_SEQUENCE_EXT]) && is_array($data[self::FIELD_INFORMATION_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_INFORMATION_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addInformationSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addInformationSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInformationSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addInformationSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInformationSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addInformationSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addInformationSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInformationSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_INFORMATION_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addInformationSequence($data[self::FIELD_INFORMATION_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INFORMATION_SEQUENCE])) { - $this->addInformationSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_INFORMATION_SEQUENCE]] + $ext)); - } else { - $this->addInformationSequence(new FHIRPositiveInt($data[self::FIELD_INFORMATION_SEQUENCE])); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -639,33 +673,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_PROCEDURE_SEQUENCE])) { - $ext = (isset($data[self::FIELD_PROCEDURE_SEQUENCE_EXT]) && is_array($data[self::FIELD_PROCEDURE_SEQUENCE_EXT])) - ? $data[self::FIELD_PROCEDURE_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_PROCEDURE_SEQUENCE])) { - foreach($data[self::FIELD_PROCEDURE_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addProcedureSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProcedureSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProcedureSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROCEDURE_SEQUENCE]) || isset($data[self::FIELD_PROCEDURE_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_PROCEDURE_SEQUENCE])) { + $value = $data[self::FIELD_PROCEDURE_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROCEDURE_SEQUENCE_EXT]) && is_array($data[self::FIELD_PROCEDURE_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_PROCEDURE_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addProcedureSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addProcedureSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProcedureSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addProcedureSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProcedureSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addProcedureSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addProcedureSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProcedureSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_PROCEDURE_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addProcedureSequence($data[self::FIELD_PROCEDURE_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROCEDURE_SEQUENCE])) { - $this->addProcedureSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PROCEDURE_SEQUENCE]] + $ext)); - } else { - $this->addProcedureSequence(new FHIRPositiveInt($data[self::FIELD_PROCEDURE_SEQUENCE])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -707,36 +750,50 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); - } - } - if (isset($data[self::FIELD_SERVICED_DATE])) { - $ext = (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) - ? $data[self::FIELD_SERVICED_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICED_DATE] instanceof FHIRDate) { - $this->setServicedDate($data[self::FIELD_SERVICED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICED_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SERVICED_DATE]) || isset($data[self::FIELD_SERVICED_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICED_DATE])) { + $value = $data[self::FIELD_SERVICED_DATE]; } else { - $this->setServicedDate(new FHIRDate($data[self::FIELD_SERVICED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServicedDate($value); + } else if (is_array($value)) { + $this->setServicedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServicedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SERVICED_PERIOD])) { @@ -2233,64 +2290,102 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getCareTeamSequence())) { $a[self::FIELD_CARE_TEAM_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CARE_TEAM_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CARE_TEAM_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CARE_TEAM_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CARE_TEAM_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getDiagnosisSequence())) { $a[self::FIELD_DIAGNOSIS_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DIAGNOSIS_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DIAGNOSIS_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DIAGNOSIS_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DIAGNOSIS_SEQUENCE_EXT] = $encs; + } } if ([] !== ($vs = $this->getEncounter())) { - $a[self::FIELD_ENCOUNTER] = $vs; + $a[self::FIELD_ENCOUNTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENCOUNTER][] = $v; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getInformationSequence())) { $a[self::FIELD_INFORMATION_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INFORMATION_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INFORMATION_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INFORMATION_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INFORMATION_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getLocationAddress())) { $a[self::FIELD_LOCATION_ADDRESS] = $v; @@ -2302,31 +2397,51 @@ public function jsonSerialize() $a[self::FIELD_LOCATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getProcedureSequence())) { $a[self::FIELD_PROCEDURE_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROCEDURE_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROCEDURE_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROCEDURE_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROCEDURE_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -2336,15 +2451,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getServicedDate())) { $a[self::FIELD_SERVICED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICED_DATE_EXT] = $enc; } } @@ -2352,14 +2471,29 @@ public function jsonSerialize() $a[self::FIELD_SERVICED_PERIOD] = $v; } if ([] !== ($vs = $this->getSubSite())) { - $a[self::FIELD_SUB_SITE] = $vs; + $a[self::FIELD_SUB_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_SITE][] = $v; + } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php index e0cd7adada..bae2d958d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRClaimPayee extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php index ac7f2a7064..8fff53a6e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRClaimProcedure extends FHIRBackboneElement const FIELD_UDI = 'udi'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -189,20 +189,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { @@ -219,20 +226,27 @@ public function __construct($data = null) $this->setProcedureReference(new FHIRReference($data[self::FIELD_PROCEDURE_REFERENCE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -696,8 +710,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -709,16 +725,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php index cb6513e0e5..a5d5e02f33 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimRelated extends FHIRBackboneElement const FIELD_RELATIONSHIP = 'relationship'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -384,6 +384,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php index 8cfaa02b66..7386688262 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRClaimSubDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -267,20 +267,27 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -347,20 +354,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_UDI])) { @@ -1049,13 +1063,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; @@ -1064,7 +1086,13 @@ public function jsonSerialize() $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -1074,17 +1102,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfo.php index 44d13abeb4..ecfe8fc28d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRClaimSupportingInfo extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -291,36 +291,50 @@ public function __construct($data = null) $this->setReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; } - } - if (isset($data[self::FIELD_TIMING_DATE])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) - ? $data[self::FIELD_TIMING_DATE_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE] instanceof FHIRDate) { - $this->setTimingDate($data[self::FIELD_TIMING_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_TIMING_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate(array_merge($ext, $data[self::FIELD_TIMING_DATE]))); + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_TIMING_DATE]) || isset($data[self::FIELD_TIMING_DATE_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE])) { + $value = $data[self::FIELD_TIMING_DATE]; } else { - $this->setTimingDate(new FHIRDate($data[self::FIELD_TIMING_DATE])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setTimingDate($value); + } else if (is_array($value)) { + $this->setTimingDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -337,20 +351,27 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -367,20 +388,27 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -990,15 +1018,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getTimingDate())) { $a[self::FIELD_TIMING_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_EXT] = $enc; } } @@ -1010,8 +1042,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -1023,11 +1057,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php index c3bd266511..89b8ec8ed2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRClaimResponseAddItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -444,78 +444,103 @@ public function __construct($data = null) $this->addDetail(new FHIRClaimResponseDetail1($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DETAIL_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_EXT])) - ? $data[self::FIELD_DETAIL_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_DETAIL_SEQUENCE])) { - foreach($data[self::FIELD_DETAIL_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addDetailSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDetailSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DETAIL_SEQUENCE]) || isset($data[self::FIELD_DETAIL_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DETAIL_SEQUENCE])) { + $value = $data[self::FIELD_DETAIL_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DETAIL_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addDetailSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addDetailSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDetailSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDetailSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addDetailSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DETAIL_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addDetailSequence($data[self::FIELD_DETAIL_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DETAIL_SEQUENCE])) { - $this->addDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DETAIL_SEQUENCE]] + $ext)); - } else { - $this->addDetailSequence(new FHIRPositiveInt($data[self::FIELD_DETAIL_SEQUENCE])); - } - } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDetailSequence(new FHIRPositiveInt($iext)); } + } + } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_ITEM_SEQUENCE])) { - $ext = (isset($data[self::FIELD_ITEM_SEQUENCE_EXT]) && is_array($data[self::FIELD_ITEM_SEQUENCE_EXT])) - ? $data[self::FIELD_ITEM_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_ITEM_SEQUENCE])) { - foreach($data[self::FIELD_ITEM_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addItemSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addItemSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ITEM_SEQUENCE]) || isset($data[self::FIELD_ITEM_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_ITEM_SEQUENCE])) { + $value = $data[self::FIELD_ITEM_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ITEM_SEQUENCE_EXT]) && is_array($data[self::FIELD_ITEM_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_ITEM_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addItemSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addItemSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addItemSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addItemSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addItemSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addItemSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_ITEM_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addItemSequence($data[self::FIELD_ITEM_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ITEM_SEQUENCE])) { - $this->addItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_ITEM_SEQUENCE]] + $ext)); - } else { - $this->addItemSequence(new FHIRPositiveInt($data[self::FIELD_ITEM_SEQUENCE])); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -564,33 +589,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -643,20 +677,27 @@ public function __construct($data = null) $this->setQuantity(new FHIRQuantity($data[self::FIELD_QUANTITY])); } } - if (isset($data[self::FIELD_SERVICED_DATE])) { - $ext = (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) - ? $data[self::FIELD_SERVICED_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICED_DATE] instanceof FHIRDate) { - $this->setServicedDate($data[self::FIELD_SERVICED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICED_DATE]))); - } + if (isset($data[self::FIELD_SERVICED_DATE]) || isset($data[self::FIELD_SERVICED_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICED_DATE])) { + $value = $data[self::FIELD_SERVICED_DATE]; } else { - $this->setServicedDate(new FHIRDate($data[self::FIELD_SERVICED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServicedDate($value); + } else if (is_array($value)) { + $this->setServicedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServicedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SERVICED_PERIOD])) { @@ -684,33 +725,42 @@ public function __construct($data = null) $this->addSubSite(new FHIRCodeableConcept($data[self::FIELD_SUB_SITE])); } } - if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUBDETAIL_SEQUENCE_EXT])) - ? $data[self::FIELD_SUBDETAIL_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_SUBDETAIL_SEQUENCE])) { - foreach($data[self::FIELD_SUBDETAIL_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addSubdetailSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSubdetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSubdetailSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE]) || isset($data[self::FIELD_SUBDETAIL_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE])) { + $value = $data[self::FIELD_SUBDETAIL_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUBDETAIL_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SUBDETAIL_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addSubdetailSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addSubdetailSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSubdetailSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addSubdetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSubdetailSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addSubdetailSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addSubdetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSubdetailSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_SUBDETAIL_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addSubdetailSequence($data[self::FIELD_SUBDETAIL_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUBDETAIL_SEQUENCE])) { - $this->addSubdetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SUBDETAIL_SEQUENCE]] + $ext)); - } else { - $this->addSubdetailSequence(new FHIRPositiveInt($data[self::FIELD_SUBDETAIL_SEQUENCE])); } } if (isset($data[self::FIELD_UNIT_PRICE])) { @@ -2024,50 +2074,80 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getBodySite())) { $a[self::FIELD_BODY_SITE] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getDetailSequence())) { $a[self::FIELD_DETAIL_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DETAIL_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DETAIL_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DETAIL_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DETAIL_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getItemSequence())) { $a[self::FIELD_ITEM_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ITEM_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ITEM_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ITEM_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ITEM_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getLocationAddress())) { $a[self::FIELD_LOCATION_ADDRESS] = $v; @@ -2079,42 +2159,70 @@ public function jsonSerialize() $a[self::FIELD_LOCATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if ([] !== ($vs = $this->getProvider())) { - $a[self::FIELD_PROVIDER] = $vs; + $a[self::FIELD_PROVIDER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROVIDER][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } if (null !== ($v = $this->getServicedDate())) { $a[self::FIELD_SERVICED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICED_DATE_EXT] = $enc; } } @@ -2122,26 +2230,43 @@ public function jsonSerialize() $a[self::FIELD_SERVICED_PERIOD] = $v; } if ([] !== ($vs = $this->getSubSite())) { - $a[self::FIELD_SUB_SITE] = $vs; + $a[self::FIELD_SUB_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_SITE][] = $v; + } } if ([] !== ($vs = $this->getSubdetailSequence())) { $a[self::FIELD_SUBDETAIL_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUBDETAIL_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUBDETAIL_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUBDETAIL_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUBDETAIL_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php index a93b5db23d..1212484761 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRClaimResponseAdjudication extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -185,20 +185,27 @@ public function __construct($data = null) $this->setReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -485,11 +492,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php index de7adaf9b6..70cd10a591 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseDetail extends FHIRBackboneElement const FIELD_SUB_DETAIL = 'subDetail'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -175,49 +175,65 @@ public function __construct($data = null) $this->addAdjudication(new FHIRClaimResponseAdjudication($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_DETAIL_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_EXT])) - ? $data[self::FIELD_DETAIL_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_DETAIL_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setDetailSequence($data[self::FIELD_DETAIL_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL_SEQUENCE])) { - $this->setDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DETAIL_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL_SEQUENCE])) { - $this->setDetailSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DETAIL_SEQUENCE]))); - } + if (isset($data[self::FIELD_DETAIL_SEQUENCE]) || isset($data[self::FIELD_DETAIL_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DETAIL_SEQUENCE])) { + $value = $data[self::FIELD_DETAIL_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DETAIL_SEQUENCE_EXT]; } else { - $this->setDetailSequence(new FHIRPositiveInt($data[self::FIELD_DETAIL_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDetailSequence($value); + } else if (is_array($value)) { + $this->setDetailSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetailSequence(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_SUB_DETAIL])) { @@ -597,32 +613,57 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getDetailSequence())) { $a[self::FIELD_DETAIL_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DETAIL_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php index e8405646d3..61b84ea4e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRClaimResponseDetail1 extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -251,20 +251,27 @@ public function __construct($data = null) $this->addAdjudication(new FHIRClaimResponseAdjudication($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -292,33 +299,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -958,35 +974,57 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; @@ -995,11 +1033,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php index 544545155e..9e10bbc005 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRClaimResponseError extends FHIRBackboneElement const FIELD_SUB_DETAIL_SEQUENCE_EXT = '_subDetailSequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -170,52 +170,73 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DETAIL_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_EXT])) - ? $data[self::FIELD_DETAIL_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_DETAIL_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setDetailSequence($data[self::FIELD_DETAIL_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL_SEQUENCE])) { - $this->setDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DETAIL_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL_SEQUENCE])) { - $this->setDetailSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DETAIL_SEQUENCE]))); - } + if (isset($data[self::FIELD_DETAIL_SEQUENCE]) || isset($data[self::FIELD_DETAIL_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DETAIL_SEQUENCE])) { + $value = $data[self::FIELD_DETAIL_SEQUENCE]; } else { - $this->setDetailSequence(new FHIRPositiveInt($data[self::FIELD_DETAIL_SEQUENCE])); + $value = null; } - } - if (isset($data[self::FIELD_ITEM_SEQUENCE])) { - $ext = (isset($data[self::FIELD_ITEM_SEQUENCE_EXT]) && is_array($data[self::FIELD_ITEM_SEQUENCE_EXT])) - ? $data[self::FIELD_ITEM_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_ITEM_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setItemSequence($data[self::FIELD_ITEM_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ITEM_SEQUENCE])) { - $this->setItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_ITEM_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_ITEM_SEQUENCE])) { - $this->setItemSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_ITEM_SEQUENCE]))); - } + if (isset($data[self::FIELD_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DETAIL_SEQUENCE_EXT]; } else { - $this->setItemSequence(new FHIRPositiveInt($data[self::FIELD_ITEM_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDetailSequence($value); + } else if (is_array($value)) { + $this->setDetailSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetailSequence(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT])) - ? $data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SUB_DETAIL_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSubDetailSequence($data[self::FIELD_SUB_DETAIL_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { - $this->setSubDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SUB_DETAIL_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { - $this->setSubDetailSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SUB_DETAIL_SEQUENCE]))); + if (isset($data[self::FIELD_ITEM_SEQUENCE]) || isset($data[self::FIELD_ITEM_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_ITEM_SEQUENCE])) { + $value = $data[self::FIELD_ITEM_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ITEM_SEQUENCE_EXT]) && is_array($data[self::FIELD_ITEM_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_ITEM_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setItemSequence($value); + } else if (is_array($value)) { + $this->setItemSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setItemSequence(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE]) || isset($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { + $value = $data[self::FIELD_SUB_DETAIL_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT]; } else { - $this->setSubDetailSequence(new FHIRPositiveInt($data[self::FIELD_SUB_DETAIL_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSubDetailSequence($value); + } else if (is_array($value)) { + $this->setSubDetailSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSubDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubDetailSequence(new FHIRPositiveInt($ext)); } } } @@ -523,25 +544,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getDetailSequence())) { $a[self::FIELD_DETAIL_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DETAIL_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getItemSequence())) { $a[self::FIELD_ITEM_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_ITEM_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getSubDetailSequence())) { $a[self::FIELD_SUB_DETAIL_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SUB_DETAIL_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php index a02e69267a..4d7fd8930d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRClaimResponseInsurance extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -175,20 +175,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $ext = (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) - ? $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT] - : null; - if ($data[self::FIELD_BUSINESS_ARRANGEMENT] instanceof FHIRString) { - $this->setBusinessArrangement($data[self::FIELD_BUSINESS_ARRANGEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BUSINESS_ARRANGEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString(array_merge($ext, $data[self::FIELD_BUSINESS_ARRANGEMENT]))); - } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT]) || isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { + $value = $data[self::FIELD_BUSINESS_ARRANGEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + $ext = $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]; } else { - $this->setBusinessArrangement(new FHIRString($data[self::FIELD_BUSINESS_ARRANGEMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBusinessArrangement($value); + } else if (is_array($value)) { + $this->setBusinessArrangement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBusinessArrangement(new FHIRString($ext)); } } if (isset($data[self::FIELD_CLAIM_RESPONSE])) { @@ -205,36 +212,50 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_FOCAL])) { - $ext = (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) - ? $data[self::FIELD_FOCAL_EXT] - : null; - if ($data[self::FIELD_FOCAL] instanceof FHIRBoolean) { - $this->setFocal($data[self::FIELD_FOCAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FOCAL]] + $ext)); - } else if (is_array($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FOCAL]))); - } + if (isset($data[self::FIELD_FOCAL]) || isset($data[self::FIELD_FOCAL_EXT])) { + if (isset($data[self::FIELD_FOCAL])) { + $value = $data[self::FIELD_FOCAL]; } else { - $this->setFocal(new FHIRBoolean($data[self::FIELD_FOCAL])); + $value = null; } - } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); + if (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) { + $ext = $data[self::FIELD_FOCAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFocal($value); + } else if (is_array($value)) { + $this->setFocal(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFocal(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -571,8 +592,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBusinessArrangement())) { $a[self::FIELD_BUSINESS_ARRANGEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BUSINESS_ARRANGEMENT_EXT] = $enc; } } @@ -584,18 +607,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getFocal())) { $a[self::FIELD_FOCAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FOCAL_EXT] = $enc; } } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php index e9e5b47725..5df52573cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseItem extends FHIRBackboneElement const FIELD_NOTE_NUMBER_EXT = '_noteNumber'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -196,49 +196,65 @@ public function __construct($data = null) $this->addDetail(new FHIRClaimResponseDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_ITEM_SEQUENCE])) { - $ext = (isset($data[self::FIELD_ITEM_SEQUENCE_EXT]) && is_array($data[self::FIELD_ITEM_SEQUENCE_EXT])) - ? $data[self::FIELD_ITEM_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_ITEM_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setItemSequence($data[self::FIELD_ITEM_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ITEM_SEQUENCE])) { - $this->setItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_ITEM_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_ITEM_SEQUENCE])) { - $this->setItemSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_ITEM_SEQUENCE]))); - } + if (isset($data[self::FIELD_ITEM_SEQUENCE]) || isset($data[self::FIELD_ITEM_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_ITEM_SEQUENCE])) { + $value = $data[self::FIELD_ITEM_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ITEM_SEQUENCE_EXT]) && is_array($data[self::FIELD_ITEM_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_ITEM_SEQUENCE_EXT]; } else { - $this->setItemSequence(new FHIRPositiveInt($data[self::FIELD_ITEM_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setItemSequence($value); + } else if (is_array($value)) { + $this->setItemSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setItemSequence(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } } @@ -609,32 +625,57 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getItemSequence())) { $a[self::FIELD_ITEM_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_ITEM_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php index d83944cb08..533d434819 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRClaimResponsePayment extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -206,20 +206,27 @@ public function __construct($data = null) $this->setAmount(new FHIRMoney($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -583,8 +590,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -594,6 +603,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php index b52370add1..aab8c841e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRClaimResponseProcessNote extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -164,52 +164,73 @@ public function __construct($data = null) $this->setLanguage(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRPositiveInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setNumber(new FHIRPositiveInt($data[self::FIELD_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumber(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRNoteType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNoteType([FHIRNoteType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNoteType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRNoteType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNoteType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRNoteType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRNoteType([FHIRNoteType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRNoteType($ext)); } } } @@ -485,25 +506,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNoteType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNoteType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php index 01b505f35e..cf6676aaf0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRClaimResponseSubDetail extends FHIRBackboneElement const FIELD_SUB_DETAIL_SEQUENCE_EXT = '_subDetailSequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -160,49 +160,65 @@ public function __construct($data = null) $this->addAdjudication(new FHIRClaimResponseAdjudication($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } - if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT])) - ? $data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SUB_DETAIL_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSubDetailSequence($data[self::FIELD_SUB_DETAIL_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { - $this->setSubDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SUB_DETAIL_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { - $this->setSubDetailSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SUB_DETAIL_SEQUENCE]))); - } + if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE]) || isset($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { + $value = $data[self::FIELD_SUB_DETAIL_SEQUENCE]; } else { - $this->setSubDetailSequence(new FHIRPositiveInt($data[self::FIELD_SUB_DETAIL_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSubDetailSequence($value); + } else if (is_array($value)) { + $this->setSubDetailSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSubDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubDetailSequence(new FHIRPositiveInt($ext)); } } } @@ -498,30 +514,49 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getSubDetailSequence())) { $a[self::FIELD_SUB_DETAIL_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SUB_DETAIL_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1.php index 1b8049e7bc..b646f24fe9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRClaimResponseSubDetail1 extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -240,20 +240,27 @@ public function __construct($data = null) $this->addAdjudication(new FHIRClaimResponseAdjudication($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -281,33 +288,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -863,35 +879,57 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; @@ -902,6 +940,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotal.php index fcd76960c7..0d9eaa5733 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRClaimResponseTotal extends FHIRBackboneElement const FIELD_CATEGORY = 'category'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -330,6 +330,9 @@ public function jsonSerialize() if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php index b6354fc58a..6d2c4bdc9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRClinicalImpressionFinding extends FHIRBackboneElement const FIELD_ITEM_REFERENCE = 'itemReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -151,20 +151,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BASIS])) { - $ext = (isset($data[self::FIELD_BASIS_EXT]) && is_array($data[self::FIELD_BASIS_EXT])) - ? $data[self::FIELD_BASIS_EXT] - : null; - if ($data[self::FIELD_BASIS] instanceof FHIRString) { - $this->setBasis($data[self::FIELD_BASIS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASIS])) { - $this->setBasis(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BASIS]] + $ext)); - } else if (is_array($data[self::FIELD_BASIS])) { - $this->setBasis(new FHIRString(array_merge($ext, $data[self::FIELD_BASIS]))); - } + if (isset($data[self::FIELD_BASIS]) || isset($data[self::FIELD_BASIS_EXT])) { + if (isset($data[self::FIELD_BASIS])) { + $value = $data[self::FIELD_BASIS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BASIS_EXT]) && is_array($data[self::FIELD_BASIS_EXT])) { + $ext = $data[self::FIELD_BASIS_EXT]; } else { - $this->setBasis(new FHIRString($data[self::FIELD_BASIS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBasis($value); + } else if (is_array($value)) { + $this->setBasis(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBasis(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBasis(new FHIRString($ext)); } } if (isset($data[self::FIELD_ITEM_CODEABLE_CONCEPT])) { @@ -407,8 +414,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBasis())) { $a[self::FIELD_BASIS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BASIS_EXT] = $enc; } } @@ -418,6 +427,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItemReference())) { $a[self::FIELD_ITEM_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php index 02cc7a3c47..90867c1b25 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRClinicalImpressionInvestigation extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -374,7 +374,16 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php index 6e9a0bef6f..09fca206f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRCodeSystemConcept extends FHIRBackboneElement const FIELD_PROPERTY = 'property'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -190,20 +190,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONCEPT])) { @@ -224,20 +231,27 @@ public function __construct($data = null) $this->addConcept(new FHIRCodeSystemConcept($data[self::FIELD_CONCEPT])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRString) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRString(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRString($data[self::FIELD_DEFINITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRString($ext)); } } if (isset($data[self::FIELD_DESIGNATION])) { @@ -258,20 +272,27 @@ public function __construct($data = null) $this->addDesignation(new FHIRCodeSystemDesignation($data[self::FIELD_DESIGNATION])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROPERTY])) { @@ -772,33 +793,60 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if ([] !== ($vs = $this->getProperty())) { - $a[self::FIELD_PROPERTY] = $vs; + $a[self::FIELD_PROPERTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROPERTY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php index 9154c325fa..d6deecf97b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRCodeSystemDesignation extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -146,20 +146,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); - } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_USE])) { @@ -169,20 +176,27 @@ public function __construct($data = null) $this->setUse(new FHIRCoding($data[self::FIELD_USE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -424,8 +438,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } @@ -434,11 +450,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php index ebdf2aa150..9f131e0711 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRCodeSystemFilter extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -164,81 +164,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_OPERATOR])) { - $ext = (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) - ? $data[self::FIELD_OPERATOR_EXT] - : null; - if (is_array($data[self::FIELD_OPERATOR])) { - foreach($data[self::FIELD_OPERATOR] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRFilterOperator) { - $this->addOperator($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addOperator(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addOperator(new FHIRFilterOperator(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_OPERATOR]) || isset($data[self::FIELD_OPERATOR_EXT])) { + if (isset($data[self::FIELD_OPERATOR])) { + $value = $data[self::FIELD_OPERATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) { + $ext = $data[self::FIELD_OPERATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFilterOperator) { + $this->addOperator($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRFilterOperator) { + $this->addOperator($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addOperator(new FHIRFilterOperator(array_merge($v, $iext))); + } else { + $this->addOperator(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addOperator(new FHIRFilterOperator($v)); } + } elseif (is_array($value)) { + $this->addOperator(new FHIRFilterOperator(array_merge($ext, $value))); + } else { + $this->addOperator(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addOperator(new FHIRFilterOperator($iext)); } - } elseif ($data[self::FIELD_OPERATOR] instanceof FHIRFilterOperator) { - $this->addOperator($data[self::FIELD_OPERATOR]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_OPERATOR])) { - $this->addOperator(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $data[self::FIELD_OPERATOR]] + $ext)); - } else { - $this->addOperator(new FHIRFilterOperator($data[self::FIELD_OPERATOR])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -564,40 +594,57 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getOperator())) { $a[self::FIELD_OPERATOR] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_OPERATOR][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_OPERATOR_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRFilterOperator::FIELD_VALUE]) || array_key_exists(FHIRFilterOperator::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_OPERATOR_EXT][] = null; + unset($enc[FHIRFilterOperator::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_OPERATOR_EXT] = $encs; + } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php index 2eed91942f..3c22d8a48d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCodeSystemProperty extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -165,68 +165,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRPropertyType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRPropertyType([FHIRPropertyType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRPropertyType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setType(new FHIRPropertyType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPropertyType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRPropertyType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRPropertyType([FHIRPropertyType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRPropertyType($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -527,32 +555,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPropertyType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPropertyType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php index 8f775977b4..7401ebb6a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRCodeSystemProperty1 extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -219,52 +219,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODING])) { @@ -274,68 +295,96 @@ public function __construct($data = null) $this->setValueCoding(new FHIRCoding($data[self::FIELD_VALUE_CODING])); } } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -844,22 +893,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -868,32 +923,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php index 8b0efbe09d..993428909c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCommunicationPayload extends FHIRBackboneElement const FIELD_CONTENT_STRING_EXT = '_contentString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -161,20 +161,27 @@ public function __construct($data = null) $this->setContentReference(new FHIRReference($data[self::FIELD_CONTENT_REFERENCE])); } } - if (isset($data[self::FIELD_CONTENT_STRING])) { - $ext = (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) - ? $data[self::FIELD_CONTENT_STRING_EXT] - : null; - if ($data[self::FIELD_CONTENT_STRING] instanceof FHIRString) { - $this->setContentString($data[self::FIELD_CONTENT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTENT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString(array_merge($ext, $data[self::FIELD_CONTENT_STRING]))); - } + if (isset($data[self::FIELD_CONTENT_STRING]) || isset($data[self::FIELD_CONTENT_STRING_EXT])) { + if (isset($data[self::FIELD_CONTENT_STRING])) { + $value = $data[self::FIELD_CONTENT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) { + $ext = $data[self::FIELD_CONTENT_STRING_EXT]; } else { - $this->setContentString(new FHIRString($data[self::FIELD_CONTENT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setContentString($value); + } else if (is_array($value)) { + $this->setContentString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentString(new FHIRString($ext)); } } } @@ -409,11 +416,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getContentString())) { $a[self::FIELD_CONTENT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONTENT_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php index d0088b04e2..f8907d67f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCommunicationRequestPayload extends FHIRBackboneElement const FIELD_CONTENT_STRING_EXT = '_contentString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -161,20 +161,27 @@ public function __construct($data = null) $this->setContentReference(new FHIRReference($data[self::FIELD_CONTENT_REFERENCE])); } } - if (isset($data[self::FIELD_CONTENT_STRING])) { - $ext = (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) - ? $data[self::FIELD_CONTENT_STRING_EXT] - : null; - if ($data[self::FIELD_CONTENT_STRING] instanceof FHIRString) { - $this->setContentString($data[self::FIELD_CONTENT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTENT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString(array_merge($ext, $data[self::FIELD_CONTENT_STRING]))); - } + if (isset($data[self::FIELD_CONTENT_STRING]) || isset($data[self::FIELD_CONTENT_STRING_EXT])) { + if (isset($data[self::FIELD_CONTENT_STRING])) { + $value = $data[self::FIELD_CONTENT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) { + $ext = $data[self::FIELD_CONTENT_STRING_EXT]; } else { - $this->setContentString(new FHIRString($data[self::FIELD_CONTENT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setContentString($value); + } else if (is_array($value)) { + $this->setContentString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentString(new FHIRString($ext)); } } } @@ -409,11 +416,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getContentString())) { $a[self::FIELD_CONTENT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONTENT_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php index 9e6f7c8835..21e37edeb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCompartmentDefinitionResource extends FHIRBackboneElement const FIELD_PARAM_EXT = '_param'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -146,65 +146,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PARAM])) { - $ext = (isset($data[self::FIELD_PARAM_EXT]) && is_array($data[self::FIELD_PARAM_EXT])) - ? $data[self::FIELD_PARAM_EXT] - : null; - if (is_array($data[self::FIELD_PARAM])) { - foreach($data[self::FIELD_PARAM] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addParam($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addParam(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addParam(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PARAM]) || isset($data[self::FIELD_PARAM_EXT])) { + if (isset($data[self::FIELD_PARAM])) { + $value = $data[self::FIELD_PARAM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARAM_EXT]) && is_array($data[self::FIELD_PARAM_EXT])) { + $ext = $data[self::FIELD_PARAM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addParam($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addParam($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addParam(new FHIRString(array_merge($v, $iext))); + } else { + $this->addParam(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addParam(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addParam(new FHIRString(array_merge($ext, $value))); + } else { + $this->addParam(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addParam(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PARAM] instanceof FHIRString) { - $this->addParam($data[self::FIELD_PARAM]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PARAM])) { - $this->addParam(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARAM]] + $ext)); - } else { - $this->addParam(new FHIRString($data[self::FIELD_PARAM])); } } } @@ -492,32 +515,47 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getParam())) { $a[self::FIELD_PARAM] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PARAM][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PARAM_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PARAM_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PARAM_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php index 9e6648c78c..645f6e2c02 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRCompositionAttester extends FHIRBackboneElement const FIELD_TIME_EXT = '_time'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The way in which a person authenticated a composition. @@ -153,20 +153,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRCompositionAttestationMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRCompositionAttestationMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIRCompositionAttestationMode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionAttestationMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRCompositionAttestationMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRCompositionAttestationMode($ext)); } } if (isset($data[self::FIELD_PARTY])) { @@ -176,20 +183,27 @@ public function __construct($data = null) $this->setParty(new FHIRReference($data[self::FIELD_PARTY])); } } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRDateTime) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME]))); - } + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; } else { - $this->setTime(new FHIRDateTime($data[self::FIELD_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTime(new FHIRDateTime($ext)); } } } @@ -416,8 +430,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompositionAttestationMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompositionAttestationMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } @@ -426,11 +442,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php index 9c081b7a40..5131825c6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRCompositionEvent extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -487,14 +487,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php index 8b19cb8d6e..eb626f5918 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRCompositionRelatesTo extends FHIRBackboneElement const FIELD_TARGET_REFERENCE = 'targetReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The type of relationship between documents. @@ -153,20 +153,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRDocumentRelationshipType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRDocumentRelationshipType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentRelationshipType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRDocumentRelationshipType($ext)); } } if (isset($data[self::FIELD_TARGET_IDENTIFIER])) { @@ -393,8 +400,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentRelationshipType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } @@ -404,6 +413,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTargetReference())) { $a[self::FIELD_TARGET_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php index e00882b6c6..e01894a46f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRCompositionSection extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -321,20 +321,27 @@ public function __construct($data = null) $this->setFocus(new FHIRReference($data[self::FIELD_FOCUS])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRListMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIRListMode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRListMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRListMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRListMode($ext)); } } if (isset($data[self::FIELD_ORDERED_BY])) { @@ -369,20 +376,27 @@ public function __construct($data = null) $this->setText(new FHIRNarrative($data[self::FIELD_TEXT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -1017,7 +1031,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -1026,15 +1046,23 @@ public function jsonSerialize() $a[self::FIELD_EMPTY_REASON] = $v; } if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if (null !== ($v = $this->getFocus())) { $a[self::FIELD_FOCUS] = $v; } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRListMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRListMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } @@ -1042,18 +1070,29 @@ public function jsonSerialize() $a[self::FIELD_ORDERED_BY] = $v; } if ([] !== ($vs = $this->getSection())) { - $a[self::FIELD_SECTION] = $vs; + $a[self::FIELD_SECTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECTION][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v; } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php index 78a6f5b45d..80bdf2105c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRConceptMapDependsOn extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -165,68 +165,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_PROPERTY])) { - $ext = (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) - ? $data[self::FIELD_PROPERTY_EXT] - : null; - if ($data[self::FIELD_PROPERTY] instanceof FHIRUri) { - $this->setProperty($data[self::FIELD_PROPERTY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROPERTY]] + $ext)); - } else if (is_array($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRUri(array_merge($ext, $data[self::FIELD_PROPERTY]))); - } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setProperty(new FHIRUri($data[self::FIELD_PROPERTY])); + $ext = []; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRCanonical) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRCanonical(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PROPERTY]) || isset($data[self::FIELD_PROPERTY_EXT])) { + if (isset($data[self::FIELD_PROPERTY])) { + $value = $data[self::FIELD_PROPERTY]; } else { - $this->setSystem(new FHIRCanonical($data[self::FIELD_SYSTEM])); + $value = null; + } + if (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) { + $ext = $data[self::FIELD_PROPERTY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setProperty($value); + } else if (is_array($value)) { + $this->setProperty(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setProperty(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProperty(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -546,32 +574,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getProperty())) { $a[self::FIELD_PROPERTY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PROPERTY_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php index c6f4aaa744..0b9420533f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRConceptMapElement extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -146,36 +146,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -469,20 +483,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php index a0b172a74c..99eb4aed43 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConceptMapGroup extends FHIRBackboneElement const FIELD_UNMAPPED = 'unmapped'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A statement of relationships from one set of concepts to one or more other @@ -211,68 +211,96 @@ public function __construct($data = null) $this->addElement(new FHIRConceptMapElement($data[self::FIELD_ELEMENT])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); + $value = null; } - } - if (isset($data[self::FIELD_SOURCE_VERSION])) { - $ext = (isset($data[self::FIELD_SOURCE_VERSION_EXT]) && is_array($data[self::FIELD_SOURCE_VERSION_EXT])) - ? $data[self::FIELD_SOURCE_VERSION_EXT] - : null; - if ($data[self::FIELD_SOURCE_VERSION] instanceof FHIRString) { - $this->setSourceVersion($data[self::FIELD_SOURCE_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_VERSION])) { - $this->setSourceVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOURCE_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_VERSION])) { - $this->setSourceVersion(new FHIRString(array_merge($ext, $data[self::FIELD_SOURCE_VERSION]))); - } + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; } else { - $this->setSourceVersion(new FHIRString($data[self::FIELD_SOURCE_VERSION])); + $ext = []; } - } - if (isset($data[self::FIELD_TARGET])) { - $ext = (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) - ? $data[self::FIELD_TARGET_EXT] - : null; - if ($data[self::FIELD_TARGET] instanceof FHIRUri) { - $this->setTarget($data[self::FIELD_TARGET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET])) { - $this->setTarget(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_TARGET]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET])) { - $this->setTarget(new FHIRUri(array_merge($ext, $data[self::FIELD_TARGET]))); + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_VERSION]) || isset($data[self::FIELD_SOURCE_VERSION_EXT])) { + if (isset($data[self::FIELD_SOURCE_VERSION])) { + $value = $data[self::FIELD_SOURCE_VERSION]; } else { - $this->setTarget(new FHIRUri($data[self::FIELD_TARGET])); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_VERSION_EXT]) && is_array($data[self::FIELD_SOURCE_VERSION_EXT])) { + $ext = $data[self::FIELD_SOURCE_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSourceVersion($value); + } else if (is_array($value)) { + $this->setSourceVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSourceVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSourceVersion(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TARGET_VERSION])) { - $ext = (isset($data[self::FIELD_TARGET_VERSION_EXT]) && is_array($data[self::FIELD_TARGET_VERSION_EXT])) - ? $data[self::FIELD_TARGET_VERSION_EXT] - : null; - if ($data[self::FIELD_TARGET_VERSION] instanceof FHIRString) { - $this->setTargetVersion($data[self::FIELD_TARGET_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_VERSION])) { - $this->setTargetVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TARGET_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_VERSION])) { - $this->setTargetVersion(new FHIRString(array_merge($ext, $data[self::FIELD_TARGET_VERSION]))); + if (isset($data[self::FIELD_TARGET]) || isset($data[self::FIELD_TARGET_EXT])) { + if (isset($data[self::FIELD_TARGET])) { + $value = $data[self::FIELD_TARGET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) { + $ext = $data[self::FIELD_TARGET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setTarget($value); + } else if (is_array($value)) { + $this->setTarget(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setTarget(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTarget(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_TARGET_VERSION]) || isset($data[self::FIELD_TARGET_VERSION_EXT])) { + if (isset($data[self::FIELD_TARGET_VERSION])) { + $value = $data[self::FIELD_TARGET_VERSION]; } else { - $this->setTargetVersion(new FHIRString($data[self::FIELD_TARGET_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_TARGET_VERSION_EXT]) && is_array($data[self::FIELD_TARGET_VERSION_EXT])) { + $ext = $data[self::FIELD_TARGET_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTargetVersion($value); + } else if (is_array($value)) { + $this->setTargetVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTargetVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTargetVersion(new FHIRString($ext)); } } if (isset($data[self::FIELD_UNMAPPED])) { @@ -705,39 +733,56 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getSourceVersion())) { $a[self::FIELD_SOURCE_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOURCE_VERSION_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_TARGET_EXT] = $enc; } } if (null !== ($v = $this->getTargetVersion())) { $a[self::FIELD_TARGET_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TARGET_VERSION_EXT] = $enc; } } if (null !== ($v = $this->getUnmapped())) { $a[self::FIELD_UNMAPPED] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php index 818c50b644..9ab9514db3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRConceptMapTarget extends FHIRBackboneElement const FIELD_PRODUCT = 'product'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -191,36 +191,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_DEPENDS_ON])) { @@ -241,36 +255,50 @@ public function __construct($data = null) $this->addDependsOn(new FHIRConceptMapDependsOn($data[self::FIELD_DEPENDS_ON])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_EQUIVALENCE])) { - $ext = (isset($data[self::FIELD_EQUIVALENCE_EXT]) && is_array($data[self::FIELD_EQUIVALENCE_EXT])) - ? $data[self::FIELD_EQUIVALENCE_EXT] - : null; - if ($data[self::FIELD_EQUIVALENCE] instanceof FHIRConceptMapEquivalence) { - $this->setEquivalence($data[self::FIELD_EQUIVALENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EQUIVALENCE])) { - $this->setEquivalence(new FHIRConceptMapEquivalence([FHIRConceptMapEquivalence::FIELD_VALUE => $data[self::FIELD_EQUIVALENCE]] + $ext)); - } else if (is_array($data[self::FIELD_EQUIVALENCE])) { - $this->setEquivalence(new FHIRConceptMapEquivalence(array_merge($ext, $data[self::FIELD_EQUIVALENCE]))); + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EQUIVALENCE]) || isset($data[self::FIELD_EQUIVALENCE_EXT])) { + if (isset($data[self::FIELD_EQUIVALENCE])) { + $value = $data[self::FIELD_EQUIVALENCE]; } else { - $this->setEquivalence(new FHIRConceptMapEquivalence($data[self::FIELD_EQUIVALENCE])); + $value = null; + } + if (isset($data[self::FIELD_EQUIVALENCE_EXT]) && is_array($data[self::FIELD_EQUIVALENCE_EXT])) { + $ext = $data[self::FIELD_EQUIVALENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConceptMapEquivalence) { + $this->setEquivalence($value); + } else if (is_array($value)) { + $this->setEquivalence(new FHIRConceptMapEquivalence(array_merge($ext, $value))); + } else { + $this->setEquivalence(new FHIRConceptMapEquivalence([FHIRConceptMapEquivalence::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEquivalence(new FHIRConceptMapEquivalence($ext)); } } if (isset($data[self::FIELD_PRODUCT])) { @@ -738,37 +766,60 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getDependsOn())) { - $a[self::FIELD_DEPENDS_ON] = $vs; + $a[self::FIELD_DEPENDS_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEPENDS_ON][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getEquivalence())) { $a[self::FIELD_EQUIVALENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConceptMapEquivalence::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConceptMapEquivalence::FIELD_VALUE]); $a[self::FIELD_EQUIVALENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getProduct())) { - $a[self::FIELD_PRODUCT] = $vs; + $a[self::FIELD_PRODUCT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRODUCT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php index 64662a599d..9de17edf0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConceptMapUnmapped extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -169,68 +169,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRConceptMapGroupUnmappedMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRConceptMapGroupUnmappedMode([FHIRConceptMapGroupUnmappedMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRConceptMapGroupUnmappedMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setMode(new FHIRConceptMapGroupUnmappedMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRCanonical) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRCanonical(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConceptMapGroupUnmappedMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRConceptMapGroupUnmappedMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRConceptMapGroupUnmappedMode([FHIRConceptMapGroupUnmappedMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRConceptMapGroupUnmappedMode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRCanonical($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRCanonical($ext)); } } } @@ -539,32 +567,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConceptMapGroupUnmappedMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConceptMapGroupUnmappedMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php index 9eb3fb2d93..3ec90de9f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRConditionEvidence extends FHIRBackboneElement const FIELD_DETAIL = 'detail'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -402,10 +402,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php index 9747bf8fad..61e4dc8737 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRConditionStage extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -422,7 +422,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAssessment())) { - $a[self::FIELD_ASSESSMENT] = $vs; + $a[self::FIELD_ASSESSMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ASSESSMENT][] = $v; + } } if (null !== ($v = $this->getSummary())) { $a[self::FIELD_SUMMARY] = $v; @@ -430,6 +436,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php index acdcd9962e..d0dac11b87 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRConsentActor extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -328,6 +328,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php index f504f3c2e5..000ffae81a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConsentData extends FHIRBackboneElement const FIELD_REFERENCE = 'reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How a resource reference is interpreted when testing consent restrictions. @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MEANING])) { - $ext = (isset($data[self::FIELD_MEANING_EXT]) && is_array($data[self::FIELD_MEANING_EXT])) - ? $data[self::FIELD_MEANING_EXT] - : null; - if ($data[self::FIELD_MEANING] instanceof FHIRConsentDataMeaning) { - $this->setMeaning($data[self::FIELD_MEANING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEANING])) { - $this->setMeaning(new FHIRConsentDataMeaning([FHIRConsentDataMeaning::FIELD_VALUE => $data[self::FIELD_MEANING]] + $ext)); - } else if (is_array($data[self::FIELD_MEANING])) { - $this->setMeaning(new FHIRConsentDataMeaning(array_merge($ext, $data[self::FIELD_MEANING]))); - } + if (isset($data[self::FIELD_MEANING]) || isset($data[self::FIELD_MEANING_EXT])) { + if (isset($data[self::FIELD_MEANING])) { + $value = $data[self::FIELD_MEANING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MEANING_EXT]) && is_array($data[self::FIELD_MEANING_EXT])) { + $ext = $data[self::FIELD_MEANING_EXT]; } else { - $this->setMeaning(new FHIRConsentDataMeaning($data[self::FIELD_MEANING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConsentDataMeaning) { + $this->setMeaning($value); + } else if (is_array($value)) { + $this->setMeaning(new FHIRConsentDataMeaning(array_merge($ext, $value))); + } else { + $this->setMeaning(new FHIRConsentDataMeaning([FHIRConsentDataMeaning::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeaning(new FHIRConsentDataMeaning($ext)); } } if (isset($data[self::FIELD_REFERENCE])) { @@ -322,14 +329,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMeaning())) { $a[self::FIELD_MEANING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConsentDataMeaning::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConsentDataMeaning::FIELD_VALUE]); $a[self::FIELD_MEANING_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php index e8f5243467..154aec3376 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConsentPolicy extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORITY])) { - $ext = (isset($data[self::FIELD_AUTHORITY_EXT]) && is_array($data[self::FIELD_AUTHORITY_EXT])) - ? $data[self::FIELD_AUTHORITY_EXT] - : null; - if ($data[self::FIELD_AUTHORITY] instanceof FHIRUri) { - $this->setAuthority($data[self::FIELD_AUTHORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORITY])) { - $this->setAuthority(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_AUTHORITY]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORITY])) { - $this->setAuthority(new FHIRUri(array_merge($ext, $data[self::FIELD_AUTHORITY]))); - } + if (isset($data[self::FIELD_AUTHORITY]) || isset($data[self::FIELD_AUTHORITY_EXT])) { + if (isset($data[self::FIELD_AUTHORITY])) { + $value = $data[self::FIELD_AUTHORITY]; } else { - $this->setAuthority(new FHIRUri($data[self::FIELD_AUTHORITY])); + $value = null; } - } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_AUTHORITY_EXT]) && is_array($data[self::FIELD_AUTHORITY_EXT])) { + $ext = $data[self::FIELD_AUTHORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setAuthority($value); + } else if (is_array($value)) { + $this->setAuthority(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setAuthority(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAuthority(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -369,18 +383,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthority())) { $a[self::FIELD_AUTHORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_AUTHORITY_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvision.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvision.php index 5603043e2d..3d3559893e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvision.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvision.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRConsentProvision extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -408,20 +408,27 @@ public function __construct($data = null) $this->addSecurityLabel(new FHIRCoding($data[self::FIELD_SECURITY_LABEL])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRConsentProvisionType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRConsentProvisionType([FHIRConsentProvisionType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRConsentProvisionType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRConsentProvisionType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConsentProvisionType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRConsentProvisionType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRConsentProvisionType([FHIRConsentProvisionType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRConsentProvisionType($ext)); } } } @@ -1204,19 +1211,49 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if ([] !== ($vs = $this->getActor())) { - $a[self::FIELD_ACTOR] = $vs; + $a[self::FIELD_ACTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTOR][] = $v; + } } if ([] !== ($vs = $this->getClass())) { - $a[self::FIELD_CLASS] = $vs; + $a[self::FIELD_CLASS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CLASS][] = $v; + } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getData())) { - $a[self::FIELD_DATA] = $vs; + $a[self::FIELD_DATA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA][] = $v; + } } if (null !== ($v = $this->getDataPeriod())) { $a[self::FIELD_DATA_PERIOD] = $v; @@ -1225,21 +1262,44 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getProvision())) { - $a[self::FIELD_PROVISION] = $vs; + $a[self::FIELD_PROVISION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROVISION][] = $v; + } } if ([] !== ($vs = $this->getPurpose())) { - $a[self::FIELD_PURPOSE] = $vs; + $a[self::FIELD_PURPOSE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PURPOSE][] = $v; + } } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConsentProvisionType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConsentProvisionType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerification.php index e863e5ca09..f898befa9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRConsentVerification extends FHIRBackboneElement const FIELD_VERIFIED_WITH = 'verifiedWith'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -147,36 +147,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_VERIFICATION_DATE])) { - $ext = (isset($data[self::FIELD_VERIFICATION_DATE_EXT]) && is_array($data[self::FIELD_VERIFICATION_DATE_EXT])) - ? $data[self::FIELD_VERIFICATION_DATE_EXT] - : null; - if ($data[self::FIELD_VERIFICATION_DATE] instanceof FHIRDateTime) { - $this->setVerificationDate($data[self::FIELD_VERIFICATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERIFICATION_DATE])) { - $this->setVerificationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VERIFICATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VERIFICATION_DATE])) { - $this->setVerificationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VERIFICATION_DATE]))); - } + if (isset($data[self::FIELD_VERIFICATION_DATE]) || isset($data[self::FIELD_VERIFICATION_DATE_EXT])) { + if (isset($data[self::FIELD_VERIFICATION_DATE])) { + $value = $data[self::FIELD_VERIFICATION_DATE]; } else { - $this->setVerificationDate(new FHIRDateTime($data[self::FIELD_VERIFICATION_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VERIFIED])) { - $ext = (isset($data[self::FIELD_VERIFIED_EXT]) && is_array($data[self::FIELD_VERIFIED_EXT])) - ? $data[self::FIELD_VERIFIED_EXT] - : null; - if ($data[self::FIELD_VERIFIED] instanceof FHIRBoolean) { - $this->setVerified($data[self::FIELD_VERIFIED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERIFIED])) { - $this->setVerified(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VERIFIED]] + $ext)); - } else if (is_array($data[self::FIELD_VERIFIED])) { - $this->setVerified(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VERIFIED]))); + if (isset($data[self::FIELD_VERIFICATION_DATE_EXT]) && is_array($data[self::FIELD_VERIFICATION_DATE_EXT])) { + $ext = $data[self::FIELD_VERIFICATION_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setVerificationDate($value); + } else if (is_array($value)) { + $this->setVerificationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setVerificationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setVerificationDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VERIFIED]) || isset($data[self::FIELD_VERIFIED_EXT])) { + if (isset($data[self::FIELD_VERIFIED])) { + $value = $data[self::FIELD_VERIFIED]; } else { - $this->setVerified(new FHIRBoolean($data[self::FIELD_VERIFIED])); + $value = null; + } + if (isset($data[self::FIELD_VERIFIED_EXT]) && is_array($data[self::FIELD_VERIFIED_EXT])) { + $ext = $data[self::FIELD_VERIFIED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setVerified($value); + } else if (is_array($value)) { + $this->setVerified(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setVerified(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVerified(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VERIFIED_WITH])) { @@ -426,21 +440,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getVerificationDate())) { $a[self::FIELD_VERIFICATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VERIFICATION_DATE_EXT] = $enc; } } if (null !== ($v = $this->getVerified())) { $a[self::FIELD_VERIFIED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VERIFIED_EXT] = $enc; } } if (null !== ($v = $this->getVerifiedWith())) { $a[self::FIELD_VERIFIED_WITH] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAction.php index e28b32d4c9..856612b9f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRContractAction extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -427,49 +427,65 @@ public function __construct($data = null) $this->setContext(new FHIRReference($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_CONTEXT_LINK_ID])) { - $ext = (isset($data[self::FIELD_CONTEXT_LINK_ID_EXT]) && is_array($data[self::FIELD_CONTEXT_LINK_ID_EXT])) - ? $data[self::FIELD_CONTEXT_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_CONTEXT_LINK_ID])) { - foreach($data[self::FIELD_CONTEXT_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addContextLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addContextLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addContextLinkId(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CONTEXT_LINK_ID]) || isset($data[self::FIELD_CONTEXT_LINK_ID_EXT])) { + if (isset($data[self::FIELD_CONTEXT_LINK_ID])) { + $value = $data[self::FIELD_CONTEXT_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_LINK_ID_EXT]) && is_array($data[self::FIELD_CONTEXT_LINK_ID_EXT])) { + $ext = $data[self::FIELD_CONTEXT_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addContextLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addContextLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addContextLinkId(new FHIRString(array_merge($v, $iext))); + } else { + $this->addContextLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addContextLinkId(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addContextLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->addContextLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_CONTEXT_LINK_ID] instanceof FHIRString) { - $this->addContextLinkId($data[self::FIELD_CONTEXT_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONTEXT_LINK_ID])) { - $this->addContextLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTEXT_LINK_ID]] + $ext)); - } else { - $this->addContextLinkId(new FHIRString($data[self::FIELD_CONTEXT_LINK_ID])); - } - } - if (isset($data[self::FIELD_DO_NOT_PERFORM])) { - $ext = (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) - ? $data[self::FIELD_DO_NOT_PERFORM_EXT] - : null; - if ($data[self::FIELD_DO_NOT_PERFORM] instanceof FHIRBoolean) { - $this->setDoNotPerform($data[self::FIELD_DO_NOT_PERFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DO_NOT_PERFORM]] + $ext)); - } else if (is_array($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DO_NOT_PERFORM]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addContextLinkId(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_DO_NOT_PERFORM]) || isset($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + if (isset($data[self::FIELD_DO_NOT_PERFORM])) { + $value = $data[self::FIELD_DO_NOT_PERFORM]; } else { - $this->setDoNotPerform(new FHIRBoolean($data[self::FIELD_DO_NOT_PERFORM])); + $value = null; + } + if (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + $ext = $data[self::FIELD_DO_NOT_PERFORM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDoNotPerform($value); + } else if (is_array($value)) { + $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoNotPerform(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_INTENT])) { @@ -479,33 +495,42 @@ public function __construct($data = null) $this->setIntent(new FHIRCodeableConcept($data[self::FIELD_INTENT])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_LINK_ID])) { - foreach($data[self::FIELD_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLinkId(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLinkId(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLinkId(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLinkId(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->addLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINK_ID])) { - $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else { - $this->addLinkId(new FHIRString($data[self::FIELD_LINK_ID])); } } if (isset($data[self::FIELD_NOTE])) { @@ -526,20 +551,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -563,33 +595,42 @@ public function __construct($data = null) $this->setPerformer(new FHIRReference($data[self::FIELD_PERFORMER])); } } - if (isset($data[self::FIELD_PERFORMER_LINK_ID])) { - $ext = (isset($data[self::FIELD_PERFORMER_LINK_ID_EXT]) && is_array($data[self::FIELD_PERFORMER_LINK_ID_EXT])) - ? $data[self::FIELD_PERFORMER_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_PERFORMER_LINK_ID])) { - foreach($data[self::FIELD_PERFORMER_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPerformerLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPerformerLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPerformerLinkId(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PERFORMER_LINK_ID]) || isset($data[self::FIELD_PERFORMER_LINK_ID_EXT])) { + if (isset($data[self::FIELD_PERFORMER_LINK_ID])) { + $value = $data[self::FIELD_PERFORMER_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERFORMER_LINK_ID_EXT]) && is_array($data[self::FIELD_PERFORMER_LINK_ID_EXT])) { + $ext = $data[self::FIELD_PERFORMER_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPerformerLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPerformerLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPerformerLinkId(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPerformerLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPerformerLinkId(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPerformerLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPerformerLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPerformerLinkId(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PERFORMER_LINK_ID] instanceof FHIRString) { - $this->addPerformerLinkId($data[self::FIELD_PERFORMER_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PERFORMER_LINK_ID])) { - $this->addPerformerLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PERFORMER_LINK_ID]] + $ext)); - } else { - $this->addPerformerLinkId(new FHIRString($data[self::FIELD_PERFORMER_LINK_ID])); } } if (isset($data[self::FIELD_PERFORMER_ROLE])) { @@ -617,33 +658,42 @@ public function __construct($data = null) $this->addPerformerType(new FHIRCodeableConcept($data[self::FIELD_PERFORMER_TYPE])); } } - if (isset($data[self::FIELD_REASON])) { - $ext = (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) - ? $data[self::FIELD_REASON_EXT] - : null; - if (is_array($data[self::FIELD_REASON])) { - foreach($data[self::FIELD_REASON] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addReason($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addReason(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addReason(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_REASON]) || isset($data[self::FIELD_REASON_EXT])) { + if (isset($data[self::FIELD_REASON])) { + $value = $data[self::FIELD_REASON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) { + $ext = $data[self::FIELD_REASON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addReason($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addReason($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addReason(new FHIRString(array_merge($v, $iext))); + } else { + $this->addReason(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addReason(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->addReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addReason(new FHIRString($iext)); } - } elseif ($data[self::FIELD_REASON] instanceof FHIRString) { - $this->addReason($data[self::FIELD_REASON]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REASON])) { - $this->addReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REASON]] + $ext)); - } else { - $this->addReason(new FHIRString($data[self::FIELD_REASON])); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -664,33 +714,42 @@ public function __construct($data = null) $this->addReasonCode(new FHIRCodeableConcept($data[self::FIELD_REASON_CODE])); } } - if (isset($data[self::FIELD_REASON_LINK_ID])) { - $ext = (isset($data[self::FIELD_REASON_LINK_ID_EXT]) && is_array($data[self::FIELD_REASON_LINK_ID_EXT])) - ? $data[self::FIELD_REASON_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_REASON_LINK_ID])) { - foreach($data[self::FIELD_REASON_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addReasonLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addReasonLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addReasonLinkId(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_REASON_LINK_ID]) || isset($data[self::FIELD_REASON_LINK_ID_EXT])) { + if (isset($data[self::FIELD_REASON_LINK_ID])) { + $value = $data[self::FIELD_REASON_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REASON_LINK_ID_EXT]) && is_array($data[self::FIELD_REASON_LINK_ID_EXT])) { + $ext = $data[self::FIELD_REASON_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addReasonLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addReasonLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addReasonLinkId(new FHIRString(array_merge($v, $iext))); + } else { + $this->addReasonLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addReasonLinkId(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addReasonLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->addReasonLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addReasonLinkId(new FHIRString($iext)); } - } elseif ($data[self::FIELD_REASON_LINK_ID] instanceof FHIRString) { - $this->addReasonLinkId($data[self::FIELD_REASON_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REASON_LINK_ID])) { - $this->addReasonLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REASON_LINK_ID]] + $ext)); - } else { - $this->addReasonLinkId(new FHIRString($data[self::FIELD_REASON_LINK_ID])); } } if (isset($data[self::FIELD_REASON_REFERENCE])) { @@ -729,62 +788,80 @@ public function __construct($data = null) $this->addRequester(new FHIRReference($data[self::FIELD_REQUESTER])); } } - if (isset($data[self::FIELD_REQUESTER_LINK_ID])) { - $ext = (isset($data[self::FIELD_REQUESTER_LINK_ID_EXT]) && is_array($data[self::FIELD_REQUESTER_LINK_ID_EXT])) - ? $data[self::FIELD_REQUESTER_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_REQUESTER_LINK_ID])) { - foreach($data[self::FIELD_REQUESTER_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addRequesterLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addRequesterLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addRequesterLinkId(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_REQUESTER_LINK_ID]) || isset($data[self::FIELD_REQUESTER_LINK_ID_EXT])) { + if (isset($data[self::FIELD_REQUESTER_LINK_ID])) { + $value = $data[self::FIELD_REQUESTER_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUESTER_LINK_ID_EXT]) && is_array($data[self::FIELD_REQUESTER_LINK_ID_EXT])) { + $ext = $data[self::FIELD_REQUESTER_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addRequesterLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addRequesterLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addRequesterLinkId(new FHIRString(array_merge($v, $iext))); + } else { + $this->addRequesterLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addRequesterLinkId(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addRequesterLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->addRequesterLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addRequesterLinkId(new FHIRString($iext)); } - } elseif ($data[self::FIELD_REQUESTER_LINK_ID] instanceof FHIRString) { - $this->addRequesterLinkId($data[self::FIELD_REQUESTER_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REQUESTER_LINK_ID])) { - $this->addRequesterLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUESTER_LINK_ID]] + $ext)); - } else { - $this->addRequesterLinkId(new FHIRString($data[self::FIELD_REQUESTER_LINK_ID])); } } - if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - $ext = (isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]) && is_array($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) - ? $data[self::FIELD_SECURITY_LABEL_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - foreach($data[self::FIELD_SECURITY_LABEL_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUnsignedInt) { - $this->addSecurityLabelNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER]) || isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) { + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER])) { + $value = $data[self::FIELD_SECURITY_LABEL_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]) && is_array($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) { + $ext = $data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->addSecurityLabelNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUnsignedInt) { + $this->addSecurityLabelNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($v, $iext))); + } else { + $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSecurityLabelNumber(new FHIRUnsignedInt($v)); } + } elseif (is_array($value)) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt($iext)); } - } elseif ($data[self::FIELD_SECURITY_LABEL_NUMBER] instanceof FHIRUnsignedInt) { - $this->addSecurityLabelNumber($data[self::FIELD_SECURITY_LABEL_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_SECURITY_LABEL_NUMBER]] + $ext)); - } else { - $this->addSecurityLabelNumber(new FHIRUnsignedInt($data[self::FIELD_SECURITY_LABEL_NUMBER])); } } if (isset($data[self::FIELD_STATUS])) { @@ -2320,23 +2397,33 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getContextLinkId())) { $a[self::FIELD_CONTEXT_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONTEXT_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONTEXT_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONTEXT_LINK_ID_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONTEXT_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getDoNotPerform())) { $a[self::FIELD_DO_NOT_PERFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DO_NOT_PERFORM_EXT] = $enc; } } @@ -2345,26 +2432,42 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINK_ID_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -2379,103 +2482,176 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPerformerLinkId())) { $a[self::FIELD_PERFORMER_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PERFORMER_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PERFORMER_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PERFORMER_LINK_ID_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PERFORMER_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getPerformerRole())) { $a[self::FIELD_PERFORMER_ROLE] = $v; } if ([] !== ($vs = $this->getPerformerType())) { - $a[self::FIELD_PERFORMER_TYPE] = $vs; + $a[self::FIELD_PERFORMER_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER_TYPE][] = $v; + } } if ([] !== ($vs = $this->getReason())) { $a[self::FIELD_REASON] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REASON][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REASON_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REASON_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REASON_EXT] = $encs; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonLinkId())) { $a[self::FIELD_REASON_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REASON_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REASON_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REASON_LINK_ID_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REASON_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getRequester())) { - $a[self::FIELD_REQUESTER] = $vs; + $a[self::FIELD_REQUESTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUESTER][] = $v; + } } if ([] !== ($vs = $this->getRequesterLinkId())) { $a[self::FIELD_REQUESTER_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REQUESTER_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REQUESTER_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REQUESTER_LINK_ID_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REQUESTER_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getSecurityLabelNumber())) { $a[self::FIELD_SECURITY_LABEL_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SECURITY_LABEL_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUnsignedInt::FIELD_VALUE]) || array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT][] = null; + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v; } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswer.php index 1fcd51d08d..2b97cc7dd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRContractAnswer extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -315,20 +315,27 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODING])) { @@ -338,68 +345,96 @@ public function __construct($data = null) $this->setValueCoding(new FHIRCoding($data[self::FIELD_VALUE_CODING])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -416,52 +451,73 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -1205,8 +1261,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -1215,29 +1273,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } @@ -1249,25 +1315,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAsset.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAsset.php index 69629be05c..f3a6b0732d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAsset.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAsset.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRContractAsset extends FHIRBackboneElement const FIELD_VALUED_ITEM = 'valuedItem'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a @@ -317,20 +317,27 @@ public function __construct($data = null) $this->addAnswer(new FHIRContractAnswer($data[self::FIELD_ANSWER])); } } - if (isset($data[self::FIELD_CONDITION])) { - $ext = (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) - ? $data[self::FIELD_CONDITION_EXT] - : null; - if ($data[self::FIELD_CONDITION] instanceof FHIRString) { - $this->setCondition($data[self::FIELD_CONDITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITION])) { - $this->setCondition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONDITION]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITION])) { - $this->setCondition(new FHIRString(array_merge($ext, $data[self::FIELD_CONDITION]))); - } + if (isset($data[self::FIELD_CONDITION]) || isset($data[self::FIELD_CONDITION_EXT])) { + if (isset($data[self::FIELD_CONDITION])) { + $value = $data[self::FIELD_CONDITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) { + $ext = $data[self::FIELD_CONDITION_EXT]; } else { - $this->setCondition(new FHIRString($data[self::FIELD_CONDITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCondition($value); + } else if (is_array($value)) { + $this->setCondition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCondition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCondition(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONTEXT])) { @@ -351,33 +358,42 @@ public function __construct($data = null) $this->addContext(new FHIRContractContext($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_LINK_ID])) { - foreach($data[self::FIELD_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLinkId(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLinkId(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLinkId(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLinkId(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->addLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINK_ID])) { - $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else { - $this->addLinkId(new FHIRString($data[self::FIELD_LINK_ID])); } } if (isset($data[self::FIELD_PERIOD])) { @@ -430,33 +446,42 @@ public function __construct($data = null) $this->setScope(new FHIRCodeableConcept($data[self::FIELD_SCOPE])); } } - if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - $ext = (isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]) && is_array($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) - ? $data[self::FIELD_SECURITY_LABEL_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - foreach($data[self::FIELD_SECURITY_LABEL_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUnsignedInt) { - $this->addSecurityLabelNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER]) || isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) { + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER])) { + $value = $data[self::FIELD_SECURITY_LABEL_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]) && is_array($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) { + $ext = $data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->addSecurityLabelNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUnsignedInt) { + $this->addSecurityLabelNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($v, $iext))); + } else { + $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSecurityLabelNumber(new FHIRUnsignedInt($v)); } + } elseif (is_array($value)) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt($iext)); } - } elseif ($data[self::FIELD_SECURITY_LABEL_NUMBER] instanceof FHIRUnsignedInt) { - $this->addSecurityLabelNumber($data[self::FIELD_SECURITY_LABEL_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_SECURITY_LABEL_NUMBER]] + $ext)); - } else { - $this->addSecurityLabelNumber(new FHIRUnsignedInt($data[self::FIELD_SECURITY_LABEL_NUMBER])); } } if (isset($data[self::FIELD_SUBTYPE])) { @@ -477,20 +502,27 @@ public function __construct($data = null) $this->addSubtype(new FHIRCodeableConcept($data[self::FIELD_SUBTYPE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1624,38 +1656,72 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAnswer())) { - $a[self::FIELD_ANSWER] = $vs; + $a[self::FIELD_ANSWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ANSWER][] = $v; + } } if (null !== ($v = $this->getCondition())) { $a[self::FIELD_CONDITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONDITION_EXT] = $enc; } } if ([] !== ($vs = $this->getContext())) { - $a[self::FIELD_CONTEXT] = $vs; + $a[self::FIELD_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTEXT][] = $v; + } } if ([] !== ($vs = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINK_ID_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getPeriod())) { - $a[self::FIELD_PERIOD] = $vs; + $a[self::FIELD_PERIOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERIOD][] = $v; + } } if ([] !== ($vs = $this->getPeriodType())) { - $a[self::FIELD_PERIOD_TYPE] = $vs; + $a[self::FIELD_PERIOD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERIOD_TYPE][] = $v; + } } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; @@ -1665,40 +1731,83 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getSecurityLabelNumber())) { $a[self::FIELD_SECURITY_LABEL_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SECURITY_LABEL_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUnsignedInt::FIELD_VALUE]) || array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT][] = null; + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT] = $encs; + } } if ([] !== ($vs = $this->getSubtype())) { - $a[self::FIELD_SUBTYPE] = $vs; + $a[self::FIELD_SUBTYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBTYPE][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if ([] !== ($vs = $this->getTypeReference())) { - $a[self::FIELD_TYPE_REFERENCE] = $vs; + $a[self::FIELD_TYPE_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getUsePeriod())) { - $a[self::FIELD_USE_PERIOD] = $vs; + $a[self::FIELD_USE_PERIOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_PERIOD][] = $v; + } } if ([] !== ($vs = $this->getValuedItem())) { - $a[self::FIELD_VALUED_ITEM] = $vs; + $a[self::FIELD_VALUED_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUED_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinition.php index 19add1abdc..d822727556 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRContractContentDefinition extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string that may contain Github Flavored Markdown syntax for optional @@ -200,52 +200,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_PUBLICATION_DATE])) { - $ext = (isset($data[self::FIELD_PUBLICATION_DATE_EXT]) && is_array($data[self::FIELD_PUBLICATION_DATE_EXT])) - ? $data[self::FIELD_PUBLICATION_DATE_EXT] - : null; - if ($data[self::FIELD_PUBLICATION_DATE] instanceof FHIRDateTime) { - $this->setPublicationDate($data[self::FIELD_PUBLICATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLICATION_DATE])) { - $this->setPublicationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PUBLICATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLICATION_DATE])) { - $this->setPublicationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PUBLICATION_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setPublicationDate(new FHIRDateTime($data[self::FIELD_PUBLICATION_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_PUBLICATION_STATUS])) { - $ext = (isset($data[self::FIELD_PUBLICATION_STATUS_EXT]) && is_array($data[self::FIELD_PUBLICATION_STATUS_EXT])) - ? $data[self::FIELD_PUBLICATION_STATUS_EXT] - : null; - if ($data[self::FIELD_PUBLICATION_STATUS] instanceof FHIRContractResourcePublicationStatusCodes) { - $this->setPublicationStatus($data[self::FIELD_PUBLICATION_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLICATION_STATUS])) { - $this->setPublicationStatus(new FHIRContractResourcePublicationStatusCodes([FHIRContractResourcePublicationStatusCodes::FIELD_VALUE => $data[self::FIELD_PUBLICATION_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLICATION_STATUS])) { - $this->setPublicationStatus(new FHIRContractResourcePublicationStatusCodes(array_merge($ext, $data[self::FIELD_PUBLICATION_STATUS]))); + if (isset($data[self::FIELD_PUBLICATION_DATE]) || isset($data[self::FIELD_PUBLICATION_DATE_EXT])) { + if (isset($data[self::FIELD_PUBLICATION_DATE])) { + $value = $data[self::FIELD_PUBLICATION_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLICATION_DATE_EXT]) && is_array($data[self::FIELD_PUBLICATION_DATE_EXT])) { + $ext = $data[self::FIELD_PUBLICATION_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPublicationDate($value); + } else if (is_array($value)) { + $this->setPublicationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPublicationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublicationDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_PUBLICATION_STATUS]) || isset($data[self::FIELD_PUBLICATION_STATUS_EXT])) { + if (isset($data[self::FIELD_PUBLICATION_STATUS])) { + $value = $data[self::FIELD_PUBLICATION_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLICATION_STATUS_EXT]) && is_array($data[self::FIELD_PUBLICATION_STATUS_EXT])) { + $ext = $data[self::FIELD_PUBLICATION_STATUS_EXT]; } else { - $this->setPublicationStatus(new FHIRContractResourcePublicationStatusCodes($data[self::FIELD_PUBLICATION_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContractResourcePublicationStatusCodes) { + $this->setPublicationStatus($value); + } else if (is_array($value)) { + $this->setPublicationStatus(new FHIRContractResourcePublicationStatusCodes(array_merge($ext, $value))); + } else { + $this->setPublicationStatus(new FHIRContractResourcePublicationStatusCodes([FHIRContractResourcePublicationStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublicationStatus(new FHIRContractResourcePublicationStatusCodes($ext)); } } if (isset($data[self::FIELD_PUBLISHER])) { @@ -647,22 +668,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getPublicationDate())) { $a[self::FIELD_PUBLICATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PUBLICATION_DATE_EXT] = $enc; } } if (null !== ($v = $this->getPublicationStatus())) { $a[self::FIELD_PUBLICATION_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContractResourcePublicationStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContractResourcePublicationStatusCodes::FIELD_VALUE]); $a[self::FIELD_PUBLICATION_STATUS_EXT] = $enc; } } @@ -675,6 +702,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContext.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContext.php index 240b46a4f7..b9aff9db9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContext.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRContractContext extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -172,20 +172,27 @@ public function __construct($data = null) $this->setReference(new FHIRReference($data[self::FIELD_REFERENCE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -450,18 +457,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php index 0c58f469c6..8c2f3c4b18 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractFriendly extends FHIRBackboneElement const FIELD_CONTENT_REFERENCE = 'contentReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -327,6 +327,9 @@ public function jsonSerialize() if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php index 77e75bdc3e..6b80e4c1d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractLegal extends FHIRBackboneElement const FIELD_CONTENT_REFERENCE = 'contentReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOffer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOffer.php index 224c3fc9cf..8c07705a43 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOffer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOffer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRContractOffer extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a @@ -299,33 +299,42 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_LINK_ID])) { - foreach($data[self::FIELD_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLinkId(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLinkId(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLinkId(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLinkId(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->addLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINK_ID])) { - $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else { - $this->addLinkId(new FHIRString($data[self::FIELD_LINK_ID])); } } if (isset($data[self::FIELD_PARTY])) { @@ -346,49 +355,65 @@ public function __construct($data = null) $this->addParty(new FHIRContractParty($data[self::FIELD_PARTY])); } } - if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - $ext = (isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]) && is_array($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) - ? $data[self::FIELD_SECURITY_LABEL_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - foreach($data[self::FIELD_SECURITY_LABEL_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUnsignedInt) { - $this->addSecurityLabelNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER]) || isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) { + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER])) { + $value = $data[self::FIELD_SECURITY_LABEL_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]) && is_array($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) { + $ext = $data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->addSecurityLabelNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUnsignedInt) { + $this->addSecurityLabelNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($v, $iext))); + } else { + $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSecurityLabelNumber(new FHIRUnsignedInt($v)); } + } elseif (is_array($value)) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt($iext)); } - } elseif ($data[self::FIELD_SECURITY_LABEL_NUMBER] instanceof FHIRUnsignedInt) { - $this->addSecurityLabelNumber($data[self::FIELD_SECURITY_LABEL_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_SECURITY_LABEL_NUMBER]] + $ext)); - } else { - $this->addSecurityLabelNumber(new FHIRUnsignedInt($data[self::FIELD_SECURITY_LABEL_NUMBER])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1105,54 +1130,96 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAnswer())) { - $a[self::FIELD_ANSWER] = $vs; + $a[self::FIELD_ANSWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ANSWER][] = $v; + } } if (null !== ($v = $this->getDecision())) { $a[self::FIELD_DECISION] = $v; } if ([] !== ($vs = $this->getDecisionMode())) { - $a[self::FIELD_DECISION_MODE] = $vs; + $a[self::FIELD_DECISION_MODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DECISION_MODE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINK_ID_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getParty())) { - $a[self::FIELD_PARTY] = $vs; + $a[self::FIELD_PARTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTY][] = $v; + } } if ([] !== ($vs = $this->getSecurityLabelNumber())) { $a[self::FIELD_SECURITY_LABEL_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SECURITY_LABEL_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUnsignedInt::FIELD_VALUE]) || array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT][] = null; + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } @@ -1162,6 +1229,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractParty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractParty.php index c3c4b01cfe..faae80f7a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractParty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractParty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractParty extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -361,11 +361,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReference())) { - $a[self::FIELD_REFERENCE] = $vs; + $a[self::FIELD_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php index 6d74e67948..ed76476c15 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractRule extends FHIRBackboneElement const FIELD_CONTENT_REFERENCE = 'contentReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabel.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabel.php index f2bb0b7551..e8fd541706 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabel.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRContractSecurityLabel extends FHIRBackboneElement const FIELD_NUMBER_EXT = '_number'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -200,33 +200,42 @@ public function __construct($data = null) $this->addControl(new FHIRCoding($data[self::FIELD_CONTROL])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NUMBER])) { - foreach($data[self::FIELD_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUnsignedInt) { - $this->addNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNumber(new FHIRUnsignedInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->addNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUnsignedInt) { + $this->addNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNumber(new FHIRUnsignedInt(array_merge($v, $iext))); + } else { + $this->addNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNumber(new FHIRUnsignedInt($v)); } + } elseif (is_array($value)) { + $this->addNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->addNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNumber(new FHIRUnsignedInt($iext)); } - } elseif ($data[self::FIELD_NUMBER] instanceof FHIRUnsignedInt) { - $this->addNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NUMBER])) { - $this->addNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else { - $this->addNumber(new FHIRUnsignedInt($data[self::FIELD_NUMBER])); } } } @@ -583,28 +592,51 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getClassification())) { $a[self::FIELD_CLASSIFICATION] = $v; } if ([] !== ($vs = $this->getControl())) { - $a[self::FIELD_CONTROL] = $vs; + $a[self::FIELD_CONTROL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTROL][] = $v; + } } if ([] !== ($vs = $this->getNumber())) { $a[self::FIELD_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUnsignedInt::FIELD_VALUE]) || array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NUMBER_EXT][] = null; + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NUMBER_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php index 3ef779df16..325d6149c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRContractSigner extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -433,11 +433,20 @@ public function jsonSerialize() $a[self::FIELD_PARTY] = $v; } if ([] !== ($vs = $this->getSignature())) { - $a[self::FIELD_SIGNATURE] = $vs; + $a[self::FIELD_SIGNATURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SIGNATURE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubject.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubject.php index 80e7a94d1d..ca894b510f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubject.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractSubject extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -361,11 +361,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReference())) { - $a[self::FIELD_REFERENCE] = $vs; + $a[self::FIELD_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php index 331c1fae6d..36a849e376 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRContractTerm extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a @@ -342,20 +342,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRDateTime) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRDateTime($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OFFER])) { @@ -390,20 +397,27 @@ public function __construct($data = null) $this->setSubType(new FHIRCodeableConcept($data[self::FIELD_SUB_TYPE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC_CODEABLE_CONCEPT])) { @@ -1166,24 +1180,44 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getApplies())) { $a[self::FIELD_APPLIES] = $v; } if ([] !== ($vs = $this->getAsset())) { - $a[self::FIELD_ASSET] = $vs; + $a[self::FIELD_ASSET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ASSET][] = $v; + } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } @@ -1191,15 +1225,23 @@ public function jsonSerialize() $a[self::FIELD_OFFER] = $v; } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getSubType())) { $a[self::FIELD_SUB_TYPE] = $v; } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } @@ -1212,6 +1254,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php index c30027cedd..32082415c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRContractValuedItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -325,20 +325,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EFFECTIVE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveTime($data[self::FIELD_EFFECTIVE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_TIME]) || isset($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_TIME_EXT]; } else { - $this->setEffectiveTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveTime($value); + } else if (is_array($value)) { + $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { @@ -355,20 +362,27 @@ public function __construct($data = null) $this->setEntityReference(new FHIRReference($data[self::FIELD_ENTITY_REFERENCE])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -378,33 +392,42 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_LINK_ID])) { - foreach($data[self::FIELD_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLinkId(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLinkId(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLinkId(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLinkId(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->addLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINK_ID])) { - $this->addLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else { - $this->addLinkId(new FHIRString($data[self::FIELD_LINK_ID])); } } if (isset($data[self::FIELD_NET])) { @@ -414,52 +437,73 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_PAYMENT])) { - $ext = (isset($data[self::FIELD_PAYMENT_EXT]) && is_array($data[self::FIELD_PAYMENT_EXT])) - ? $data[self::FIELD_PAYMENT_EXT] - : null; - if ($data[self::FIELD_PAYMENT] instanceof FHIRString) { - $this->setPayment($data[self::FIELD_PAYMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAYMENT])) { - $this->setPayment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PAYMENT]] + $ext)); - } else if (is_array($data[self::FIELD_PAYMENT])) { - $this->setPayment(new FHIRString(array_merge($ext, $data[self::FIELD_PAYMENT]))); - } + if (isset($data[self::FIELD_PAYMENT]) || isset($data[self::FIELD_PAYMENT_EXT])) { + if (isset($data[self::FIELD_PAYMENT])) { + $value = $data[self::FIELD_PAYMENT]; } else { - $this->setPayment(new FHIRString($data[self::FIELD_PAYMENT])); + $value = null; } - } - if (isset($data[self::FIELD_PAYMENT_DATE])) { - $ext = (isset($data[self::FIELD_PAYMENT_DATE_EXT]) && is_array($data[self::FIELD_PAYMENT_DATE_EXT])) - ? $data[self::FIELD_PAYMENT_DATE_EXT] - : null; - if ($data[self::FIELD_PAYMENT_DATE] instanceof FHIRDateTime) { - $this->setPaymentDate($data[self::FIELD_PAYMENT_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAYMENT_DATE])) { - $this->setPaymentDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PAYMENT_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PAYMENT_DATE])) { - $this->setPaymentDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PAYMENT_DATE]))); - } + if (isset($data[self::FIELD_PAYMENT_EXT]) && is_array($data[self::FIELD_PAYMENT_EXT])) { + $ext = $data[self::FIELD_PAYMENT_EXT]; } else { - $this->setPaymentDate(new FHIRDateTime($data[self::FIELD_PAYMENT_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPayment($value); + } else if (is_array($value)) { + $this->setPayment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPayment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPayment(new FHIRString($ext)); } } - if (isset($data[self::FIELD_POINTS])) { - $ext = (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) - ? $data[self::FIELD_POINTS_EXT] - : null; - if ($data[self::FIELD_POINTS] instanceof FHIRDecimal) { - $this->setPoints($data[self::FIELD_POINTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POINTS]] + $ext)); - } else if (is_array($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POINTS]))); + if (isset($data[self::FIELD_PAYMENT_DATE]) || isset($data[self::FIELD_PAYMENT_DATE_EXT])) { + if (isset($data[self::FIELD_PAYMENT_DATE])) { + $value = $data[self::FIELD_PAYMENT_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PAYMENT_DATE_EXT]) && is_array($data[self::FIELD_PAYMENT_DATE_EXT])) { + $ext = $data[self::FIELD_PAYMENT_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPaymentDate($value); + } else if (is_array($value)) { + $this->setPaymentDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPaymentDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPaymentDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_POINTS]) || isset($data[self::FIELD_POINTS_EXT])) { + if (isset($data[self::FIELD_POINTS])) { + $value = $data[self::FIELD_POINTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) { + $ext = $data[self::FIELD_POINTS_EXT]; } else { - $this->setPoints(new FHIRDecimal($data[self::FIELD_POINTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPoints($value); + } else if (is_array($value)) { + $this->setPoints(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPoints(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -483,33 +527,42 @@ public function __construct($data = null) $this->setResponsible(new FHIRReference($data[self::FIELD_RESPONSIBLE])); } } - if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - $ext = (isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]) && is_array($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) - ? $data[self::FIELD_SECURITY_LABEL_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - foreach($data[self::FIELD_SECURITY_LABEL_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUnsignedInt) { - $this->addSecurityLabelNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER]) || isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) { + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER])) { + $value = $data[self::FIELD_SECURITY_LABEL_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]) && is_array($data[self::FIELD_SECURITY_LABEL_NUMBER_EXT])) { + $ext = $data[self::FIELD_SECURITY_LABEL_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->addSecurityLabelNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUnsignedInt) { + $this->addSecurityLabelNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($v, $iext))); + } else { + $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSecurityLabelNumber(new FHIRUnsignedInt($v)); } + } elseif (is_array($value)) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSecurityLabelNumber(new FHIRUnsignedInt($iext)); } - } elseif ($data[self::FIELD_SECURITY_LABEL_NUMBER] instanceof FHIRUnsignedInt) { - $this->addSecurityLabelNumber($data[self::FIELD_SECURITY_LABEL_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SECURITY_LABEL_NUMBER])) { - $this->addSecurityLabelNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_SECURITY_LABEL_NUMBER]] + $ext)); - } else { - $this->addSecurityLabelNumber(new FHIRUnsignedInt($data[self::FIELD_SECURITY_LABEL_NUMBER])); } } if (isset($data[self::FIELD_UNIT_PRICE])) { @@ -1371,8 +1424,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEffectiveTime())) { $a[self::FIELD_EFFECTIVE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_TIME_EXT] = $enc; } } @@ -1384,8 +1439,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } @@ -1394,40 +1451,54 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINK_ID_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if (null !== ($v = $this->getPayment())) { $a[self::FIELD_PAYMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PAYMENT_EXT] = $enc; } } if (null !== ($v = $this->getPaymentDate())) { $a[self::FIELD_PAYMENT_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PAYMENT_DATE_EXT] = $enc; } } if (null !== ($v = $this->getPoints())) { $a[self::FIELD_POINTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POINTS_EXT] = $enc; } } @@ -1442,22 +1513,33 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getSecurityLabelNumber())) { $a[self::FIELD_SECURITY_LABEL_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SECURITY_LABEL_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUnsignedInt::FIELD_VALUE]) || array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT][] = null; + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SECURITY_LABEL_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClass.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClass.php index 293055fa51..bc1f532547 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClass.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClass.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCoverageClass extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -146,20 +146,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -169,20 +176,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -428,8 +442,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -438,11 +454,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiary.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiary.php index 9cf5ce1b81..7b60e59404 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiary.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCoverageCostToBeneficiary extends FHIRBackboneElement const FIELD_VALUE_QUANTITY = 'valueQuantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Financial instrument which may be used to reimburse or pay for health care @@ -480,7 +480,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getException())) { - $a[self::FIELD_EXCEPTION] = $vs; + $a[self::FIELD_EXCEPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCEPTION][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; @@ -491,6 +497,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValueQuantity())) { $a[self::FIELD_VALUE_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageException.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageException.php index 69708bdd2e..73ec93b6c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageException.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageException.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRCoverageException extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -318,6 +318,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosis.php index 66234f913c..da5fc76657 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCoverageEligibilityRequestDiagnosis extends FHIRBackboneElement const FIELD_DIAGNOSIS_REFERENCE = 'diagnosisReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -327,6 +327,9 @@ public function jsonSerialize() if (null !== ($v = $this->getDiagnosisReference())) { $a[self::FIELD_DIAGNOSIS_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsurance.php index 3fa37e0541..4b98d5648a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCoverageEligibilityRequestInsurance extends FHIRBackboneElement const FIELD_FOCAL_EXT = '_focal'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -150,20 +150,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $ext = (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) - ? $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT] - : null; - if ($data[self::FIELD_BUSINESS_ARRANGEMENT] instanceof FHIRString) { - $this->setBusinessArrangement($data[self::FIELD_BUSINESS_ARRANGEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BUSINESS_ARRANGEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString(array_merge($ext, $data[self::FIELD_BUSINESS_ARRANGEMENT]))); - } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT]) || isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { + $value = $data[self::FIELD_BUSINESS_ARRANGEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + $ext = $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]; } else { - $this->setBusinessArrangement(new FHIRString($data[self::FIELD_BUSINESS_ARRANGEMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBusinessArrangement($value); + } else if (is_array($value)) { + $this->setBusinessArrangement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBusinessArrangement(new FHIRString($ext)); } } if (isset($data[self::FIELD_COVERAGE])) { @@ -173,20 +180,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_FOCAL])) { - $ext = (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) - ? $data[self::FIELD_FOCAL_EXT] - : null; - if ($data[self::FIELD_FOCAL] instanceof FHIRBoolean) { - $this->setFocal($data[self::FIELD_FOCAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FOCAL]] + $ext)); - } else if (is_array($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FOCAL]))); - } + if (isset($data[self::FIELD_FOCAL]) || isset($data[self::FIELD_FOCAL_EXT])) { + if (isset($data[self::FIELD_FOCAL])) { + $value = $data[self::FIELD_FOCAL]; } else { - $this->setFocal(new FHIRBoolean($data[self::FIELD_FOCAL])); + $value = null; + } + if (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) { + $ext = $data[self::FIELD_FOCAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFocal($value); + } else if (is_array($value)) { + $this->setFocal(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFocal(new FHIRBoolean($ext)); } } } @@ -431,8 +445,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBusinessArrangement())) { $a[self::FIELD_BUSINESS_ARRANGEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BUSINESS_ARRANGEMENT_EXT] = $enc; } } @@ -441,11 +457,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getFocal())) { $a[self::FIELD_FOCAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FOCAL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItem.php index 2614f76298..b2e95636d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRCoverageEligibilityRequestItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -332,33 +332,42 @@ public function __construct($data = null) $this->setQuantity(new FHIRQuantity($data[self::FIELD_QUANTITY])); } } - if (isset($data[self::FIELD_SUPPORTING_INFO_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT])) - ? $data[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_SUPPORTING_INFO_SEQUENCE])) { - foreach($data[self::FIELD_SUPPORTING_INFO_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addSupportingInfoSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSupportingInfoSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSupportingInfoSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUPPORTING_INFO_SEQUENCE]) || isset($data[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SUPPORTING_INFO_SEQUENCE])) { + $value = $data[self::FIELD_SUPPORTING_INFO_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addSupportingInfoSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addSupportingInfoSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSupportingInfoSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addSupportingInfoSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSupportingInfoSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addSupportingInfoSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addSupportingInfoSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSupportingInfoSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_SUPPORTING_INFO_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addSupportingInfoSequence($data[self::FIELD_SUPPORTING_INFO_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUPPORTING_INFO_SEQUENCE])) { - $this->addSupportingInfoSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SUPPORTING_INFO_SEQUENCE]] + $ext)); - } else { - $this->addSupportingInfoSequence(new FHIRPositiveInt($data[self::FIELD_SUPPORTING_INFO_SEQUENCE])); } } if (isset($data[self::FIELD_UNIT_PRICE])) { @@ -993,16 +1002,34 @@ public function jsonSerialize() $a[self::FIELD_CATEGORY] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getFacility())) { $a[self::FIELD_FACILITY] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; @@ -1015,22 +1042,33 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getSupportingInfoSequence())) { $a[self::FIELD_SUPPORTING_INFO_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUPPORTING_INFO_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUPPORTING_INFO_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfo.php index 3d20fe354d..a097664ff5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCoverageEligibilityRequestSupportingInfo extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -148,20 +148,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPLIES_TO_ALL])) { - $ext = (isset($data[self::FIELD_APPLIES_TO_ALL_EXT]) && is_array($data[self::FIELD_APPLIES_TO_ALL_EXT])) - ? $data[self::FIELD_APPLIES_TO_ALL_EXT] - : null; - if ($data[self::FIELD_APPLIES_TO_ALL] instanceof FHIRBoolean) { - $this->setAppliesToAll($data[self::FIELD_APPLIES_TO_ALL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPLIES_TO_ALL])) { - $this->setAppliesToAll(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_APPLIES_TO_ALL]] + $ext)); - } else if (is_array($data[self::FIELD_APPLIES_TO_ALL])) { - $this->setAppliesToAll(new FHIRBoolean(array_merge($ext, $data[self::FIELD_APPLIES_TO_ALL]))); - } + if (isset($data[self::FIELD_APPLIES_TO_ALL]) || isset($data[self::FIELD_APPLIES_TO_ALL_EXT])) { + if (isset($data[self::FIELD_APPLIES_TO_ALL])) { + $value = $data[self::FIELD_APPLIES_TO_ALL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPLIES_TO_ALL_EXT]) && is_array($data[self::FIELD_APPLIES_TO_ALL_EXT])) { + $ext = $data[self::FIELD_APPLIES_TO_ALL_EXT]; } else { - $this->setAppliesToAll(new FHIRBoolean($data[self::FIELD_APPLIES_TO_ALL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAppliesToAll($value); + } else if (is_array($value)) { + $this->setAppliesToAll(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAppliesToAll(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAppliesToAll(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_INFORMATION])) { @@ -171,20 +178,27 @@ public function __construct($data = null) $this->setInformation(new FHIRReference($data[self::FIELD_INFORMATION])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -425,8 +439,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAppliesToAll())) { $a[self::FIELD_APPLIES_TO_ALL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_APPLIES_TO_ALL_EXT] = $enc; } } @@ -435,11 +451,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefit.php index 30dee73d47..ee88f0077e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRCoverageEligibilityResponseBenefit extends FHIRBackboneElement const FIELD_USED_UNSIGNED_INT_EXT = '_usedUnsignedInt'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -209,36 +209,50 @@ public function __construct($data = null) $this->setAllowedMoney(new FHIRMoney($data[self::FIELD_ALLOWED_MONEY])); } } - if (isset($data[self::FIELD_ALLOWED_STRING])) { - $ext = (isset($data[self::FIELD_ALLOWED_STRING_EXT]) && is_array($data[self::FIELD_ALLOWED_STRING_EXT])) - ? $data[self::FIELD_ALLOWED_STRING_EXT] - : null; - if ($data[self::FIELD_ALLOWED_STRING] instanceof FHIRString) { - $this->setAllowedString($data[self::FIELD_ALLOWED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED_STRING])) { - $this->setAllowedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALLOWED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED_STRING])) { - $this->setAllowedString(new FHIRString(array_merge($ext, $data[self::FIELD_ALLOWED_STRING]))); - } + if (isset($data[self::FIELD_ALLOWED_STRING]) || isset($data[self::FIELD_ALLOWED_STRING_EXT])) { + if (isset($data[self::FIELD_ALLOWED_STRING])) { + $value = $data[self::FIELD_ALLOWED_STRING]; } else { - $this->setAllowedString(new FHIRString($data[self::FIELD_ALLOWED_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_ALLOWED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setAllowedUnsignedInt($data[self::FIELD_ALLOWED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_ALLOWED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_ALLOWED_UNSIGNED_INT]))); + if (isset($data[self::FIELD_ALLOWED_STRING_EXT]) && is_array($data[self::FIELD_ALLOWED_STRING_EXT])) { + $ext = $data[self::FIELD_ALLOWED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAllowedString($value); + } else if (is_array($value)) { + $this->setAllowedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAllowedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAllowedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT]) || isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $value = $data[self::FIELD_ALLOWED_UNSIGNED_INT]; } else { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_ALLOWED_UNSIGNED_INT])); + $value = null; + } + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setAllowedUnsignedInt($value); + } else if (is_array($value)) { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -255,36 +269,50 @@ public function __construct($data = null) $this->setUsedMoney(new FHIRMoney($data[self::FIELD_USED_MONEY])); } } - if (isset($data[self::FIELD_USED_STRING])) { - $ext = (isset($data[self::FIELD_USED_STRING_EXT]) && is_array($data[self::FIELD_USED_STRING_EXT])) - ? $data[self::FIELD_USED_STRING_EXT] - : null; - if ($data[self::FIELD_USED_STRING] instanceof FHIRString) { - $this->setUsedString($data[self::FIELD_USED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USED_STRING])) { - $this->setUsedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_USED_STRING])) { - $this->setUsedString(new FHIRString(array_merge($ext, $data[self::FIELD_USED_STRING]))); - } + if (isset($data[self::FIELD_USED_STRING]) || isset($data[self::FIELD_USED_STRING_EXT])) { + if (isset($data[self::FIELD_USED_STRING])) { + $value = $data[self::FIELD_USED_STRING]; } else { - $this->setUsedString(new FHIRString($data[self::FIELD_USED_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_USED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_USED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_USED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_USED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_USED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setUsedUnsignedInt($data[self::FIELD_USED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USED_UNSIGNED_INT])) { - $this->setUsedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_USED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_USED_UNSIGNED_INT])) { - $this->setUsedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_USED_UNSIGNED_INT]))); + if (isset($data[self::FIELD_USED_STRING_EXT]) && is_array($data[self::FIELD_USED_STRING_EXT])) { + $ext = $data[self::FIELD_USED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsedString($value); + } else if (is_array($value)) { + $this->setUsedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUsedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_USED_UNSIGNED_INT]) || isset($data[self::FIELD_USED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_USED_UNSIGNED_INT])) { + $value = $data[self::FIELD_USED_UNSIGNED_INT]; } else { - $this->setUsedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_USED_UNSIGNED_INT])); + $value = null; + } + if (isset($data[self::FIELD_USED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_USED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_USED_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setUsedUnsignedInt($value); + } else if (is_array($value)) { + $this->setUsedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setUsedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsedUnsignedInt(new FHIRUnsignedInt($ext)); } } } @@ -716,15 +744,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAllowedString())) { $a[self::FIELD_ALLOWED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALLOWED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getAllowedUnsignedInt())) { $a[self::FIELD_ALLOWED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_ALLOWED_UNSIGNED_INT_EXT] = $enc; } } @@ -736,18 +768,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getUsedString())) { $a[self::FIELD_USED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getUsedUnsignedInt())) { $a[self::FIELD_USED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_USED_UNSIGNED_INT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseError.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseError.php index 3eaeeaa8e9..a620e5f070 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRCoverageEligibilityResponseError extends FHIRBackboneElement const FIELD_CODE = 'code'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -262,6 +262,9 @@ public function jsonSerialize() if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsurance.php index 021404c898..392d502666 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCoverageEligibilityResponseInsurance extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -171,20 +171,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_INFORCE])) { - $ext = (isset($data[self::FIELD_INFORCE_EXT]) && is_array($data[self::FIELD_INFORCE_EXT])) - ? $data[self::FIELD_INFORCE_EXT] - : null; - if ($data[self::FIELD_INFORCE] instanceof FHIRBoolean) { - $this->setInforce($data[self::FIELD_INFORCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INFORCE])) { - $this->setInforce(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INFORCE]] + $ext)); - } else if (is_array($data[self::FIELD_INFORCE])) { - $this->setInforce(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INFORCE]))); - } + if (isset($data[self::FIELD_INFORCE]) || isset($data[self::FIELD_INFORCE_EXT])) { + if (isset($data[self::FIELD_INFORCE])) { + $value = $data[self::FIELD_INFORCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INFORCE_EXT]) && is_array($data[self::FIELD_INFORCE_EXT])) { + $ext = $data[self::FIELD_INFORCE_EXT]; } else { - $this->setInforce(new FHIRBoolean($data[self::FIELD_INFORCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInforce($value); + } else if (is_array($value)) { + $this->setInforce(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInforce(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInforce(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ITEM])) { @@ -504,13 +511,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getInforce())) { $a[self::FIELD_INFORCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INFORCE_EXT] = $enc; } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItem.php index 33f97e177f..57771668eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRCoverageEligibilityResponseItem extends FHIRBackboneElement const FIELD_UNIT = 'unit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -293,20 +293,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORIZATION_REQUIRED])) { - $ext = (isset($data[self::FIELD_AUTHORIZATION_REQUIRED_EXT]) && is_array($data[self::FIELD_AUTHORIZATION_REQUIRED_EXT])) - ? $data[self::FIELD_AUTHORIZATION_REQUIRED_EXT] - : null; - if ($data[self::FIELD_AUTHORIZATION_REQUIRED] instanceof FHIRBoolean) { - $this->setAuthorizationRequired($data[self::FIELD_AUTHORIZATION_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORIZATION_REQUIRED])) { - $this->setAuthorizationRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AUTHORIZATION_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORIZATION_REQUIRED])) { - $this->setAuthorizationRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AUTHORIZATION_REQUIRED]))); - } + if (isset($data[self::FIELD_AUTHORIZATION_REQUIRED]) || isset($data[self::FIELD_AUTHORIZATION_REQUIRED_EXT])) { + if (isset($data[self::FIELD_AUTHORIZATION_REQUIRED])) { + $value = $data[self::FIELD_AUTHORIZATION_REQUIRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORIZATION_REQUIRED_EXT]) && is_array($data[self::FIELD_AUTHORIZATION_REQUIRED_EXT])) { + $ext = $data[self::FIELD_AUTHORIZATION_REQUIRED_EXT]; } else { - $this->setAuthorizationRequired(new FHIRBoolean($data[self::FIELD_AUTHORIZATION_REQUIRED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAuthorizationRequired($value); + } else if (is_array($value)) { + $this->setAuthorizationRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAuthorizationRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthorizationRequired(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AUTHORIZATION_SUPPORTING])) { @@ -327,20 +334,27 @@ public function __construct($data = null) $this->addAuthorizationSupporting(new FHIRCodeableConcept($data[self::FIELD_AUTHORIZATION_SUPPORTING])); } } - if (isset($data[self::FIELD_AUTHORIZATION_URL])) { - $ext = (isset($data[self::FIELD_AUTHORIZATION_URL_EXT]) && is_array($data[self::FIELD_AUTHORIZATION_URL_EXT])) - ? $data[self::FIELD_AUTHORIZATION_URL_EXT] - : null; - if ($data[self::FIELD_AUTHORIZATION_URL] instanceof FHIRUri) { - $this->setAuthorizationUrl($data[self::FIELD_AUTHORIZATION_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORIZATION_URL])) { - $this->setAuthorizationUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_AUTHORIZATION_URL]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORIZATION_URL])) { - $this->setAuthorizationUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_AUTHORIZATION_URL]))); - } + if (isset($data[self::FIELD_AUTHORIZATION_URL]) || isset($data[self::FIELD_AUTHORIZATION_URL_EXT])) { + if (isset($data[self::FIELD_AUTHORIZATION_URL])) { + $value = $data[self::FIELD_AUTHORIZATION_URL]; } else { - $this->setAuthorizationUrl(new FHIRUri($data[self::FIELD_AUTHORIZATION_URL])); + $value = null; + } + if (isset($data[self::FIELD_AUTHORIZATION_URL_EXT]) && is_array($data[self::FIELD_AUTHORIZATION_URL_EXT])) { + $ext = $data[self::FIELD_AUTHORIZATION_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setAuthorizationUrl($value); + } else if (is_array($value)) { + $this->setAuthorizationUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setAuthorizationUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthorizationUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_BENEFIT])) { @@ -368,36 +382,50 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXCLUDED])) { - $ext = (isset($data[self::FIELD_EXCLUDED_EXT]) && is_array($data[self::FIELD_EXCLUDED_EXT])) - ? $data[self::FIELD_EXCLUDED_EXT] - : null; - if ($data[self::FIELD_EXCLUDED] instanceof FHIRBoolean) { - $this->setExcluded($data[self::FIELD_EXCLUDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDED])) { - $this->setExcluded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDED]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDED])) { - $this->setExcluded(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDED]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXCLUDED]) || isset($data[self::FIELD_EXCLUDED_EXT])) { + if (isset($data[self::FIELD_EXCLUDED])) { + $value = $data[self::FIELD_EXCLUDED]; } else { - $this->setExcluded(new FHIRBoolean($data[self::FIELD_EXCLUDED])); + $value = null; + } + if (isset($data[self::FIELD_EXCLUDED_EXT]) && is_array($data[self::FIELD_EXCLUDED_EXT])) { + $ext = $data[self::FIELD_EXCLUDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExcluded($value); + } else if (is_array($value)) { + $this->setExcluded(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExcluded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExcluded(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -418,20 +446,27 @@ public function __construct($data = null) $this->addModifier(new FHIRCodeableConcept($data[self::FIELD_MODIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NETWORK])) { @@ -1275,48 +1310,76 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthorizationRequired())) { $a[self::FIELD_AUTHORIZATION_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AUTHORIZATION_REQUIRED_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthorizationSupporting())) { - $a[self::FIELD_AUTHORIZATION_SUPPORTING] = $vs; + $a[self::FIELD_AUTHORIZATION_SUPPORTING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHORIZATION_SUPPORTING][] = $v; + } } if (null !== ($v = $this->getAuthorizationUrl())) { $a[self::FIELD_AUTHORIZATION_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_AUTHORIZATION_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getBenefit())) { - $a[self::FIELD_BENEFIT] = $vs; + $a[self::FIELD_BENEFIT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BENEFIT][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExcluded())) { $a[self::FIELD_EXCLUDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDED_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1335,6 +1398,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidence.php index 9165c214cc..cf386c2987 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRDetectedIssueEvidence extends FHIRBackboneElement const FIELD_DETAIL = 'detail'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -407,10 +407,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php index b0141f54a7..c45a817884 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDetectedIssueMitigation extends FHIRBackboneElement const FIELD_DATE_EXT = '_date'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -164,20 +164,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } } @@ -418,11 +425,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceName.php index a49b0158a3..cb246861b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDeviceDeviceName extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRDeviceNameType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceNameType([FHIRDeviceNameType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceNameType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRDeviceNameType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceNameType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRDeviceNameType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRDeviceNameType([FHIRDeviceNameType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRDeviceNameType($ext)); } } } @@ -348,18 +362,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceNameType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceNameType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceProperty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceProperty.php index c91628185d..a599739d64 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRDeviceProperty extends FHIRBackboneElement const FIELD_VALUE_QUANTITY = 'valueQuantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -472,10 +472,25 @@ public function jsonSerialize() $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getValueCode())) { - $a[self::FIELD_VALUE_CODE] = $vs; + $a[self::FIELD_VALUE_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUE_CODE][] = $v; + } } if ([] !== ($vs = $this->getValueQuantity())) { - $a[self::FIELD_VALUE_QUANTITY] = $vs; + $a[self::FIELD_VALUE_QUANTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUE_QUANTITY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecialization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecialization.php index aaa9423dee..2fba6a4893 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecialization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecialization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRDeviceSpecialization extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -139,20 +139,27 @@ public function __construct($data = null) $this->setSystemType(new FHIRCodeableConcept($data[self::FIELD_SYSTEM_TYPE])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -344,11 +351,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrier.php index 30a668fee6..be1951c559 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRDeviceUdiCarrier extends FHIRBackboneElement const FIELD_JURISDICTION_EXT = '_jurisdiction'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -198,100 +198,142 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CARRIER_AIDC])) { - $ext = (isset($data[self::FIELD_CARRIER_AIDC_EXT]) && is_array($data[self::FIELD_CARRIER_AIDC_EXT])) - ? $data[self::FIELD_CARRIER_AIDC_EXT] - : null; - if ($data[self::FIELD_CARRIER_AIDC] instanceof FHIRBase64Binary) { - $this->setCarrierAIDC($data[self::FIELD_CARRIER_AIDC]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CARRIER_AIDC])) { - $this->setCarrierAIDC(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_CARRIER_AIDC]] + $ext)); - } else if (is_array($data[self::FIELD_CARRIER_AIDC])) { - $this->setCarrierAIDC(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_CARRIER_AIDC]))); - } + if (isset($data[self::FIELD_CARRIER_AIDC]) || isset($data[self::FIELD_CARRIER_AIDC_EXT])) { + if (isset($data[self::FIELD_CARRIER_AIDC])) { + $value = $data[self::FIELD_CARRIER_AIDC]; } else { - $this->setCarrierAIDC(new FHIRBase64Binary($data[self::FIELD_CARRIER_AIDC])); + $value = null; } - } - if (isset($data[self::FIELD_CARRIER_HRF])) { - $ext = (isset($data[self::FIELD_CARRIER_HRF_EXT]) && is_array($data[self::FIELD_CARRIER_HRF_EXT])) - ? $data[self::FIELD_CARRIER_HRF_EXT] - : null; - if ($data[self::FIELD_CARRIER_HRF] instanceof FHIRString) { - $this->setCarrierHRF($data[self::FIELD_CARRIER_HRF]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CARRIER_HRF])) { - $this->setCarrierHRF(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CARRIER_HRF]] + $ext)); - } else if (is_array($data[self::FIELD_CARRIER_HRF])) { - $this->setCarrierHRF(new FHIRString(array_merge($ext, $data[self::FIELD_CARRIER_HRF]))); - } + if (isset($data[self::FIELD_CARRIER_AIDC_EXT]) && is_array($data[self::FIELD_CARRIER_AIDC_EXT])) { + $ext = $data[self::FIELD_CARRIER_AIDC_EXT]; } else { - $this->setCarrierHRF(new FHIRString($data[self::FIELD_CARRIER_HRF])); + $ext = []; } - } - if (isset($data[self::FIELD_DEVICE_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_DEVICE_IDENTIFIER_EXT]) && is_array($data[self::FIELD_DEVICE_IDENTIFIER_EXT])) - ? $data[self::FIELD_DEVICE_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_DEVICE_IDENTIFIER] instanceof FHIRString) { - $this->setDeviceIdentifier($data[self::FIELD_DEVICE_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEVICE_IDENTIFIER])) { - $this->setDeviceIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEVICE_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_DEVICE_IDENTIFIER])) { - $this->setDeviceIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_DEVICE_IDENTIFIER]))); + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setCarrierAIDC($value); + } else if (is_array($value)) { + $this->setCarrierAIDC(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setCarrierAIDC(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setDeviceIdentifier(new FHIRString($data[self::FIELD_DEVICE_IDENTIFIER])); + } else if ([] !== $ext) { + $this->setCarrierAIDC(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_ENTRY_TYPE])) { - $ext = (isset($data[self::FIELD_ENTRY_TYPE_EXT]) && is_array($data[self::FIELD_ENTRY_TYPE_EXT])) - ? $data[self::FIELD_ENTRY_TYPE_EXT] - : null; - if ($data[self::FIELD_ENTRY_TYPE] instanceof FHIRUDIEntryType) { - $this->setEntryType($data[self::FIELD_ENTRY_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENTRY_TYPE])) { - $this->setEntryType(new FHIRUDIEntryType([FHIRUDIEntryType::FIELD_VALUE => $data[self::FIELD_ENTRY_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_ENTRY_TYPE])) { - $this->setEntryType(new FHIRUDIEntryType(array_merge($ext, $data[self::FIELD_ENTRY_TYPE]))); - } + if (isset($data[self::FIELD_CARRIER_HRF]) || isset($data[self::FIELD_CARRIER_HRF_EXT])) { + if (isset($data[self::FIELD_CARRIER_HRF])) { + $value = $data[self::FIELD_CARRIER_HRF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARRIER_HRF_EXT]) && is_array($data[self::FIELD_CARRIER_HRF_EXT])) { + $ext = $data[self::FIELD_CARRIER_HRF_EXT]; } else { - $this->setEntryType(new FHIRUDIEntryType($data[self::FIELD_ENTRY_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCarrierHRF($value); + } else if (is_array($value)) { + $this->setCarrierHRF(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCarrierHRF(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCarrierHRF(new FHIRString($ext)); } } - if (isset($data[self::FIELD_ISSUER])) { - $ext = (isset($data[self::FIELD_ISSUER_EXT]) && is_array($data[self::FIELD_ISSUER_EXT])) - ? $data[self::FIELD_ISSUER_EXT] - : null; - if ($data[self::FIELD_ISSUER] instanceof FHIRUri) { - $this->setIssuer($data[self::FIELD_ISSUER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUER])) { - $this->setIssuer(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ISSUER]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUER])) { - $this->setIssuer(new FHIRUri(array_merge($ext, $data[self::FIELD_ISSUER]))); + if (isset($data[self::FIELD_DEVICE_IDENTIFIER]) || isset($data[self::FIELD_DEVICE_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_DEVICE_IDENTIFIER])) { + $value = $data[self::FIELD_DEVICE_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEVICE_IDENTIFIER_EXT]) && is_array($data[self::FIELD_DEVICE_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_DEVICE_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeviceIdentifier($value); + } else if (is_array($value)) { + $this->setDeviceIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeviceIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeviceIdentifier(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ENTRY_TYPE]) || isset($data[self::FIELD_ENTRY_TYPE_EXT])) { + if (isset($data[self::FIELD_ENTRY_TYPE])) { + $value = $data[self::FIELD_ENTRY_TYPE]; } else { - $this->setIssuer(new FHIRUri($data[self::FIELD_ISSUER])); + $value = null; + } + if (isset($data[self::FIELD_ENTRY_TYPE_EXT]) && is_array($data[self::FIELD_ENTRY_TYPE_EXT])) { + $ext = $data[self::FIELD_ENTRY_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUDIEntryType) { + $this->setEntryType($value); + } else if (is_array($value)) { + $this->setEntryType(new FHIRUDIEntryType(array_merge($ext, $value))); + } else { + $this->setEntryType(new FHIRUDIEntryType([FHIRUDIEntryType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEntryType(new FHIRUDIEntryType($ext)); } } - if (isset($data[self::FIELD_JURISDICTION])) { - $ext = (isset($data[self::FIELD_JURISDICTION_EXT]) && is_array($data[self::FIELD_JURISDICTION_EXT])) - ? $data[self::FIELD_JURISDICTION_EXT] - : null; - if ($data[self::FIELD_JURISDICTION] instanceof FHIRUri) { - $this->setJurisdiction($data[self::FIELD_JURISDICTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_JURISDICTION])) { - $this->setJurisdiction(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_JURISDICTION]] + $ext)); - } else if (is_array($data[self::FIELD_JURISDICTION])) { - $this->setJurisdiction(new FHIRUri(array_merge($ext, $data[self::FIELD_JURISDICTION]))); + if (isset($data[self::FIELD_ISSUER]) || isset($data[self::FIELD_ISSUER_EXT])) { + if (isset($data[self::FIELD_ISSUER])) { + $value = $data[self::FIELD_ISSUER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUER_EXT]) && is_array($data[self::FIELD_ISSUER_EXT])) { + $ext = $data[self::FIELD_ISSUER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setIssuer($value); + } else if (is_array($value)) { + $this->setIssuer(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setIssuer(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIssuer(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_JURISDICTION]) || isset($data[self::FIELD_JURISDICTION_EXT])) { + if (isset($data[self::FIELD_JURISDICTION])) { + $value = $data[self::FIELD_JURISDICTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_JURISDICTION_EXT]) && is_array($data[self::FIELD_JURISDICTION_EXT])) { + $ext = $data[self::FIELD_JURISDICTION_EXT]; } else { - $this->setJurisdiction(new FHIRUri($data[self::FIELD_JURISDICTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setJurisdiction($value); + } else if (is_array($value)) { + $this->setJurisdiction(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setJurisdiction(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setJurisdiction(new FHIRUri($ext)); } } } @@ -710,46 +752,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCarrierAIDC())) { $a[self::FIELD_CARRIER_AIDC] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_CARRIER_AIDC_EXT] = $enc; } } if (null !== ($v = $this->getCarrierHRF())) { $a[self::FIELD_CARRIER_HRF] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CARRIER_HRF_EXT] = $enc; } } if (null !== ($v = $this->getDeviceIdentifier())) { $a[self::FIELD_DEVICE_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEVICE_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getEntryType())) { $a[self::FIELD_ENTRY_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUDIEntryType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUDIEntryType::FIELD_VALUE]); $a[self::FIELD_ENTRY_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getIssuer())) { $a[self::FIELD_ISSUER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ISSUER_EXT] = $enc; } } if (null !== ($v = $this->getJurisdiction())) { $a[self::FIELD_JURISDICTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_JURISDICTION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersion.php index a08de48748..9901425767 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDeviceVersion extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An identifier - identifies some entity uniquely and unambiguously. Typically @@ -160,20 +160,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -407,11 +414,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapability.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapability.php index 08b7e3d908..d41b968071 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapability.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceDefinitionCapability extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -360,11 +360,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDescription())) { - $a[self::FIELD_DESCRIPTION] = $vs; + $a[self::FIELD_DESCRIPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESCRIPTION][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceName.php index 1cc4151585..8199b4fc8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRDeviceDefinitionDeviceName extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRDeviceNameType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceNameType([FHIRDeviceNameType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceNameType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRDeviceNameType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceNameType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRDeviceNameType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRDeviceNameType([FHIRDeviceNameType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRDeviceNameType($ext)); } } } @@ -347,18 +361,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceNameType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceNameType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterial.php index 8d3b2a159b..4a33537735 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDeviceDefinitionMaterial extends FHIRBackboneElement const FIELD_SUBSTANCE = 'substance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -142,36 +142,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALLERGENIC_INDICATOR])) { - $ext = (isset($data[self::FIELD_ALLERGENIC_INDICATOR_EXT]) && is_array($data[self::FIELD_ALLERGENIC_INDICATOR_EXT])) - ? $data[self::FIELD_ALLERGENIC_INDICATOR_EXT] - : null; - if ($data[self::FIELD_ALLERGENIC_INDICATOR] instanceof FHIRBoolean) { - $this->setAllergenicIndicator($data[self::FIELD_ALLERGENIC_INDICATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLERGENIC_INDICATOR])) { - $this->setAllergenicIndicator(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALLERGENIC_INDICATOR]] + $ext)); - } else if (is_array($data[self::FIELD_ALLERGENIC_INDICATOR])) { - $this->setAllergenicIndicator(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALLERGENIC_INDICATOR]))); - } + if (isset($data[self::FIELD_ALLERGENIC_INDICATOR]) || isset($data[self::FIELD_ALLERGENIC_INDICATOR_EXT])) { + if (isset($data[self::FIELD_ALLERGENIC_INDICATOR])) { + $value = $data[self::FIELD_ALLERGENIC_INDICATOR]; } else { - $this->setAllergenicIndicator(new FHIRBoolean($data[self::FIELD_ALLERGENIC_INDICATOR])); + $value = null; } - } - if (isset($data[self::FIELD_ALTERNATE])) { - $ext = (isset($data[self::FIELD_ALTERNATE_EXT]) && is_array($data[self::FIELD_ALTERNATE_EXT])) - ? $data[self::FIELD_ALTERNATE_EXT] - : null; - if ($data[self::FIELD_ALTERNATE] instanceof FHIRBoolean) { - $this->setAlternate($data[self::FIELD_ALTERNATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALTERNATE])) { - $this->setAlternate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALTERNATE]] + $ext)); - } else if (is_array($data[self::FIELD_ALTERNATE])) { - $this->setAlternate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALTERNATE]))); + if (isset($data[self::FIELD_ALLERGENIC_INDICATOR_EXT]) && is_array($data[self::FIELD_ALLERGENIC_INDICATOR_EXT])) { + $ext = $data[self::FIELD_ALLERGENIC_INDICATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllergenicIndicator($value); + } else if (is_array($value)) { + $this->setAllergenicIndicator(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllergenicIndicator(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAllergenicIndicator(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_ALTERNATE]) || isset($data[self::FIELD_ALTERNATE_EXT])) { + if (isset($data[self::FIELD_ALTERNATE])) { + $value = $data[self::FIELD_ALTERNATE]; } else { - $this->setAlternate(new FHIRBoolean($data[self::FIELD_ALTERNATE])); + $value = null; + } + if (isset($data[self::FIELD_ALTERNATE_EXT]) && is_array($data[self::FIELD_ALTERNATE_EXT])) { + $ext = $data[self::FIELD_ALTERNATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAlternate($value); + } else if (is_array($value)) { + $this->setAlternate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAlternate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAlternate(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_SUBSTANCE])) { @@ -415,21 +429,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllergenicIndicator())) { $a[self::FIELD_ALLERGENIC_INDICATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALLERGENIC_INDICATOR_EXT] = $enc; } } if (null !== ($v = $this->getAlternate())) { $a[self::FIELD_ALTERNATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALTERNATE_EXT] = $enc; } } if (null !== ($v = $this->getSubstance())) { $a[self::FIELD_SUBSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionProperty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionProperty.php index 0e7e9ccac0..a16e9cd0b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRDeviceDefinitionProperty extends FHIRBackboneElement const FIELD_VALUE_QUANTITY = 'valueQuantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -471,10 +471,25 @@ public function jsonSerialize() $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getValueCode())) { - $a[self::FIELD_VALUE_CODE] = $vs; + $a[self::FIELD_VALUE_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUE_CODE][] = $v; + } } if ([] !== ($vs = $this->getValueQuantity())) { - $a[self::FIELD_VALUE_QUANTITY] = $vs; + $a[self::FIELD_VALUE_QUANTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUE_QUANTITY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecialization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecialization.php index ec3ecebd47..c240201af1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecialization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecialization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRDeviceDefinitionSpecialization extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,36 +130,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_SYSTEM_TYPE])) { - $ext = (isset($data[self::FIELD_SYSTEM_TYPE_EXT]) && is_array($data[self::FIELD_SYSTEM_TYPE_EXT])) - ? $data[self::FIELD_SYSTEM_TYPE_EXT] - : null; - if ($data[self::FIELD_SYSTEM_TYPE] instanceof FHIRString) { - $this->setSystemType($data[self::FIELD_SYSTEM_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM_TYPE])) { - $this->setSystemType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SYSTEM_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM_TYPE])) { - $this->setSystemType(new FHIRString(array_merge($ext, $data[self::FIELD_SYSTEM_TYPE]))); - } + if (isset($data[self::FIELD_SYSTEM_TYPE]) || isset($data[self::FIELD_SYSTEM_TYPE_EXT])) { + if (isset($data[self::FIELD_SYSTEM_TYPE])) { + $value = $data[self::FIELD_SYSTEM_TYPE]; } else { - $this->setSystemType(new FHIRString($data[self::FIELD_SYSTEM_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SYSTEM_TYPE_EXT]) && is_array($data[self::FIELD_SYSTEM_TYPE_EXT])) { + $ext = $data[self::FIELD_SYSTEM_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSystemType($value); + } else if (is_array($value)) { + $this->setSystemType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSystemType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystemType(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -362,18 +376,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getSystemType())) { $a[self::FIELD_SYSTEM_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SYSTEM_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifier.php index dd765dcedf..455c47bd89 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDeviceDefinitionUdiDeviceIdentifier extends FHIRBackboneElement const FIELD_JURISDICTION_EXT = '_jurisdiction'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -146,52 +146,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEVICE_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_DEVICE_IDENTIFIER_EXT]) && is_array($data[self::FIELD_DEVICE_IDENTIFIER_EXT])) - ? $data[self::FIELD_DEVICE_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_DEVICE_IDENTIFIER] instanceof FHIRString) { - $this->setDeviceIdentifier($data[self::FIELD_DEVICE_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEVICE_IDENTIFIER])) { - $this->setDeviceIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEVICE_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_DEVICE_IDENTIFIER])) { - $this->setDeviceIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_DEVICE_IDENTIFIER]))); - } + if (isset($data[self::FIELD_DEVICE_IDENTIFIER]) || isset($data[self::FIELD_DEVICE_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_DEVICE_IDENTIFIER])) { + $value = $data[self::FIELD_DEVICE_IDENTIFIER]; } else { - $this->setDeviceIdentifier(new FHIRString($data[self::FIELD_DEVICE_IDENTIFIER])); + $value = null; } - } - if (isset($data[self::FIELD_ISSUER])) { - $ext = (isset($data[self::FIELD_ISSUER_EXT]) && is_array($data[self::FIELD_ISSUER_EXT])) - ? $data[self::FIELD_ISSUER_EXT] - : null; - if ($data[self::FIELD_ISSUER] instanceof FHIRUri) { - $this->setIssuer($data[self::FIELD_ISSUER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUER])) { - $this->setIssuer(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ISSUER]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUER])) { - $this->setIssuer(new FHIRUri(array_merge($ext, $data[self::FIELD_ISSUER]))); - } + if (isset($data[self::FIELD_DEVICE_IDENTIFIER_EXT]) && is_array($data[self::FIELD_DEVICE_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_DEVICE_IDENTIFIER_EXT]; } else { - $this->setIssuer(new FHIRUri($data[self::FIELD_ISSUER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeviceIdentifier($value); + } else if (is_array($value)) { + $this->setDeviceIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeviceIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeviceIdentifier(new FHIRString($ext)); } } - if (isset($data[self::FIELD_JURISDICTION])) { - $ext = (isset($data[self::FIELD_JURISDICTION_EXT]) && is_array($data[self::FIELD_JURISDICTION_EXT])) - ? $data[self::FIELD_JURISDICTION_EXT] - : null; - if ($data[self::FIELD_JURISDICTION] instanceof FHIRUri) { - $this->setJurisdiction($data[self::FIELD_JURISDICTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_JURISDICTION])) { - $this->setJurisdiction(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_JURISDICTION]] + $ext)); - } else if (is_array($data[self::FIELD_JURISDICTION])) { - $this->setJurisdiction(new FHIRUri(array_merge($ext, $data[self::FIELD_JURISDICTION]))); + if (isset($data[self::FIELD_ISSUER]) || isset($data[self::FIELD_ISSUER_EXT])) { + if (isset($data[self::FIELD_ISSUER])) { + $value = $data[self::FIELD_ISSUER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUER_EXT]) && is_array($data[self::FIELD_ISSUER_EXT])) { + $ext = $data[self::FIELD_ISSUER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setIssuer($value); + } else if (is_array($value)) { + $this->setIssuer(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setIssuer(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIssuer(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_JURISDICTION]) || isset($data[self::FIELD_JURISDICTION_EXT])) { + if (isset($data[self::FIELD_JURISDICTION])) { + $value = $data[self::FIELD_JURISDICTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_JURISDICTION_EXT]) && is_array($data[self::FIELD_JURISDICTION_EXT])) { + $ext = $data[self::FIELD_JURISDICTION_EXT]; } else { - $this->setJurisdiction(new FHIRUri($data[self::FIELD_JURISDICTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setJurisdiction($value); + } else if (is_array($value)) { + $this->setJurisdiction(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setJurisdiction(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setJurisdiction(new FHIRUri($ext)); } } } @@ -450,25 +471,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDeviceIdentifier())) { $a[self::FIELD_DEVICE_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEVICE_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getIssuer())) { $a[self::FIELD_ISSUER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ISSUER_EXT] = $enc; } } if (null !== ($v = $this->getJurisdiction())) { $a[self::FIELD_JURISDICTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_JURISDICTION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php index dffb2d5b15..cbef5c326a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDeviceMetricCalibration extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the state of a metric calibration. @@ -145,52 +145,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_STATE])) { - $ext = (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) - ? $data[self::FIELD_STATE_EXT] - : null; - if ($data[self::FIELD_STATE] instanceof FHIRDeviceMetricCalibrationState) { - $this->setState($data[self::FIELD_STATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATE])) { - $this->setState(new FHIRDeviceMetricCalibrationState([FHIRDeviceMetricCalibrationState::FIELD_VALUE => $data[self::FIELD_STATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATE])) { - $this->setState(new FHIRDeviceMetricCalibrationState(array_merge($ext, $data[self::FIELD_STATE]))); - } + if (isset($data[self::FIELD_STATE]) || isset($data[self::FIELD_STATE_EXT])) { + if (isset($data[self::FIELD_STATE])) { + $value = $data[self::FIELD_STATE]; } else { - $this->setState(new FHIRDeviceMetricCalibrationState($data[self::FIELD_STATE])); + $value = null; } - } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRInstant) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRInstant(array_merge($ext, $data[self::FIELD_TIME]))); - } + if (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) { + $ext = $data[self::FIELD_STATE_EXT]; } else { - $this->setTime(new FHIRInstant($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricCalibrationState) { + $this->setState($value); + } else if (is_array($value)) { + $this->setState(new FHIRDeviceMetricCalibrationState(array_merge($ext, $value))); + } else { + $this->setState(new FHIRDeviceMetricCalibrationState([FHIRDeviceMetricCalibrationState::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setState(new FHIRDeviceMetricCalibrationState($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRDeviceMetricCalibrationType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceMetricCalibrationType([FHIRDeviceMetricCalibrationType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceMetricCalibrationType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTime(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRDeviceMetricCalibrationType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricCalibrationType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRDeviceMetricCalibrationType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRDeviceMetricCalibrationType([FHIRDeviceMetricCalibrationType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRDeviceMetricCalibrationType($ext)); } } } @@ -415,25 +436,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getState())) { $a[self::FIELD_STATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricCalibrationState::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricCalibrationState::FIELD_VALUE]); $a[self::FIELD_STATE_EXT] = $enc; } } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricCalibrationType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricCalibrationType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameter.php index 3d929b2b72..43af82d4d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRDeviceRequestParameter extends FHIRBackboneElement const FIELD_VALUE_RANGE = 'valueRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -178,20 +178,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -516,8 +523,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -530,6 +539,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValueRange())) { $a[self::FIELD_VALUE_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMedia.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMedia.php index bf843f5fc0..44bacb2364 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDiagnosticReportMedia extends FHIRBackboneElement const FIELD_LINK = 'link'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -135,20 +135,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_LINK])) { @@ -346,14 +353,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getLink())) { $a[self::FIELD_LINK] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php index 1a41befdc6..815e31c533 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRDocumentManifestRelated extends FHIRBackboneElement const FIELD_REF = 'ref'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An identifier - identifies some entity uniquely and unambiguously. Typically @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRef())) { $a[self::FIELD_REF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php index 0a94d5058a..758a86a119 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDocumentReferenceContent extends FHIRBackboneElement const FIELD_FORMAT = 'format'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getFormat())) { $a[self::FIELD_FORMAT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php index 9d7f28b3e7..62f453f3fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRDocumentReferenceContext extends FHIRBackboneElement const FIELD_SOURCE_PATIENT_INFO = 'sourcePatientInfo'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -756,10 +756,22 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getEncounter())) { - $a[self::FIELD_ENCOUNTER] = $vs; + $a[self::FIELD_ENCOUNTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENCOUNTER][] = $v; + } } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getFacilityType())) { $a[self::FIELD_FACILITY_TYPE] = $v; @@ -771,11 +783,20 @@ public function jsonSerialize() $a[self::FIELD_PRACTICE_SETTING] = $v; } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getSourcePatientInfo())) { $a[self::FIELD_SOURCE_PATIENT_INFO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php index e5ddc85346..fdad90c8a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDocumentReferenceRelatesTo extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The type of relationship between documents. @@ -132,20 +132,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRDocumentRelationshipType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRDocumentRelationshipType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentRelationshipType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRDocumentRelationshipType($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -321,14 +328,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentRelationshipType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage.php index b982eeabf1..663c3443e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRDosage extends FHIRBackboneElement const FIELD_TIMING = 'timing'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -322,20 +322,27 @@ public function __construct($data = null) $this->addAdditionalInstruction(new FHIRCodeableConcept($data[self::FIELD_ADDITIONAL_INSTRUCTION])); } } - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -391,20 +398,27 @@ public function __construct($data = null) $this->setMethod(new FHIRCodeableConcept($data[self::FIELD_METHOD])); } } - if (isset($data[self::FIELD_PATIENT_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) - ? $data[self::FIELD_PATIENT_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_PATIENT_INSTRUCTION] instanceof FHIRString) { - $this->setPatientInstruction($data[self::FIELD_PATIENT_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATIENT_INSTRUCTION])) { - $this->setPatientInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATIENT_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_PATIENT_INSTRUCTION])) { - $this->setPatientInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_PATIENT_INSTRUCTION]))); - } + if (isset($data[self::FIELD_PATIENT_INSTRUCTION]) || isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_PATIENT_INSTRUCTION])) { + $value = $data[self::FIELD_PATIENT_INSTRUCTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_PATIENT_INSTRUCTION_EXT]; } else { - $this->setPatientInstruction(new FHIRString($data[self::FIELD_PATIENT_INSTRUCTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPatientInstruction($value); + } else if (is_array($value)) { + $this->setPatientInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPatientInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatientInstruction(new FHIRString($ext)); } } if (isset($data[self::FIELD_ROUTE])) { @@ -414,20 +428,27 @@ public function __construct($data = null) $this->setRoute(new FHIRCodeableConcept($data[self::FIELD_ROUTE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRInteger) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRInteger(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRInteger($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_SITE])) { @@ -437,20 +458,27 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TIMING])) { @@ -1235,12 +1263,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdditionalInstruction())) { - $a[self::FIELD_ADDITIONAL_INSTRUCTION] = $vs; + $a[self::FIELD_ADDITIONAL_INSTRUCTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIONAL_INSTRUCTION][] = $v; + } } if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -1248,7 +1284,13 @@ public function jsonSerialize() $a[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT] = $v; } if ([] !== ($vs = $this->getDoseAndRate())) { - $a[self::FIELD_DOSE_AND_RATE] = $vs; + $a[self::FIELD_DOSE_AND_RATE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSE_AND_RATE][] = $v; + } } if (null !== ($v = $this->getMaxDosePerAdministration())) { $a[self::FIELD_MAX_DOSE_PER_ADMINISTRATION] = $v; @@ -1264,8 +1306,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatientInstruction())) { $a[self::FIELD_PATIENT_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATIENT_INSTRUCTION_EXT] = $enc; } } @@ -1274,8 +1318,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -1284,14 +1330,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTiming())) { $a[self::FIELD_TIMING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRate.php index 9148140cb0..5c9cc43c2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRDosageDoseAndRate extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -568,6 +568,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertainty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertainty.php index eb0f9060a5..62ca632743 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertainty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertainty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIREffectEvidenceSynthesisCertainty extends FHIRBackboneElement const FIELD_RATING = 'rating'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The EffectEvidenceSynthesis resource describes the difference in an outcome @@ -506,13 +506,34 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCertaintySubcomponent())) { - $a[self::FIELD_CERTAINTY_SUBCOMPONENT] = $vs; + $a[self::FIELD_CERTAINTY_SUBCOMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CERTAINTY_SUBCOMPONENT][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getRating())) { - $a[self::FIELD_RATING] = $vs; + $a[self::FIELD_RATING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RATING][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponent.php index 184d681206..4194317e3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIREffectEvidenceSynthesisCertaintySubcomponent extends FHIRBackboneEleme const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A text note which also contains information about who made the statement and @@ -465,14 +465,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getRating())) { - $a[self::FIELD_RATING] = $vs; + $a[self::FIELD_RATING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RATING][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimate.php index 98f3039ffb..4cf5e0aa87 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIREffectEvidenceSynthesisEffectEstimate extends FHIRBackboneElement const FIELD_VARIANT_STATE = 'variantState'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -185,20 +185,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_PRECISION_ESTIMATE])) { @@ -233,20 +240,27 @@ public function __construct($data = null) $this->setUnitOfMeasure(new FHIRCodeableConcept($data[self::FIELD_UNIT_OF_MEASURE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VARIANT_STATE])) { @@ -642,13 +656,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getPrecisionEstimate())) { - $a[self::FIELD_PRECISION_ESTIMATE] = $vs; + $a[self::FIELD_PRECISION_ESTIMATE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRECISION_ESTIMATE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; @@ -658,14 +680,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } if (null !== ($v = $this->getVariantState())) { $a[self::FIELD_VARIANT_STATE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimate.php index b7fe3a1ecc..babbd33ea2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIREffectEvidenceSynthesisPrecisionEstimate extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -161,52 +161,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FROM])) { - $ext = (isset($data[self::FIELD_FROM_EXT]) && is_array($data[self::FIELD_FROM_EXT])) - ? $data[self::FIELD_FROM_EXT] - : null; - if ($data[self::FIELD_FROM] instanceof FHIRDecimal) { - $this->setFrom($data[self::FIELD_FROM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FROM])) { - $this->setFrom(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FROM]] + $ext)); - } else if (is_array($data[self::FIELD_FROM])) { - $this->setFrom(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FROM]))); - } + if (isset($data[self::FIELD_FROM]) || isset($data[self::FIELD_FROM_EXT])) { + if (isset($data[self::FIELD_FROM])) { + $value = $data[self::FIELD_FROM]; } else { - $this->setFrom(new FHIRDecimal($data[self::FIELD_FROM])); + $value = null; } - } - if (isset($data[self::FIELD_LEVEL])) { - $ext = (isset($data[self::FIELD_LEVEL_EXT]) && is_array($data[self::FIELD_LEVEL_EXT])) - ? $data[self::FIELD_LEVEL_EXT] - : null; - if ($data[self::FIELD_LEVEL] instanceof FHIRDecimal) { - $this->setLevel($data[self::FIELD_LEVEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LEVEL])) { - $this->setLevel(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LEVEL]] + $ext)); - } else if (is_array($data[self::FIELD_LEVEL])) { - $this->setLevel(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LEVEL]))); - } + if (isset($data[self::FIELD_FROM_EXT]) && is_array($data[self::FIELD_FROM_EXT])) { + $ext = $data[self::FIELD_FROM_EXT]; } else { - $this->setLevel(new FHIRDecimal($data[self::FIELD_LEVEL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFrom($value); + } else if (is_array($value)) { + $this->setFrom(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFrom(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFrom(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_TO])) { - $ext = (isset($data[self::FIELD_TO_EXT]) && is_array($data[self::FIELD_TO_EXT])) - ? $data[self::FIELD_TO_EXT] - : null; - if ($data[self::FIELD_TO] instanceof FHIRDecimal) { - $this->setTo($data[self::FIELD_TO]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TO])) { - $this->setTo(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_TO]] + $ext)); - } else if (is_array($data[self::FIELD_TO])) { - $this->setTo(new FHIRDecimal(array_merge($ext, $data[self::FIELD_TO]))); + if (isset($data[self::FIELD_LEVEL]) || isset($data[self::FIELD_LEVEL_EXT])) { + if (isset($data[self::FIELD_LEVEL])) { + $value = $data[self::FIELD_LEVEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LEVEL_EXT]) && is_array($data[self::FIELD_LEVEL_EXT])) { + $ext = $data[self::FIELD_LEVEL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLevel($value); + } else if (is_array($value)) { + $this->setLevel(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLevel(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLevel(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_TO]) || isset($data[self::FIELD_TO_EXT])) { + if (isset($data[self::FIELD_TO])) { + $value = $data[self::FIELD_TO]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TO_EXT]) && is_array($data[self::FIELD_TO_EXT])) { + $ext = $data[self::FIELD_TO_EXT]; } else { - $this->setTo(new FHIRDecimal($data[self::FIELD_TO])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setTo($value); + } else if (is_array($value)) { + $this->setTo(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setTo(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTo(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -512,28 +533,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFrom())) { $a[self::FIELD_FROM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FROM_EXT] = $enc; } } if (null !== ($v = $this->getLevel())) { $a[self::FIELD_LEVEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LEVEL_EXT] = $enc; } } if (null !== ($v = $this->getTo())) { $a[self::FIELD_TO] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_TO_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposure.php index d8fe66c2a4..f71bfa6bc4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIREffectEvidenceSynthesisResultsByExposure extends FHIRBackboneElement const FIELD_VARIANT_STATE = 'variantState'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -159,36 +159,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXPOSURE_STATE])) { - $ext = (isset($data[self::FIELD_EXPOSURE_STATE_EXT]) && is_array($data[self::FIELD_EXPOSURE_STATE_EXT])) - ? $data[self::FIELD_EXPOSURE_STATE_EXT] - : null; - if ($data[self::FIELD_EXPOSURE_STATE] instanceof FHIRExposureState) { - $this->setExposureState($data[self::FIELD_EXPOSURE_STATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPOSURE_STATE])) { - $this->setExposureState(new FHIRExposureState([FHIRExposureState::FIELD_VALUE => $data[self::FIELD_EXPOSURE_STATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPOSURE_STATE])) { - $this->setExposureState(new FHIRExposureState(array_merge($ext, $data[self::FIELD_EXPOSURE_STATE]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPOSURE_STATE]) || isset($data[self::FIELD_EXPOSURE_STATE_EXT])) { + if (isset($data[self::FIELD_EXPOSURE_STATE])) { + $value = $data[self::FIELD_EXPOSURE_STATE]; } else { - $this->setExposureState(new FHIRExposureState($data[self::FIELD_EXPOSURE_STATE])); + $value = null; + } + if (isset($data[self::FIELD_EXPOSURE_STATE_EXT]) && is_array($data[self::FIELD_EXPOSURE_STATE_EXT])) { + $ext = $data[self::FIELD_EXPOSURE_STATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExposureState) { + $this->setExposureState($value); + } else if (is_array($value)) { + $this->setExposureState(new FHIRExposureState(array_merge($ext, $value))); + } else { + $this->setExposureState(new FHIRExposureState([FHIRExposureState::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExposureState(new FHIRExposureState($ext)); } } if (isset($data[self::FIELD_RISK_EVIDENCE_SYNTHESIS])) { @@ -463,15 +477,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExposureState())) { $a[self::FIELD_EXPOSURE_STATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExposureState::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExposureState::FIELD_VALUE]); $a[self::FIELD_EXPOSURE_STATE_EXT] = $enc; } } @@ -481,6 +499,9 @@ public function jsonSerialize() if (null !== ($v = $this->getVariantState())) { $a[self::FIELD_VARIANT_STATE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSize.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSize.php index 019a81dfa4..d366490f68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSize.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSize.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIREffectEvidenceSynthesisSampleSize extends FHIRBackboneElement const FIELD_NUMBER_OF_STUDIES_EXT = '_numberOfStudies'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -145,52 +145,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT])) - ? $data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_PARTICIPANTS] instanceof FHIRInteger) { - $this->setNumberOfParticipants($data[self::FIELD_NUMBER_OF_PARTICIPANTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_PARTICIPANTS])) { - $this->setNumberOfParticipants(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_PARTICIPANTS]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_PARTICIPANTS])) { - $this->setNumberOfParticipants(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_PARTICIPANTS]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setNumberOfParticipants(new FHIRInteger($data[self::FIELD_NUMBER_OF_PARTICIPANTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_NUMBER_OF_STUDIES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_STUDIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_STUDIES_EXT])) - ? $data[self::FIELD_NUMBER_OF_STUDIES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_STUDIES] instanceof FHIRInteger) { - $this->setNumberOfStudies($data[self::FIELD_NUMBER_OF_STUDIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_STUDIES])) { - $this->setNumberOfStudies(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_STUDIES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_STUDIES])) { - $this->setNumberOfStudies(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_STUDIES]))); + if (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS]) || isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS])) { + $value = $data[self::FIELD_NUMBER_OF_PARTICIPANTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfParticipants($value); + } else if (is_array($value)) { + $this->setNumberOfParticipants(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfParticipants(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumberOfParticipants(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_STUDIES]) || isset($data[self::FIELD_NUMBER_OF_STUDIES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_STUDIES])) { + $value = $data[self::FIELD_NUMBER_OF_STUDIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_STUDIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_STUDIES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_STUDIES_EXT]; } else { - $this->setNumberOfStudies(new FHIRInteger($data[self::FIELD_NUMBER_OF_STUDIES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfStudies($value); + } else if (is_array($value)) { + $this->setNumberOfStudies(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfStudies(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfStudies(new FHIRInteger($ext)); } } } @@ -445,25 +466,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfParticipants())) { $a[self::FIELD_NUMBER_OF_PARTICIPANTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfStudies())) { $a[self::FIELD_NUMBER_OF_STUDIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_STUDIES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition.php index 92cd45c77c..30bd45fb68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -427,7 +427,7 @@ class FHIRElementDefinition extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -3798,33 +3798,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if (is_array($data[self::FIELD_ALIAS])) { - foreach($data[self::FIELD_ALIAS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAlias($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAlias(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAlias($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAlias($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAlias(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAlias(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAlias(new FHIRString($iext)); } - } elseif ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->addAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ALIAS])) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else { - $this->addAlias(new FHIRString($data[self::FIELD_ALIAS])); } } if (isset($data[self::FIELD_BASE])) { @@ -3859,49 +3868,65 @@ public function __construct($data = null) $this->addCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRMarkdown) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRMarkdown($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_CONDITION])) { - $ext = (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) - ? $data[self::FIELD_CONDITION_EXT] - : null; - if (is_array($data[self::FIELD_CONDITION])) { - foreach($data[self::FIELD_CONDITION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRId) { - $this->addCondition($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCondition(new FHIRId(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_CONDITION]) || isset($data[self::FIELD_CONDITION_EXT])) { + if (isset($data[self::FIELD_CONDITION])) { + $value = $data[self::FIELD_CONDITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) { + $ext = $data[self::FIELD_CONDITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->addCondition($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRId) { + $this->addCondition($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCondition(new FHIRId(array_merge($v, $iext))); + } else { + $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCondition(new FHIRId($v)); } + } elseif (is_array($value)) { + $this->addCondition(new FHIRId(array_merge($ext, $value))); + } else { + $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCondition(new FHIRId($iext)); } - } elseif ($data[self::FIELD_CONDITION] instanceof FHIRId) { - $this->addCondition($data[self::FIELD_CONDITION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONDITION])) { - $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_CONDITION]] + $ext)); - } else { - $this->addCondition(new FHIRId($data[self::FIELD_CONDITION])); } } if (isset($data[self::FIELD_CONSTRAINT])) { @@ -3922,20 +3947,27 @@ public function __construct($data = null) $this->addConstraint(new FHIRElementDefinitionConstraint($data[self::FIELD_CONSTRAINT])); } } - if (isset($data[self::FIELD_CONTENT_REFERENCE])) { - $ext = (isset($data[self::FIELD_CONTENT_REFERENCE_EXT]) && is_array($data[self::FIELD_CONTENT_REFERENCE_EXT])) - ? $data[self::FIELD_CONTENT_REFERENCE_EXT] - : null; - if ($data[self::FIELD_CONTENT_REFERENCE] instanceof FHIRUri) { - $this->setContentReference($data[self::FIELD_CONTENT_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_REFERENCE])) { - $this->setContentReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_CONTENT_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_REFERENCE])) { - $this->setContentReference(new FHIRUri(array_merge($ext, $data[self::FIELD_CONTENT_REFERENCE]))); - } + if (isset($data[self::FIELD_CONTENT_REFERENCE]) || isset($data[self::FIELD_CONTENT_REFERENCE_EXT])) { + if (isset($data[self::FIELD_CONTENT_REFERENCE])) { + $value = $data[self::FIELD_CONTENT_REFERENCE]; } else { - $this->setContentReference(new FHIRUri($data[self::FIELD_CONTENT_REFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_CONTENT_REFERENCE_EXT]) && is_array($data[self::FIELD_CONTENT_REFERENCE_EXT])) { + $ext = $data[self::FIELD_CONTENT_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setContentReference($value); + } else if (is_array($value)) { + $this->setContentReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setContentReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentReference(new FHIRUri($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_ADDRESS])) { @@ -3966,68 +3998,96 @@ public function __construct($data = null) $this->setDefaultValueAttachment(new FHIRAttachment($data[self::FIELD_DEFAULT_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setDefaultValueBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]; } else { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setDefaultValueBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]; } else { - $this->setDefaultValueBoolean(new FHIRBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])); + $ext = []; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_CANONICAL] instanceof FHIRCanonical) { - $this->setDefaultValueCanonical($data[self::FIELD_DEFAULT_VALUE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_CANONICAL])) { - $this->setDefaultValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_CANONICAL])) { - $this->setDefaultValueCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_CANONICAL]))); + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setDefaultValueBase64Binary($value); + } else if (is_array($value)) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]) || isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]; } else { - $this->setDefaultValueCanonical(new FHIRCanonical($data[self::FIELD_DEFAULT_VALUE_CANONICAL])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDefaultValueBoolean($value); + } else if (is_array($value)) { + $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueBoolean(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_CODE] instanceof FHIRCode) { - $this->setDefaultValueCode($data[self::FIELD_DEFAULT_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_CODE]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL]) || isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL])) { + $value = $data[self::FIELD_DEFAULT_VALUE_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefaultValueCanonical($value); + } else if (is_array($value)) { + $this->setDefaultValueCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefaultValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE]) || isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_CODE_EXT]; } else { - $this->setDefaultValueCode(new FHIRCode($data[self::FIELD_DEFAULT_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setDefaultValueCode($value); + } else if (is_array($value)) { + $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { @@ -4079,52 +4139,73 @@ public function __construct($data = null) $this->setDefaultValueDataRequirement(new FHIRDataRequirement($data[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE] instanceof FHIRDate) { - $this->setDefaultValueDate($data[self::FIELD_DEFAULT_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE]; } else { - $this->setDefaultValueDate(new FHIRDate($data[self::FIELD_DEFAULT_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setDefaultValueDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_EXT]; } else { - $this->setDefaultValueDateTime(new FHIRDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDefaultValueDate($value); + } else if (is_array($value)) { + $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setDefaultValueDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDefaultValueDateTime($value); + } else if (is_array($value)) { + $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL]) || isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]; } else { - $this->setDefaultValueDecimal(new FHIRDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDefaultValueDecimal($value); + } else if (is_array($value)) { + $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_DISTANCE])) { @@ -4162,20 +4243,27 @@ public function __construct($data = null) $this->setDefaultValueHumanName(new FHIRHumanName($data[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_ID] instanceof FHIRId) { - $this->setDefaultValueId($data[self::FIELD_DEFAULT_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_ID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID]) || isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_ID_EXT]; } else { - $this->setDefaultValueId(new FHIRId($data[self::FIELD_DEFAULT_VALUE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setDefaultValueId($value); + } else if (is_array($value)) { + $this->setDefaultValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { @@ -4185,52 +4273,73 @@ public function __construct($data = null) $this->setDefaultValueIdentifier(new FHIRIdentifier($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setDefaultValueInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT]) || isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INSTANT]; } else { - $this->setDefaultValueInstant(new FHIRInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setDefaultValueInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]; } else { - $this->setDefaultValueInteger(new FHIRInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setDefaultValueInstant($value); + } else if (is_array($value)) { + $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setDefaultValueMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER]) || isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDefaultValueInteger($value); + } else if (is_array($value)) { + $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]) || isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]; } else { - $this->setDefaultValueMarkdown(new FHIRMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDefaultValueMarkdown($value); + } else if (is_array($value)) { + $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_META])) { @@ -4247,20 +4356,27 @@ public function __construct($data = null) $this->setDefaultValueMoney(new FHIRMoney($data[self::FIELD_DEFAULT_VALUE_MONEY])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_OID] instanceof FHIROid) { - $this->setDefaultValueOid($data[self::FIELD_DEFAULT_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_OID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID]) || isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_OID]; } else { - $this->setDefaultValueOid(new FHIROid($data[self::FIELD_DEFAULT_VALUE_OID])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_OID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setDefaultValueOid($value); + } else if (is_array($value)) { + $this->setDefaultValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION])) { @@ -4277,20 +4393,27 @@ public function __construct($data = null) $this->setDefaultValuePeriod(new FHIRPeriod($data[self::FIELD_DEFAULT_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setDefaultValuePositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]; } else { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDefaultValuePositiveInt($value); + } else if (is_array($value)) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_QUANTITY])) { @@ -4342,36 +4465,50 @@ public function __construct($data = null) $this->setDefaultValueSignature(new FHIRSignature($data[self::FIELD_DEFAULT_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_STRING] instanceof FHIRString) { - $this->setDefaultValueString($data[self::FIELD_DEFAULT_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_STRING]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING]) || isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { + $value = $data[self::FIELD_DEFAULT_VALUE_STRING]; } else { - $this->setDefaultValueString(new FHIRString($data[self::FIELD_DEFAULT_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_TIME] instanceof FHIRTime) { - $this->setDefaultValueTime($data[self::FIELD_DEFAULT_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_TIME]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefaultValueString($value); + } else if (is_array($value)) { + $this->setDefaultValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_TIME]; } else { - $this->setDefaultValueTime(new FHIRTime($data[self::FIELD_DEFAULT_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setDefaultValueTime($value); + } else if (is_array($value)) { + $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_TIMING])) { @@ -4388,52 +4525,73 @@ public function __construct($data = null) $this->setDefaultValueTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setDefaultValueUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]; } else { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_URI] instanceof FHIRUri) { - $this->setDefaultValueUri($data[self::FIELD_DEFAULT_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_URI]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setDefaultValueUri(new FHIRUri($data[self::FIELD_DEFAULT_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setDefaultValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_URL])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_URL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URL_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_URL_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_URL] instanceof FHIRUrl) { - $this->setDefaultValueUrl($data[self::FIELD_DEFAULT_VALUE_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_URL])) { - $this->setDefaultValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_URL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_URL])) { - $this->setDefaultValueUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_URL]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_URI]) || isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { + $value = $data[self::FIELD_DEFAULT_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefaultValueUri($value); + } else if (is_array($value)) { + $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URL]) || isset($data[self::FIELD_DEFAULT_VALUE_URL_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_URL])) { + $value = $data[self::FIELD_DEFAULT_VALUE_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URL_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_URL_EXT]; } else { - $this->setDefaultValueUrl(new FHIRUrl($data[self::FIELD_DEFAULT_VALUE_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setDefaultValueUrl($value); + } else if (is_array($value)) { + $this->setDefaultValueUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setDefaultValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT])) { @@ -4443,36 +4601,50 @@ public function __construct($data = null) $this->setDefaultValueUsageContext(new FHIRUsageContext($data[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_UUID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UUID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_UUID] instanceof FHIRUuid) { - $this->setDefaultValueUuid($data[self::FIELD_DEFAULT_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_UUID])) { - $this->setDefaultValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_UUID])) { - $this->setDefaultValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_UUID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UUID]) || isset($data[self::FIELD_DEFAULT_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_UUID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_UUID]; } else { - $this->setDefaultValueUuid(new FHIRUuid($data[self::FIELD_DEFAULT_VALUE_UUID])); + $value = null; } - } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRMarkdown) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DEFINITION]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_UUID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setDefaultValueUuid($value); + } else if (is_array($value)) { + $this->setDefaultValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setDefaultValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueUuid(new FHIRUuid($ext)); + } + } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRMarkdown($data[self::FIELD_DEFINITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EXAMPLE])) { @@ -4521,68 +4693,96 @@ public function __construct($data = null) $this->setFixedAttachment(new FHIRAttachment($data[self::FIELD_FIXED_ATTACHMENT])); } } - if (isset($data[self::FIELD_FIXED_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_FIXED_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_FIXED_BASE_64BINARY_EXT])) - ? $data[self::FIELD_FIXED_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_FIXED_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setFixedBase64Binary($data[self::FIELD_FIXED_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_BASE_64BINARY])) { - $this->setFixedBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_FIXED_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_BASE_64BINARY])) { - $this->setFixedBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_FIXED_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_FIXED_BASE_64BINARY]) || isset($data[self::FIELD_FIXED_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_FIXED_BASE_64BINARY])) { + $value = $data[self::FIELD_FIXED_BASE_64BINARY]; } else { - $this->setFixedBase64Binary(new FHIRBase64Binary($data[self::FIELD_FIXED_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_FIXED_BOOLEAN_EXT]) && is_array($data[self::FIELD_FIXED_BOOLEAN_EXT])) - ? $data[self::FIELD_FIXED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_FIXED_BOOLEAN] instanceof FHIRBoolean) { - $this->setFixedBoolean($data[self::FIELD_FIXED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_BOOLEAN])) { - $this->setFixedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FIXED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_BOOLEAN])) { - $this->setFixedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FIXED_BOOLEAN]))); - } + if (isset($data[self::FIELD_FIXED_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_FIXED_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_FIXED_BASE_64BINARY_EXT]; } else { - $this->setFixedBoolean(new FHIRBoolean($data[self::FIELD_FIXED_BOOLEAN])); + $ext = []; } - } - if (isset($data[self::FIELD_FIXED_CANONICAL])) { - $ext = (isset($data[self::FIELD_FIXED_CANONICAL_EXT]) && is_array($data[self::FIELD_FIXED_CANONICAL_EXT])) - ? $data[self::FIELD_FIXED_CANONICAL_EXT] - : null; - if ($data[self::FIELD_FIXED_CANONICAL] instanceof FHIRCanonical) { - $this->setFixedCanonical($data[self::FIELD_FIXED_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_CANONICAL])) { - $this->setFixedCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_FIXED_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_CANONICAL])) { - $this->setFixedCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_FIXED_CANONICAL]))); + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setFixedBase64Binary($value); + } else if (is_array($value)) { + $this->setFixedBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setFixedBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_FIXED_BOOLEAN]) || isset($data[self::FIELD_FIXED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_FIXED_BOOLEAN])) { + $value = $data[self::FIELD_FIXED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_BOOLEAN_EXT]) && is_array($data[self::FIELD_FIXED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_FIXED_BOOLEAN_EXT]; } else { - $this->setFixedCanonical(new FHIRCanonical($data[self::FIELD_FIXED_CANONICAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFixedBoolean($value); + } else if (is_array($value)) { + $this->setFixedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFixedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedBoolean(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_FIXED_CODE])) { - $ext = (isset($data[self::FIELD_FIXED_CODE_EXT]) && is_array($data[self::FIELD_FIXED_CODE_EXT])) - ? $data[self::FIELD_FIXED_CODE_EXT] - : null; - if ($data[self::FIELD_FIXED_CODE] instanceof FHIRCode) { - $this->setFixedCode($data[self::FIELD_FIXED_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_CODE])) { - $this->setFixedCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FIXED_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_CODE])) { - $this->setFixedCode(new FHIRCode(array_merge($ext, $data[self::FIELD_FIXED_CODE]))); + if (isset($data[self::FIELD_FIXED_CANONICAL]) || isset($data[self::FIELD_FIXED_CANONICAL_EXT])) { + if (isset($data[self::FIELD_FIXED_CANONICAL])) { + $value = $data[self::FIELD_FIXED_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_CANONICAL_EXT]) && is_array($data[self::FIELD_FIXED_CANONICAL_EXT])) { + $ext = $data[self::FIELD_FIXED_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setFixedCanonical($value); + } else if (is_array($value)) { + $this->setFixedCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setFixedCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_FIXED_CODE]) || isset($data[self::FIELD_FIXED_CODE_EXT])) { + if (isset($data[self::FIELD_FIXED_CODE])) { + $value = $data[self::FIELD_FIXED_CODE]; } else { - $this->setFixedCode(new FHIRCode($data[self::FIELD_FIXED_CODE])); + $value = null; + } + if (isset($data[self::FIELD_FIXED_CODE_EXT]) && is_array($data[self::FIELD_FIXED_CODE_EXT])) { + $ext = $data[self::FIELD_FIXED_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setFixedCode($value); + } else if (is_array($value)) { + $this->setFixedCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setFixedCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_FIXED_CODEABLE_CONCEPT])) { @@ -4634,52 +4834,73 @@ public function __construct($data = null) $this->setFixedDataRequirement(new FHIRDataRequirement($data[self::FIELD_FIXED_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_FIXED_DATE])) { - $ext = (isset($data[self::FIELD_FIXED_DATE_EXT]) && is_array($data[self::FIELD_FIXED_DATE_EXT])) - ? $data[self::FIELD_FIXED_DATE_EXT] - : null; - if ($data[self::FIELD_FIXED_DATE] instanceof FHIRDate) { - $this->setFixedDate($data[self::FIELD_FIXED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_DATE])) { - $this->setFixedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_FIXED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_DATE])) { - $this->setFixedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_FIXED_DATE]))); - } + if (isset($data[self::FIELD_FIXED_DATE]) || isset($data[self::FIELD_FIXED_DATE_EXT])) { + if (isset($data[self::FIELD_FIXED_DATE])) { + $value = $data[self::FIELD_FIXED_DATE]; } else { - $this->setFixedDate(new FHIRDate($data[self::FIELD_FIXED_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_FIXED_DATE_TIME_EXT]) && is_array($data[self::FIELD_FIXED_DATE_TIME_EXT])) - ? $data[self::FIELD_FIXED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_FIXED_DATE_TIME] instanceof FHIRDateTime) { - $this->setFixedDateTime($data[self::FIELD_FIXED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_DATE_TIME])) { - $this->setFixedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_FIXED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_DATE_TIME])) { - $this->setFixedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_FIXED_DATE_TIME]))); - } + if (isset($data[self::FIELD_FIXED_DATE_EXT]) && is_array($data[self::FIELD_FIXED_DATE_EXT])) { + $ext = $data[self::FIELD_FIXED_DATE_EXT]; } else { - $this->setFixedDateTime(new FHIRDateTime($data[self::FIELD_FIXED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setFixedDate($value); + } else if (is_array($value)) { + $this->setFixedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setFixedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_FIXED_DECIMAL])) { - $ext = (isset($data[self::FIELD_FIXED_DECIMAL_EXT]) && is_array($data[self::FIELD_FIXED_DECIMAL_EXT])) - ? $data[self::FIELD_FIXED_DECIMAL_EXT] - : null; - if ($data[self::FIELD_FIXED_DECIMAL] instanceof FHIRDecimal) { - $this->setFixedDecimal($data[self::FIELD_FIXED_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_DECIMAL])) { - $this->setFixedDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FIXED_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_DECIMAL])) { - $this->setFixedDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FIXED_DECIMAL]))); + if (isset($data[self::FIELD_FIXED_DATE_TIME]) || isset($data[self::FIELD_FIXED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_FIXED_DATE_TIME])) { + $value = $data[self::FIELD_FIXED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_DATE_TIME_EXT]) && is_array($data[self::FIELD_FIXED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_FIXED_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setFixedDateTime($value); + } else if (is_array($value)) { + $this->setFixedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setFixedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_FIXED_DECIMAL]) || isset($data[self::FIELD_FIXED_DECIMAL_EXT])) { + if (isset($data[self::FIELD_FIXED_DECIMAL])) { + $value = $data[self::FIELD_FIXED_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_DECIMAL_EXT]) && is_array($data[self::FIELD_FIXED_DECIMAL_EXT])) { + $ext = $data[self::FIELD_FIXED_DECIMAL_EXT]; } else { - $this->setFixedDecimal(new FHIRDecimal($data[self::FIELD_FIXED_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFixedDecimal($value); + } else if (is_array($value)) { + $this->setFixedDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFixedDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_FIXED_DISTANCE])) { @@ -4717,20 +4938,27 @@ public function __construct($data = null) $this->setFixedHumanName(new FHIRHumanName($data[self::FIELD_FIXED_HUMAN_NAME])); } } - if (isset($data[self::FIELD_FIXED_ID])) { - $ext = (isset($data[self::FIELD_FIXED_ID_EXT]) && is_array($data[self::FIELD_FIXED_ID_EXT])) - ? $data[self::FIELD_FIXED_ID_EXT] - : null; - if ($data[self::FIELD_FIXED_ID] instanceof FHIRId) { - $this->setFixedId($data[self::FIELD_FIXED_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_ID])) { - $this->setFixedId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FIXED_ID]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_ID])) { - $this->setFixedId(new FHIRId(array_merge($ext, $data[self::FIELD_FIXED_ID]))); - } + if (isset($data[self::FIELD_FIXED_ID]) || isset($data[self::FIELD_FIXED_ID_EXT])) { + if (isset($data[self::FIELD_FIXED_ID])) { + $value = $data[self::FIELD_FIXED_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_ID_EXT]) && is_array($data[self::FIELD_FIXED_ID_EXT])) { + $ext = $data[self::FIELD_FIXED_ID_EXT]; } else { - $this->setFixedId(new FHIRId($data[self::FIELD_FIXED_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFixedId($value); + } else if (is_array($value)) { + $this->setFixedId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFixedId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedId(new FHIRId($ext)); } } if (isset($data[self::FIELD_FIXED_IDENTIFIER])) { @@ -4740,52 +4968,73 @@ public function __construct($data = null) $this->setFixedIdentifier(new FHIRIdentifier($data[self::FIELD_FIXED_IDENTIFIER])); } } - if (isset($data[self::FIELD_FIXED_INSTANT])) { - $ext = (isset($data[self::FIELD_FIXED_INSTANT_EXT]) && is_array($data[self::FIELD_FIXED_INSTANT_EXT])) - ? $data[self::FIELD_FIXED_INSTANT_EXT] - : null; - if ($data[self::FIELD_FIXED_INSTANT] instanceof FHIRInstant) { - $this->setFixedInstant($data[self::FIELD_FIXED_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_INSTANT])) { - $this->setFixedInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_FIXED_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_INSTANT])) { - $this->setFixedInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_FIXED_INSTANT]))); - } + if (isset($data[self::FIELD_FIXED_INSTANT]) || isset($data[self::FIELD_FIXED_INSTANT_EXT])) { + if (isset($data[self::FIELD_FIXED_INSTANT])) { + $value = $data[self::FIELD_FIXED_INSTANT]; } else { - $this->setFixedInstant(new FHIRInstant($data[self::FIELD_FIXED_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_INTEGER])) { - $ext = (isset($data[self::FIELD_FIXED_INTEGER_EXT]) && is_array($data[self::FIELD_FIXED_INTEGER_EXT])) - ? $data[self::FIELD_FIXED_INTEGER_EXT] - : null; - if ($data[self::FIELD_FIXED_INTEGER] instanceof FHIRInteger) { - $this->setFixedInteger($data[self::FIELD_FIXED_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_INTEGER])) { - $this->setFixedInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_FIXED_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_INTEGER])) { - $this->setFixedInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_FIXED_INTEGER]))); - } + if (isset($data[self::FIELD_FIXED_INSTANT_EXT]) && is_array($data[self::FIELD_FIXED_INSTANT_EXT])) { + $ext = $data[self::FIELD_FIXED_INSTANT_EXT]; } else { - $this->setFixedInteger(new FHIRInteger($data[self::FIELD_FIXED_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setFixedInstant($value); + } else if (is_array($value)) { + $this->setFixedInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setFixedInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_FIXED_MARKDOWN])) { - $ext = (isset($data[self::FIELD_FIXED_MARKDOWN_EXT]) && is_array($data[self::FIELD_FIXED_MARKDOWN_EXT])) - ? $data[self::FIELD_FIXED_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_FIXED_MARKDOWN] instanceof FHIRMarkdown) { - $this->setFixedMarkdown($data[self::FIELD_FIXED_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_MARKDOWN])) { - $this->setFixedMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_FIXED_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_MARKDOWN])) { - $this->setFixedMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_FIXED_MARKDOWN]))); + if (isset($data[self::FIELD_FIXED_INTEGER]) || isset($data[self::FIELD_FIXED_INTEGER_EXT])) { + if (isset($data[self::FIELD_FIXED_INTEGER])) { + $value = $data[self::FIELD_FIXED_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_INTEGER_EXT]) && is_array($data[self::FIELD_FIXED_INTEGER_EXT])) { + $ext = $data[self::FIELD_FIXED_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setFixedInteger($value); + } else if (is_array($value)) { + $this->setFixedInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setFixedInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_FIXED_MARKDOWN]) || isset($data[self::FIELD_FIXED_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_FIXED_MARKDOWN])) { + $value = $data[self::FIELD_FIXED_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_MARKDOWN_EXT]) && is_array($data[self::FIELD_FIXED_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_FIXED_MARKDOWN_EXT]; } else { - $this->setFixedMarkdown(new FHIRMarkdown($data[self::FIELD_FIXED_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setFixedMarkdown($value); + } else if (is_array($value)) { + $this->setFixedMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setFixedMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_FIXED_META])) { @@ -4802,20 +5051,27 @@ public function __construct($data = null) $this->setFixedMoney(new FHIRMoney($data[self::FIELD_FIXED_MONEY])); } } - if (isset($data[self::FIELD_FIXED_OID])) { - $ext = (isset($data[self::FIELD_FIXED_OID_EXT]) && is_array($data[self::FIELD_FIXED_OID_EXT])) - ? $data[self::FIELD_FIXED_OID_EXT] - : null; - if ($data[self::FIELD_FIXED_OID] instanceof FHIROid) { - $this->setFixedOid($data[self::FIELD_FIXED_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_OID])) { - $this->setFixedOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_FIXED_OID]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_OID])) { - $this->setFixedOid(new FHIROid(array_merge($ext, $data[self::FIELD_FIXED_OID]))); - } + if (isset($data[self::FIELD_FIXED_OID]) || isset($data[self::FIELD_FIXED_OID_EXT])) { + if (isset($data[self::FIELD_FIXED_OID])) { + $value = $data[self::FIELD_FIXED_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_OID_EXT]) && is_array($data[self::FIELD_FIXED_OID_EXT])) { + $ext = $data[self::FIELD_FIXED_OID_EXT]; } else { - $this->setFixedOid(new FHIROid($data[self::FIELD_FIXED_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setFixedOid($value); + } else if (is_array($value)) { + $this->setFixedOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setFixedOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_FIXED_PARAMETER_DEFINITION])) { @@ -4832,20 +5088,27 @@ public function __construct($data = null) $this->setFixedPeriod(new FHIRPeriod($data[self::FIELD_FIXED_PERIOD])); } } - if (isset($data[self::FIELD_FIXED_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_FIXED_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_FIXED_POSITIVE_INT_EXT])) - ? $data[self::FIELD_FIXED_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_FIXED_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setFixedPositiveInt($data[self::FIELD_FIXED_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_POSITIVE_INT])) { - $this->setFixedPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_FIXED_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_POSITIVE_INT])) { - $this->setFixedPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_FIXED_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_FIXED_POSITIVE_INT]) || isset($data[self::FIELD_FIXED_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_FIXED_POSITIVE_INT])) { + $value = $data[self::FIELD_FIXED_POSITIVE_INT]; } else { - $this->setFixedPositiveInt(new FHIRPositiveInt($data[self::FIELD_FIXED_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_FIXED_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_FIXED_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_FIXED_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setFixedPositiveInt($value); + } else if (is_array($value)) { + $this->setFixedPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setFixedPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedPositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_FIXED_QUANTITY])) { @@ -4897,36 +5160,50 @@ public function __construct($data = null) $this->setFixedSignature(new FHIRSignature($data[self::FIELD_FIXED_SIGNATURE])); } } - if (isset($data[self::FIELD_FIXED_STRING])) { - $ext = (isset($data[self::FIELD_FIXED_STRING_EXT]) && is_array($data[self::FIELD_FIXED_STRING_EXT])) - ? $data[self::FIELD_FIXED_STRING_EXT] - : null; - if ($data[self::FIELD_FIXED_STRING] instanceof FHIRString) { - $this->setFixedString($data[self::FIELD_FIXED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_STRING])) { - $this->setFixedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FIXED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_STRING])) { - $this->setFixedString(new FHIRString(array_merge($ext, $data[self::FIELD_FIXED_STRING]))); - } + if (isset($data[self::FIELD_FIXED_STRING]) || isset($data[self::FIELD_FIXED_STRING_EXT])) { + if (isset($data[self::FIELD_FIXED_STRING])) { + $value = $data[self::FIELD_FIXED_STRING]; } else { - $this->setFixedString(new FHIRString($data[self::FIELD_FIXED_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_TIME])) { - $ext = (isset($data[self::FIELD_FIXED_TIME_EXT]) && is_array($data[self::FIELD_FIXED_TIME_EXT])) - ? $data[self::FIELD_FIXED_TIME_EXT] - : null; - if ($data[self::FIELD_FIXED_TIME] instanceof FHIRTime) { - $this->setFixedTime($data[self::FIELD_FIXED_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_TIME])) { - $this->setFixedTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_FIXED_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_TIME])) { - $this->setFixedTime(new FHIRTime(array_merge($ext, $data[self::FIELD_FIXED_TIME]))); + if (isset($data[self::FIELD_FIXED_STRING_EXT]) && is_array($data[self::FIELD_FIXED_STRING_EXT])) { + $ext = $data[self::FIELD_FIXED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setFixedString($value); + } else if (is_array($value)) { + $this->setFixedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setFixedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_FIXED_TIME]) || isset($data[self::FIELD_FIXED_TIME_EXT])) { + if (isset($data[self::FIELD_FIXED_TIME])) { + $value = $data[self::FIELD_FIXED_TIME]; } else { - $this->setFixedTime(new FHIRTime($data[self::FIELD_FIXED_TIME])); + $value = null; + } + if (isset($data[self::FIELD_FIXED_TIME_EXT]) && is_array($data[self::FIELD_FIXED_TIME_EXT])) { + $ext = $data[self::FIELD_FIXED_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setFixedTime($value); + } else if (is_array($value)) { + $this->setFixedTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setFixedTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_FIXED_TIMING])) { @@ -4943,52 +5220,73 @@ public function __construct($data = null) $this->setFixedTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_FIXED_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_FIXED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_FIXED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_FIXED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_FIXED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_FIXED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setFixedUnsignedInt($data[self::FIELD_FIXED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_UNSIGNED_INT])) { - $this->setFixedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_FIXED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_UNSIGNED_INT])) { - $this->setFixedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_FIXED_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_FIXED_UNSIGNED_INT]) || isset($data[self::FIELD_FIXED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_FIXED_UNSIGNED_INT])) { + $value = $data[self::FIELD_FIXED_UNSIGNED_INT]; } else { - $this->setFixedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_FIXED_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_URI])) { - $ext = (isset($data[self::FIELD_FIXED_URI_EXT]) && is_array($data[self::FIELD_FIXED_URI_EXT])) - ? $data[self::FIELD_FIXED_URI_EXT] - : null; - if ($data[self::FIELD_FIXED_URI] instanceof FHIRUri) { - $this->setFixedUri($data[self::FIELD_FIXED_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_URI])) { - $this->setFixedUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_FIXED_URI]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_URI])) { - $this->setFixedUri(new FHIRUri(array_merge($ext, $data[self::FIELD_FIXED_URI]))); - } + if (isset($data[self::FIELD_FIXED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_FIXED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_FIXED_UNSIGNED_INT_EXT]; } else { - $this->setFixedUri(new FHIRUri($data[self::FIELD_FIXED_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setFixedUnsignedInt($value); + } else if (is_array($value)) { + $this->setFixedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setFixedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_FIXED_URL])) { - $ext = (isset($data[self::FIELD_FIXED_URL_EXT]) && is_array($data[self::FIELD_FIXED_URL_EXT])) - ? $data[self::FIELD_FIXED_URL_EXT] - : null; - if ($data[self::FIELD_FIXED_URL] instanceof FHIRUrl) { - $this->setFixedUrl($data[self::FIELD_FIXED_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_URL])) { - $this->setFixedUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_FIXED_URL]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_URL])) { - $this->setFixedUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_FIXED_URL]))); + if (isset($data[self::FIELD_FIXED_URI]) || isset($data[self::FIELD_FIXED_URI_EXT])) { + if (isset($data[self::FIELD_FIXED_URI])) { + $value = $data[self::FIELD_FIXED_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_URI_EXT]) && is_array($data[self::FIELD_FIXED_URI_EXT])) { + $ext = $data[self::FIELD_FIXED_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setFixedUri($value); + } else if (is_array($value)) { + $this->setFixedUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setFixedUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_FIXED_URL]) || isset($data[self::FIELD_FIXED_URL_EXT])) { + if (isset($data[self::FIELD_FIXED_URL])) { + $value = $data[self::FIELD_FIXED_URL]; } else { - $this->setFixedUrl(new FHIRUrl($data[self::FIELD_FIXED_URL])); + $value = null; + } + if (isset($data[self::FIELD_FIXED_URL_EXT]) && is_array($data[self::FIELD_FIXED_URL_EXT])) { + $ext = $data[self::FIELD_FIXED_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setFixedUrl($value); + } else if (is_array($value)) { + $this->setFixedUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setFixedUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_FIXED_USAGE_CONTEXT])) { @@ -4998,84 +5296,119 @@ public function __construct($data = null) $this->setFixedUsageContext(new FHIRUsageContext($data[self::FIELD_FIXED_USAGE_CONTEXT])); } } - if (isset($data[self::FIELD_FIXED_UUID])) { - $ext = (isset($data[self::FIELD_FIXED_UUID_EXT]) && is_array($data[self::FIELD_FIXED_UUID_EXT])) - ? $data[self::FIELD_FIXED_UUID_EXT] - : null; - if ($data[self::FIELD_FIXED_UUID] instanceof FHIRUuid) { - $this->setFixedUuid($data[self::FIELD_FIXED_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_UUID])) { - $this->setFixedUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_FIXED_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_UUID])) { - $this->setFixedUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_FIXED_UUID]))); - } + if (isset($data[self::FIELD_FIXED_UUID]) || isset($data[self::FIELD_FIXED_UUID_EXT])) { + if (isset($data[self::FIELD_FIXED_UUID])) { + $value = $data[self::FIELD_FIXED_UUID]; } else { - $this->setFixedUuid(new FHIRUuid($data[self::FIELD_FIXED_UUID])); + $value = null; } - } - if (isset($data[self::FIELD_IS_MODIFIER])) { - $ext = (isset($data[self::FIELD_IS_MODIFIER_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_EXT])) - ? $data[self::FIELD_IS_MODIFIER_EXT] - : null; - if ($data[self::FIELD_IS_MODIFIER] instanceof FHIRBoolean) { - $this->setIsModifier($data[self::FIELD_IS_MODIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_MODIFIER])) { - $this->setIsModifier(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_MODIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IS_MODIFIER])) { - $this->setIsModifier(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_MODIFIER]))); - } + if (isset($data[self::FIELD_FIXED_UUID_EXT]) && is_array($data[self::FIELD_FIXED_UUID_EXT])) { + $ext = $data[self::FIELD_FIXED_UUID_EXT]; } else { - $this->setIsModifier(new FHIRBoolean($data[self::FIELD_IS_MODIFIER])); + $ext = []; } - } - if (isset($data[self::FIELD_IS_MODIFIER_REASON])) { - $ext = (isset($data[self::FIELD_IS_MODIFIER_REASON_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_REASON_EXT])) - ? $data[self::FIELD_IS_MODIFIER_REASON_EXT] - : null; - if ($data[self::FIELD_IS_MODIFIER_REASON] instanceof FHIRString) { - $this->setIsModifierReason($data[self::FIELD_IS_MODIFIER_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_MODIFIER_REASON])) { - $this->setIsModifierReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IS_MODIFIER_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_IS_MODIFIER_REASON])) { - $this->setIsModifierReason(new FHIRString(array_merge($ext, $data[self::FIELD_IS_MODIFIER_REASON]))); + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setFixedUuid($value); + } else if (is_array($value)) { + $this->setFixedUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setFixedUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setIsModifierReason(new FHIRString($data[self::FIELD_IS_MODIFIER_REASON])); + } else if ([] !== $ext) { + $this->setFixedUuid(new FHIRUuid($ext)); } } - if (isset($data[self::FIELD_IS_SUMMARY])) { - $ext = (isset($data[self::FIELD_IS_SUMMARY_EXT]) && is_array($data[self::FIELD_IS_SUMMARY_EXT])) - ? $data[self::FIELD_IS_SUMMARY_EXT] - : null; - if ($data[self::FIELD_IS_SUMMARY] instanceof FHIRBoolean) { - $this->setIsSummary($data[self::FIELD_IS_SUMMARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_SUMMARY])) { - $this->setIsSummary(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_SUMMARY]] + $ext)); - } else if (is_array($data[self::FIELD_IS_SUMMARY])) { - $this->setIsSummary(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_SUMMARY]))); + if (isset($data[self::FIELD_IS_MODIFIER]) || isset($data[self::FIELD_IS_MODIFIER_EXT])) { + if (isset($data[self::FIELD_IS_MODIFIER])) { + $value = $data[self::FIELD_IS_MODIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_MODIFIER_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_EXT])) { + $ext = $data[self::FIELD_IS_MODIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsModifier($value); + } else if (is_array($value)) { + $this->setIsModifier(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsModifier(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIsModifier(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_IS_MODIFIER_REASON]) || isset($data[self::FIELD_IS_MODIFIER_REASON_EXT])) { + if (isset($data[self::FIELD_IS_MODIFIER_REASON])) { + $value = $data[self::FIELD_IS_MODIFIER_REASON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_MODIFIER_REASON_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_REASON_EXT])) { + $ext = $data[self::FIELD_IS_MODIFIER_REASON_EXT]; } else { - $this->setIsSummary(new FHIRBoolean($data[self::FIELD_IS_SUMMARY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIsModifierReason($value); + } else if (is_array($value)) { + $this->setIsModifierReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIsModifierReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsModifierReason(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); + if (isset($data[self::FIELD_IS_SUMMARY]) || isset($data[self::FIELD_IS_SUMMARY_EXT])) { + if (isset($data[self::FIELD_IS_SUMMARY])) { + $value = $data[self::FIELD_IS_SUMMARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_SUMMARY_EXT]) && is_array($data[self::FIELD_IS_SUMMARY_EXT])) { + $ext = $data[self::FIELD_IS_SUMMARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsSummary($value); + } else if (is_array($value)) { + $this->setIsSummary(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsSummary(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIsSummary(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); } } if (isset($data[self::FIELD_MAPPING])) { @@ -5096,299 +5429,425 @@ public function __construct($data = null) $this->addMapping(new FHIRElementDefinitionMapping($data[self::FIELD_MAPPING])); } } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX_LENGTH]) || isset($data[self::FIELD_MAX_LENGTH_EXT])) { + if (isset($data[self::FIELD_MAX_LENGTH])) { + $value = $data[self::FIELD_MAX_LENGTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) { + $ext = $data[self::FIELD_MAX_LENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMaxLength($value); + } else if (is_array($value)) { + $this->setMaxLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxLength(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_DATE]) || isset($data[self::FIELD_MAX_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_DATE])) { + $value = $data[self::FIELD_MAX_VALUE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setMaxValueDate($value); + } else if (is_array($value)) { + $this->setMaxValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setMaxValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME]) || isset($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_MAX_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setMaxValueDateTime($value); + } else if (is_array($value)) { + $this->setMaxValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setMaxValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_DECIMAL]) || isset($data[self::FIELD_MAX_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_DECIMAL])) { + $value = $data[self::FIELD_MAX_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setMaxValueDecimal($value); + } else if (is_array($value)) { + $this->setMaxValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setMaxValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_INSTANT]) || isset($data[self::FIELD_MAX_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_INSTANT])) { + $value = $data[self::FIELD_MAX_VALUE_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_INSTANT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setMaxValueInstant($value); + } else if (is_array($value)) { + $this->setMaxValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setMaxValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_INTEGER]) || isset($data[self::FIELD_MAX_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_INTEGER])) { + $value = $data[self::FIELD_MAX_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMaxValueInteger($value); + } else if (is_array($value)) { + $this->setMaxValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMaxValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_MAX_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setMaxValuePositiveInt($value); + } else if (is_array($value)) { + $this->setMaxValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setMaxValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValuePositiveInt(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_QUANTITY])) { + if ($data[self::FIELD_MAX_VALUE_QUANTITY] instanceof FHIRQuantity) { + $this->setMaxValueQuantity($data[self::FIELD_MAX_VALUE_QUANTITY]); + } else { + $this->setMaxValueQuantity(new FHIRQuantity($data[self::FIELD_MAX_VALUE_QUANTITY])); + } + } + if (isset($data[self::FIELD_MAX_VALUE_TIME]) || isset($data[self::FIELD_MAX_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_TIME])) { + $value = $data[self::FIELD_MAX_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setMaxValueTime($value); + } else if (is_array($value)) { + $this->setMaxValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setMaxValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_MAX_VALUE_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMaxValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setMaxValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMaxValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_MEANING_WHEN_MISSING]) || isset($data[self::FIELD_MEANING_WHEN_MISSING_EXT])) { + if (isset($data[self::FIELD_MEANING_WHEN_MISSING])) { + $value = $data[self::FIELD_MEANING_WHEN_MISSING]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_LENGTH])) { - $ext = (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) - ? $data[self::FIELD_MAX_LENGTH_EXT] - : null; - if ($data[self::FIELD_MAX_LENGTH] instanceof FHIRInteger) { - $this->setMaxLength($data[self::FIELD_MAX_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MAX_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_MAX_LENGTH]))); - } + if (isset($data[self::FIELD_MEANING_WHEN_MISSING_EXT]) && is_array($data[self::FIELD_MEANING_WHEN_MISSING_EXT])) { + $ext = $data[self::FIELD_MEANING_WHEN_MISSING_EXT]; } else { - $this->setMaxLength(new FHIRInteger($data[self::FIELD_MAX_LENGTH])); + $ext = []; } - } - if (isset($data[self::FIELD_MAX_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_EXT])) - ? $data[self::FIELD_MAX_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_DATE] instanceof FHIRDate) { - $this->setMaxValueDate($data[self::FIELD_MAX_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_DATE])) { - $this->setMaxValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_DATE])) { - $this->setMaxValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_MAX_VALUE_DATE]))); + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setMeaningWhenMissing($value); + } else if (is_array($value)) { + $this->setMeaningWhenMissing(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setMeaningWhenMissing(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMaxValueDate(new FHIRDate($data[self::FIELD_MAX_VALUE_DATE])); + } else if ([] !== $ext) { + $this->setMeaningWhenMissing(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_MAX_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setMaxValueDateTime($data[self::FIELD_MAX_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_DATE_TIME])) { - $this->setMaxValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_DATE_TIME])) { - $this->setMaxValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MAX_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; } else { - $this->setMaxValueDateTime(new FHIRDateTime($data[self::FIELD_MAX_VALUE_DATE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_MAX_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setMaxValueDecimal($data[self::FIELD_MAX_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_DECIMAL])) { - $this->setMaxValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_DECIMAL])) { - $this->setMaxValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_MAX_VALUE_DECIMAL]))); - } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; } else { - $this->setMaxValueDecimal(new FHIRDecimal($data[self::FIELD_MAX_VALUE_DECIMAL])); + $ext = []; } - } - if (isset($data[self::FIELD_MAX_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_MAX_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setMaxValueInstant($data[self::FIELD_MAX_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_INSTANT])) { - $this->setMaxValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_INSTANT])) { - $this->setMaxValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_MAX_VALUE_INSTANT]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMaxValueInstant(new FHIRInstant($data[self::FIELD_MAX_VALUE_INSTANT])); + } else if ([] !== $ext) { + $this->setMin(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_MAX_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_MAX_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setMaxValueInteger($data[self::FIELD_MAX_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_INTEGER])) { - $this->setMaxValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_INTEGER])) { - $this->setMaxValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MAX_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DATE]) || isset($data[self::FIELD_MIN_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_DATE])) { + $value = $data[self::FIELD_MIN_VALUE_DATE]; } else { - $this->setMaxValueInteger(new FHIRInteger($data[self::FIELD_MAX_VALUE_INTEGER])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setMaxValuePositiveInt($data[self::FIELD_MAX_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { - $this->setMaxValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { - $this->setMaxValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_MAX_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_DATE_EXT]; } else { - $this->setMaxValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_MAX_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setMinValueDate($value); + } else if (is_array($value)) { + $this->setMinValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setMinValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_MAX_VALUE_QUANTITY])) { - if ($data[self::FIELD_MAX_VALUE_QUANTITY] instanceof FHIRQuantity) { - $this->setMaxValueQuantity($data[self::FIELD_MAX_VALUE_QUANTITY]); + if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME]) || isset($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_MIN_VALUE_DATE_TIME]; } else { - $this->setMaxValueQuantity(new FHIRQuantity($data[self::FIELD_MAX_VALUE_QUANTITY])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_TIME_EXT])) - ? $data[self::FIELD_MAX_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_TIME] instanceof FHIRTime) { - $this->setMaxValueTime($data[self::FIELD_MAX_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_TIME])) { - $this->setMaxValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_TIME])) { - $this->setMaxValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_MAX_VALUE_TIME]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_DATE_TIME_EXT]; } else { - $this->setMaxValueTime(new FHIRTime($data[self::FIELD_MAX_VALUE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setMaxValueUnsignedInt($data[self::FIELD_MAX_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { - $this->setMaxValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { - $this->setMaxValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MAX_VALUE_UNSIGNED_INT]))); + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setMinValueDateTime($value); + } else if (is_array($value)) { + $this->setMinValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setMinValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMaxValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])); + } else if ([] !== $ext) { + $this->setMinValueDateTime(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_MEANING_WHEN_MISSING])) { - $ext = (isset($data[self::FIELD_MEANING_WHEN_MISSING_EXT]) && is_array($data[self::FIELD_MEANING_WHEN_MISSING_EXT])) - ? $data[self::FIELD_MEANING_WHEN_MISSING_EXT] - : null; - if ($data[self::FIELD_MEANING_WHEN_MISSING] instanceof FHIRMarkdown) { - $this->setMeaningWhenMissing($data[self::FIELD_MEANING_WHEN_MISSING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEANING_WHEN_MISSING])) { - $this->setMeaningWhenMissing(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_MEANING_WHEN_MISSING]] + $ext)); - } else if (is_array($data[self::FIELD_MEANING_WHEN_MISSING])) { - $this->setMeaningWhenMissing(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_MEANING_WHEN_MISSING]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DECIMAL]) || isset($data[self::FIELD_MIN_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_DECIMAL])) { + $value = $data[self::FIELD_MIN_VALUE_DECIMAL]; } else { - $this->setMeaningWhenMissing(new FHIRMarkdown($data[self::FIELD_MEANING_WHEN_MISSING])); + $value = null; } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRUnsignedInt) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MIN]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_DECIMAL_EXT]; } else { - $this->setMin(new FHIRUnsignedInt($data[self::FIELD_MIN])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_EXT])) - ? $data[self::FIELD_MIN_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_DATE] instanceof FHIRDate) { - $this->setMinValueDate($data[self::FIELD_MIN_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_DATE])) { - $this->setMinValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_DATE])) { - $this->setMinValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_MIN_VALUE_DATE]))); + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setMinValueDecimal($value); + } else if (is_array($value)) { + $this->setMinValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setMinValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMinValueDate(new FHIRDate($data[self::FIELD_MIN_VALUE_DATE])); + } else if ([] !== $ext) { + $this->setMinValueDecimal(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_MIN_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setMinValueDateTime($data[self::FIELD_MIN_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_DATE_TIME])) { - $this->setMinValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_DATE_TIME])) { - $this->setMinValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MIN_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_MIN_VALUE_INSTANT]) || isset($data[self::FIELD_MIN_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_INSTANT])) { + $value = $data[self::FIELD_MIN_VALUE_INSTANT]; } else { - $this->setMinValueDateTime(new FHIRDateTime($data[self::FIELD_MIN_VALUE_DATE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_MIN_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setMinValueDecimal($data[self::FIELD_MIN_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_DECIMAL])) { - $this->setMinValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_DECIMAL])) { - $this->setMinValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_MIN_VALUE_DECIMAL]))); - } + if (isset($data[self::FIELD_MIN_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_INSTANT_EXT]; } else { - $this->setMinValueDecimal(new FHIRDecimal($data[self::FIELD_MIN_VALUE_DECIMAL])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_MIN_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setMinValueInstant($data[self::FIELD_MIN_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_INSTANT])) { - $this->setMinValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_INSTANT])) { - $this->setMinValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_MIN_VALUE_INSTANT]))); + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setMinValueInstant($value); + } else if (is_array($value)) { + $this->setMinValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setMinValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMinValueInstant(new FHIRInstant($data[self::FIELD_MIN_VALUE_INSTANT])); + } else if ([] !== $ext) { + $this->setMinValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_MIN_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_MIN_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setMinValueInteger($data[self::FIELD_MIN_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_INTEGER])) { - $this->setMinValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_INTEGER])) { - $this->setMinValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_MIN_VALUE_INTEGER]) || isset($data[self::FIELD_MIN_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_INTEGER])) { + $value = $data[self::FIELD_MIN_VALUE_INTEGER]; } else { - $this->setMinValueInteger(new FHIRInteger($data[self::FIELD_MIN_VALUE_INTEGER])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setMinValuePositiveInt($data[self::FIELD_MIN_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { - $this->setMinValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { - $this->setMinValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_MIN_VALUE_POSITIVE_INT]))); + if (isset($data[self::FIELD_MIN_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMinValueInteger($value); + } else if (is_array($value)) { + $this->setMinValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMinValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_MIN_VALUE_POSITIVE_INT]; } else { - $this->setMinValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_MIN_VALUE_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setMinValuePositiveInt($value); + } else if (is_array($value)) { + $this->setMinValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setMinValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_QUANTITY])) { @@ -5398,84 +5857,119 @@ public function __construct($data = null) $this->setMinValueQuantity(new FHIRQuantity($data[self::FIELD_MIN_VALUE_QUANTITY])); } } - if (isset($data[self::FIELD_MIN_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_TIME_EXT])) - ? $data[self::FIELD_MIN_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_TIME] instanceof FHIRTime) { - $this->setMinValueTime($data[self::FIELD_MIN_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_TIME])) { - $this->setMinValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_TIME])) { - $this->setMinValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_MIN_VALUE_TIME]))); - } + if (isset($data[self::FIELD_MIN_VALUE_TIME]) || isset($data[self::FIELD_MIN_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_TIME])) { + $value = $data[self::FIELD_MIN_VALUE_TIME]; } else { - $this->setMinValueTime(new FHIRTime($data[self::FIELD_MIN_VALUE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setMinValueUnsignedInt($data[self::FIELD_MIN_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { - $this->setMinValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { - $this->setMinValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MIN_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_TIME_EXT]; } else { - $this->setMinValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])); + $ext = []; } - } - if (isset($data[self::FIELD_MUST_SUPPORT])) { - $ext = (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) - ? $data[self::FIELD_MUST_SUPPORT_EXT] - : null; - if ($data[self::FIELD_MUST_SUPPORT] instanceof FHIRBoolean) { - $this->setMustSupport($data[self::FIELD_MUST_SUPPORT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MUST_SUPPORT])) { - $this->setMustSupport(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MUST_SUPPORT]] + $ext)); - } else if (is_array($data[self::FIELD_MUST_SUPPORT])) { - $this->setMustSupport(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MUST_SUPPORT]))); + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setMinValueTime($value); + } else if (is_array($value)) { + $this->setMinValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setMinValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMustSupport(new FHIRBoolean($data[self::FIELD_MUST_SUPPORT])); + } else if ([] !== $ext) { + $this->setMinValueTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_ORDER_MEANING])) { - $ext = (isset($data[self::FIELD_ORDER_MEANING_EXT]) && is_array($data[self::FIELD_ORDER_MEANING_EXT])) - ? $data[self::FIELD_ORDER_MEANING_EXT] - : null; - if ($data[self::FIELD_ORDER_MEANING] instanceof FHIRString) { - $this->setOrderMeaning($data[self::FIELD_ORDER_MEANING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDER_MEANING])) { - $this->setOrderMeaning(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ORDER_MEANING]] + $ext)); - } else if (is_array($data[self::FIELD_ORDER_MEANING])) { - $this->setOrderMeaning(new FHIRString(array_merge($ext, $data[self::FIELD_ORDER_MEANING]))); + if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_MIN_VALUE_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMinValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setMinValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMinValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_MUST_SUPPORT]) || isset($data[self::FIELD_MUST_SUPPORT_EXT])) { + if (isset($data[self::FIELD_MUST_SUPPORT])) { + $value = $data[self::FIELD_MUST_SUPPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) { + $ext = $data[self::FIELD_MUST_SUPPORT_EXT]; } else { - $this->setOrderMeaning(new FHIRString($data[self::FIELD_ORDER_MEANING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMustSupport($value); + } else if (is_array($value)) { + $this->setMustSupport(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMustSupport(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMustSupport(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_ORDER_MEANING]) || isset($data[self::FIELD_ORDER_MEANING_EXT])) { + if (isset($data[self::FIELD_ORDER_MEANING])) { + $value = $data[self::FIELD_ORDER_MEANING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ORDER_MEANING_EXT]) && is_array($data[self::FIELD_ORDER_MEANING_EXT])) { + $ext = $data[self::FIELD_ORDER_MEANING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOrderMeaning($value); + } else if (is_array($value)) { + $this->setOrderMeaning(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOrderMeaning(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOrderMeaning(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATTERN_ADDRESS])) { @@ -5506,68 +6000,96 @@ public function __construct($data = null) $this->setPatternAttachment(new FHIRAttachment($data[self::FIELD_PATTERN_ATTACHMENT])); } } - if (isset($data[self::FIELD_PATTERN_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_PATTERN_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_PATTERN_BASE_64BINARY_EXT])) - ? $data[self::FIELD_PATTERN_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_PATTERN_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setPatternBase64Binary($data[self::FIELD_PATTERN_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_BASE_64BINARY])) { - $this->setPatternBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_PATTERN_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_BASE_64BINARY])) { - $this->setPatternBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_PATTERN_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_PATTERN_BASE_64BINARY]) || isset($data[self::FIELD_PATTERN_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_PATTERN_BASE_64BINARY])) { + $value = $data[self::FIELD_PATTERN_BASE_64BINARY]; } else { - $this->setPatternBase64Binary(new FHIRBase64Binary($data[self::FIELD_PATTERN_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_BOOLEAN])) { - $ext = (isset($data[self::FIELD_PATTERN_BOOLEAN_EXT]) && is_array($data[self::FIELD_PATTERN_BOOLEAN_EXT])) - ? $data[self::FIELD_PATTERN_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_PATTERN_BOOLEAN] instanceof FHIRBoolean) { - $this->setPatternBoolean($data[self::FIELD_PATTERN_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_BOOLEAN])) { - $this->setPatternBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PATTERN_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_BOOLEAN])) { - $this->setPatternBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PATTERN_BOOLEAN]))); - } + if (isset($data[self::FIELD_PATTERN_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_PATTERN_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_PATTERN_BASE_64BINARY_EXT]; } else { - $this->setPatternBoolean(new FHIRBoolean($data[self::FIELD_PATTERN_BOOLEAN])); + $ext = []; } - } - if (isset($data[self::FIELD_PATTERN_CANONICAL])) { - $ext = (isset($data[self::FIELD_PATTERN_CANONICAL_EXT]) && is_array($data[self::FIELD_PATTERN_CANONICAL_EXT])) - ? $data[self::FIELD_PATTERN_CANONICAL_EXT] - : null; - if ($data[self::FIELD_PATTERN_CANONICAL] instanceof FHIRCanonical) { - $this->setPatternCanonical($data[self::FIELD_PATTERN_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_CANONICAL])) { - $this->setPatternCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PATTERN_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_CANONICAL])) { - $this->setPatternCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_PATTERN_CANONICAL]))); + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setPatternBase64Binary($value); + } else if (is_array($value)) { + $this->setPatternBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setPatternBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_BOOLEAN]) || isset($data[self::FIELD_PATTERN_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_PATTERN_BOOLEAN])) { + $value = $data[self::FIELD_PATTERN_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_BOOLEAN_EXT]) && is_array($data[self::FIELD_PATTERN_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_PATTERN_BOOLEAN_EXT]; } else { - $this->setPatternCanonical(new FHIRCanonical($data[self::FIELD_PATTERN_CANONICAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPatternBoolean($value); + } else if (is_array($value)) { + $this->setPatternBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPatternBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternBoolean(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PATTERN_CODE])) { - $ext = (isset($data[self::FIELD_PATTERN_CODE_EXT]) && is_array($data[self::FIELD_PATTERN_CODE_EXT])) - ? $data[self::FIELD_PATTERN_CODE_EXT] - : null; - if ($data[self::FIELD_PATTERN_CODE] instanceof FHIRCode) { - $this->setPatternCode($data[self::FIELD_PATTERN_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_CODE])) { - $this->setPatternCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PATTERN_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_CODE])) { - $this->setPatternCode(new FHIRCode(array_merge($ext, $data[self::FIELD_PATTERN_CODE]))); + if (isset($data[self::FIELD_PATTERN_CANONICAL]) || isset($data[self::FIELD_PATTERN_CANONICAL_EXT])) { + if (isset($data[self::FIELD_PATTERN_CANONICAL])) { + $value = $data[self::FIELD_PATTERN_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_CANONICAL_EXT]) && is_array($data[self::FIELD_PATTERN_CANONICAL_EXT])) { + $ext = $data[self::FIELD_PATTERN_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setPatternCanonical($value); + } else if (is_array($value)) { + $this->setPatternCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setPatternCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_CODE]) || isset($data[self::FIELD_PATTERN_CODE_EXT])) { + if (isset($data[self::FIELD_PATTERN_CODE])) { + $value = $data[self::FIELD_PATTERN_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_CODE_EXT]) && is_array($data[self::FIELD_PATTERN_CODE_EXT])) { + $ext = $data[self::FIELD_PATTERN_CODE_EXT]; } else { - $this->setPatternCode(new FHIRCode($data[self::FIELD_PATTERN_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setPatternCode($value); + } else if (is_array($value)) { + $this->setPatternCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setPatternCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PATTERN_CODEABLE_CONCEPT])) { @@ -5619,52 +6141,73 @@ public function __construct($data = null) $this->setPatternDataRequirement(new FHIRDataRequirement($data[self::FIELD_PATTERN_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_PATTERN_DATE])) { - $ext = (isset($data[self::FIELD_PATTERN_DATE_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_EXT])) - ? $data[self::FIELD_PATTERN_DATE_EXT] - : null; - if ($data[self::FIELD_PATTERN_DATE] instanceof FHIRDate) { - $this->setPatternDate($data[self::FIELD_PATTERN_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_DATE])) { - $this->setPatternDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_PATTERN_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_DATE])) { - $this->setPatternDate(new FHIRDate(array_merge($ext, $data[self::FIELD_PATTERN_DATE]))); - } + if (isset($data[self::FIELD_PATTERN_DATE]) || isset($data[self::FIELD_PATTERN_DATE_EXT])) { + if (isset($data[self::FIELD_PATTERN_DATE])) { + $value = $data[self::FIELD_PATTERN_DATE]; } else { - $this->setPatternDate(new FHIRDate($data[self::FIELD_PATTERN_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_DATE_TIME])) { - $ext = (isset($data[self::FIELD_PATTERN_DATE_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_TIME_EXT])) - ? $data[self::FIELD_PATTERN_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_PATTERN_DATE_TIME] instanceof FHIRDateTime) { - $this->setPatternDateTime($data[self::FIELD_PATTERN_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_DATE_TIME])) { - $this->setPatternDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PATTERN_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_DATE_TIME])) { - $this->setPatternDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PATTERN_DATE_TIME]))); - } + if (isset($data[self::FIELD_PATTERN_DATE_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_EXT])) { + $ext = $data[self::FIELD_PATTERN_DATE_EXT]; } else { - $this->setPatternDateTime(new FHIRDateTime($data[self::FIELD_PATTERN_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setPatternDate($value); + } else if (is_array($value)) { + $this->setPatternDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setPatternDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_PATTERN_DECIMAL])) { - $ext = (isset($data[self::FIELD_PATTERN_DECIMAL_EXT]) && is_array($data[self::FIELD_PATTERN_DECIMAL_EXT])) - ? $data[self::FIELD_PATTERN_DECIMAL_EXT] - : null; - if ($data[self::FIELD_PATTERN_DECIMAL] instanceof FHIRDecimal) { - $this->setPatternDecimal($data[self::FIELD_PATTERN_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_DECIMAL])) { - $this->setPatternDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PATTERN_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_DECIMAL])) { - $this->setPatternDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PATTERN_DECIMAL]))); + if (isset($data[self::FIELD_PATTERN_DATE_TIME]) || isset($data[self::FIELD_PATTERN_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_PATTERN_DATE_TIME])) { + $value = $data[self::FIELD_PATTERN_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_DATE_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_PATTERN_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPatternDateTime($value); + } else if (is_array($value)) { + $this->setPatternDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPatternDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_DECIMAL]) || isset($data[self::FIELD_PATTERN_DECIMAL_EXT])) { + if (isset($data[self::FIELD_PATTERN_DECIMAL])) { + $value = $data[self::FIELD_PATTERN_DECIMAL]; } else { - $this->setPatternDecimal(new FHIRDecimal($data[self::FIELD_PATTERN_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_PATTERN_DECIMAL_EXT]) && is_array($data[self::FIELD_PATTERN_DECIMAL_EXT])) { + $ext = $data[self::FIELD_PATTERN_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPatternDecimal($value); + } else if (is_array($value)) { + $this->setPatternDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPatternDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PATTERN_DISTANCE])) { @@ -5702,20 +6245,27 @@ public function __construct($data = null) $this->setPatternHumanName(new FHIRHumanName($data[self::FIELD_PATTERN_HUMAN_NAME])); } } - if (isset($data[self::FIELD_PATTERN_ID])) { - $ext = (isset($data[self::FIELD_PATTERN_ID_EXT]) && is_array($data[self::FIELD_PATTERN_ID_EXT])) - ? $data[self::FIELD_PATTERN_ID_EXT] - : null; - if ($data[self::FIELD_PATTERN_ID] instanceof FHIRId) { - $this->setPatternId($data[self::FIELD_PATTERN_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_ID])) { - $this->setPatternId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_PATTERN_ID]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_ID])) { - $this->setPatternId(new FHIRId(array_merge($ext, $data[self::FIELD_PATTERN_ID]))); - } + if (isset($data[self::FIELD_PATTERN_ID]) || isset($data[self::FIELD_PATTERN_ID_EXT])) { + if (isset($data[self::FIELD_PATTERN_ID])) { + $value = $data[self::FIELD_PATTERN_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_ID_EXT]) && is_array($data[self::FIELD_PATTERN_ID_EXT])) { + $ext = $data[self::FIELD_PATTERN_ID_EXT]; } else { - $this->setPatternId(new FHIRId($data[self::FIELD_PATTERN_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setPatternId($value); + } else if (is_array($value)) { + $this->setPatternId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setPatternId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternId(new FHIRId($ext)); } } if (isset($data[self::FIELD_PATTERN_IDENTIFIER])) { @@ -5725,52 +6275,73 @@ public function __construct($data = null) $this->setPatternIdentifier(new FHIRIdentifier($data[self::FIELD_PATTERN_IDENTIFIER])); } } - if (isset($data[self::FIELD_PATTERN_INSTANT])) { - $ext = (isset($data[self::FIELD_PATTERN_INSTANT_EXT]) && is_array($data[self::FIELD_PATTERN_INSTANT_EXT])) - ? $data[self::FIELD_PATTERN_INSTANT_EXT] - : null; - if ($data[self::FIELD_PATTERN_INSTANT] instanceof FHIRInstant) { - $this->setPatternInstant($data[self::FIELD_PATTERN_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_INSTANT])) { - $this->setPatternInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_PATTERN_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_INSTANT])) { - $this->setPatternInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_PATTERN_INSTANT]))); - } + if (isset($data[self::FIELD_PATTERN_INSTANT]) || isset($data[self::FIELD_PATTERN_INSTANT_EXT])) { + if (isset($data[self::FIELD_PATTERN_INSTANT])) { + $value = $data[self::FIELD_PATTERN_INSTANT]; } else { - $this->setPatternInstant(new FHIRInstant($data[self::FIELD_PATTERN_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_INTEGER])) { - $ext = (isset($data[self::FIELD_PATTERN_INTEGER_EXT]) && is_array($data[self::FIELD_PATTERN_INTEGER_EXT])) - ? $data[self::FIELD_PATTERN_INTEGER_EXT] - : null; - if ($data[self::FIELD_PATTERN_INTEGER] instanceof FHIRInteger) { - $this->setPatternInteger($data[self::FIELD_PATTERN_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_INTEGER])) { - $this->setPatternInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_PATTERN_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_INTEGER])) { - $this->setPatternInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_PATTERN_INTEGER]))); - } + if (isset($data[self::FIELD_PATTERN_INSTANT_EXT]) && is_array($data[self::FIELD_PATTERN_INSTANT_EXT])) { + $ext = $data[self::FIELD_PATTERN_INSTANT_EXT]; } else { - $this->setPatternInteger(new FHIRInteger($data[self::FIELD_PATTERN_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setPatternInstant($value); + } else if (is_array($value)) { + $this->setPatternInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setPatternInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_PATTERN_MARKDOWN])) { - $ext = (isset($data[self::FIELD_PATTERN_MARKDOWN_EXT]) && is_array($data[self::FIELD_PATTERN_MARKDOWN_EXT])) - ? $data[self::FIELD_PATTERN_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_PATTERN_MARKDOWN] instanceof FHIRMarkdown) { - $this->setPatternMarkdown($data[self::FIELD_PATTERN_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_MARKDOWN])) { - $this->setPatternMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PATTERN_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_MARKDOWN])) { - $this->setPatternMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PATTERN_MARKDOWN]))); + if (isset($data[self::FIELD_PATTERN_INTEGER]) || isset($data[self::FIELD_PATTERN_INTEGER_EXT])) { + if (isset($data[self::FIELD_PATTERN_INTEGER])) { + $value = $data[self::FIELD_PATTERN_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_INTEGER_EXT]) && is_array($data[self::FIELD_PATTERN_INTEGER_EXT])) { + $ext = $data[self::FIELD_PATTERN_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setPatternInteger($value); + } else if (is_array($value)) { + $this->setPatternInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setPatternInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_MARKDOWN]) || isset($data[self::FIELD_PATTERN_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_PATTERN_MARKDOWN])) { + $value = $data[self::FIELD_PATTERN_MARKDOWN]; } else { - $this->setPatternMarkdown(new FHIRMarkdown($data[self::FIELD_PATTERN_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_PATTERN_MARKDOWN_EXT]) && is_array($data[self::FIELD_PATTERN_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_PATTERN_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPatternMarkdown($value); + } else if (is_array($value)) { + $this->setPatternMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPatternMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_PATTERN_META])) { @@ -5787,20 +6358,27 @@ public function __construct($data = null) $this->setPatternMoney(new FHIRMoney($data[self::FIELD_PATTERN_MONEY])); } } - if (isset($data[self::FIELD_PATTERN_OID])) { - $ext = (isset($data[self::FIELD_PATTERN_OID_EXT]) && is_array($data[self::FIELD_PATTERN_OID_EXT])) - ? $data[self::FIELD_PATTERN_OID_EXT] - : null; - if ($data[self::FIELD_PATTERN_OID] instanceof FHIROid) { - $this->setPatternOid($data[self::FIELD_PATTERN_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_OID])) { - $this->setPatternOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_PATTERN_OID]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_OID])) { - $this->setPatternOid(new FHIROid(array_merge($ext, $data[self::FIELD_PATTERN_OID]))); - } + if (isset($data[self::FIELD_PATTERN_OID]) || isset($data[self::FIELD_PATTERN_OID_EXT])) { + if (isset($data[self::FIELD_PATTERN_OID])) { + $value = $data[self::FIELD_PATTERN_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_OID_EXT]) && is_array($data[self::FIELD_PATTERN_OID_EXT])) { + $ext = $data[self::FIELD_PATTERN_OID_EXT]; } else { - $this->setPatternOid(new FHIROid($data[self::FIELD_PATTERN_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setPatternOid($value); + } else if (is_array($value)) { + $this->setPatternOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setPatternOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_PATTERN_PARAMETER_DEFINITION])) { @@ -5817,20 +6395,27 @@ public function __construct($data = null) $this->setPatternPeriod(new FHIRPeriod($data[self::FIELD_PATTERN_PERIOD])); } } - if (isset($data[self::FIELD_PATTERN_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_PATTERN_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_PATTERN_POSITIVE_INT_EXT])) - ? $data[self::FIELD_PATTERN_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_PATTERN_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setPatternPositiveInt($data[self::FIELD_PATTERN_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_POSITIVE_INT])) { - $this->setPatternPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PATTERN_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_POSITIVE_INT])) { - $this->setPatternPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_PATTERN_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_PATTERN_POSITIVE_INT]) || isset($data[self::FIELD_PATTERN_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_PATTERN_POSITIVE_INT])) { + $value = $data[self::FIELD_PATTERN_POSITIVE_INT]; } else { - $this->setPatternPositiveInt(new FHIRPositiveInt($data[self::FIELD_PATTERN_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_PATTERN_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_PATTERN_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_PATTERN_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setPatternPositiveInt($value); + } else if (is_array($value)) { + $this->setPatternPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setPatternPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternPositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PATTERN_QUANTITY])) { @@ -5882,36 +6467,50 @@ public function __construct($data = null) $this->setPatternSignature(new FHIRSignature($data[self::FIELD_PATTERN_SIGNATURE])); } } - if (isset($data[self::FIELD_PATTERN_STRING])) { - $ext = (isset($data[self::FIELD_PATTERN_STRING_EXT]) && is_array($data[self::FIELD_PATTERN_STRING_EXT])) - ? $data[self::FIELD_PATTERN_STRING_EXT] - : null; - if ($data[self::FIELD_PATTERN_STRING] instanceof FHIRString) { - $this->setPatternString($data[self::FIELD_PATTERN_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_STRING])) { - $this->setPatternString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATTERN_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_STRING])) { - $this->setPatternString(new FHIRString(array_merge($ext, $data[self::FIELD_PATTERN_STRING]))); - } + if (isset($data[self::FIELD_PATTERN_STRING]) || isset($data[self::FIELD_PATTERN_STRING_EXT])) { + if (isset($data[self::FIELD_PATTERN_STRING])) { + $value = $data[self::FIELD_PATTERN_STRING]; } else { - $this->setPatternString(new FHIRString($data[self::FIELD_PATTERN_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_TIME])) { - $ext = (isset($data[self::FIELD_PATTERN_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_TIME_EXT])) - ? $data[self::FIELD_PATTERN_TIME_EXT] - : null; - if ($data[self::FIELD_PATTERN_TIME] instanceof FHIRTime) { - $this->setPatternTime($data[self::FIELD_PATTERN_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_TIME])) { - $this->setPatternTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_PATTERN_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_TIME])) { - $this->setPatternTime(new FHIRTime(array_merge($ext, $data[self::FIELD_PATTERN_TIME]))); + if (isset($data[self::FIELD_PATTERN_STRING_EXT]) && is_array($data[self::FIELD_PATTERN_STRING_EXT])) { + $ext = $data[self::FIELD_PATTERN_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPatternString($value); + } else if (is_array($value)) { + $this->setPatternString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPatternString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_TIME]) || isset($data[self::FIELD_PATTERN_TIME_EXT])) { + if (isset($data[self::FIELD_PATTERN_TIME])) { + $value = $data[self::FIELD_PATTERN_TIME]; } else { - $this->setPatternTime(new FHIRTime($data[self::FIELD_PATTERN_TIME])); + $value = null; + } + if (isset($data[self::FIELD_PATTERN_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_TIME_EXT])) { + $ext = $data[self::FIELD_PATTERN_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setPatternTime($value); + } else if (is_array($value)) { + $this->setPatternTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setPatternTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_PATTERN_TIMING])) { @@ -5928,52 +6527,73 @@ public function __construct($data = null) $this->setPatternTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_PATTERN_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_PATTERN_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_PATTERN_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setPatternUnsignedInt($data[self::FIELD_PATTERN_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_UNSIGNED_INT])) { - $this->setPatternUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_PATTERN_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_UNSIGNED_INT])) { - $this->setPatternUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_PATTERN_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT]) || isset($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT])) { + $value = $data[self::FIELD_PATTERN_UNSIGNED_INT]; } else { - $this->setPatternUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_PATTERN_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_URI])) { - $ext = (isset($data[self::FIELD_PATTERN_URI_EXT]) && is_array($data[self::FIELD_PATTERN_URI_EXT])) - ? $data[self::FIELD_PATTERN_URI_EXT] - : null; - if ($data[self::FIELD_PATTERN_URI] instanceof FHIRUri) { - $this->setPatternUri($data[self::FIELD_PATTERN_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_URI])) { - $this->setPatternUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PATTERN_URI]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_URI])) { - $this->setPatternUri(new FHIRUri(array_merge($ext, $data[self::FIELD_PATTERN_URI]))); - } + if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_PATTERN_UNSIGNED_INT_EXT]; } else { - $this->setPatternUri(new FHIRUri($data[self::FIELD_PATTERN_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setPatternUnsignedInt($value); + } else if (is_array($value)) { + $this->setPatternUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setPatternUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_PATTERN_URL])) { - $ext = (isset($data[self::FIELD_PATTERN_URL_EXT]) && is_array($data[self::FIELD_PATTERN_URL_EXT])) - ? $data[self::FIELD_PATTERN_URL_EXT] - : null; - if ($data[self::FIELD_PATTERN_URL] instanceof FHIRUrl) { - $this->setPatternUrl($data[self::FIELD_PATTERN_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_URL])) { - $this->setPatternUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_PATTERN_URL]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_URL])) { - $this->setPatternUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_PATTERN_URL]))); + if (isset($data[self::FIELD_PATTERN_URI]) || isset($data[self::FIELD_PATTERN_URI_EXT])) { + if (isset($data[self::FIELD_PATTERN_URI])) { + $value = $data[self::FIELD_PATTERN_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_URI_EXT]) && is_array($data[self::FIELD_PATTERN_URI_EXT])) { + $ext = $data[self::FIELD_PATTERN_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setPatternUri($value); + } else if (is_array($value)) { + $this->setPatternUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setPatternUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_URL]) || isset($data[self::FIELD_PATTERN_URL_EXT])) { + if (isset($data[self::FIELD_PATTERN_URL])) { + $value = $data[self::FIELD_PATTERN_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_URL_EXT]) && is_array($data[self::FIELD_PATTERN_URL_EXT])) { + $ext = $data[self::FIELD_PATTERN_URL_EXT]; } else { - $this->setPatternUrl(new FHIRUrl($data[self::FIELD_PATTERN_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setPatternUrl($value); + } else if (is_array($value)) { + $this->setPatternUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setPatternUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_PATTERN_USAGE_CONTEXT])) { @@ -5983,113 +6603,157 @@ public function __construct($data = null) $this->setPatternUsageContext(new FHIRUsageContext($data[self::FIELD_PATTERN_USAGE_CONTEXT])); } } - if (isset($data[self::FIELD_PATTERN_UUID])) { - $ext = (isset($data[self::FIELD_PATTERN_UUID_EXT]) && is_array($data[self::FIELD_PATTERN_UUID_EXT])) - ? $data[self::FIELD_PATTERN_UUID_EXT] - : null; - if ($data[self::FIELD_PATTERN_UUID] instanceof FHIRUuid) { - $this->setPatternUuid($data[self::FIELD_PATTERN_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_UUID])) { - $this->setPatternUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_PATTERN_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_UUID])) { - $this->setPatternUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_PATTERN_UUID]))); - } + if (isset($data[self::FIELD_PATTERN_UUID]) || isset($data[self::FIELD_PATTERN_UUID_EXT])) { + if (isset($data[self::FIELD_PATTERN_UUID])) { + $value = $data[self::FIELD_PATTERN_UUID]; } else { - $this->setPatternUuid(new FHIRUuid($data[self::FIELD_PATTERN_UUID])); + $value = null; } - } - if (isset($data[self::FIELD_REPRESENTATION])) { - $ext = (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) - ? $data[self::FIELD_REPRESENTATION_EXT] - : null; - if (is_array($data[self::FIELD_REPRESENTATION])) { - foreach($data[self::FIELD_REPRESENTATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPropertyRepresentation) { - $this->addRepresentation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PATTERN_UUID_EXT]) && is_array($data[self::FIELD_PATTERN_UUID_EXT])) { + $ext = $data[self::FIELD_PATTERN_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setPatternUuid($value); + } else if (is_array($value)) { + $this->setPatternUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setPatternUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternUuid(new FHIRUuid($ext)); + } + } + if (isset($data[self::FIELD_REPRESENTATION]) || isset($data[self::FIELD_REPRESENTATION_EXT])) { + if (isset($data[self::FIELD_REPRESENTATION])) { + $value = $data[self::FIELD_REPRESENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) { + $ext = $data[self::FIELD_REPRESENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPropertyRepresentation) { + $this->addRepresentation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPropertyRepresentation) { + $this->addRepresentation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($v, $iext))); + } else { + $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addRepresentation(new FHIRPropertyRepresentation($v)); } + } elseif (is_array($value)) { + $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($ext, $value))); + } else { + $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_REPRESENTATION] instanceof FHIRPropertyRepresentation) { - $this->addRepresentation($data[self::FIELD_REPRESENTATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REPRESENTATION])) { - $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $data[self::FIELD_REPRESENTATION]] + $ext)); - } else { - $this->addRepresentation(new FHIRPropertyRepresentation($data[self::FIELD_REPRESENTATION])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRMarkdown) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addRepresentation(new FHIRPropertyRepresentation($iext)); } - } else { - $this->setRequirements(new FHIRMarkdown($data[self::FIELD_REQUIREMENTS])); } } - if (isset($data[self::FIELD_SHORT])) { - $ext = (isset($data[self::FIELD_SHORT_EXT]) && is_array($data[self::FIELD_SHORT_EXT])) - ? $data[self::FIELD_SHORT_EXT] - : null; - if ($data[self::FIELD_SHORT] instanceof FHIRString) { - $this->setShort($data[self::FIELD_SHORT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SHORT])) { - $this->setShort(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SHORT]] + $ext)); - } else if (is_array($data[self::FIELD_SHORT])) { - $this->setShort(new FHIRString(array_merge($ext, $data[self::FIELD_SHORT]))); - } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; } else { - $this->setShort(new FHIRString($data[self::FIELD_SHORT])); + $value = null; } - } - if (isset($data[self::FIELD_SLICE_IS_CONSTRAINING])) { - $ext = (isset($data[self::FIELD_SLICE_IS_CONSTRAINING_EXT]) && is_array($data[self::FIELD_SLICE_IS_CONSTRAINING_EXT])) - ? $data[self::FIELD_SLICE_IS_CONSTRAINING_EXT] - : null; - if ($data[self::FIELD_SLICE_IS_CONSTRAINING] instanceof FHIRBoolean) { - $this->setSliceIsConstraining($data[self::FIELD_SLICE_IS_CONSTRAINING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SLICE_IS_CONSTRAINING])) { - $this->setSliceIsConstraining(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_SLICE_IS_CONSTRAINING]] + $ext)); - } else if (is_array($data[self::FIELD_SLICE_IS_CONSTRAINING])) { - $this->setSliceIsConstraining(new FHIRBoolean(array_merge($ext, $data[self::FIELD_SLICE_IS_CONSTRAINING]))); + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_SHORT]) || isset($data[self::FIELD_SHORT_EXT])) { + if (isset($data[self::FIELD_SHORT])) { + $value = $data[self::FIELD_SHORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SHORT_EXT]) && is_array($data[self::FIELD_SHORT_EXT])) { + $ext = $data[self::FIELD_SHORT_EXT]; } else { - $this->setSliceIsConstraining(new FHIRBoolean($data[self::FIELD_SLICE_IS_CONSTRAINING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setShort($value); + } else if (is_array($value)) { + $this->setShort(new FHIRString(array_merge($ext, $value))); + } else { + $this->setShort(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setShort(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SLICE_NAME])) { - $ext = (isset($data[self::FIELD_SLICE_NAME_EXT]) && is_array($data[self::FIELD_SLICE_NAME_EXT])) - ? $data[self::FIELD_SLICE_NAME_EXT] - : null; - if ($data[self::FIELD_SLICE_NAME] instanceof FHIRString) { - $this->setSliceName($data[self::FIELD_SLICE_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SLICE_NAME])) { - $this->setSliceName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SLICE_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_SLICE_NAME])) { - $this->setSliceName(new FHIRString(array_merge($ext, $data[self::FIELD_SLICE_NAME]))); + if (isset($data[self::FIELD_SLICE_IS_CONSTRAINING]) || isset($data[self::FIELD_SLICE_IS_CONSTRAINING_EXT])) { + if (isset($data[self::FIELD_SLICE_IS_CONSTRAINING])) { + $value = $data[self::FIELD_SLICE_IS_CONSTRAINING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SLICE_IS_CONSTRAINING_EXT]) && is_array($data[self::FIELD_SLICE_IS_CONSTRAINING_EXT])) { + $ext = $data[self::FIELD_SLICE_IS_CONSTRAINING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setSliceIsConstraining($value); + } else if (is_array($value)) { + $this->setSliceIsConstraining(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setSliceIsConstraining(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSliceIsConstraining(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_SLICE_NAME]) || isset($data[self::FIELD_SLICE_NAME_EXT])) { + if (isset($data[self::FIELD_SLICE_NAME])) { + $value = $data[self::FIELD_SLICE_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SLICE_NAME_EXT]) && is_array($data[self::FIELD_SLICE_NAME_EXT])) { + $ext = $data[self::FIELD_SLICE_NAME_EXT]; } else { - $this->setSliceName(new FHIRString($data[self::FIELD_SLICE_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSliceName($value); + } else if (is_array($value)) { + $this->setSliceName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSliceName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSliceName(new FHIRString($ext)); } } if (isset($data[self::FIELD_SLICING])) { @@ -17408,18 +18072,26 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAlias())) { $a[self::FIELD_ALIAS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ALIAS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ALIAS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ALIAS_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ALIAS_EXT] = $encs; + } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v; @@ -17428,37 +18100,61 @@ public function jsonSerialize() $a[self::FIELD_BINDING] = $v; } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getCondition())) { $a[self::FIELD_CONDITION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONDITION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONDITION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRId::FIELD_VALUE]) || array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONDITION_EXT][] = null; + unset($enc[FHIRId::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONDITION_EXT] = $encs; + } } if ([] !== ($vs = $this->getConstraint())) { - $a[self::FIELD_CONSTRAINT] = $vs; + $a[self::FIELD_CONSTRAINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONSTRAINT][] = $v; + } } if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_CONTENT_REFERENCE_EXT] = $enc; } } @@ -17476,29 +18172,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueBase64Binary())) { $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueBoolean())) { $a[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueCanonical())) { $a[self::FIELD_DEFAULT_VALUE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueCode())) { $a[self::FIELD_DEFAULT_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_CODE_EXT] = $enc; } } @@ -17525,22 +18229,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueDate())) { $a[self::FIELD_DEFAULT_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDateTime())) { $a[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDecimal())) { $a[self::FIELD_DEFAULT_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] = $enc; } } @@ -17561,8 +18271,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueId())) { $a[self::FIELD_DEFAULT_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_ID_EXT] = $enc; } } @@ -17571,22 +18283,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueInstant())) { $a[self::FIELD_DEFAULT_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueInteger())) { $a[self::FIELD_DEFAULT_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueMarkdown())) { $a[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] = $enc; } } @@ -17598,8 +18316,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueOid())) { $a[self::FIELD_DEFAULT_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_OID_EXT] = $enc; } } @@ -17611,8 +18331,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValuePositiveInt())) { $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -17639,15 +18361,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueString())) { $a[self::FIELD_DEFAULT_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueTime())) { $a[self::FIELD_DEFAULT_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_TIME_EXT] = $enc; } } @@ -17659,22 +18385,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueUnsignedInt())) { $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueUri())) { $a[self::FIELD_DEFAULT_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueUrl())) { $a[self::FIELD_DEFAULT_VALUE_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_URL_EXT] = $enc; } } @@ -17683,20 +18415,30 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueUuid())) { $a[self::FIELD_DEFAULT_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_UUID_EXT] = $enc; } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getExample())) { - $a[self::FIELD_EXAMPLE] = $vs; + $a[self::FIELD_EXAMPLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXAMPLE][] = $v; + } } if (null !== ($v = $this->getFixedAddress())) { $a[self::FIELD_FIXED_ADDRESS] = $v; @@ -17712,29 +18454,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedBase64Binary())) { $a[self::FIELD_FIXED_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_FIXED_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getFixedBoolean())) { $a[self::FIELD_FIXED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FIXED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getFixedCanonical())) { $a[self::FIELD_FIXED_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_FIXED_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getFixedCode())) { $a[self::FIELD_FIXED_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_FIXED_CODE_EXT] = $enc; } } @@ -17761,22 +18511,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedDate())) { $a[self::FIELD_FIXED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_FIXED_DATE_EXT] = $enc; } } if (null !== ($v = $this->getFixedDateTime())) { $a[self::FIELD_FIXED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_FIXED_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getFixedDecimal())) { $a[self::FIELD_FIXED_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FIXED_DECIMAL_EXT] = $enc; } } @@ -17797,8 +18553,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedId())) { $a[self::FIELD_FIXED_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FIXED_ID_EXT] = $enc; } } @@ -17807,22 +18565,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedInstant())) { $a[self::FIELD_FIXED_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_FIXED_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getFixedInteger())) { $a[self::FIELD_FIXED_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_FIXED_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getFixedMarkdown())) { $a[self::FIELD_FIXED_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_FIXED_MARKDOWN_EXT] = $enc; } } @@ -17834,8 +18598,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedOid())) { $a[self::FIELD_FIXED_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_FIXED_OID_EXT] = $enc; } } @@ -17847,8 +18613,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedPositiveInt())) { $a[self::FIELD_FIXED_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_FIXED_POSITIVE_INT_EXT] = $enc; } } @@ -17875,15 +18643,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedString())) { $a[self::FIELD_FIXED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FIXED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getFixedTime())) { $a[self::FIELD_FIXED_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_FIXED_TIME_EXT] = $enc; } } @@ -17895,22 +18667,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedUnsignedInt())) { $a[self::FIELD_FIXED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_FIXED_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getFixedUri())) { $a[self::FIELD_FIXED_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_FIXED_URI_EXT] = $enc; } } if (null !== ($v = $this->getFixedUrl())) { $a[self::FIELD_FIXED_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_FIXED_URL_EXT] = $enc; } } @@ -17919,95 +18697,127 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedUuid())) { $a[self::FIELD_FIXED_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_FIXED_UUID_EXT] = $enc; } } if (null !== ($v = $this->getIsModifier())) { $a[self::FIELD_IS_MODIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_MODIFIER_EXT] = $enc; } } if (null !== ($v = $this->getIsModifierReason())) { $a[self::FIELD_IS_MODIFIER_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IS_MODIFIER_REASON_EXT] = $enc; } } if (null !== ($v = $this->getIsSummary())) { $a[self::FIELD_IS_SUMMARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_SUMMARY_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMaxLength())) { $a[self::FIELD_MAX_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MAX_LENGTH_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueDate())) { $a[self::FIELD_MAX_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueDateTime())) { $a[self::FIELD_MAX_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueDecimal())) { $a[self::FIELD_MAX_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueInstant())) { $a[self::FIELD_MAX_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueInteger())) { $a[self::FIELD_MAX_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getMaxValuePositiveInt())) { $a[self::FIELD_MAX_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -18016,71 +18826,91 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValueTime())) { $a[self::FIELD_MAX_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueUnsignedInt())) { $a[self::FIELD_MAX_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getMeaningWhenMissing())) { $a[self::FIELD_MEANING_WHEN_MISSING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_MEANING_WHEN_MISSING_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getMinValueDate())) { $a[self::FIELD_MIN_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getMinValueDateTime())) { $a[self::FIELD_MIN_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMinValueDecimal())) { $a[self::FIELD_MIN_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getMinValueInstant())) { $a[self::FIELD_MIN_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getMinValueInteger())) { $a[self::FIELD_MIN_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getMinValuePositiveInt())) { $a[self::FIELD_MIN_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -18089,36 +18919,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValueTime())) { $a[self::FIELD_MIN_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMinValueUnsignedInt())) { $a[self::FIELD_MIN_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getMustSupport())) { $a[self::FIELD_MUST_SUPPORT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MUST_SUPPORT_EXT] = $enc; } } if (null !== ($v = $this->getOrderMeaning())) { $a[self::FIELD_ORDER_MEANING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ORDER_MEANING_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } @@ -18136,29 +18976,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternBase64Binary())) { $a[self::FIELD_PATTERN_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_PATTERN_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getPatternBoolean())) { $a[self::FIELD_PATTERN_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PATTERN_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getPatternCanonical())) { $a[self::FIELD_PATTERN_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_PATTERN_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getPatternCode())) { $a[self::FIELD_PATTERN_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_PATTERN_CODE_EXT] = $enc; } } @@ -18185,22 +19033,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternDate())) { $a[self::FIELD_PATTERN_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_PATTERN_DATE_EXT] = $enc; } } if (null !== ($v = $this->getPatternDateTime())) { $a[self::FIELD_PATTERN_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PATTERN_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getPatternDecimal())) { $a[self::FIELD_PATTERN_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PATTERN_DECIMAL_EXT] = $enc; } } @@ -18221,8 +19075,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternId())) { $a[self::FIELD_PATTERN_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_PATTERN_ID_EXT] = $enc; } } @@ -18231,22 +19087,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternInstant())) { $a[self::FIELD_PATTERN_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_PATTERN_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getPatternInteger())) { $a[self::FIELD_PATTERN_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_PATTERN_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getPatternMarkdown())) { $a[self::FIELD_PATTERN_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PATTERN_MARKDOWN_EXT] = $enc; } } @@ -18258,8 +19120,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternOid())) { $a[self::FIELD_PATTERN_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_PATTERN_OID_EXT] = $enc; } } @@ -18271,8 +19135,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternPositiveInt())) { $a[self::FIELD_PATTERN_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_PATTERN_POSITIVE_INT_EXT] = $enc; } } @@ -18299,15 +19165,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternString())) { $a[self::FIELD_PATTERN_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATTERN_STRING_EXT] = $enc; } } if (null !== ($v = $this->getPatternTime())) { $a[self::FIELD_PATTERN_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_PATTERN_TIME_EXT] = $enc; } } @@ -18319,22 +19189,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternUnsignedInt())) { $a[self::FIELD_PATTERN_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_PATTERN_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getPatternUri())) { $a[self::FIELD_PATTERN_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PATTERN_URI_EXT] = $enc; } } if (null !== ($v = $this->getPatternUrl())) { $a[self::FIELD_PATTERN_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_PATTERN_URL_EXT] = $enc; } } @@ -18343,51 +19219,69 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternUuid())) { $a[self::FIELD_PATTERN_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_PATTERN_UUID_EXT] = $enc; } } if ([] !== ($vs = $this->getRepresentation())) { $a[self::FIELD_REPRESENTATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REPRESENTATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REPRESENTATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPropertyRepresentation::FIELD_VALUE]) || array_key_exists(FHIRPropertyRepresentation::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REPRESENTATION_EXT][] = null; + unset($enc[FHIRPropertyRepresentation::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REPRESENTATION_EXT] = $encs; + } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getShort())) { $a[self::FIELD_SHORT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SHORT_EXT] = $enc; } } if (null !== ($v = $this->getSliceIsConstraining())) { $a[self::FIELD_SLICE_IS_CONSTRAINING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_SLICE_IS_CONSTRAINING_EXT] = $enc; } } if (null !== ($v = $this->getSliceName())) { $a[self::FIELD_SLICE_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SLICE_NAME_EXT] = $enc; } } @@ -18395,7 +19289,16 @@ public function jsonSerialize() $a[self::FIELD_SLICING] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBase.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBase.php index e4cb278b8f..527f71aed2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRElementDefinitionBase extends FHIRBackboneElement const FIELD_PATH_EXT = '_path'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -148,52 +148,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $value = null; } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRUnsignedInt) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MIN]))); - } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMin(new FHIRUnsignedInt($data[self::FIELD_MIN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } } @@ -454,25 +475,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php index ead41a9c26..b225416c2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRElementDefinitionBinding extends FHIRBackboneElement const FIELD_VALUE_SET_EXT = '_valueSet'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -148,52 +148,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_STRENGTH])) { - $ext = (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) - ? $data[self::FIELD_STRENGTH_EXT] - : null; - if ($data[self::FIELD_STRENGTH] instanceof FHIRBindingStrength) { - $this->setStrength($data[self::FIELD_STRENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $data[self::FIELD_STRENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength(array_merge($ext, $data[self::FIELD_STRENGTH]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setStrength(new FHIRBindingStrength($data[self::FIELD_STRENGTH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_SET])) { - $ext = (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) - ? $data[self::FIELD_VALUE_SET_EXT] - : null; - if ($data[self::FIELD_VALUE_SET] instanceof FHIRCanonical) { - $this->setValueSet($data[self::FIELD_VALUE_SET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_SET]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRCanonical(array_merge($ext, $data[self::FIELD_VALUE_SET]))); + if (isset($data[self::FIELD_STRENGTH]) || isset($data[self::FIELD_STRENGTH_EXT])) { + if (isset($data[self::FIELD_STRENGTH])) { + $value = $data[self::FIELD_STRENGTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) { + $ext = $data[self::FIELD_STRENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBindingStrength) { + $this->setStrength($value); + } else if (is_array($value)) { + $this->setStrength(new FHIRBindingStrength(array_merge($ext, $value))); + } else { + $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStrength(new FHIRBindingStrength($ext)); + } + } + if (isset($data[self::FIELD_VALUE_SET]) || isset($data[self::FIELD_VALUE_SET_EXT])) { + if (isset($data[self::FIELD_VALUE_SET])) { + $value = $data[self::FIELD_VALUE_SET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_EXT]; } else { - $this->setValueSet(new FHIRCanonical($data[self::FIELD_VALUE_SET])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setValueSet($value); + } else if (is_array($value)) { + $this->setValueSet(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSet(new FHIRCanonical($ext)); } } } @@ -436,25 +457,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getStrength())) { $a[self::FIELD_STRENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBindingStrength::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBindingStrength::FIELD_VALUE]); $a[self::FIELD_STRENGTH_EXT] = $enc; } } if (null !== ($v = $this->getValueSet())) { $a[self::FIELD_VALUE_SET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php index 37f44aacc6..dd5166bb04 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRElementDefinitionConstraint extends FHIRBackboneElement const FIELD_XPATH_EXT = '_xpath'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -208,116 +208,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); - } - } - if (isset($data[self::FIELD_HUMAN])) { - $ext = (isset($data[self::FIELD_HUMAN_EXT]) && is_array($data[self::FIELD_HUMAN_EXT])) - ? $data[self::FIELD_HUMAN_EXT] - : null; - if ($data[self::FIELD_HUMAN] instanceof FHIRString) { - $this->setHuman($data[self::FIELD_HUMAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HUMAN])) { - $this->setHuman(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HUMAN]] + $ext)); - } else if (is_array($data[self::FIELD_HUMAN])) { - $this->setHuman(new FHIRString(array_merge($ext, $data[self::FIELD_HUMAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_HUMAN]) || isset($data[self::FIELD_HUMAN_EXT])) { + if (isset($data[self::FIELD_HUMAN])) { + $value = $data[self::FIELD_HUMAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HUMAN_EXT]) && is_array($data[self::FIELD_HUMAN_EXT])) { + $ext = $data[self::FIELD_HUMAN_EXT]; } else { - $this->setHuman(new FHIRString($data[self::FIELD_HUMAN])); - } - } - if (isset($data[self::FIELD_KEY])) { - $ext = (isset($data[self::FIELD_KEY_EXT]) && is_array($data[self::FIELD_KEY_EXT])) - ? $data[self::FIELD_KEY_EXT] - : null; - if ($data[self::FIELD_KEY] instanceof FHIRId) { - $this->setKey($data[self::FIELD_KEY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KEY])) { - $this->setKey(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_KEY]] + $ext)); - } else if (is_array($data[self::FIELD_KEY])) { - $this->setKey(new FHIRId(array_merge($ext, $data[self::FIELD_KEY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHuman($value); + } else if (is_array($value)) { + $this->setHuman(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHuman(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHuman(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_KEY]) || isset($data[self::FIELD_KEY_EXT])) { + if (isset($data[self::FIELD_KEY])) { + $value = $data[self::FIELD_KEY]; } else { - $this->setKey(new FHIRId($data[self::FIELD_KEY])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + $value = null; + } + if (isset($data[self::FIELD_KEY_EXT]) && is_array($data[self::FIELD_KEY_EXT])) { + $ext = $data[self::FIELD_KEY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setKey($value); + } else if (is_array($value)) { + $this->setKey(new FHIRId(array_merge($ext, $value))); + } else { + $this->setKey(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKey(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); - } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRConstraintSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRConstraintSeverity([FHIRConstraintSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRConstraintSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; } else { - $this->setSeverity(new FHIRConstraintSeverity($data[self::FIELD_SEVERITY])); - } - } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRCanonical) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRCanonical(array_merge($ext, $data[self::FIELD_SOURCE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConstraintSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRConstraintSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRConstraintSeverity([FHIRConstraintSeverity::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRConstraintSeverity($ext)); + } + } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; } else { - $this->setSource(new FHIRCanonical($data[self::FIELD_SOURCE])); - } - } - if (isset($data[self::FIELD_XPATH])) { - $ext = (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) - ? $data[self::FIELD_XPATH_EXT] - : null; - if ($data[self::FIELD_XPATH] instanceof FHIRString) { - $this->setXpath($data[self::FIELD_XPATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_XPATH]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString(array_merge($ext, $data[self::FIELD_XPATH]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_XPATH]) || isset($data[self::FIELD_XPATH_EXT])) { + if (isset($data[self::FIELD_XPATH])) { + $value = $data[self::FIELD_XPATH]; } else { - $this->setXpath(new FHIRString($data[self::FIELD_XPATH])); + $value = null; + } + if (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) { + $ext = $data[self::FIELD_XPATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setXpath($value); + } else if (is_array($value)) { + $this->setXpath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setXpath(new FHIRString($ext)); } } } @@ -782,53 +831,70 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getHuman())) { $a[self::FIELD_HUMAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HUMAN_EXT] = $enc; } } if (null !== ($v = $this->getKey())) { $a[self::FIELD_KEY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_KEY_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConstraintSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConstraintSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getXpath())) { $a[self::FIELD_XPATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_XPATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php index be2d98b5cc..bb5256f4b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRElementDefinitionDiscriminator extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRDiscriminatorType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDiscriminatorType([FHIRDiscriminatorType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDiscriminatorType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRDiscriminatorType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiscriminatorType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRDiscriminatorType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRDiscriminatorType([FHIRDiscriminatorType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRDiscriminatorType($ext)); } } } @@ -351,18 +365,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiscriminatorType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiscriminatorType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExample.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExample.php index b7a7f0f735..1523552c82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExample.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExample.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -201,7 +201,7 @@ class FHIRElementDefinitionExample extends FHIRBackboneElement const FIELD_VALUE_UUID_EXT = '_valueUuid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -888,20 +888,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); - } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); } } if (isset($data[self::FIELD_VALUE_ADDRESS])) { @@ -932,68 +939,96 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CANONICAL])) { - $ext = (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) - ? $data[self::FIELD_VALUE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_VALUE_CANONICAL] instanceof FHIRCanonical) { - $this->setValueCanonical($data[self::FIELD_VALUE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_VALUE_CANONICAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CANONICAL]) || isset($data[self::FIELD_VALUE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_VALUE_CANONICAL])) { + $value = $data[self::FIELD_VALUE_CANONICAL]; } else { - $this->setValueCanonical(new FHIRCanonical($data[self::FIELD_VALUE_CANONICAL])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_VALUE_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setValueCanonical($value); + } else if (is_array($value)) { + $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -1045,52 +1080,73 @@ public function __construct($data = null) $this->setValueDataRequirement(new FHIRDataRequirement($data[self::FIELD_VALUE_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); - } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -1128,20 +1184,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -1151,52 +1214,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -1213,20 +1297,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PARAMETER_DEFINITION])) { @@ -1243,20 +1334,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1308,36 +1406,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1354,52 +1466,73 @@ public function __construct($data = null) $this->setValueTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_VALUE_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); - } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); - } - } - if (isset($data[self::FIELD_VALUE_URL])) { - $ext = (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) - ? $data[self::FIELD_VALUE_URL_EXT] - : null; - if ($data[self::FIELD_VALUE_URL] instanceof FHIRUrl) { - $this->setValueUrl($data[self::FIELD_VALUE_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_VALUE_URL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_VALUE_URL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URL]) || isset($data[self::FIELD_VALUE_URL_EXT])) { + if (isset($data[self::FIELD_VALUE_URL])) { + $value = $data[self::FIELD_VALUE_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) { + $ext = $data[self::FIELD_VALUE_URL_EXT]; } else { - $this->setValueUrl(new FHIRUrl($data[self::FIELD_VALUE_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setValueUrl($value); + } else if (is_array($value)) { + $this->setValueUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_VALUE_USAGE_CONTEXT])) { @@ -1409,20 +1542,27 @@ public function __construct($data = null) $this->setValueUsageContext(new FHIRUsageContext($data[self::FIELD_VALUE_USAGE_CONTEXT])); } } - if (isset($data[self::FIELD_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) - ? $data[self::FIELD_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_VALUE_UUID] instanceof FHIRUuid) { - $this->setValueUuid($data[self::FIELD_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_VALUE_UUID]))); - } + if (isset($data[self::FIELD_VALUE_UUID]) || isset($data[self::FIELD_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_VALUE_UUID])) { + $value = $data[self::FIELD_VALUE_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_VALUE_UUID_EXT]; } else { - $this->setValueUuid(new FHIRUuid($data[self::FIELD_VALUE_UUID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setValueUuid($value); + } else if (is_array($value)) { + $this->setValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUuid(new FHIRUuid($ext)); } } } @@ -3881,8 +4021,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } @@ -3900,29 +4042,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCanonical())) { $a[self::FIELD_VALUE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_VALUE_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -3949,22 +4099,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -3985,8 +4141,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -3995,22 +4153,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -4022,8 +4186,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -4035,8 +4201,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -4063,15 +4231,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -4083,22 +4255,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getValueUrl())) { $a[self::FIELD_VALUE_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_VALUE_URL_EXT] = $enc; } } @@ -4107,11 +4285,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUuid())) { $a[self::FIELD_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_VALUE_UUID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php index 8f5036d4d4..463baa608a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRElementDefinitionMapping extends FHIRBackboneElement const FIELD_MAP_EXT = '_map'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -163,68 +163,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $ext = []; } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $value = null; + } + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); } } - if (isset($data[self::FIELD_MAP])) { - $ext = (isset($data[self::FIELD_MAP_EXT]) && is_array($data[self::FIELD_MAP_EXT])) - ? $data[self::FIELD_MAP_EXT] - : null; - if ($data[self::FIELD_MAP] instanceof FHIRString) { - $this->setMap($data[self::FIELD_MAP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAP])) { - $this->setMap(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAP]] + $ext)); - } else if (is_array($data[self::FIELD_MAP])) { - $this->setMap(new FHIRString(array_merge($ext, $data[self::FIELD_MAP]))); + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_MAP]) || isset($data[self::FIELD_MAP_EXT])) { + if (isset($data[self::FIELD_MAP])) { + $value = $data[self::FIELD_MAP]; } else { - $this->setMap(new FHIRString($data[self::FIELD_MAP])); + $value = null; + } + if (isset($data[self::FIELD_MAP_EXT]) && is_array($data[self::FIELD_MAP_EXT])) { + $ext = $data[self::FIELD_MAP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMap($value); + } else if (is_array($value)) { + $this->setMap(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMap(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMap(new FHIRString($ext)); } } } @@ -539,32 +567,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getMap())) { $a[self::FIELD_MAP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php index be9a750886..243d800ec8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRElementDefinitionSlicing extends FHIRBackboneElement const FIELD_RULES_EXT = '_rules'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -164,20 +164,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DISCRIMINATOR])) { @@ -198,36 +205,50 @@ public function __construct($data = null) $this->addDiscriminator(new FHIRElementDefinitionDiscriminator($data[self::FIELD_DISCRIMINATOR])); } } - if (isset($data[self::FIELD_ORDERED])) { - $ext = (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) - ? $data[self::FIELD_ORDERED_EXT] - : null; - if ($data[self::FIELD_ORDERED] instanceof FHIRBoolean) { - $this->setOrdered($data[self::FIELD_ORDERED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ORDERED]] + $ext)); - } else if (is_array($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ORDERED]))); - } + if (isset($data[self::FIELD_ORDERED]) || isset($data[self::FIELD_ORDERED_EXT])) { + if (isset($data[self::FIELD_ORDERED])) { + $value = $data[self::FIELD_ORDERED]; } else { - $this->setOrdered(new FHIRBoolean($data[self::FIELD_ORDERED])); + $value = null; } - } - if (isset($data[self::FIELD_RULES])) { - $ext = (isset($data[self::FIELD_RULES_EXT]) && is_array($data[self::FIELD_RULES_EXT])) - ? $data[self::FIELD_RULES_EXT] - : null; - if ($data[self::FIELD_RULES] instanceof FHIRSlicingRules) { - $this->setRules($data[self::FIELD_RULES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULES])) { - $this->setRules(new FHIRSlicingRules([FHIRSlicingRules::FIELD_VALUE => $data[self::FIELD_RULES]] + $ext)); - } else if (is_array($data[self::FIELD_RULES])) { - $this->setRules(new FHIRSlicingRules(array_merge($ext, $data[self::FIELD_RULES]))); + if (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) { + $ext = $data[self::FIELD_ORDERED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOrdered($value); + } else if (is_array($value)) { + $this->setOrdered(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOrdered(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_RULES]) || isset($data[self::FIELD_RULES_EXT])) { + if (isset($data[self::FIELD_RULES])) { + $value = $data[self::FIELD_RULES]; } else { - $this->setRules(new FHIRSlicingRules($data[self::FIELD_RULES])); + $value = null; + } + if (isset($data[self::FIELD_RULES_EXT]) && is_array($data[self::FIELD_RULES_EXT])) { + $ext = $data[self::FIELD_RULES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSlicingRules) { + $this->setRules($value); + } else if (is_array($value)) { + $this->setRules(new FHIRSlicingRules(array_merge($ext, $value))); + } else { + $this->setRules(new FHIRSlicingRules([FHIRSlicingRules::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRules(new FHIRSlicingRules($ext)); } } } @@ -551,28 +572,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDiscriminator())) { - $a[self::FIELD_DISCRIMINATOR] = $vs; + $a[self::FIELD_DISCRIMINATOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DISCRIMINATOR][] = $v; + } } if (null !== ($v = $this->getOrdered())) { $a[self::FIELD_ORDERED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ORDERED_EXT] = $enc; } } if (null !== ($v = $this->getRules())) { $a[self::FIELD_RULES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSlicingRules::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSlicingRules::FIELD_VALUE]); $a[self::FIELD_RULES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionType.php index c59859445d..ced43c6318 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRElementDefinitionType extends FHIRBackboneElement const FIELD_VERSIONING_EXT = '_versioning'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How resource references can be aggregated. @@ -193,123 +193,164 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AGGREGATION])) { - $ext = (isset($data[self::FIELD_AGGREGATION_EXT]) && is_array($data[self::FIELD_AGGREGATION_EXT])) - ? $data[self::FIELD_AGGREGATION_EXT] - : null; - if (is_array($data[self::FIELD_AGGREGATION])) { - foreach($data[self::FIELD_AGGREGATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRAggregationMode) { - $this->addAggregation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAggregation(new FHIRAggregationMode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_AGGREGATION]) || isset($data[self::FIELD_AGGREGATION_EXT])) { + if (isset($data[self::FIELD_AGGREGATION])) { + $value = $data[self::FIELD_AGGREGATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AGGREGATION_EXT]) && is_array($data[self::FIELD_AGGREGATION_EXT])) { + $ext = $data[self::FIELD_AGGREGATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAggregationMode) { + $this->addAggregation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRAggregationMode) { + $this->addAggregation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAggregation(new FHIRAggregationMode(array_merge($v, $iext))); + } else { + $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAggregation(new FHIRAggregationMode($v)); } + } elseif (is_array($value)) { + $this->addAggregation(new FHIRAggregationMode(array_merge($ext, $value))); + } else { + $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_AGGREGATION] instanceof FHIRAggregationMode) { - $this->addAggregation($data[self::FIELD_AGGREGATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_AGGREGATION])) { - $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $data[self::FIELD_AGGREGATION]] + $ext)); - } else { - $this->addAggregation(new FHIRAggregationMode($data[self::FIELD_AGGREGATION])); - } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRUri) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRUri(array_merge($ext, $data[self::FIELD_CODE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAggregation(new FHIRAggregationMode($iext)); } + } + } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRUri($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_PROFILE])) { - foreach($data[self::FIELD_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProfile(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProfile(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProfile(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProfile(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->addProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROFILE])) { - $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else { - $this->addProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_TARGET_PROFILE])) { - $ext = (isset($data[self::FIELD_TARGET_PROFILE_EXT]) && is_array($data[self::FIELD_TARGET_PROFILE_EXT])) - ? $data[self::FIELD_TARGET_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_TARGET_PROFILE])) { - foreach($data[self::FIELD_TARGET_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addTargetProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTargetProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTargetProfile(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TARGET_PROFILE]) || isset($data[self::FIELD_TARGET_PROFILE_EXT])) { + if (isset($data[self::FIELD_TARGET_PROFILE])) { + $value = $data[self::FIELD_TARGET_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_PROFILE_EXT]) && is_array($data[self::FIELD_TARGET_PROFILE_EXT])) { + $ext = $data[self::FIELD_TARGET_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addTargetProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addTargetProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTargetProfile(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addTargetProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTargetProfile(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addTargetProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addTargetProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_TARGET_PROFILE] instanceof FHIRCanonical) { - $this->addTargetProfile($data[self::FIELD_TARGET_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TARGET_PROFILE])) { - $this->addTargetProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_TARGET_PROFILE]] + $ext)); - } else { - $this->addTargetProfile(new FHIRCanonical($data[self::FIELD_TARGET_PROFILE])); - } - } - if (isset($data[self::FIELD_VERSIONING])) { - $ext = (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) - ? $data[self::FIELD_VERSIONING_EXT] - : null; - if ($data[self::FIELD_VERSIONING] instanceof FHIRReferenceVersionRules) { - $this->setVersioning($data[self::FIELD_VERSIONING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRReferenceVersionRules([FHIRReferenceVersionRules::FIELD_VALUE => $data[self::FIELD_VERSIONING]] + $ext)); - } else if (is_array($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRReferenceVersionRules(array_merge($ext, $data[self::FIELD_VERSIONING]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTargetProfile(new FHIRCanonical($iext)); } + } + } + if (isset($data[self::FIELD_VERSIONING]) || isset($data[self::FIELD_VERSIONING_EXT])) { + if (isset($data[self::FIELD_VERSIONING])) { + $value = $data[self::FIELD_VERSIONING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) { + $ext = $data[self::FIELD_VERSIONING_EXT]; } else { - $this->setVersioning(new FHIRReferenceVersionRules($data[self::FIELD_VERSIONING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRReferenceVersionRules) { + $this->setVersioning($value); + } else if (is_array($value)) { + $this->setVersioning(new FHIRReferenceVersionRules(array_merge($ext, $value))); + } else { + $this->setVersioning(new FHIRReferenceVersionRules([FHIRReferenceVersionRules::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersioning(new FHIRReferenceVersionRules($ext)); } } } @@ -775,63 +816,94 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAggregation())) { $a[self::FIELD_AGGREGATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_AGGREGATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_AGGREGATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRAggregationMode::FIELD_VALUE]) || array_key_exists(FHIRAggregationMode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_AGGREGATION_EXT][] = null; + unset($enc[FHIRAggregationMode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_AGGREGATION_EXT] = $encs; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getProfile())) { $a[self::FIELD_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROFILE_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROFILE_EXT] = $encs; + } } if ([] !== ($vs = $this->getTargetProfile())) { $a[self::FIELD_TARGET_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TARGET_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TARGET_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TARGET_PROFILE_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TARGET_PROFILE_EXT] = $encs; + } } if (null !== ($v = $this->getVersioning())) { $a[self::FIELD_VERSIONING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRReferenceVersionRules::FIELD_VALUE, $enc)))) { + unset($enc[FHIRReferenceVersionRules::FIELD_VALUE]); $a[self::FIELD_VERSIONING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php index ca4d232f8d..951f42a162 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIREncounterClassHistory extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -315,6 +315,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php index 6628640384..0f0000a1db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIREncounterDiagnosis extends FHIRBackboneElement const FIELD_USE = 'use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -155,20 +155,27 @@ public function __construct($data = null) $this->setCondition(new FHIRReference($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_RANK])) { - $ext = (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) - ? $data[self::FIELD_RANK_EXT] - : null; - if ($data[self::FIELD_RANK] instanceof FHIRPositiveInt) { - $this->setRank($data[self::FIELD_RANK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_RANK]] + $ext)); - } else if (is_array($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_RANK]))); - } + if (isset($data[self::FIELD_RANK]) || isset($data[self::FIELD_RANK_EXT])) { + if (isset($data[self::FIELD_RANK])) { + $value = $data[self::FIELD_RANK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) { + $ext = $data[self::FIELD_RANK_EXT]; } else { - $this->setRank(new FHIRPositiveInt($data[self::FIELD_RANK])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setRank($value); + } else if (is_array($value)) { + $this->setRank(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRank(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_USE])) { @@ -411,14 +418,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRank())) { $a[self::FIELD_RANK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_RANK_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php index 26e813e89e..52a60dad2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIREncounterHospitalization extends FHIRBackboneElement const FIELD_SPECIAL_COURTESY = 'specialCourtesy'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -862,7 +862,13 @@ public function jsonSerialize() $a[self::FIELD_DESTINATION] = $v; } if ([] !== ($vs = $this->getDietPreference())) { - $a[self::FIELD_DIET_PREFERENCE] = $vs; + $a[self::FIELD_DIET_PREFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIET_PREFERENCE][] = $v; + } } if (null !== ($v = $this->getDischargeDisposition())) { $a[self::FIELD_DISCHARGE_DISPOSITION] = $v; @@ -877,10 +883,25 @@ public function jsonSerialize() $a[self::FIELD_RE_ADMISSION] = $v; } if ([] !== ($vs = $this->getSpecialArrangement())) { - $a[self::FIELD_SPECIAL_ARRANGEMENT] = $vs; + $a[self::FIELD_SPECIAL_ARRANGEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_ARRANGEMENT][] = $v; + } } if ([] !== ($vs = $this->getSpecialCourtesy())) { - $a[self::FIELD_SPECIAL_COURTESY] = $vs; + $a[self::FIELD_SPECIAL_COURTESY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_COURTESY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php index f7f560bd62..8bc0d2c1d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIREncounterLocation extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -180,20 +180,27 @@ public function __construct($data = null) $this->setPhysicalType(new FHIRCodeableConcept($data[self::FIELD_PHYSICAL_TYPE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterLocationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterLocationStatus([FHIREncounterLocationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterLocationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREncounterLocationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterLocationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterLocationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterLocationStatus([FHIREncounterLocationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterLocationStatus($ext)); } } } @@ -451,11 +458,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterLocationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterLocationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php index 1eba414b62..ea23faf5e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIREncounterParticipant extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -423,7 +423,16 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php index 708720ee1f..76f2a80fed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIREncounterStatusHistory extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -136,20 +136,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterStatus([FHIREncounterStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREncounterStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterStatus([FHIREncounterStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterStatus($ext)); } } } @@ -321,11 +328,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php index a1ec4e5c5f..cd5bc4e65f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIREpisodeOfCareDiagnosis extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -154,20 +154,27 @@ public function __construct($data = null) $this->setCondition(new FHIRReference($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_RANK])) { - $ext = (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) - ? $data[self::FIELD_RANK_EXT] - : null; - if ($data[self::FIELD_RANK] instanceof FHIRPositiveInt) { - $this->setRank($data[self::FIELD_RANK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_RANK]] + $ext)); - } else if (is_array($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_RANK]))); - } + if (isset($data[self::FIELD_RANK]) || isset($data[self::FIELD_RANK_EXT])) { + if (isset($data[self::FIELD_RANK])) { + $value = $data[self::FIELD_RANK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) { + $ext = $data[self::FIELD_RANK_EXT]; } else { - $this->setRank(new FHIRPositiveInt($data[self::FIELD_RANK])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setRank($value); + } else if (is_array($value)) { + $this->setRank(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRank(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -406,14 +413,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRank())) { $a[self::FIELD_RANK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_RANK_EXT] = $enc; } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php index 4eb022d208..1d23660d67 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIREpisodeOfCareStatusHistory extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -137,20 +137,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREpisodeOfCareStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREpisodeOfCareStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREpisodeOfCareStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREpisodeOfCareStatus($ext)); } } } @@ -322,11 +329,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREpisodeOfCareStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREpisodeOfCareStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristic.php index eefc244ce5..d4f6e85240 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIREvidenceVariableCharacteristic extends FHIRBackboneElement const FIELD_USAGE_CONTEXT = 'usageContext'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -340,20 +340,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFINITION_CANONICAL])) { - $ext = (isset($data[self::FIELD_DEFINITION_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFINITION_CANONICAL_EXT])) - ? $data[self::FIELD_DEFINITION_CANONICAL_EXT] - : null; - if ($data[self::FIELD_DEFINITION_CANONICAL] instanceof FHIRCanonical) { - $this->setDefinitionCanonical($data[self::FIELD_DEFINITION_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION_CANONICAL])) { - $this->setDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFINITION_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION_CANONICAL])) { - $this->setDefinitionCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFINITION_CANONICAL]))); - } + if (isset($data[self::FIELD_DEFINITION_CANONICAL]) || isset($data[self::FIELD_DEFINITION_CANONICAL_EXT])) { + if (isset($data[self::FIELD_DEFINITION_CANONICAL])) { + $value = $data[self::FIELD_DEFINITION_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFINITION_CANONICAL_EXT])) { + $ext = $data[self::FIELD_DEFINITION_CANONICAL_EXT]; } else { - $this->setDefinitionCanonical(new FHIRCanonical($data[self::FIELD_DEFINITION_CANONICAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefinitionCanonical($value); + } else if (is_array($value)) { + $this->setDefinitionCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinitionCanonical(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_DEFINITION_CODEABLE_CONCEPT])) { @@ -391,68 +398,96 @@ public function __construct($data = null) $this->setDefinitionTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_DEFINITION_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXCLUDE])) { - $ext = (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) - ? $data[self::FIELD_EXCLUDE_EXT] - : null; - if ($data[self::FIELD_EXCLUDE] instanceof FHIRBoolean) { - $this->setExclude($data[self::FIELD_EXCLUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDE]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDE]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setExclude(new FHIRBoolean($data[self::FIELD_EXCLUDE])); + $ext = []; } - } - if (isset($data[self::FIELD_GROUP_MEASURE])) { - $ext = (isset($data[self::FIELD_GROUP_MEASURE_EXT]) && is_array($data[self::FIELD_GROUP_MEASURE_EXT])) - ? $data[self::FIELD_GROUP_MEASURE_EXT] - : null; - if ($data[self::FIELD_GROUP_MEASURE] instanceof FHIRGroupMeasure) { - $this->setGroupMeasure($data[self::FIELD_GROUP_MEASURE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUP_MEASURE])) { - $this->setGroupMeasure(new FHIRGroupMeasure([FHIRGroupMeasure::FIELD_VALUE => $data[self::FIELD_GROUP_MEASURE]] + $ext)); - } else if (is_array($data[self::FIELD_GROUP_MEASURE])) { - $this->setGroupMeasure(new FHIRGroupMeasure(array_merge($ext, $data[self::FIELD_GROUP_MEASURE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXCLUDE]) || isset($data[self::FIELD_EXCLUDE_EXT])) { + if (isset($data[self::FIELD_EXCLUDE])) { + $value = $data[self::FIELD_EXCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_EXT]; } else { - $this->setGroupMeasure(new FHIRGroupMeasure($data[self::FIELD_GROUP_MEASURE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExclude($value); + } else if (is_array($value)) { + $this->setExclude(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExclude(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setParticipantEffectiveDateTime($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { - $this->setParticipantEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { - $this->setParticipantEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]))); + if (isset($data[self::FIELD_GROUP_MEASURE]) || isset($data[self::FIELD_GROUP_MEASURE_EXT])) { + if (isset($data[self::FIELD_GROUP_MEASURE])) { + $value = $data[self::FIELD_GROUP_MEASURE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GROUP_MEASURE_EXT]) && is_array($data[self::FIELD_GROUP_MEASURE_EXT])) { + $ext = $data[self::FIELD_GROUP_MEASURE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGroupMeasure) { + $this->setGroupMeasure($value); + } else if (is_array($value)) { + $this->setGroupMeasure(new FHIRGroupMeasure(array_merge($ext, $value))); + } else { + $this->setGroupMeasure(new FHIRGroupMeasure([FHIRGroupMeasure::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setGroupMeasure(new FHIRGroupMeasure($ext)); + } + } + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT]; } else { - $this->setParticipantEffectiveDateTime(new FHIRDateTime($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setParticipantEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setParticipantEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setParticipantEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParticipantEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION])) { @@ -1314,8 +1349,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefinitionCanonical())) { $a[self::FIELD_DEFINITION_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFINITION_CANONICAL_EXT] = $enc; } } @@ -1336,29 +1373,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExclude())) { $a[self::FIELD_EXCLUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDE_EXT] = $enc; } } if (null !== ($v = $this->getGroupMeasure())) { $a[self::FIELD_GROUP_MEASURE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGroupMeasure::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGroupMeasure::FIELD_VALUE]); $a[self::FIELD_GROUP_MEASURE_EXT] = $enc; } } if (null !== ($v = $this->getParticipantEffectiveDateTime())) { $a[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -1375,7 +1420,16 @@ public function jsonSerialize() $a[self::FIELD_TIME_FROM_START] = $v; } if ([] !== ($vs = $this->getUsageContext())) { - $a[self::FIELD_USAGE_CONTEXT] = $vs; + $a[self::FIELD_USAGE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USAGE_CONTEXT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActor.php index b28babf5b5..8310ff7b3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRExampleScenarioActor extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -160,68 +160,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTOR_ID])) { - $ext = (isset($data[self::FIELD_ACTOR_ID_EXT]) && is_array($data[self::FIELD_ACTOR_ID_EXT])) - ? $data[self::FIELD_ACTOR_ID_EXT] - : null; - if ($data[self::FIELD_ACTOR_ID] instanceof FHIRString) { - $this->setActorId($data[self::FIELD_ACTOR_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTOR_ID])) { - $this->setActorId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ACTOR_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ACTOR_ID])) { - $this->setActorId(new FHIRString(array_merge($ext, $data[self::FIELD_ACTOR_ID]))); - } + if (isset($data[self::FIELD_ACTOR_ID]) || isset($data[self::FIELD_ACTOR_ID_EXT])) { + if (isset($data[self::FIELD_ACTOR_ID])) { + $value = $data[self::FIELD_ACTOR_ID]; } else { - $this->setActorId(new FHIRString($data[self::FIELD_ACTOR_ID])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_ACTOR_ID_EXT]) && is_array($data[self::FIELD_ACTOR_ID_EXT])) { + $ext = $data[self::FIELD_ACTOR_ID_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setActorId($value); + } else if (is_array($value)) { + $this->setActorId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setActorId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActorId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRExampleScenarioActorType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRExampleScenarioActorType([FHIRExampleScenarioActorType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRExampleScenarioActorType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRExampleScenarioActorType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExampleScenarioActorType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRExampleScenarioActorType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRExampleScenarioActorType([FHIRExampleScenarioActorType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRExampleScenarioActorType($ext)); } } } @@ -518,32 +546,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActorId())) { $a[self::FIELD_ACTOR_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ACTOR_ID_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExampleScenarioActorType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExampleScenarioActorType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternative.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternative.php index 5fb33ec3eb..ba4a6f95a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternative.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRExampleScenarioAlternative extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string that may contain Github Flavored Markdown syntax for optional @@ -146,20 +146,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_STEP])) { @@ -180,20 +187,27 @@ public function __construct($data = null) $this->addStep(new FHIRExampleScenarioStep($data[self::FIELD_STEP])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -471,21 +485,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getStep())) { - $a[self::FIELD_STEP] = $vs; + $a[self::FIELD_STEP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STEP][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstance.php index 8712822058..cb48df451c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRExampleScenarioContainedInstance extends FHIRBackboneElement const FIELD_VERSION_ID_EXT = '_versionId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -129,36 +129,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_RESOURCE_ID])) { - $ext = (isset($data[self::FIELD_RESOURCE_ID_EXT]) && is_array($data[self::FIELD_RESOURCE_ID_EXT])) - ? $data[self::FIELD_RESOURCE_ID_EXT] - : null; - if ($data[self::FIELD_RESOURCE_ID] instanceof FHIRString) { - $this->setResourceId($data[self::FIELD_RESOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE_ID])) { - $this->setResourceId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE_ID])) { - $this->setResourceId(new FHIRString(array_merge($ext, $data[self::FIELD_RESOURCE_ID]))); - } + if (isset($data[self::FIELD_RESOURCE_ID]) || isset($data[self::FIELD_RESOURCE_ID_EXT])) { + if (isset($data[self::FIELD_RESOURCE_ID])) { + $value = $data[self::FIELD_RESOURCE_ID]; } else { - $this->setResourceId(new FHIRString($data[self::FIELD_RESOURCE_ID])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION_ID])) { - $ext = (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) - ? $data[self::FIELD_VERSION_ID_EXT] - : null; - if ($data[self::FIELD_VERSION_ID] instanceof FHIRString) { - $this->setVersionId($data[self::FIELD_VERSION_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION_ID]))); + if (isset($data[self::FIELD_RESOURCE_ID_EXT]) && is_array($data[self::FIELD_RESOURCE_ID_EXT])) { + $ext = $data[self::FIELD_RESOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResourceId($value); + } else if (is_array($value)) { + $this->setResourceId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResourceId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResourceId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VERSION_ID]) || isset($data[self::FIELD_VERSION_ID_EXT])) { + if (isset($data[self::FIELD_VERSION_ID])) { + $value = $data[self::FIELD_VERSION_ID]; } else { - $this->setVersionId(new FHIRString($data[self::FIELD_VERSION_ID])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) { + $ext = $data[self::FIELD_VERSION_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersionId($value); + } else if (is_array($value)) { + $this->setVersionId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersionId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersionId(new FHIRString($ext)); } } } @@ -361,18 +375,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getResourceId())) { $a[self::FIELD_RESOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getVersionId())) { $a[self::FIELD_VERSION_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstance.php index b337202bdb..59299ec6a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRExampleScenarioInstance extends FHIRBackboneElement const FIELD_VERSION = 'version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Example of workflow instance. @@ -199,68 +199,96 @@ public function __construct($data = null) $this->addContainedInstance(new FHIRExampleScenarioContainedInstance($data[self::FIELD_CONTAINED_INSTANCE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_RESOURCE_ID])) { - $ext = (isset($data[self::FIELD_RESOURCE_ID_EXT]) && is_array($data[self::FIELD_RESOURCE_ID_EXT])) - ? $data[self::FIELD_RESOURCE_ID_EXT] - : null; - if ($data[self::FIELD_RESOURCE_ID] instanceof FHIRString) { - $this->setResourceId($data[self::FIELD_RESOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE_ID])) { - $this->setResourceId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE_ID])) { - $this->setResourceId(new FHIRString(array_merge($ext, $data[self::FIELD_RESOURCE_ID]))); + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setResourceId(new FHIRString($data[self::FIELD_RESOURCE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_RESOURCE_TYPE])) { - $ext = (isset($data[self::FIELD_RESOURCE_TYPE_EXT]) && is_array($data[self::FIELD_RESOURCE_TYPE_EXT])) - ? $data[self::FIELD_RESOURCE_TYPE_EXT] - : null; - if ($data[self::FIELD_RESOURCE_TYPE] instanceof FHIRResourceType) { - $this->setResourceType($data[self::FIELD_RESOURCE_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE_TYPE])) { - $this->setResourceType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_RESOURCE_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE_TYPE])) { - $this->setResourceType(new FHIRResourceType(array_merge($ext, $data[self::FIELD_RESOURCE_TYPE]))); + if (isset($data[self::FIELD_RESOURCE_ID]) || isset($data[self::FIELD_RESOURCE_ID_EXT])) { + if (isset($data[self::FIELD_RESOURCE_ID])) { + $value = $data[self::FIELD_RESOURCE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_ID_EXT]) && is_array($data[self::FIELD_RESOURCE_ID_EXT])) { + $ext = $data[self::FIELD_RESOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResourceId($value); + } else if (is_array($value)) { + $this->setResourceId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResourceId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResourceId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RESOURCE_TYPE]) || isset($data[self::FIELD_RESOURCE_TYPE_EXT])) { + if (isset($data[self::FIELD_RESOURCE_TYPE])) { + $value = $data[self::FIELD_RESOURCE_TYPE]; } else { - $this->setResourceType(new FHIRResourceType($data[self::FIELD_RESOURCE_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_TYPE_EXT]) && is_array($data[self::FIELD_RESOURCE_TYPE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->setResourceType($value); + } else if (is_array($value)) { + $this->setResourceType(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->setResourceType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResourceType(new FHIRResourceType($ext)); } } if (isset($data[self::FIELD_VERSION])) { @@ -703,38 +731,61 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContainedInstance())) { - $a[self::FIELD_CONTAINED_INSTANCE] = $vs; + $a[self::FIELD_CONTAINED_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINED_INSTANCE][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getResourceId())) { $a[self::FIELD_RESOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getResourceType())) { $a[self::FIELD_RESOURCE_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceType::FIELD_VALUE]); $a[self::FIELD_RESOURCE_TYPE_EXT] = $enc; } } if ([] !== ($vs = $this->getVersion())) { - $a[self::FIELD_VERSION] = $vs; + $a[self::FIELD_VERSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VERSION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperation.php index f849cba1fc..59193165d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRExampleScenarioOperation extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string that may contain Github Flavored Markdown syntax for optional @@ -231,116 +231,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_INITIATOR])) { - $ext = (isset($data[self::FIELD_INITIATOR_EXT]) && is_array($data[self::FIELD_INITIATOR_EXT])) - ? $data[self::FIELD_INITIATOR_EXT] - : null; - if ($data[self::FIELD_INITIATOR] instanceof FHIRString) { - $this->setInitiator($data[self::FIELD_INITIATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIATOR])) { - $this->setInitiator(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INITIATOR]] + $ext)); - } else if (is_array($data[self::FIELD_INITIATOR])) { - $this->setInitiator(new FHIRString(array_merge($ext, $data[self::FIELD_INITIATOR]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setInitiator(new FHIRString($data[self::FIELD_INITIATOR])); + $ext = []; } - } - if (isset($data[self::FIELD_INITIATOR_ACTIVE])) { - $ext = (isset($data[self::FIELD_INITIATOR_ACTIVE_EXT]) && is_array($data[self::FIELD_INITIATOR_ACTIVE_EXT])) - ? $data[self::FIELD_INITIATOR_ACTIVE_EXT] - : null; - if ($data[self::FIELD_INITIATOR_ACTIVE] instanceof FHIRBoolean) { - $this->setInitiatorActive($data[self::FIELD_INITIATOR_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIATOR_ACTIVE])) { - $this->setInitiatorActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INITIATOR_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_INITIATOR_ACTIVE])) { - $this->setInitiatorActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INITIATOR_ACTIVE]))); + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setInitiatorActive(new FHIRBoolean($data[self::FIELD_INITIATOR_ACTIVE])); + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_INITIATOR]) || isset($data[self::FIELD_INITIATOR_EXT])) { + if (isset($data[self::FIELD_INITIATOR])) { + $value = $data[self::FIELD_INITIATOR]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRString) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRString(array_merge($ext, $data[self::FIELD_NUMBER]))); + if (isset($data[self::FIELD_INITIATOR_EXT]) && is_array($data[self::FIELD_INITIATOR_EXT])) { + $ext = $data[self::FIELD_INITIATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setInitiator($value); + } else if (is_array($value)) { + $this->setInitiator(new FHIRString(array_merge($ext, $value))); + } else { + $this->setInitiator(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInitiator(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_INITIATOR_ACTIVE]) || isset($data[self::FIELD_INITIATOR_ACTIVE_EXT])) { + if (isset($data[self::FIELD_INITIATOR_ACTIVE])) { + $value = $data[self::FIELD_INITIATOR_ACTIVE]; } else { - $this->setNumber(new FHIRString($data[self::FIELD_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_INITIATOR_ACTIVE_EXT]) && is_array($data[self::FIELD_INITIATOR_ACTIVE_EXT])) { + $ext = $data[self::FIELD_INITIATOR_ACTIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInitiatorActive($value); + } else if (is_array($value)) { + $this->setInitiatorActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInitiatorActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInitiatorActive(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_RECEIVER])) { - $ext = (isset($data[self::FIELD_RECEIVER_EXT]) && is_array($data[self::FIELD_RECEIVER_EXT])) - ? $data[self::FIELD_RECEIVER_EXT] - : null; - if ($data[self::FIELD_RECEIVER] instanceof FHIRString) { - $this->setReceiver($data[self::FIELD_RECEIVER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECEIVER])) { - $this->setReceiver(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RECEIVER]] + $ext)); - } else if (is_array($data[self::FIELD_RECEIVER])) { - $this->setReceiver(new FHIRString(array_merge($ext, $data[self::FIELD_RECEIVER]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setReceiver(new FHIRString($data[self::FIELD_RECEIVER])); + $value = null; + } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumber(new FHIRString($ext)); } } - if (isset($data[self::FIELD_RECEIVER_ACTIVE])) { - $ext = (isset($data[self::FIELD_RECEIVER_ACTIVE_EXT]) && is_array($data[self::FIELD_RECEIVER_ACTIVE_EXT])) - ? $data[self::FIELD_RECEIVER_ACTIVE_EXT] - : null; - if ($data[self::FIELD_RECEIVER_ACTIVE] instanceof FHIRBoolean) { - $this->setReceiverActive($data[self::FIELD_RECEIVER_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECEIVER_ACTIVE])) { - $this->setReceiverActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_RECEIVER_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_RECEIVER_ACTIVE])) { - $this->setReceiverActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_RECEIVER_ACTIVE]))); + if (isset($data[self::FIELD_RECEIVER]) || isset($data[self::FIELD_RECEIVER_EXT])) { + if (isset($data[self::FIELD_RECEIVER])) { + $value = $data[self::FIELD_RECEIVER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECEIVER_EXT]) && is_array($data[self::FIELD_RECEIVER_EXT])) { + $ext = $data[self::FIELD_RECEIVER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReceiver($value); + } else if (is_array($value)) { + $this->setReceiver(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReceiver(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReceiver(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RECEIVER_ACTIVE]) || isset($data[self::FIELD_RECEIVER_ACTIVE_EXT])) { + if (isset($data[self::FIELD_RECEIVER_ACTIVE])) { + $value = $data[self::FIELD_RECEIVER_ACTIVE]; } else { - $this->setReceiverActive(new FHIRBoolean($data[self::FIELD_RECEIVER_ACTIVE])); + $value = null; + } + if (isset($data[self::FIELD_RECEIVER_ACTIVE_EXT]) && is_array($data[self::FIELD_RECEIVER_ACTIVE_EXT])) { + $ext = $data[self::FIELD_RECEIVER_ACTIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReceiverActive($value); + } else if (is_array($value)) { + $this->setReceiverActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReceiverActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReceiverActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -357,20 +406,27 @@ public function __construct($data = null) $this->setResponse(new FHIRExampleScenarioContainedInstance($data[self::FIELD_RESPONSE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); } } } @@ -953,50 +1009,64 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getInitiator())) { $a[self::FIELD_INITIATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INITIATOR_EXT] = $enc; } } if (null !== ($v = $this->getInitiatorActive())) { $a[self::FIELD_INITIATOR_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INITIATOR_ACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getReceiver())) { $a[self::FIELD_RECEIVER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RECEIVER_EXT] = $enc; } } if (null !== ($v = $this->getReceiverActive())) { $a[self::FIELD_RECEIVER_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_RECEIVER_ACTIVE_EXT] = $enc; } } @@ -1008,11 +1078,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcess.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcess.php index 4764f3e115..13e891e5a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcess.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcess.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRExampleScenarioProcess extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string that may contain Github Flavored Markdown syntax for optional @@ -178,52 +178,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_POST_CONDITIONS])) { - $ext = (isset($data[self::FIELD_POST_CONDITIONS_EXT]) && is_array($data[self::FIELD_POST_CONDITIONS_EXT])) - ? $data[self::FIELD_POST_CONDITIONS_EXT] - : null; - if ($data[self::FIELD_POST_CONDITIONS] instanceof FHIRMarkdown) { - $this->setPostConditions($data[self::FIELD_POST_CONDITIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POST_CONDITIONS])) { - $this->setPostConditions(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_POST_CONDITIONS]] + $ext)); - } else if (is_array($data[self::FIELD_POST_CONDITIONS])) { - $this->setPostConditions(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_POST_CONDITIONS]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setPostConditions(new FHIRMarkdown($data[self::FIELD_POST_CONDITIONS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_PRE_CONDITIONS])) { - $ext = (isset($data[self::FIELD_PRE_CONDITIONS_EXT]) && is_array($data[self::FIELD_PRE_CONDITIONS_EXT])) - ? $data[self::FIELD_PRE_CONDITIONS_EXT] - : null; - if ($data[self::FIELD_PRE_CONDITIONS] instanceof FHIRMarkdown) { - $this->setPreConditions($data[self::FIELD_PRE_CONDITIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRE_CONDITIONS])) { - $this->setPreConditions(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PRE_CONDITIONS]] + $ext)); - } else if (is_array($data[self::FIELD_PRE_CONDITIONS])) { - $this->setPreConditions(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PRE_CONDITIONS]))); + if (isset($data[self::FIELD_POST_CONDITIONS]) || isset($data[self::FIELD_POST_CONDITIONS_EXT])) { + if (isset($data[self::FIELD_POST_CONDITIONS])) { + $value = $data[self::FIELD_POST_CONDITIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POST_CONDITIONS_EXT]) && is_array($data[self::FIELD_POST_CONDITIONS_EXT])) { + $ext = $data[self::FIELD_POST_CONDITIONS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPostConditions($value); + } else if (is_array($value)) { + $this->setPostConditions(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPostConditions(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPostConditions(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_PRE_CONDITIONS]) || isset($data[self::FIELD_PRE_CONDITIONS_EXT])) { + if (isset($data[self::FIELD_PRE_CONDITIONS])) { + $value = $data[self::FIELD_PRE_CONDITIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_CONDITIONS_EXT]) && is_array($data[self::FIELD_PRE_CONDITIONS_EXT])) { + $ext = $data[self::FIELD_PRE_CONDITIONS_EXT]; } else { - $this->setPreConditions(new FHIRMarkdown($data[self::FIELD_PRE_CONDITIONS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPreConditions($value); + } else if (is_array($value)) { + $this->setPreConditions(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPreConditions(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreConditions(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_STEP])) { @@ -244,20 +265,27 @@ public function __construct($data = null) $this->addStep(new FHIRExampleScenarioStep($data[self::FIELD_STEP])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -651,35 +679,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getPostConditions())) { $a[self::FIELD_POST_CONDITIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_POST_CONDITIONS_EXT] = $enc; } } if (null !== ($v = $this->getPreConditions())) { $a[self::FIELD_PRE_CONDITIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PRE_CONDITIONS_EXT] = $enc; } } if ([] !== ($vs = $this->getStep())) { - $a[self::FIELD_STEP] = $vs; + $a[self::FIELD_STEP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STEP][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStep.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStep.php index 810b2d8f60..e28832b52f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStep.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStep.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRExampleScenarioStep extends FHIRBackboneElement const FIELD_PROCESS = 'process'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Example of workflow instance. @@ -171,20 +171,27 @@ public function __construct($data = null) $this->setOperation(new FHIRExampleScenarioOperation($data[self::FIELD_OPERATION])); } } - if (isset($data[self::FIELD_PAUSE])) { - $ext = (isset($data[self::FIELD_PAUSE_EXT]) && is_array($data[self::FIELD_PAUSE_EXT])) - ? $data[self::FIELD_PAUSE_EXT] - : null; - if ($data[self::FIELD_PAUSE] instanceof FHIRBoolean) { - $this->setPause($data[self::FIELD_PAUSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAUSE])) { - $this->setPause(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PAUSE]] + $ext)); - } else if (is_array($data[self::FIELD_PAUSE])) { - $this->setPause(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PAUSE]))); - } + if (isset($data[self::FIELD_PAUSE]) || isset($data[self::FIELD_PAUSE_EXT])) { + if (isset($data[self::FIELD_PAUSE])) { + $value = $data[self::FIELD_PAUSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PAUSE_EXT]) && is_array($data[self::FIELD_PAUSE_EXT])) { + $ext = $data[self::FIELD_PAUSE_EXT]; } else { - $this->setPause(new FHIRBoolean($data[self::FIELD_PAUSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPause($value); + } else if (is_array($value)) { + $this->setPause(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPause(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPause(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PROCESS])) { @@ -511,20 +518,37 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAlternative())) { - $a[self::FIELD_ALTERNATIVE] = $vs; + $a[self::FIELD_ALTERNATIVE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ALTERNATIVE][] = $v; + } } if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } if (null !== ($v = $this->getPause())) { $a[self::FIELD_PAUSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PAUSE_EXT] = $enc; } } if ([] !== ($vs = $this->getProcess())) { - $a[self::FIELD_PROCESS] = $vs; + $a[self::FIELD_PROCESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESS][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersion.php index 540ec45856..24a6121e57 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRExampleScenarioVersion extends FHIRBackboneElement const FIELD_VERSION_ID_EXT = '_versionId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string that may contain Github Flavored Markdown syntax for optional @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION_ID])) { - $ext = (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) - ? $data[self::FIELD_VERSION_ID_EXT] - : null; - if ($data[self::FIELD_VERSION_ID] instanceof FHIRString) { - $this->setVersionId($data[self::FIELD_VERSION_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION_ID]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_VERSION_ID]) || isset($data[self::FIELD_VERSION_ID_EXT])) { + if (isset($data[self::FIELD_VERSION_ID])) { + $value = $data[self::FIELD_VERSION_ID]; } else { - $this->setVersionId(new FHIRString($data[self::FIELD_VERSION_ID])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) { + $ext = $data[self::FIELD_VERSION_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersionId($value); + } else if (is_array($value)) { + $this->setVersionId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersionId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersionId(new FHIRString($ext)); } } } @@ -374,18 +388,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getVersionId())) { $a[self::FIELD_VERSION_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php index 03b0f10885..cc4bbe7c2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRExplanationOfBenefitAccident extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -168,20 +168,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -483,8 +490,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -497,6 +506,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php index 52d282782d..6d30ecbdb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRExplanationOfBenefitAddItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -443,78 +443,103 @@ public function __construct($data = null) $this->addDetail(new FHIRExplanationOfBenefitDetail1($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DETAIL_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_EXT])) - ? $data[self::FIELD_DETAIL_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_DETAIL_SEQUENCE])) { - foreach($data[self::FIELD_DETAIL_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addDetailSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDetailSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DETAIL_SEQUENCE]) || isset($data[self::FIELD_DETAIL_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DETAIL_SEQUENCE])) { + $value = $data[self::FIELD_DETAIL_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DETAIL_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addDetailSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addDetailSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDetailSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDetailSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addDetailSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DETAIL_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addDetailSequence($data[self::FIELD_DETAIL_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DETAIL_SEQUENCE])) { - $this->addDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DETAIL_SEQUENCE]] + $ext)); - } else { - $this->addDetailSequence(new FHIRPositiveInt($data[self::FIELD_DETAIL_SEQUENCE])); - } - } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDetailSequence(new FHIRPositiveInt($iext)); } + } + } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_ITEM_SEQUENCE])) { - $ext = (isset($data[self::FIELD_ITEM_SEQUENCE_EXT]) && is_array($data[self::FIELD_ITEM_SEQUENCE_EXT])) - ? $data[self::FIELD_ITEM_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_ITEM_SEQUENCE])) { - foreach($data[self::FIELD_ITEM_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addItemSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addItemSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ITEM_SEQUENCE]) || isset($data[self::FIELD_ITEM_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_ITEM_SEQUENCE])) { + $value = $data[self::FIELD_ITEM_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ITEM_SEQUENCE_EXT]) && is_array($data[self::FIELD_ITEM_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_ITEM_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addItemSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addItemSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addItemSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addItemSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addItemSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addItemSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_ITEM_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addItemSequence($data[self::FIELD_ITEM_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ITEM_SEQUENCE])) { - $this->addItemSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_ITEM_SEQUENCE]] + $ext)); - } else { - $this->addItemSequence(new FHIRPositiveInt($data[self::FIELD_ITEM_SEQUENCE])); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -563,33 +588,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -642,20 +676,27 @@ public function __construct($data = null) $this->setQuantity(new FHIRQuantity($data[self::FIELD_QUANTITY])); } } - if (isset($data[self::FIELD_SERVICED_DATE])) { - $ext = (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) - ? $data[self::FIELD_SERVICED_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICED_DATE] instanceof FHIRDate) { - $this->setServicedDate($data[self::FIELD_SERVICED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICED_DATE]))); - } + if (isset($data[self::FIELD_SERVICED_DATE]) || isset($data[self::FIELD_SERVICED_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICED_DATE])) { + $value = $data[self::FIELD_SERVICED_DATE]; } else { - $this->setServicedDate(new FHIRDate($data[self::FIELD_SERVICED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServicedDate($value); + } else if (is_array($value)) { + $this->setServicedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServicedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SERVICED_PERIOD])) { @@ -665,33 +706,42 @@ public function __construct($data = null) $this->setServicedPeriod(new FHIRPeriod($data[self::FIELD_SERVICED_PERIOD])); } } - if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT])) - ? $data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { - foreach($data[self::FIELD_SUB_DETAIL_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addSubDetailSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSubDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSubDetailSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE]) || isset($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { + $value = $data[self::FIELD_SUB_DETAIL_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT]) && is_array($data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SUB_DETAIL_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addSubDetailSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addSubDetailSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSubDetailSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addSubDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSubDetailSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addSubDetailSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addSubDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSubDetailSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_SUB_DETAIL_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addSubDetailSequence($data[self::FIELD_SUB_DETAIL_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUB_DETAIL_SEQUENCE])) { - $this->addSubDetailSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SUB_DETAIL_SEQUENCE]] + $ext)); - } else { - $this->addSubDetailSequence(new FHIRPositiveInt($data[self::FIELD_SUB_DETAIL_SEQUENCE])); } } if (isset($data[self::FIELD_SUB_SITE])) { @@ -2029,50 +2079,80 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getBodySite())) { $a[self::FIELD_BODY_SITE] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getDetailSequence())) { $a[self::FIELD_DETAIL_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DETAIL_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DETAIL_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DETAIL_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DETAIL_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getItemSequence())) { $a[self::FIELD_ITEM_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ITEM_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ITEM_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ITEM_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ITEM_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getLocationAddress())) { $a[self::FIELD_LOCATION_ADDRESS] = $v; @@ -2084,42 +2164,70 @@ public function jsonSerialize() $a[self::FIELD_LOCATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if ([] !== ($vs = $this->getProvider())) { - $a[self::FIELD_PROVIDER] = $vs; + $a[self::FIELD_PROVIDER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROVIDER][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } if (null !== ($v = $this->getServicedDate())) { $a[self::FIELD_SERVICED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICED_DATE_EXT] = $enc; } } @@ -2128,25 +2236,42 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getSubDetailSequence())) { $a[self::FIELD_SUB_DETAIL_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUB_DETAIL_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUB_DETAIL_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUB_DETAIL_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUB_DETAIL_SEQUENCE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSubSite())) { - $a[self::FIELD_SUB_SITE] = $vs; + $a[self::FIELD_SUB_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_SITE][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php index dc52004108..e9e90b6ac5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRExplanationOfBenefitAdjudication extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -186,20 +186,27 @@ public function __construct($data = null) $this->setReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -486,11 +493,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php index 6158f230e3..db8419ce53 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRExplanationOfBenefitBenefitBalance extends FHIRBackboneElement const FIELD_UNIT = 'unit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -220,36 +220,50 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXCLUDED])) { - $ext = (isset($data[self::FIELD_EXCLUDED_EXT]) && is_array($data[self::FIELD_EXCLUDED_EXT])) - ? $data[self::FIELD_EXCLUDED_EXT] - : null; - if ($data[self::FIELD_EXCLUDED] instanceof FHIRBoolean) { - $this->setExcluded($data[self::FIELD_EXCLUDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDED])) { - $this->setExcluded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDED]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDED])) { - $this->setExcluded(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDED]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXCLUDED]) || isset($data[self::FIELD_EXCLUDED_EXT])) { + if (isset($data[self::FIELD_EXCLUDED])) { + $value = $data[self::FIELD_EXCLUDED]; } else { - $this->setExcluded(new FHIRBoolean($data[self::FIELD_EXCLUDED])); + $value = null; + } + if (isset($data[self::FIELD_EXCLUDED_EXT]) && is_array($data[self::FIELD_EXCLUDED_EXT])) { + $ext = $data[self::FIELD_EXCLUDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExcluded($value); + } else if (is_array($value)) { + $this->setExcluded(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExcluded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExcluded(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FINANCIAL])) { @@ -270,20 +284,27 @@ public function __construct($data = null) $this->addFinancial(new FHIRExplanationOfBenefitFinancial($data[self::FIELD_FINANCIAL])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NETWORK])) { @@ -789,25 +810,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExcluded())) { $a[self::FIELD_EXCLUDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDED_EXT] = $enc; } } if ([] !== ($vs = $this->getFinancial())) { - $a[self::FIELD_FINANCIAL] = $vs; + $a[self::FIELD_FINANCIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FINANCIAL][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -820,6 +853,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php index 6c44678611..553cb00a7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRExplanationOfBenefitCareTeam extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -187,20 +187,27 @@ public function __construct($data = null) $this->setQualification(new FHIRCodeableConcept($data[self::FIELD_QUALIFICATION])); } } - if (isset($data[self::FIELD_RESPONSIBLE])) { - $ext = (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) - ? $data[self::FIELD_RESPONSIBLE_EXT] - : null; - if ($data[self::FIELD_RESPONSIBLE] instanceof FHIRBoolean) { - $this->setResponsible($data[self::FIELD_RESPONSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_RESPONSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRBoolean(array_merge($ext, $data[self::FIELD_RESPONSIBLE]))); - } + if (isset($data[self::FIELD_RESPONSIBLE]) || isset($data[self::FIELD_RESPONSIBLE_EXT])) { + if (isset($data[self::FIELD_RESPONSIBLE])) { + $value = $data[self::FIELD_RESPONSIBLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) { + $ext = $data[self::FIELD_RESPONSIBLE_EXT]; } else { - $this->setResponsible(new FHIRBoolean($data[self::FIELD_RESPONSIBLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setResponsible($value); + } else if (is_array($value)) { + $this->setResponsible(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setResponsible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResponsible(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -210,20 +217,27 @@ public function __construct($data = null) $this->setRole(new FHIRCodeableConcept($data[self::FIELD_ROLE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -546,8 +560,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getResponsible())) { $a[self::FIELD_RESPONSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_RESPONSIBLE_EXT] = $enc; } } @@ -556,11 +572,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php index 6db8a56e46..58cdcc9ab7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRExplanationOfBenefitDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -324,20 +324,27 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -365,33 +372,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -433,20 +449,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SUB_DETAIL])) { @@ -1369,44 +1392,72 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -1416,20 +1467,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php index f62b9cb4e3..b350fb4a9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRExplanationOfBenefitDetail1 extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -250,20 +250,27 @@ public function __construct($data = null) $this->addAdjudication(new FHIRExplanationOfBenefitAdjudication($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -291,33 +298,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -963,35 +979,57 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; @@ -1000,11 +1038,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php index f76feabc39..b808246e66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRExplanationOfBenefitDiagnosis extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -216,20 +216,27 @@ public function __construct($data = null) $this->setPackageCode(new FHIRCodeableConcept($data[self::FIELD_PACKAGE_CODE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -640,13 +647,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php index 1f8126165e..7997592b12 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRExplanationOfBenefitFinancial extends FHIRBackboneElement const FIELD_USED_UNSIGNED_INT_EXT = '_usedUnsignedInt'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -196,36 +196,50 @@ public function __construct($data = null) $this->setAllowedMoney(new FHIRMoney($data[self::FIELD_ALLOWED_MONEY])); } } - if (isset($data[self::FIELD_ALLOWED_STRING])) { - $ext = (isset($data[self::FIELD_ALLOWED_STRING_EXT]) && is_array($data[self::FIELD_ALLOWED_STRING_EXT])) - ? $data[self::FIELD_ALLOWED_STRING_EXT] - : null; - if ($data[self::FIELD_ALLOWED_STRING] instanceof FHIRString) { - $this->setAllowedString($data[self::FIELD_ALLOWED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED_STRING])) { - $this->setAllowedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALLOWED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED_STRING])) { - $this->setAllowedString(new FHIRString(array_merge($ext, $data[self::FIELD_ALLOWED_STRING]))); - } + if (isset($data[self::FIELD_ALLOWED_STRING]) || isset($data[self::FIELD_ALLOWED_STRING_EXT])) { + if (isset($data[self::FIELD_ALLOWED_STRING])) { + $value = $data[self::FIELD_ALLOWED_STRING]; } else { - $this->setAllowedString(new FHIRString($data[self::FIELD_ALLOWED_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_ALLOWED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setAllowedUnsignedInt($data[self::FIELD_ALLOWED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_ALLOWED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_ALLOWED_UNSIGNED_INT]))); + if (isset($data[self::FIELD_ALLOWED_STRING_EXT]) && is_array($data[self::FIELD_ALLOWED_STRING_EXT])) { + $ext = $data[self::FIELD_ALLOWED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAllowedString($value); + } else if (is_array($value)) { + $this->setAllowedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAllowedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAllowedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT]) || isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $value = $data[self::FIELD_ALLOWED_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]; } else { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_ALLOWED_UNSIGNED_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setAllowedUnsignedInt($value); + } else if (is_array($value)) { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -242,20 +256,27 @@ public function __construct($data = null) $this->setUsedMoney(new FHIRMoney($data[self::FIELD_USED_MONEY])); } } - if (isset($data[self::FIELD_USED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_USED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_USED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_USED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_USED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setUsedUnsignedInt($data[self::FIELD_USED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USED_UNSIGNED_INT])) { - $this->setUsedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_USED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_USED_UNSIGNED_INT])) { - $this->setUsedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_USED_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_USED_UNSIGNED_INT]) || isset($data[self::FIELD_USED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_USED_UNSIGNED_INT])) { + $value = $data[self::FIELD_USED_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_USED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_USED_UNSIGNED_INT_EXT]; } else { - $this->setUsedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_USED_UNSIGNED_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setUsedUnsignedInt($value); + } else if (is_array($value)) { + $this->setUsedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setUsedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsedUnsignedInt(new FHIRUnsignedInt($ext)); } } } @@ -633,15 +654,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAllowedString())) { $a[self::FIELD_ALLOWED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALLOWED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getAllowedUnsignedInt())) { $a[self::FIELD_ALLOWED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_ALLOWED_UNSIGNED_INT_EXT] = $enc; } } @@ -653,11 +678,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getUsedUnsignedInt())) { $a[self::FIELD_USED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_USED_UNSIGNED_INT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php index e4687b0706..f7b3cd6752 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRExplanationOfBenefitInsurance extends FHIRBackboneElement const FIELD_PRE_AUTH_REF_EXT = '_preAuthRef'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -156,49 +156,65 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_FOCAL])) { - $ext = (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) - ? $data[self::FIELD_FOCAL_EXT] - : null; - if ($data[self::FIELD_FOCAL] instanceof FHIRBoolean) { - $this->setFocal($data[self::FIELD_FOCAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FOCAL]] + $ext)); - } else if (is_array($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FOCAL]))); - } + if (isset($data[self::FIELD_FOCAL]) || isset($data[self::FIELD_FOCAL_EXT])) { + if (isset($data[self::FIELD_FOCAL])) { + $value = $data[self::FIELD_FOCAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) { + $ext = $data[self::FIELD_FOCAL_EXT]; } else { - $this->setFocal(new FHIRBoolean($data[self::FIELD_FOCAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFocal($value); + } else if (is_array($value)) { + $this->setFocal(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFocal(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - foreach($data[self::FIELD_PRE_AUTH_REF] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPreAuthRef($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPreAuthRef(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPreAuthRef($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPreAuthRef($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPreAuthRef(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPreAuthRef(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPreAuthRef(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->addPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else { - $this->addPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); } } } @@ -475,25 +491,38 @@ public function jsonSerialize() } if (null !== ($v = $this->getFocal())) { $a[self::FIELD_FOCAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FOCAL_EXT] = $enc; } } if ([] !== ($vs = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PRE_AUTH_REF][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PRE_AUTH_REF_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PRE_AUTH_REF_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PRE_AUTH_REF_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php index 1a006896e0..7ba751de63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRExplanationOfBenefitItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -491,33 +491,42 @@ public function __construct($data = null) $this->setBodySite(new FHIRCodeableConcept($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_CARE_TEAM_SEQUENCE])) { - $ext = (isset($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT]) && is_array($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT])) - ? $data[self::FIELD_CARE_TEAM_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_CARE_TEAM_SEQUENCE])) { - foreach($data[self::FIELD_CARE_TEAM_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addCareTeamSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCareTeamSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCareTeamSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CARE_TEAM_SEQUENCE]) || isset($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_CARE_TEAM_SEQUENCE])) { + $value = $data[self::FIELD_CARE_TEAM_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT]) && is_array($data[self::FIELD_CARE_TEAM_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_CARE_TEAM_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addCareTeamSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addCareTeamSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCareTeamSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addCareTeamSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCareTeamSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addCareTeamSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addCareTeamSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCareTeamSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_CARE_TEAM_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addCareTeamSequence($data[self::FIELD_CARE_TEAM_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CARE_TEAM_SEQUENCE])) { - $this->addCareTeamSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_CARE_TEAM_SEQUENCE]] + $ext)); - } else { - $this->addCareTeamSequence(new FHIRPositiveInt($data[self::FIELD_CARE_TEAM_SEQUENCE])); } } if (isset($data[self::FIELD_CATEGORY])) { @@ -545,33 +554,42 @@ public function __construct($data = null) $this->addDetail(new FHIRExplanationOfBenefitDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT])) - ? $data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_DIAGNOSIS_SEQUENCE])) { - foreach($data[self::FIELD_DIAGNOSIS_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addDiagnosisSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDiagnosisSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDiagnosisSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE]) || isset($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE])) { + $value = $data[self::FIELD_DIAGNOSIS_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DIAGNOSIS_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addDiagnosisSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addDiagnosisSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDiagnosisSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addDiagnosisSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDiagnosisSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addDiagnosisSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addDiagnosisSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDiagnosisSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_DIAGNOSIS_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addDiagnosisSequence($data[self::FIELD_DIAGNOSIS_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DIAGNOSIS_SEQUENCE])) { - $this->addDiagnosisSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DIAGNOSIS_SEQUENCE]] + $ext)); - } else { - $this->addDiagnosisSequence(new FHIRPositiveInt($data[self::FIELD_DIAGNOSIS_SEQUENCE])); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -592,49 +610,65 @@ public function __construct($data = null) $this->addEncounter(new FHIRReference($data[self::FIELD_ENCOUNTER])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_INFORMATION_SEQUENCE])) { - $ext = (isset($data[self::FIELD_INFORMATION_SEQUENCE_EXT]) && is_array($data[self::FIELD_INFORMATION_SEQUENCE_EXT])) - ? $data[self::FIELD_INFORMATION_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_INFORMATION_SEQUENCE])) { - foreach($data[self::FIELD_INFORMATION_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addInformationSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInformationSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInformationSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INFORMATION_SEQUENCE]) || isset($data[self::FIELD_INFORMATION_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_INFORMATION_SEQUENCE])) { + $value = $data[self::FIELD_INFORMATION_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INFORMATION_SEQUENCE_EXT]) && is_array($data[self::FIELD_INFORMATION_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_INFORMATION_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addInformationSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addInformationSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInformationSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addInformationSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInformationSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addInformationSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addInformationSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInformationSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_INFORMATION_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addInformationSequence($data[self::FIELD_INFORMATION_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INFORMATION_SEQUENCE])) { - $this->addInformationSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_INFORMATION_SEQUENCE]] + $ext)); - } else { - $this->addInformationSequence(new FHIRPositiveInt($data[self::FIELD_INFORMATION_SEQUENCE])); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -683,62 +717,80 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } - if (isset($data[self::FIELD_PROCEDURE_SEQUENCE])) { - $ext = (isset($data[self::FIELD_PROCEDURE_SEQUENCE_EXT]) && is_array($data[self::FIELD_PROCEDURE_SEQUENCE_EXT])) - ? $data[self::FIELD_PROCEDURE_SEQUENCE_EXT] - : null; - if (is_array($data[self::FIELD_PROCEDURE_SEQUENCE])) { - foreach($data[self::FIELD_PROCEDURE_SEQUENCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addProcedureSequence($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProcedureSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProcedureSequence(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROCEDURE_SEQUENCE]) || isset($data[self::FIELD_PROCEDURE_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_PROCEDURE_SEQUENCE])) { + $value = $data[self::FIELD_PROCEDURE_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROCEDURE_SEQUENCE_EXT]) && is_array($data[self::FIELD_PROCEDURE_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_PROCEDURE_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addProcedureSequence($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addProcedureSequence($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProcedureSequence(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addProcedureSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProcedureSequence(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addProcedureSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addProcedureSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProcedureSequence(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_PROCEDURE_SEQUENCE] instanceof FHIRPositiveInt) { - $this->addProcedureSequence($data[self::FIELD_PROCEDURE_SEQUENCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROCEDURE_SEQUENCE])) { - $this->addProcedureSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PROCEDURE_SEQUENCE]] + $ext)); - } else { - $this->addProcedureSequence(new FHIRPositiveInt($data[self::FIELD_PROCEDURE_SEQUENCE])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -780,36 +832,50 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); - } - } - if (isset($data[self::FIELD_SERVICED_DATE])) { - $ext = (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) - ? $data[self::FIELD_SERVICED_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICED_DATE] instanceof FHIRDate) { - $this->setServicedDate($data[self::FIELD_SERVICED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICED_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SERVICED_DATE]) || isset($data[self::FIELD_SERVICED_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICED_DATE])) { + $value = $data[self::FIELD_SERVICED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICED_DATE_EXT]; } else { - $this->setServicedDate(new FHIRDate($data[self::FIELD_SERVICED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServicedDate($value); + } else if (is_array($value)) { + $this->setServicedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServicedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SERVICED_PERIOD])) { @@ -2451,71 +2517,115 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getBodySite())) { $a[self::FIELD_BODY_SITE] = $v; } if ([] !== ($vs = $this->getCareTeamSequence())) { $a[self::FIELD_CARE_TEAM_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CARE_TEAM_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CARE_TEAM_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CARE_TEAM_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CARE_TEAM_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getDiagnosisSequence())) { $a[self::FIELD_DIAGNOSIS_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DIAGNOSIS_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DIAGNOSIS_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DIAGNOSIS_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DIAGNOSIS_SEQUENCE_EXT] = $encs; + } } if ([] !== ($vs = $this->getEncounter())) { - $a[self::FIELD_ENCOUNTER] = $vs; + $a[self::FIELD_ENCOUNTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENCOUNTER][] = $v; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getInformationSequence())) { $a[self::FIELD_INFORMATION_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INFORMATION_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INFORMATION_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INFORMATION_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INFORMATION_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getLocationAddress())) { $a[self::FIELD_LOCATION_ADDRESS] = $v; @@ -2527,46 +2637,74 @@ public function jsonSerialize() $a[self::FIELD_LOCATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if ([] !== ($vs = $this->getProcedureSequence())) { $a[self::FIELD_PROCEDURE_SEQUENCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROCEDURE_SEQUENCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROCEDURE_SEQUENCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROCEDURE_SEQUENCE_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROCEDURE_SEQUENCE_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -2576,15 +2714,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getServicedDate())) { $a[self::FIELD_SERVICED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICED_DATE_EXT] = $enc; } } @@ -2592,14 +2734,29 @@ public function jsonSerialize() $a[self::FIELD_SERVICED_PERIOD] = $v; } if ([] !== ($vs = $this->getSubSite())) { - $a[self::FIELD_SUB_SITE] = $vs; + $a[self::FIELD_SUB_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_SITE][] = $v; + } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php index a1fc61822e..4ada0d45d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRExplanationOfBenefitPayee extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php index 01a1e49a8f..62b80be413 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRExplanationOfBenefitPayment extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -207,20 +207,27 @@ public function __construct($data = null) $this->setAmount(new FHIRMoney($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -584,8 +591,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -595,6 +604,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php index 230f7a5a1a..ff15b55876 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRExplanationOfBenefitProcedure extends FHIRBackboneElement const FIELD_UDI = 'udi'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -189,20 +189,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { @@ -219,20 +226,27 @@ public function __construct($data = null) $this->setProcedureReference(new FHIRReference($data[self::FIELD_PROCEDURE_REFERENCE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -696,8 +710,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -709,16 +725,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php index 8da5226fac..dbd8c46e29 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRExplanationOfBenefitProcessNote extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -165,52 +165,73 @@ public function __construct($data = null) $this->setLanguage(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRPositiveInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setNumber(new FHIRPositiveInt($data[self::FIELD_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumber(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRNoteType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNoteType([FHIRNoteType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNoteType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRNoteType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNoteType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRNoteType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRNoteType([FHIRNoteType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRNoteType($ext)); } } } @@ -486,25 +507,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNoteType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNoteType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php index af5a890b66..8f43c88e47 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRExplanationOfBenefitRelated extends FHIRBackboneElement const FIELD_RELATIONSHIP = 'relationship'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -384,6 +384,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php index c82cfd2b15..b3edae9a2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRExplanationOfBenefitSubDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -312,20 +312,27 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -353,33 +360,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -421,20 +437,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_UDI])) { @@ -1270,44 +1293,72 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -1317,17 +1368,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1.php index 488a87d502..8f4602677b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRExplanationOfBenefitSubDetail1 extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -238,20 +238,27 @@ public function __construct($data = null) $this->addAdjudication(new FHIRExplanationOfBenefitAdjudication($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -279,33 +286,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PRODUCT_OR_SERVICE])) { @@ -864,35 +880,57 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getProductOrService())) { $a[self::FIELD_PRODUCT_OR_SERVICE] = $v; @@ -903,6 +941,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfo.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfo.php index e98dc4f251..fad9ac1706 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfo.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRExplanationOfBenefitSupportingInfo extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -291,36 +291,50 @@ public function __construct($data = null) $this->setReason(new FHIRCoding($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; } - } - if (isset($data[self::FIELD_TIMING_DATE])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) - ? $data[self::FIELD_TIMING_DATE_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE] instanceof FHIRDate) { - $this->setTimingDate($data[self::FIELD_TIMING_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_TIMING_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate(array_merge($ext, $data[self::FIELD_TIMING_DATE]))); + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_TIMING_DATE]) || isset($data[self::FIELD_TIMING_DATE_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE])) { + $value = $data[self::FIELD_TIMING_DATE]; } else { - $this->setTimingDate(new FHIRDate($data[self::FIELD_TIMING_DATE])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setTimingDate($value); + } else if (is_array($value)) { + $this->setTimingDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -337,20 +351,27 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -367,20 +388,27 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -988,15 +1016,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getTimingDate())) { $a[self::FIELD_TIMING_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_EXT] = $enc; } } @@ -1008,8 +1040,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -1021,11 +1055,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotal.php index fbc97e1388..e552e406e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRExplanationOfBenefitTotal extends FHIRBackboneElement const FIELD_CATEGORY = 'category'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -331,6 +331,9 @@ public function jsonSerialize() if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php index f8e198d6ac..a76a3f410c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRFamilyMemberHistoryCondition extends FHIRBackboneElement const FIELD_OUTCOME = 'outcome'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -229,20 +229,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CONTRIBUTED_TO_DEATH])) { - $ext = (isset($data[self::FIELD_CONTRIBUTED_TO_DEATH_EXT]) && is_array($data[self::FIELD_CONTRIBUTED_TO_DEATH_EXT])) - ? $data[self::FIELD_CONTRIBUTED_TO_DEATH_EXT] - : null; - if ($data[self::FIELD_CONTRIBUTED_TO_DEATH] instanceof FHIRBoolean) { - $this->setContributedToDeath($data[self::FIELD_CONTRIBUTED_TO_DEATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTRIBUTED_TO_DEATH])) { - $this->setContributedToDeath(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CONTRIBUTED_TO_DEATH]] + $ext)); - } else if (is_array($data[self::FIELD_CONTRIBUTED_TO_DEATH])) { - $this->setContributedToDeath(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CONTRIBUTED_TO_DEATH]))); - } + if (isset($data[self::FIELD_CONTRIBUTED_TO_DEATH]) || isset($data[self::FIELD_CONTRIBUTED_TO_DEATH_EXT])) { + if (isset($data[self::FIELD_CONTRIBUTED_TO_DEATH])) { + $value = $data[self::FIELD_CONTRIBUTED_TO_DEATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTRIBUTED_TO_DEATH_EXT]) && is_array($data[self::FIELD_CONTRIBUTED_TO_DEATH_EXT])) { + $ext = $data[self::FIELD_CONTRIBUTED_TO_DEATH_EXT]; } else { - $this->setContributedToDeath(new FHIRBoolean($data[self::FIELD_CONTRIBUTED_TO_DEATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setContributedToDeath($value); + } else if (is_array($value)) { + $this->setContributedToDeath(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setContributedToDeath(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContributedToDeath(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -284,20 +291,27 @@ public function __construct($data = null) $this->setOnsetRange(new FHIRRange($data[self::FIELD_ONSET_RANGE])); } } - if (isset($data[self::FIELD_ONSET_STRING])) { - $ext = (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) - ? $data[self::FIELD_ONSET_STRING_EXT] - : null; - if ($data[self::FIELD_ONSET_STRING] instanceof FHIRString) { - $this->setOnsetString($data[self::FIELD_ONSET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ONSET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString(array_merge($ext, $data[self::FIELD_ONSET_STRING]))); - } + if (isset($data[self::FIELD_ONSET_STRING]) || isset($data[self::FIELD_ONSET_STRING_EXT])) { + if (isset($data[self::FIELD_ONSET_STRING])) { + $value = $data[self::FIELD_ONSET_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) { + $ext = $data[self::FIELD_ONSET_STRING_EXT]; } else { - $this->setOnsetString(new FHIRString($data[self::FIELD_ONSET_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOnsetString($value); + } else if (is_array($value)) { + $this->setOnsetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetString(new FHIRString($ext)); } } if (isset($data[self::FIELD_OUTCOME])) { @@ -788,13 +802,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getContributedToDeath())) { $a[self::FIELD_CONTRIBUTED_TO_DEATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CONTRIBUTED_TO_DEATH_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOnsetAge())) { $a[self::FIELD_ONSET_AGE] = $v; @@ -807,14 +829,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetString())) { $a[self::FIELD_ONSET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ONSET_STRING_EXT] = $enc; } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php index 57d5d1af46..b9a6a0e12a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRGoalTarget extends FHIRBackboneElement const FIELD_MEASURE = 'measure'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -280,20 +280,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DETAIL_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DETAIL_BOOLEAN_EXT]) && is_array($data[self::FIELD_DETAIL_BOOLEAN_EXT])) - ? $data[self::FIELD_DETAIL_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DETAIL_BOOLEAN] instanceof FHIRBoolean) { - $this->setDetailBoolean($data[self::FIELD_DETAIL_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL_BOOLEAN])) { - $this->setDetailBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DETAIL_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL_BOOLEAN])) { - $this->setDetailBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DETAIL_BOOLEAN]))); - } + if (isset($data[self::FIELD_DETAIL_BOOLEAN]) || isset($data[self::FIELD_DETAIL_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DETAIL_BOOLEAN])) { + $value = $data[self::FIELD_DETAIL_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DETAIL_BOOLEAN_EXT]) && is_array($data[self::FIELD_DETAIL_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DETAIL_BOOLEAN_EXT]; } else { - $this->setDetailBoolean(new FHIRBoolean($data[self::FIELD_DETAIL_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDetailBoolean($value); + } else if (is_array($value)) { + $this->setDetailBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDetailBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetailBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_DETAIL_CODEABLE_CONCEPT])) { @@ -303,20 +310,27 @@ public function __construct($data = null) $this->setDetailCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_DETAIL_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_DETAIL_INTEGER])) { - $ext = (isset($data[self::FIELD_DETAIL_INTEGER_EXT]) && is_array($data[self::FIELD_DETAIL_INTEGER_EXT])) - ? $data[self::FIELD_DETAIL_INTEGER_EXT] - : null; - if ($data[self::FIELD_DETAIL_INTEGER] instanceof FHIRInteger) { - $this->setDetailInteger($data[self::FIELD_DETAIL_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL_INTEGER])) { - $this->setDetailInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DETAIL_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL_INTEGER])) { - $this->setDetailInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_DETAIL_INTEGER]))); - } + if (isset($data[self::FIELD_DETAIL_INTEGER]) || isset($data[self::FIELD_DETAIL_INTEGER_EXT])) { + if (isset($data[self::FIELD_DETAIL_INTEGER])) { + $value = $data[self::FIELD_DETAIL_INTEGER]; } else { - $this->setDetailInteger(new FHIRInteger($data[self::FIELD_DETAIL_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_DETAIL_INTEGER_EXT]) && is_array($data[self::FIELD_DETAIL_INTEGER_EXT])) { + $ext = $data[self::FIELD_DETAIL_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDetailInteger($value); + } else if (is_array($value)) { + $this->setDetailInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDetailInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetailInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_DETAIL_QUANTITY])) { @@ -340,36 +354,50 @@ public function __construct($data = null) $this->setDetailRatio(new FHIRRatio($data[self::FIELD_DETAIL_RATIO])); } } - if (isset($data[self::FIELD_DETAIL_STRING])) { - $ext = (isset($data[self::FIELD_DETAIL_STRING_EXT]) && is_array($data[self::FIELD_DETAIL_STRING_EXT])) - ? $data[self::FIELD_DETAIL_STRING_EXT] - : null; - if ($data[self::FIELD_DETAIL_STRING] instanceof FHIRString) { - $this->setDetailString($data[self::FIELD_DETAIL_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL_STRING])) { - $this->setDetailString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DETAIL_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL_STRING])) { - $this->setDetailString(new FHIRString(array_merge($ext, $data[self::FIELD_DETAIL_STRING]))); - } + if (isset($data[self::FIELD_DETAIL_STRING]) || isset($data[self::FIELD_DETAIL_STRING_EXT])) { + if (isset($data[self::FIELD_DETAIL_STRING])) { + $value = $data[self::FIELD_DETAIL_STRING]; } else { - $this->setDetailString(new FHIRString($data[self::FIELD_DETAIL_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_DUE_DATE])) { - $ext = (isset($data[self::FIELD_DUE_DATE_EXT]) && is_array($data[self::FIELD_DUE_DATE_EXT])) - ? $data[self::FIELD_DUE_DATE_EXT] - : null; - if ($data[self::FIELD_DUE_DATE] instanceof FHIRDate) { - $this->setDueDate($data[self::FIELD_DUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DUE_DATE])) { - $this->setDueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DUE_DATE])) { - $this->setDueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DUE_DATE]))); + if (isset($data[self::FIELD_DETAIL_STRING_EXT]) && is_array($data[self::FIELD_DETAIL_STRING_EXT])) { + $ext = $data[self::FIELD_DETAIL_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDetailString($value); + } else if (is_array($value)) { + $this->setDetailString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDetailString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDetailString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DUE_DATE]) || isset($data[self::FIELD_DUE_DATE_EXT])) { + if (isset($data[self::FIELD_DUE_DATE])) { + $value = $data[self::FIELD_DUE_DATE]; } else { - $this->setDueDate(new FHIRDate($data[self::FIELD_DUE_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DUE_DATE_EXT]) && is_array($data[self::FIELD_DUE_DATE_EXT])) { + $ext = $data[self::FIELD_DUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDueDate($value); + } else if (is_array($value)) { + $this->setDueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDueDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_DUE_DURATION])) { @@ -992,8 +1020,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDetailBoolean())) { $a[self::FIELD_DETAIL_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DETAIL_BOOLEAN_EXT] = $enc; } } @@ -1002,8 +1032,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDetailInteger())) { $a[self::FIELD_DETAIL_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DETAIL_INTEGER_EXT] = $enc; } } @@ -1018,15 +1050,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDetailString())) { $a[self::FIELD_DETAIL_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DETAIL_STRING_EXT] = $enc; } } if (null !== ($v = $this->getDueDate())) { $a[self::FIELD_DUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DUE_DATE_EXT] = $enc; } } @@ -1036,6 +1072,9 @@ public function jsonSerialize() if (null !== ($v = $this->getMeasure())) { $a[self::FIELD_MEASURE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php index 52bb4fedbf..3e045d0bba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRGraphDefinitionCompartment extends FHIRBackboneElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Which type a compartment definition describes. @@ -172,84 +172,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCompartmentType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCompartmentType([FHIRCompartmentType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCompartmentType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCompartmentType($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); + if (null !== $value) { + if ($value instanceof FHIRCompartmentType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCompartmentType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCompartmentType([FHIRCompartmentType::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + } else if ([] !== $ext) { + $this->setCode(new FHIRCompartmentType($ext)); } } - if (isset($data[self::FIELD_RULE])) { - $ext = (isset($data[self::FIELD_RULE_EXT]) && is_array($data[self::FIELD_RULE_EXT])) - ? $data[self::FIELD_RULE_EXT] - : null; - if ($data[self::FIELD_RULE] instanceof FHIRGraphCompartmentRule) { - $this->setRule($data[self::FIELD_RULE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULE])) { - $this->setRule(new FHIRGraphCompartmentRule([FHIRGraphCompartmentRule::FIELD_VALUE => $data[self::FIELD_RULE]] + $ext)); - } else if (is_array($data[self::FIELD_RULE])) { - $this->setRule(new FHIRGraphCompartmentRule(array_merge($ext, $data[self::FIELD_RULE]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; } else { - $this->setRule(new FHIRGraphCompartmentRule($data[self::FIELD_RULE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRGraphCompartmentUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRGraphCompartmentUse([FHIRGraphCompartmentUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRGraphCompartmentUse(array_merge($ext, $data[self::FIELD_USE]))); + if (isset($data[self::FIELD_RULE]) || isset($data[self::FIELD_RULE_EXT])) { + if (isset($data[self::FIELD_RULE])) { + $value = $data[self::FIELD_RULE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RULE_EXT]) && is_array($data[self::FIELD_RULE_EXT])) { + $ext = $data[self::FIELD_RULE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGraphCompartmentRule) { + $this->setRule($value); + } else if (is_array($value)) { + $this->setRule(new FHIRGraphCompartmentRule(array_merge($ext, $value))); + } else { + $this->setRule(new FHIRGraphCompartmentRule([FHIRGraphCompartmentRule::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRule(new FHIRGraphCompartmentRule($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIRGraphCompartmentUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGraphCompartmentUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRGraphCompartmentUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRGraphCompartmentUse([FHIRGraphCompartmentUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRGraphCompartmentUse($ext)); } } } @@ -558,39 +593,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompartmentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompartmentType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getRule())) { $a[self::FIELD_RULE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGraphCompartmentRule::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGraphCompartmentRule::FIELD_VALUE]); $a[self::FIELD_RULE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGraphCompartmentUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGraphCompartmentUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php index cfa9e73af2..7106ba4a34 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRGraphDefinitionLink extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -183,84 +183,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); - } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); - } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); - } - } - if (isset($data[self::FIELD_SLICE_NAME])) { - $ext = (isset($data[self::FIELD_SLICE_NAME_EXT]) && is_array($data[self::FIELD_SLICE_NAME_EXT])) - ? $data[self::FIELD_SLICE_NAME_EXT] - : null; - if ($data[self::FIELD_SLICE_NAME] instanceof FHIRString) { - $this->setSliceName($data[self::FIELD_SLICE_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SLICE_NAME])) { - $this->setSliceName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SLICE_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_SLICE_NAME])) { - $this->setSliceName(new FHIRString(array_merge($ext, $data[self::FIELD_SLICE_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SLICE_NAME]) || isset($data[self::FIELD_SLICE_NAME_EXT])) { + if (isset($data[self::FIELD_SLICE_NAME])) { + $value = $data[self::FIELD_SLICE_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SLICE_NAME_EXT]) && is_array($data[self::FIELD_SLICE_NAME_EXT])) { + $ext = $data[self::FIELD_SLICE_NAME_EXT]; } else { - $this->setSliceName(new FHIRString($data[self::FIELD_SLICE_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSliceName($value); + } else if (is_array($value)) { + $this->setSliceName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSliceName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSliceName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -706,41 +741,60 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getSliceName())) { $a[self::FIELD_SLICE_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SLICE_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php index 23490d80e0..c2e8bab164 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRGraphDefinitionTarget extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A formal computable definition of a graph of resources - that is, a coherent set @@ -208,52 +208,73 @@ public function __construct($data = null) $this->addLink(new FHIRGraphDefinitionLink($data[self::FIELD_LINK])); } } - if (isset($data[self::FIELD_PARAMS])) { - $ext = (isset($data[self::FIELD_PARAMS_EXT]) && is_array($data[self::FIELD_PARAMS_EXT])) - ? $data[self::FIELD_PARAMS_EXT] - : null; - if ($data[self::FIELD_PARAMS] instanceof FHIRString) { - $this->setParams($data[self::FIELD_PARAMS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARAMS])) { - $this->setParams(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARAMS]] + $ext)); - } else if (is_array($data[self::FIELD_PARAMS])) { - $this->setParams(new FHIRString(array_merge($ext, $data[self::FIELD_PARAMS]))); - } + if (isset($data[self::FIELD_PARAMS]) || isset($data[self::FIELD_PARAMS_EXT])) { + if (isset($data[self::FIELD_PARAMS])) { + $value = $data[self::FIELD_PARAMS]; } else { - $this->setParams(new FHIRString($data[self::FIELD_PARAMS])); + $value = null; } - } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_PROFILE]))); - } + if (isset($data[self::FIELD_PARAMS_EXT]) && is_array($data[self::FIELD_PARAMS_EXT])) { + $ext = $data[self::FIELD_PARAMS_EXT]; } else { - $this->setProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setParams($value); + } else if (is_array($value)) { + $this->setParams(new FHIRString(array_merge($ext, $value))); + } else { + $this->setParams(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParams(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProfile(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -649,32 +670,53 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCompartment())) { - $a[self::FIELD_COMPARTMENT] = $vs; + $a[self::FIELD_COMPARTMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPARTMENT][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getParams())) { $a[self::FIELD_PARAMS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PARAMS_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php index 60ec2ea5eb..693e08f086 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRGroupCharacteristic extends FHIRBackboneElement const FIELD_VALUE_REFERENCE = 'valueReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -225,20 +225,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_EXCLUDE])) { - $ext = (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) - ? $data[self::FIELD_EXCLUDE_EXT] - : null; - if ($data[self::FIELD_EXCLUDE] instanceof FHIRBoolean) { - $this->setExclude($data[self::FIELD_EXCLUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDE]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDE]))); - } + if (isset($data[self::FIELD_EXCLUDE]) || isset($data[self::FIELD_EXCLUDE_EXT])) { + if (isset($data[self::FIELD_EXCLUDE])) { + $value = $data[self::FIELD_EXCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_EXT]; } else { - $this->setExclude(new FHIRBoolean($data[self::FIELD_EXCLUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExclude($value); + } else if (is_array($value)) { + $this->setExclude(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExclude(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -248,20 +255,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -729,8 +743,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExclude())) { $a[self::FIELD_EXCLUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDE_EXT] = $enc; } } @@ -739,8 +755,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -756,6 +774,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValueReference())) { $a[self::FIELD_VALUE_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php index 5c74f638d3..5530ff259c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRGroupMember extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -153,20 +153,27 @@ public function __construct($data = null) $this->setEntity(new FHIRReference($data[self::FIELD_ENTITY])); } } - if (isset($data[self::FIELD_INACTIVE])) { - $ext = (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) - ? $data[self::FIELD_INACTIVE_EXT] - : null; - if ($data[self::FIELD_INACTIVE] instanceof FHIRBoolean) { - $this->setInactive($data[self::FIELD_INACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INACTIVE]))); - } + if (isset($data[self::FIELD_INACTIVE]) || isset($data[self::FIELD_INACTIVE_EXT])) { + if (isset($data[self::FIELD_INACTIVE])) { + $value = $data[self::FIELD_INACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) { + $ext = $data[self::FIELD_INACTIVE_EXT]; } else { - $this->setInactive(new FHIRBoolean($data[self::FIELD_INACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInactive($value); + } else if (is_array($value)) { + $this->setInactive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInactive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -401,14 +408,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getInactive())) { $a[self::FIELD_INACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php index 3b88b797a4..63a8d5a7f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRHealthcareServiceAvailableTime extends FHIRBackboneElement const FIELD_DAYS_OF_WEEK_EXT = '_daysOfWeek'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -155,81 +155,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALL_DAY])) { - $ext = (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) - ? $data[self::FIELD_ALL_DAY_EXT] - : null; - if ($data[self::FIELD_ALL_DAY] instanceof FHIRBoolean) { - $this->setAllDay($data[self::FIELD_ALL_DAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALL_DAY]] + $ext)); - } else if (is_array($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALL_DAY]))); - } + if (isset($data[self::FIELD_ALL_DAY]) || isset($data[self::FIELD_ALL_DAY_EXT])) { + if (isset($data[self::FIELD_ALL_DAY])) { + $value = $data[self::FIELD_ALL_DAY]; } else { - $this->setAllDay(new FHIRBoolean($data[self::FIELD_ALL_DAY])); + $value = null; } - } - if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_END_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_END_TIME] instanceof FHIRTime) { - $this->setAvailableEndTime($data[self::FIELD_AVAILABLE_END_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_END_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_END_TIME]))); - } + if (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) { + $ext = $data[self::FIELD_ALL_DAY_EXT]; } else { - $this->setAvailableEndTime(new FHIRTime($data[self::FIELD_AVAILABLE_END_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllDay($value); + } else if (is_array($value)) { + $this->setAllDay(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllDay(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_START_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_START_TIME] instanceof FHIRTime) { - $this->setAvailableStartTime($data[self::FIELD_AVAILABLE_START_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_START_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_START_TIME]))); + if (isset($data[self::FIELD_AVAILABLE_END_TIME]) || isset($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { + $value = $data[self::FIELD_AVAILABLE_END_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_END_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableEndTime($value); + } else if (is_array($value)) { + $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAvailableEndTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME]) || isset($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { + $value = $data[self::FIELD_AVAILABLE_START_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_START_TIME_EXT]; } else { - $this->setAvailableStartTime(new FHIRTime($data[self::FIELD_AVAILABLE_START_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableStartTime($value); + } else if (is_array($value)) { + $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailableStartTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_DAYS_OF_WEEK])) { - $ext = (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) - ? $data[self::FIELD_DAYS_OF_WEEK_EXT] - : null; - if (is_array($data[self::FIELD_DAYS_OF_WEEK])) { - foreach($data[self::FIELD_DAYS_OF_WEEK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DAYS_OF_WEEK]) || isset($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + if (isset($data[self::FIELD_DAYS_OF_WEEK])) { + $value = $data[self::FIELD_DAYS_OF_WEEK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + $ext = $data[self::FIELD_DAYS_OF_WEEK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $iext))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($v)); } + } elseif (is_array($value)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($ext, $value))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDaysOfWeek(new FHIRDaysOfWeek($iext)); } - } elseif ($data[self::FIELD_DAYS_OF_WEEK] instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DAYS_OF_WEEK])) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $data[self::FIELD_DAYS_OF_WEEK]] + $ext)); - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK])); } } } @@ -548,39 +578,56 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllDay())) { $a[self::FIELD_ALL_DAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALL_DAY_EXT] = $enc; } } if (null !== ($v = $this->getAvailableEndTime())) { $a[self::FIELD_AVAILABLE_END_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_END_TIME_EXT] = $enc; } } if (null !== ($v = $this->getAvailableStartTime())) { $a[self::FIELD_AVAILABLE_START_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_START_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getDaysOfWeek())) { $a[self::FIELD_DAYS_OF_WEEK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DAYS_OF_WEEK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDaysOfWeek::FIELD_VALUE]) || array_key_exists(FHIRDaysOfWeek::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = null; + unset($enc[FHIRDaysOfWeek::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DAYS_OF_WEEK_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibility.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibility.php index 7e343f573e..defb629395 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibility.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibility.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRHealthcareServiceEligibility extends FHIRBackboneElement const FIELD_COMMENT_EXT = '_comment'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -141,20 +141,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRMarkdown) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRMarkdown($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRMarkdown($ext)); } } } @@ -354,11 +361,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php index 655571bc8f..2f3cd4e14e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRHealthcareServiceNotAvailable extends FHIRBackboneElement const FIELD_DURING = 'during'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DURING])) { @@ -339,14 +346,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDuring())) { $a[self::FIELD_DURING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php index ef9540029c..46ad46c78f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRImagingStudyInstance extends FHIRBackboneElement const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An integer with a value that is not negative (e.g. >= 0) @@ -164,20 +164,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRUnsignedInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; } else { - $this->setNumber(new FHIRUnsignedInt($data[self::FIELD_NUMBER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumber(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_SOP_CLASS])) { @@ -187,36 +194,50 @@ public function __construct($data = null) $this->setSopClass(new FHIRCoding($data[self::FIELD_SOP_CLASS])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; } - } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIRId) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIRId(array_merge($ext, $data[self::FIELD_UID]))); + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; } else { - $this->setUid(new FHIRId($data[self::FIELD_UID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIRId(array_merge($ext, $value))); + } else { + $this->setUid(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIRId($ext)); } } } @@ -513,8 +534,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } @@ -523,18 +546,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformer.php index feae6e6c5b..38c0e557e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRImagingStudyPerformer extends FHIRBackboneElement const FIELD_FUNCTION = 'function'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getFunction())) { $a[self::FIELD_FUNCTION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php index d8a4bdf333..662d9e134c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRImagingStudySeries extends FHIRBackboneElement const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -290,20 +290,27 @@ public function __construct($data = null) $this->setBodySite(new FHIRCoding($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENDPOINT])) { @@ -356,36 +363,50 @@ public function __construct($data = null) $this->setModality(new FHIRCoding($data[self::FIELD_MODALITY])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRUnsignedInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setNumber(new FHIRUnsignedInt($data[self::FIELD_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) - ? $data[self::FIELD_NUMBER_OF_INSTANCES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_INSTANCES] instanceof FHIRUnsignedInt) { - $this->setNumberOfInstances($data[self::FIELD_NUMBER_OF_INSTANCES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_INSTANCES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_INSTANCES]))); + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumber(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES]) || isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { + $value = $data[self::FIELD_NUMBER_OF_INSTANCES]; } else { - $this->setNumberOfInstances(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_INSTANCES])); + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_INSTANCES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfInstances($value); + } else if (is_array($value)) { + $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfInstances(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -424,36 +445,50 @@ public function __construct($data = null) $this->addSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STARTED])) { - $ext = (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) - ? $data[self::FIELD_STARTED_EXT] - : null; - if ($data[self::FIELD_STARTED] instanceof FHIRDateTime) { - $this->setStarted($data[self::FIELD_STARTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STARTED]] + $ext)); - } else if (is_array($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STARTED]))); - } + if (isset($data[self::FIELD_STARTED]) || isset($data[self::FIELD_STARTED_EXT])) { + if (isset($data[self::FIELD_STARTED])) { + $value = $data[self::FIELD_STARTED]; } else { - $this->setStarted(new FHIRDateTime($data[self::FIELD_STARTED])); + $value = null; } - } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIRId) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIRId(array_merge($ext, $data[self::FIELD_UID]))); + if (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) { + $ext = $data[self::FIELD_STARTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStarted($value); + } else if (is_array($value)) { + $this->setStarted(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStarted(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; } else { - $this->setUid(new FHIRId($data[self::FIELD_UID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIRId(array_merge($ext, $value))); + } else { + $this->setUid(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIRId($ext)); } } } @@ -1250,16 +1285,30 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if (null !== ($v = $this->getLaterality())) { $a[self::FIELD_LATERALITY] = $v; @@ -1269,38 +1318,61 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfInstances())) { $a[self::FIELD_NUMBER_OF_INSTANCES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_INSTANCES_EXT] = $enc; } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStarted())) { $a[self::FIELD_STARTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STARTED_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducation.php index 49dc362cf7..5b16fe2037 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRImmunizationEducation extends FHIRBackboneElement const FIELD_REFERENCE_EXT = '_reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -165,68 +165,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENT_TYPE])) { - $ext = (isset($data[self::FIELD_DOCUMENT_TYPE_EXT]) && is_array($data[self::FIELD_DOCUMENT_TYPE_EXT])) - ? $data[self::FIELD_DOCUMENT_TYPE_EXT] - : null; - if ($data[self::FIELD_DOCUMENT_TYPE] instanceof FHIRString) { - $this->setDocumentType($data[self::FIELD_DOCUMENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENT_TYPE])) { - $this->setDocumentType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENT_TYPE])) { - $this->setDocumentType(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENT_TYPE]))); - } + if (isset($data[self::FIELD_DOCUMENT_TYPE]) || isset($data[self::FIELD_DOCUMENT_TYPE_EXT])) { + if (isset($data[self::FIELD_DOCUMENT_TYPE])) { + $value = $data[self::FIELD_DOCUMENT_TYPE]; } else { - $this->setDocumentType(new FHIRString($data[self::FIELD_DOCUMENT_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_PRESENTATION_DATE])) { - $ext = (isset($data[self::FIELD_PRESENTATION_DATE_EXT]) && is_array($data[self::FIELD_PRESENTATION_DATE_EXT])) - ? $data[self::FIELD_PRESENTATION_DATE_EXT] - : null; - if ($data[self::FIELD_PRESENTATION_DATE] instanceof FHIRDateTime) { - $this->setPresentationDate($data[self::FIELD_PRESENTATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRESENTATION_DATE])) { - $this->setPresentationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PRESENTATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PRESENTATION_DATE])) { - $this->setPresentationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PRESENTATION_DATE]))); - } + if (isset($data[self::FIELD_DOCUMENT_TYPE_EXT]) && is_array($data[self::FIELD_DOCUMENT_TYPE_EXT])) { + $ext = $data[self::FIELD_DOCUMENT_TYPE_EXT]; } else { - $this->setPresentationDate(new FHIRDateTime($data[self::FIELD_PRESENTATION_DATE])); + $ext = []; } - } - if (isset($data[self::FIELD_PUBLICATION_DATE])) { - $ext = (isset($data[self::FIELD_PUBLICATION_DATE_EXT]) && is_array($data[self::FIELD_PUBLICATION_DATE_EXT])) - ? $data[self::FIELD_PUBLICATION_DATE_EXT] - : null; - if ($data[self::FIELD_PUBLICATION_DATE] instanceof FHIRDateTime) { - $this->setPublicationDate($data[self::FIELD_PUBLICATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLICATION_DATE])) { - $this->setPublicationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PUBLICATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLICATION_DATE])) { - $this->setPublicationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PUBLICATION_DATE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentType($value); + } else if (is_array($value)) { + $this->setDocumentType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentType(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PRESENTATION_DATE]) || isset($data[self::FIELD_PRESENTATION_DATE_EXT])) { + if (isset($data[self::FIELD_PRESENTATION_DATE])) { + $value = $data[self::FIELD_PRESENTATION_DATE]; } else { - $this->setPublicationDate(new FHIRDateTime($data[self::FIELD_PUBLICATION_DATE])); + $value = null; + } + if (isset($data[self::FIELD_PRESENTATION_DATE_EXT]) && is_array($data[self::FIELD_PRESENTATION_DATE_EXT])) { + $ext = $data[self::FIELD_PRESENTATION_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPresentationDate($value); + } else if (is_array($value)) { + $this->setPresentationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPresentationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPresentationDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRUri) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri(array_merge($ext, $data[self::FIELD_REFERENCE]))); + if (isset($data[self::FIELD_PUBLICATION_DATE]) || isset($data[self::FIELD_PUBLICATION_DATE_EXT])) { + if (isset($data[self::FIELD_PUBLICATION_DATE])) { + $value = $data[self::FIELD_PUBLICATION_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLICATION_DATE_EXT]) && is_array($data[self::FIELD_PUBLICATION_DATE_EXT])) { + $ext = $data[self::FIELD_PUBLICATION_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPublicationDate($value); + } else if (is_array($value)) { + $this->setPublicationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPublicationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublicationDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRUri($data[self::FIELD_REFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRUri($ext)); } } } @@ -547,32 +575,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentType())) { $a[self::FIELD_DOCUMENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getPresentationDate())) { $a[self::FIELD_PRESENTATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PRESENTATION_DATE_EXT] = $enc; } } if (null !== ($v = $this->getPublicationDate())) { $a[self::FIELD_PUBLICATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PUBLICATION_DATE_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformer.php index 7546e721f1..c228ba2240 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRImmunizationPerformer extends FHIRBackboneElement const FIELD_FUNCTION = 'function'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getFunction())) { $a[self::FIELD_FUNCTION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolApplied.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolApplied.php index 3e4736430d..86fe9b7d23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolApplied.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolApplied.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRImmunizationProtocolApplied extends FHIRBackboneElement const FIELD_TARGET_DISEASE = 'targetDisease'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -208,84 +208,119 @@ public function __construct($data = null) $this->setAuthority(new FHIRReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT])) - ? $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setDoseNumberPositiveInt($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { - $this->setDoseNumberPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { - $this->setDoseNumberPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]) || isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { + $value = $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT]; } else { - $this->setDoseNumberPositiveInt(new FHIRPositiveInt($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])); - } - } - if (isset($data[self::FIELD_DOSE_NUMBER_STRING])) { - $ext = (isset($data[self::FIELD_DOSE_NUMBER_STRING_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_STRING_EXT])) - ? $data[self::FIELD_DOSE_NUMBER_STRING_EXT] - : null; - if ($data[self::FIELD_DOSE_NUMBER_STRING] instanceof FHIRString) { - $this->setDoseNumberString($data[self::FIELD_DOSE_NUMBER_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_NUMBER_STRING])) { - $this->setDoseNumberString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOSE_NUMBER_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_NUMBER_STRING])) { - $this->setDoseNumberString(new FHIRString(array_merge($ext, $data[self::FIELD_DOSE_NUMBER_STRING]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDoseNumberPositiveInt($value); + } else if (is_array($value)) { + $this->setDoseNumberPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDoseNumberPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDoseNumberPositiveInt(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_DOSE_NUMBER_STRING]) || isset($data[self::FIELD_DOSE_NUMBER_STRING_EXT])) { + if (isset($data[self::FIELD_DOSE_NUMBER_STRING])) { + $value = $data[self::FIELD_DOSE_NUMBER_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOSE_NUMBER_STRING_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_STRING_EXT])) { + $ext = $data[self::FIELD_DOSE_NUMBER_STRING_EXT]; } else { - $this->setDoseNumberString(new FHIRString($data[self::FIELD_DOSE_NUMBER_STRING])); - } - } - if (isset($data[self::FIELD_SERIES])) { - $ext = (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) - ? $data[self::FIELD_SERIES_EXT] - : null; - if ($data[self::FIELD_SERIES] instanceof FHIRString) { - $this->setSeries($data[self::FIELD_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDoseNumberString($value); + } else if (is_array($value)) { + $this->setDoseNumberString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDoseNumberString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDoseNumberString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SERIES]) || isset($data[self::FIELD_SERIES_EXT])) { + if (isset($data[self::FIELD_SERIES])) { + $value = $data[self::FIELD_SERIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) { + $ext = $data[self::FIELD_SERIES_EXT]; } else { - $this->setSeries(new FHIRString($data[self::FIELD_SERIES])); - } - } - if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT])) - ? $data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_SERIES_DOSES_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setSeriesDosesPositiveInt($data[self::FIELD_SERIES_DOSES_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { - $this->setSeriesDosesPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SERIES_DOSES_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { - $this->setSeriesDosesPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SERIES_DOSES_POSITIVE_INT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeries($value); + } else if (is_array($value)) { + $this->setSeries(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeries(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT]) || isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { + $value = $data[self::FIELD_SERIES_DOSES_POSITIVE_INT]; } else { - $this->setSeriesDosesPositiveInt(new FHIRPositiveInt($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])); - } - } - if (isset($data[self::FIELD_SERIES_DOSES_STRING])) { - $ext = (isset($data[self::FIELD_SERIES_DOSES_STRING_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_STRING_EXT])) - ? $data[self::FIELD_SERIES_DOSES_STRING_EXT] - : null; - if ($data[self::FIELD_SERIES_DOSES_STRING] instanceof FHIRString) { - $this->setSeriesDosesString($data[self::FIELD_SERIES_DOSES_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES_DOSES_STRING])) { - $this->setSeriesDosesString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES_DOSES_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES_DOSES_STRING])) { - $this->setSeriesDosesString(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES_DOSES_STRING]))); + $value = null; + } + if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSeriesDosesPositiveInt($value); + } else if (is_array($value)) { + $this->setSeriesDosesPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSeriesDosesPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeriesDosesPositiveInt(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SERIES_DOSES_STRING]) || isset($data[self::FIELD_SERIES_DOSES_STRING_EXT])) { + if (isset($data[self::FIELD_SERIES_DOSES_STRING])) { + $value = $data[self::FIELD_SERIES_DOSES_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERIES_DOSES_STRING_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_STRING_EXT])) { + $ext = $data[self::FIELD_SERIES_DOSES_STRING_EXT]; } else { - $this->setSeriesDosesString(new FHIRString($data[self::FIELD_SERIES_DOSES_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeriesDosesString($value); + } else if (is_array($value)) { + $this->setSeriesDosesString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeriesDosesString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeriesDosesString(new FHIRString($ext)); } } if (isset($data[self::FIELD_TARGET_DISEASE])) { @@ -781,41 +816,60 @@ public function jsonSerialize() } if (null !== ($v = $this->getDoseNumberPositiveInt())) { $a[self::FIELD_DOSE_NUMBER_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT] = $enc; } } if (null !== ($v = $this->getDoseNumberString())) { $a[self::FIELD_DOSE_NUMBER_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOSE_NUMBER_STRING_EXT] = $enc; } } if (null !== ($v = $this->getSeries())) { $a[self::FIELD_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_EXT] = $enc; } } if (null !== ($v = $this->getSeriesDosesPositiveInt())) { $a[self::FIELD_SERIES_DOSES_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT] = $enc; } } if (null !== ($v = $this->getSeriesDosesString())) { $a[self::FIELD_SERIES_DOSES_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_DOSES_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getTargetDisease())) { - $a[self::FIELD_TARGET_DISEASE] = $vs; + $a[self::FIELD_TARGET_DISEASE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET_DISEASE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php index 9e44ed490b..cdd4ef7938 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRImmunizationReaction extends FHIRBackboneElement const FIELD_REPORTED_EXT = '_reported'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -146,20 +146,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -169,20 +176,27 @@ public function __construct($data = null) $this->setDetail(new FHIRReference($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_REPORTED])) { - $ext = (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) - ? $data[self::FIELD_REPORTED_EXT] - : null; - if ($data[self::FIELD_REPORTED] instanceof FHIRBoolean) { - $this->setReported($data[self::FIELD_REPORTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPORTED]] + $ext)); - } else if (is_array($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPORTED]))); - } + if (isset($data[self::FIELD_REPORTED]) || isset($data[self::FIELD_REPORTED_EXT])) { + if (isset($data[self::FIELD_REPORTED])) { + $value = $data[self::FIELD_REPORTED]; } else { - $this->setReported(new FHIRBoolean($data[self::FIELD_REPORTED])); + $value = null; + } + if (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) { + $ext = $data[self::FIELD_REPORTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReported($value); + } else if (is_array($value)) { + $this->setReported(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReported(new FHIRBoolean($ext)); } } } @@ -425,8 +439,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -435,11 +451,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getReported())) { $a[self::FIELD_REPORTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPORTED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php index 3d0290c301..da8a9e3732 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRImmunizationRecommendationDateCriterion extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -142,20 +142,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDateTime) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDateTime($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDateTime($ext)); } } } @@ -356,11 +363,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php index 8e61656072..13b006f3b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRImmunizationRecommendationRecommendation extends FHIRBackboneElement const FIELD_VACCINE_CODE = 'vaccineCode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -331,52 +331,73 @@ public function __construct($data = null) $this->addDateCriterion(new FHIRImmunizationRecommendationDateCriterion($data[self::FIELD_DATE_CRITERION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT])) - ? $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setDoseNumberPositiveInt($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { - $this->setDoseNumberPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { - $this->setDoseNumberPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]) || isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { + $value = $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT]; } else { - $this->setDoseNumberPositiveInt(new FHIRPositiveInt($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])); - } - } - if (isset($data[self::FIELD_DOSE_NUMBER_STRING])) { - $ext = (isset($data[self::FIELD_DOSE_NUMBER_STRING_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_STRING_EXT])) - ? $data[self::FIELD_DOSE_NUMBER_STRING_EXT] - : null; - if ($data[self::FIELD_DOSE_NUMBER_STRING] instanceof FHIRString) { - $this->setDoseNumberString($data[self::FIELD_DOSE_NUMBER_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_NUMBER_STRING])) { - $this->setDoseNumberString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOSE_NUMBER_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_NUMBER_STRING])) { - $this->setDoseNumberString(new FHIRString(array_merge($ext, $data[self::FIELD_DOSE_NUMBER_STRING]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDoseNumberPositiveInt($value); + } else if (is_array($value)) { + $this->setDoseNumberPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDoseNumberPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDoseNumberPositiveInt(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_DOSE_NUMBER_STRING]) || isset($data[self::FIELD_DOSE_NUMBER_STRING_EXT])) { + if (isset($data[self::FIELD_DOSE_NUMBER_STRING])) { + $value = $data[self::FIELD_DOSE_NUMBER_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOSE_NUMBER_STRING_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_STRING_EXT])) { + $ext = $data[self::FIELD_DOSE_NUMBER_STRING_EXT]; } else { - $this->setDoseNumberString(new FHIRString($data[self::FIELD_DOSE_NUMBER_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDoseNumberString($value); + } else if (is_array($value)) { + $this->setDoseNumberString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDoseNumberString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoseNumberString(new FHIRString($ext)); } } if (isset($data[self::FIELD_FORECAST_REASON])) { @@ -404,52 +425,73 @@ public function __construct($data = null) $this->setForecastStatus(new FHIRCodeableConcept($data[self::FIELD_FORECAST_STATUS])); } } - if (isset($data[self::FIELD_SERIES])) { - $ext = (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) - ? $data[self::FIELD_SERIES_EXT] - : null; - if ($data[self::FIELD_SERIES] instanceof FHIRString) { - $this->setSeries($data[self::FIELD_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES]))); - } + if (isset($data[self::FIELD_SERIES]) || isset($data[self::FIELD_SERIES_EXT])) { + if (isset($data[self::FIELD_SERIES])) { + $value = $data[self::FIELD_SERIES]; } else { - $this->setSeries(new FHIRString($data[self::FIELD_SERIES])); - } - } - if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT])) - ? $data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_SERIES_DOSES_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setSeriesDosesPositiveInt($data[self::FIELD_SERIES_DOSES_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { - $this->setSeriesDosesPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SERIES_DOSES_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { - $this->setSeriesDosesPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SERIES_DOSES_POSITIVE_INT]))); + $value = null; + } + if (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) { + $ext = $data[self::FIELD_SERIES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeries($value); + } else if (is_array($value)) { + $this->setSeries(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeries(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT]) || isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { + $value = $data[self::FIELD_SERIES_DOSES_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT]; } else { - $this->setSeriesDosesPositiveInt(new FHIRPositiveInt($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])); - } - } - if (isset($data[self::FIELD_SERIES_DOSES_STRING])) { - $ext = (isset($data[self::FIELD_SERIES_DOSES_STRING_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_STRING_EXT])) - ? $data[self::FIELD_SERIES_DOSES_STRING_EXT] - : null; - if ($data[self::FIELD_SERIES_DOSES_STRING] instanceof FHIRString) { - $this->setSeriesDosesString($data[self::FIELD_SERIES_DOSES_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES_DOSES_STRING])) { - $this->setSeriesDosesString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES_DOSES_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES_DOSES_STRING])) { - $this->setSeriesDosesString(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES_DOSES_STRING]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSeriesDosesPositiveInt($value); + } else if (is_array($value)) { + $this->setSeriesDosesPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSeriesDosesPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeriesDosesPositiveInt(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SERIES_DOSES_STRING]) || isset($data[self::FIELD_SERIES_DOSES_STRING_EXT])) { + if (isset($data[self::FIELD_SERIES_DOSES_STRING])) { + $value = $data[self::FIELD_SERIES_DOSES_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERIES_DOSES_STRING_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_STRING_EXT])) { + $ext = $data[self::FIELD_SERIES_DOSES_STRING_EXT]; } else { - $this->setSeriesDosesString(new FHIRString($data[self::FIELD_SERIES_DOSES_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeriesDosesString($value); + } else if (is_array($value)) { + $this->setSeriesDosesString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeriesDosesString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeriesDosesString(new FHIRString($ext)); } } if (isset($data[self::FIELD_SUPPORTING_IMMUNIZATION])) { @@ -1439,70 +1481,121 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContraindicatedVaccineCode())) { - $a[self::FIELD_CONTRAINDICATED_VACCINE_CODE] = $vs; + $a[self::FIELD_CONTRAINDICATED_VACCINE_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRAINDICATED_VACCINE_CODE][] = $v; + } } if ([] !== ($vs = $this->getDateCriterion())) { - $a[self::FIELD_DATE_CRITERION] = $vs; + $a[self::FIELD_DATE_CRITERION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATE_CRITERION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoseNumberPositiveInt())) { $a[self::FIELD_DOSE_NUMBER_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT] = $enc; } } if (null !== ($v = $this->getDoseNumberString())) { $a[self::FIELD_DOSE_NUMBER_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOSE_NUMBER_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getForecastReason())) { - $a[self::FIELD_FORECAST_REASON] = $vs; + $a[self::FIELD_FORECAST_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FORECAST_REASON][] = $v; + } } if (null !== ($v = $this->getForecastStatus())) { $a[self::FIELD_FORECAST_STATUS] = $v; } if (null !== ($v = $this->getSeries())) { $a[self::FIELD_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_EXT] = $enc; } } if (null !== ($v = $this->getSeriesDosesPositiveInt())) { $a[self::FIELD_SERIES_DOSES_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT] = $enc; } } if (null !== ($v = $this->getSeriesDosesString())) { $a[self::FIELD_SERIES_DOSES_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_DOSES_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportingImmunization())) { - $a[self::FIELD_SUPPORTING_IMMUNIZATION] = $vs; + $a[self::FIELD_SUPPORTING_IMMUNIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_IMMUNIZATION][] = $v; + } } if ([] !== ($vs = $this->getSupportingPatientInformation())) { - $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION][] = $v; + } } if (null !== ($v = $this->getTargetDisease())) { $a[self::FIELD_TARGET_DISEASE] = $v; } if ([] !== ($vs = $this->getVaccineCode())) { - $a[self::FIELD_VACCINE_CODE] = $vs; + $a[self::FIELD_VACCINE_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VACCINE_CODE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinition.php index 5a35e1370e..8a037f1cda 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRImplementationGuideDefinition extends FHIRBackboneElement const FIELD_TEMPLATE = 'template'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of rules of how a particular interoperability or standards problem is @@ -689,19 +689,46 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getGrouping())) { - $a[self::FIELD_GROUPING] = $vs; + $a[self::FIELD_GROUPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUPING][] = $v; + } } if (null !== ($v = $this->getPage())) { $a[self::FIELD_PAGE] = $v; } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } } if ([] !== ($vs = $this->getTemplate())) { - $a[self::FIELD_TEMPLATE] = $vs; + $a[self::FIELD_TEMPLATE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEMPLATE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOn.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOn.php index 4bff7ab435..0e0a7cf55d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRImplementationGuideDependsOn extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -152,52 +152,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_PACKAGE_ID])) { - $ext = (isset($data[self::FIELD_PACKAGE_ID_EXT]) && is_array($data[self::FIELD_PACKAGE_ID_EXT])) - ? $data[self::FIELD_PACKAGE_ID_EXT] - : null; - if ($data[self::FIELD_PACKAGE_ID] instanceof FHIRId) { - $this->setPackageId($data[self::FIELD_PACKAGE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PACKAGE_ID])) { - $this->setPackageId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_PACKAGE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_PACKAGE_ID])) { - $this->setPackageId(new FHIRId(array_merge($ext, $data[self::FIELD_PACKAGE_ID]))); - } + if (isset($data[self::FIELD_PACKAGE_ID]) || isset($data[self::FIELD_PACKAGE_ID_EXT])) { + if (isset($data[self::FIELD_PACKAGE_ID])) { + $value = $data[self::FIELD_PACKAGE_ID]; } else { - $this->setPackageId(new FHIRId($data[self::FIELD_PACKAGE_ID])); + $value = null; } - } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRCanonical) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRCanonical(array_merge($ext, $data[self::FIELD_URI]))); - } + if (isset($data[self::FIELD_PACKAGE_ID_EXT]) && is_array($data[self::FIELD_PACKAGE_ID_EXT])) { + $ext = $data[self::FIELD_PACKAGE_ID_EXT]; } else { - $this->setUri(new FHIRCanonical($data[self::FIELD_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setPackageId($value); + } else if (is_array($value)) { + $this->setPackageId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setPackageId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPackageId(new FHIRId($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUri(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -462,25 +483,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getPackageId())) { $a[self::FIELD_PACKAGE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_PACKAGE_ID_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php index 21667c9b89..14c73967ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRImplementationGuideGlobal extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -135,36 +135,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_PROFILE]))); - } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; } else { - $this->setProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProfile(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -371,18 +385,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGrouping.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGrouping.php index 71db55203a..b1e29a0e6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGrouping.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGrouping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRImplementationGuideGrouping extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -367,18 +381,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifest.php index bfeb61e143..e1b445262c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRImplementationGuideManifest extends FHIRBackboneElement const FIELD_RESOURCE = 'resource'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -182,62 +182,80 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IMAGE])) { - $ext = (isset($data[self::FIELD_IMAGE_EXT]) && is_array($data[self::FIELD_IMAGE_EXT])) - ? $data[self::FIELD_IMAGE_EXT] - : null; - if (is_array($data[self::FIELD_IMAGE])) { - foreach($data[self::FIELD_IMAGE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addImage($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addImage(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addImage(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_IMAGE]) || isset($data[self::FIELD_IMAGE_EXT])) { + if (isset($data[self::FIELD_IMAGE])) { + $value = $data[self::FIELD_IMAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMAGE_EXT]) && is_array($data[self::FIELD_IMAGE_EXT])) { + $ext = $data[self::FIELD_IMAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addImage($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addImage($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addImage(new FHIRString(array_merge($v, $iext))); + } else { + $this->addImage(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addImage(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addImage(new FHIRString(array_merge($ext, $value))); + } else { + $this->addImage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addImage(new FHIRString($iext)); } - } elseif ($data[self::FIELD_IMAGE] instanceof FHIRString) { - $this->addImage($data[self::FIELD_IMAGE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_IMAGE])) { - $this->addImage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IMAGE]] + $ext)); - } else { - $this->addImage(new FHIRString($data[self::FIELD_IMAGE])); } } - if (isset($data[self::FIELD_OTHER])) { - $ext = (isset($data[self::FIELD_OTHER_EXT]) && is_array($data[self::FIELD_OTHER_EXT])) - ? $data[self::FIELD_OTHER_EXT] - : null; - if (is_array($data[self::FIELD_OTHER])) { - foreach($data[self::FIELD_OTHER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addOther($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addOther(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addOther(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_OTHER]) || isset($data[self::FIELD_OTHER_EXT])) { + if (isset($data[self::FIELD_OTHER])) { + $value = $data[self::FIELD_OTHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OTHER_EXT]) && is_array($data[self::FIELD_OTHER_EXT])) { + $ext = $data[self::FIELD_OTHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addOther($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addOther($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addOther(new FHIRString(array_merge($v, $iext))); + } else { + $this->addOther(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addOther(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addOther(new FHIRString(array_merge($ext, $value))); + } else { + $this->addOther(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addOther(new FHIRString($iext)); } - } elseif ($data[self::FIELD_OTHER] instanceof FHIRString) { - $this->addOther($data[self::FIELD_OTHER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_OTHER])) { - $this->addOther(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OTHER]] + $ext)); - } else { - $this->addOther(new FHIRString($data[self::FIELD_OTHER])); } } if (isset($data[self::FIELD_PAGE])) { @@ -258,20 +276,27 @@ public function __construct($data = null) $this->addPage(new FHIRImplementationGuidePage1($data[self::FIELD_PAGE])); } } - if (isset($data[self::FIELD_RENDERING])) { - $ext = (isset($data[self::FIELD_RENDERING_EXT]) && is_array($data[self::FIELD_RENDERING_EXT])) - ? $data[self::FIELD_RENDERING_EXT] - : null; - if ($data[self::FIELD_RENDERING] instanceof FHIRUrl) { - $this->setRendering($data[self::FIELD_RENDERING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RENDERING])) { - $this->setRendering(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_RENDERING]] + $ext)); - } else if (is_array($data[self::FIELD_RENDERING])) { - $this->setRendering(new FHIRUrl(array_merge($ext, $data[self::FIELD_RENDERING]))); - } + if (isset($data[self::FIELD_RENDERING]) || isset($data[self::FIELD_RENDERING_EXT])) { + if (isset($data[self::FIELD_RENDERING])) { + $value = $data[self::FIELD_RENDERING]; } else { - $this->setRendering(new FHIRUrl($data[self::FIELD_RENDERING])); + $value = null; + } + if (isset($data[self::FIELD_RENDERING_EXT]) && is_array($data[self::FIELD_RENDERING_EXT])) { + $ext = $data[self::FIELD_RENDERING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setRendering($value); + } else if (is_array($value)) { + $this->setRendering(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setRendering(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRendering(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -755,46 +780,79 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getImage())) { $a[self::FIELD_IMAGE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_IMAGE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_IMAGE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_IMAGE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_IMAGE_EXT] = $encs; + } } if ([] !== ($vs = $this->getOther())) { $a[self::FIELD_OTHER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_OTHER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_OTHER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_OTHER_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_OTHER_EXT] = $encs; + } } if ([] !== ($vs = $this->getPage())) { - $a[self::FIELD_PAGE] = $vs; + $a[self::FIELD_PAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAGE][] = $v; + } } if (null !== ($v = $this->getRendering())) { $a[self::FIELD_RENDERING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_RENDERING_EXT] = $enc; } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php index 1ba927b872..d81bca8080 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRImplementationGuidePage extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A code that indicates how the page is generated. @@ -173,20 +173,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_GENERATION])) { - $ext = (isset($data[self::FIELD_GENERATION_EXT]) && is_array($data[self::FIELD_GENERATION_EXT])) - ? $data[self::FIELD_GENERATION_EXT] - : null; - if ($data[self::FIELD_GENERATION] instanceof FHIRGuidePageGeneration) { - $this->setGeneration($data[self::FIELD_GENERATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENERATION])) { - $this->setGeneration(new FHIRGuidePageGeneration([FHIRGuidePageGeneration::FIELD_VALUE => $data[self::FIELD_GENERATION]] + $ext)); - } else if (is_array($data[self::FIELD_GENERATION])) { - $this->setGeneration(new FHIRGuidePageGeneration(array_merge($ext, $data[self::FIELD_GENERATION]))); - } + if (isset($data[self::FIELD_GENERATION]) || isset($data[self::FIELD_GENERATION_EXT])) { + if (isset($data[self::FIELD_GENERATION])) { + $value = $data[self::FIELD_GENERATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENERATION_EXT]) && is_array($data[self::FIELD_GENERATION_EXT])) { + $ext = $data[self::FIELD_GENERATION_EXT]; } else { - $this->setGeneration(new FHIRGuidePageGeneration($data[self::FIELD_GENERATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGuidePageGeneration) { + $this->setGeneration($value); + } else if (is_array($value)) { + $this->setGeneration(new FHIRGuidePageGeneration(array_merge($ext, $value))); + } else { + $this->setGeneration(new FHIRGuidePageGeneration([FHIRGuidePageGeneration::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGeneration(new FHIRGuidePageGeneration($ext)); } } if (isset($data[self::FIELD_NAME_REFERENCE])) { @@ -196,20 +203,27 @@ public function __construct($data = null) $this->setNameReference(new FHIRReference($data[self::FIELD_NAME_REFERENCE])); } } - if (isset($data[self::FIELD_NAME_URL])) { - $ext = (isset($data[self::FIELD_NAME_URL_EXT]) && is_array($data[self::FIELD_NAME_URL_EXT])) - ? $data[self::FIELD_NAME_URL_EXT] - : null; - if ($data[self::FIELD_NAME_URL] instanceof FHIRUrl) { - $this->setNameUrl($data[self::FIELD_NAME_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME_URL])) { - $this->setNameUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_NAME_URL]] + $ext)); - } else if (is_array($data[self::FIELD_NAME_URL])) { - $this->setNameUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_NAME_URL]))); - } + if (isset($data[self::FIELD_NAME_URL]) || isset($data[self::FIELD_NAME_URL_EXT])) { + if (isset($data[self::FIELD_NAME_URL])) { + $value = $data[self::FIELD_NAME_URL]; } else { - $this->setNameUrl(new FHIRUrl($data[self::FIELD_NAME_URL])); + $value = null; + } + if (isset($data[self::FIELD_NAME_URL_EXT]) && is_array($data[self::FIELD_NAME_URL_EXT])) { + $ext = $data[self::FIELD_NAME_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setNameUrl($value); + } else if (is_array($value)) { + $this->setNameUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setNameUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNameUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_PAGE])) { @@ -230,20 +244,27 @@ public function __construct($data = null) $this->addPage(new FHIRImplementationGuidePage($data[self::FIELD_PAGE])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -590,8 +611,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getGeneration())) { $a[self::FIELD_GENERATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGuidePageGeneration::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGuidePageGeneration::FIELD_VALUE]); $a[self::FIELD_GENERATION_EXT] = $enc; } } @@ -600,21 +623,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getNameUrl())) { $a[self::FIELD_NAME_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_NAME_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getPage())) { - $a[self::FIELD_PAGE] = $vs; + $a[self::FIELD_PAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAGE][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1.php index 94d1177cad..43aa0544ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRImplementationGuidePage1 extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -145,65 +145,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ANCHOR])) { - $ext = (isset($data[self::FIELD_ANCHOR_EXT]) && is_array($data[self::FIELD_ANCHOR_EXT])) - ? $data[self::FIELD_ANCHOR_EXT] - : null; - if (is_array($data[self::FIELD_ANCHOR])) { - foreach($data[self::FIELD_ANCHOR] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAnchor($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAnchor(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAnchor(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ANCHOR]) || isset($data[self::FIELD_ANCHOR_EXT])) { + if (isset($data[self::FIELD_ANCHOR])) { + $value = $data[self::FIELD_ANCHOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANCHOR_EXT]) && is_array($data[self::FIELD_ANCHOR_EXT])) { + $ext = $data[self::FIELD_ANCHOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAnchor($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAnchor($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAnchor(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAnchor(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAnchor(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAnchor(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAnchor(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAnchor(new FHIRString($iext)); } - } elseif ($data[self::FIELD_ANCHOR] instanceof FHIRString) { - $this->addAnchor($data[self::FIELD_ANCHOR]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ANCHOR])) { - $this->addAnchor(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ANCHOR]] + $ext)); - } else { - $this->addAnchor(new FHIRString($data[self::FIELD_ANCHOR])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -483,33 +506,48 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAnchor())) { $a[self::FIELD_ANCHOR] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ANCHOR][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ANCHOR_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ANCHOR_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ANCHOR_EXT] = $encs; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameter.php index 918eb5c37e..370cfc08fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRImplementationGuideParameter extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Code of parameter that is input to the guide. @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRGuideParameterCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRGuideParameterCode([FHIRGuideParameterCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRGuideParameterCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRGuideParameterCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGuideParameterCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRGuideParameterCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRGuideParameterCode([FHIRGuideParameterCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRGuideParameterCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -353,18 +367,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGuideParameterCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGuideParameterCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php index 7235792604..4a46bf1f94 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRImplementationGuideResource extends FHIRBackboneElement const FIELD_REFERENCE = 'reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -210,113 +210,157 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT]) && is_array($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) - ? $data[self::FIELD_EXAMPLE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_BOOLEAN] instanceof FHIRBoolean) { - $this->setExampleBoolean($data[self::FIELD_EXAMPLE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $this->setExampleBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXAMPLE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $this->setExampleBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXAMPLE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN]) || isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN])) { + $value = $data[self::FIELD_EXAMPLE_BOOLEAN]; } else { - $this->setExampleBoolean(new FHIRBoolean($data[self::FIELD_EXAMPLE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_EXAMPLE_CANONICAL])) { - $ext = (isset($data[self::FIELD_EXAMPLE_CANONICAL_EXT]) && is_array($data[self::FIELD_EXAMPLE_CANONICAL_EXT])) - ? $data[self::FIELD_EXAMPLE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_CANONICAL] instanceof FHIRCanonical) { - $this->setExampleCanonical($data[self::FIELD_EXAMPLE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_CANONICAL])) { - $this->setExampleCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_EXAMPLE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_CANONICAL])) { - $this->setExampleCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_EXAMPLE_CANONICAL]))); + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT]) && is_array($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExampleBoolean($value); + } else if (is_array($value)) { + $this->setExampleBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExampleBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_CANONICAL]) || isset($data[self::FIELD_EXAMPLE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_CANONICAL])) { + $value = $data[self::FIELD_EXAMPLE_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_CANONICAL_EXT]) && is_array($data[self::FIELD_EXAMPLE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_CANONICAL_EXT]; } else { - $this->setExampleCanonical(new FHIRCanonical($data[self::FIELD_EXAMPLE_CANONICAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setExampleCanonical($value); + } else if (is_array($value)) { + $this->setExampleCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setExampleCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleCanonical(new FHIRCanonical($ext)); } } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if (is_array($data[self::FIELD_FHIR_VERSION])) { - foreach($data[self::FIELD_FHIR_VERSION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRFHIRVersion) { - $this->addFhirVersion($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFhirVersion(new FHIRFHIRVersion(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRVersion) { + $this->addFhirVersion($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRFHIRVersion) { + $this->addFhirVersion($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFhirVersion(new FHIRFHIRVersion(array_merge($v, $iext))); + } else { + $this->addFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFhirVersion(new FHIRFHIRVersion($v)); } + } elseif (is_array($value)) { + $this->addFhirVersion(new FHIRFHIRVersion(array_merge($ext, $value))); + } else { + $this->addFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_FHIR_VERSION] instanceof FHIRFHIRVersion) { - $this->addFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->addFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else { - $this->addFhirVersion(new FHIRFHIRVersion($data[self::FIELD_FHIR_VERSION])); - } - } - if (isset($data[self::FIELD_GROUPING_ID])) { - $ext = (isset($data[self::FIELD_GROUPING_ID_EXT]) && is_array($data[self::FIELD_GROUPING_ID_EXT])) - ? $data[self::FIELD_GROUPING_ID_EXT] - : null; - if ($data[self::FIELD_GROUPING_ID] instanceof FHIRId) { - $this->setGroupingId($data[self::FIELD_GROUPING_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUPING_ID])) { - $this->setGroupingId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_GROUPING_ID]] + $ext)); - } else if (is_array($data[self::FIELD_GROUPING_ID])) { - $this->setGroupingId(new FHIRId(array_merge($ext, $data[self::FIELD_GROUPING_ID]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFhirVersion(new FHIRFHIRVersion($iext)); } + } + } + if (isset($data[self::FIELD_GROUPING_ID]) || isset($data[self::FIELD_GROUPING_ID_EXT])) { + if (isset($data[self::FIELD_GROUPING_ID])) { + $value = $data[self::FIELD_GROUPING_ID]; } else { - $this->setGroupingId(new FHIRId($data[self::FIELD_GROUPING_ID])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_GROUPING_ID_EXT]) && is_array($data[self::FIELD_GROUPING_ID_EXT])) { + $ext = $data[self::FIELD_GROUPING_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setGroupingId($value); + } else if (is_array($value)) { + $this->setGroupingId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setGroupingId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setGroupingId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_REFERENCE])) { @@ -805,57 +849,78 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExampleBoolean())) { $a[self::FIELD_EXAMPLE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getExampleCanonical())) { $a[self::FIELD_EXAMPLE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_CANONICAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FHIR_VERSION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FHIR_VERSION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRFHIRVersion::FIELD_VALUE]) || array_key_exists(FHIRFHIRVersion::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FHIR_VERSION_EXT][] = null; + unset($enc[FHIRFHIRVersion::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FHIR_VERSION_EXT] = $encs; + } } if (null !== ($v = $this->getGroupingId())) { $a[self::FIELD_GROUPING_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_GROUPING_ID_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1.php index 5a585a62cf..0508b25097 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRImplementationGuideResource1 extends FHIRBackboneElement const FIELD_RELATIVE_PATH_EXT = '_relativePath'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -164,36 +164,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT]) && is_array($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) - ? $data[self::FIELD_EXAMPLE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_BOOLEAN] instanceof FHIRBoolean) { - $this->setExampleBoolean($data[self::FIELD_EXAMPLE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $this->setExampleBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXAMPLE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_BOOLEAN])) { - $this->setExampleBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXAMPLE_BOOLEAN]))); - } + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN]) || isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN])) { + $value = $data[self::FIELD_EXAMPLE_BOOLEAN]; } else { - $this->setExampleBoolean(new FHIRBoolean($data[self::FIELD_EXAMPLE_BOOLEAN])); + $value = null; } - } - if (isset($data[self::FIELD_EXAMPLE_CANONICAL])) { - $ext = (isset($data[self::FIELD_EXAMPLE_CANONICAL_EXT]) && is_array($data[self::FIELD_EXAMPLE_CANONICAL_EXT])) - ? $data[self::FIELD_EXAMPLE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_EXAMPLE_CANONICAL] instanceof FHIRCanonical) { - $this->setExampleCanonical($data[self::FIELD_EXAMPLE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE_CANONICAL])) { - $this->setExampleCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_EXAMPLE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE_CANONICAL])) { - $this->setExampleCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_EXAMPLE_CANONICAL]))); + if (isset($data[self::FIELD_EXAMPLE_BOOLEAN_EXT]) && is_array($data[self::FIELD_EXAMPLE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExampleBoolean($value); + } else if (is_array($value)) { + $this->setExampleBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExampleBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExampleBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE_CANONICAL]) || isset($data[self::FIELD_EXAMPLE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_EXAMPLE_CANONICAL])) { + $value = $data[self::FIELD_EXAMPLE_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_CANONICAL_EXT]) && is_array($data[self::FIELD_EXAMPLE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_CANONICAL_EXT]; } else { - $this->setExampleCanonical(new FHIRCanonical($data[self::FIELD_EXAMPLE_CANONICAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setExampleCanonical($value); + } else if (is_array($value)) { + $this->setExampleCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setExampleCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExampleCanonical(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_REFERENCE])) { @@ -203,20 +217,27 @@ public function __construct($data = null) $this->setReference(new FHIRReference($data[self::FIELD_REFERENCE])); } } - if (isset($data[self::FIELD_RELATIVE_PATH])) { - $ext = (isset($data[self::FIELD_RELATIVE_PATH_EXT]) && is_array($data[self::FIELD_RELATIVE_PATH_EXT])) - ? $data[self::FIELD_RELATIVE_PATH_EXT] - : null; - if ($data[self::FIELD_RELATIVE_PATH] instanceof FHIRUrl) { - $this->setRelativePath($data[self::FIELD_RELATIVE_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIVE_PATH])) { - $this->setRelativePath(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_RELATIVE_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIVE_PATH])) { - $this->setRelativePath(new FHIRUrl(array_merge($ext, $data[self::FIELD_RELATIVE_PATH]))); - } + if (isset($data[self::FIELD_RELATIVE_PATH]) || isset($data[self::FIELD_RELATIVE_PATH_EXT])) { + if (isset($data[self::FIELD_RELATIVE_PATH])) { + $value = $data[self::FIELD_RELATIVE_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELATIVE_PATH_EXT]) && is_array($data[self::FIELD_RELATIVE_PATH_EXT])) { + $ext = $data[self::FIELD_RELATIVE_PATH_EXT]; } else { - $this->setRelativePath(new FHIRUrl($data[self::FIELD_RELATIVE_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setRelativePath($value); + } else if (is_array($value)) { + $this->setRelativePath(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setRelativePath(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelativePath(new FHIRUrl($ext)); } } } @@ -515,15 +536,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExampleBoolean())) { $a[self::FIELD_EXAMPLE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getExampleCanonical())) { $a[self::FIELD_EXAMPLE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_CANONICAL_EXT] = $enc; } } @@ -532,11 +557,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getRelativePath())) { $a[self::FIELD_RELATIVE_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_RELATIVE_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplate.php index 0accbe19f2..62c0c37d48 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRImplementationGuideTemplate extends FHIRBackboneElement const FIELD_SOURCE_EXT = '_source'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -147,52 +147,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_SCOPE])) { - $ext = (isset($data[self::FIELD_SCOPE_EXT]) && is_array($data[self::FIELD_SCOPE_EXT])) - ? $data[self::FIELD_SCOPE_EXT] - : null; - if ($data[self::FIELD_SCOPE] instanceof FHIRString) { - $this->setScope($data[self::FIELD_SCOPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCOPE])) { - $this->setScope(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SCOPE]] + $ext)); - } else if (is_array($data[self::FIELD_SCOPE])) { - $this->setScope(new FHIRString(array_merge($ext, $data[self::FIELD_SCOPE]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setScope(new FHIRString($data[self::FIELD_SCOPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRString) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRString(array_merge($ext, $data[self::FIELD_SOURCE]))); + if (isset($data[self::FIELD_SCOPE]) || isset($data[self::FIELD_SCOPE_EXT])) { + if (isset($data[self::FIELD_SCOPE])) { + $value = $data[self::FIELD_SCOPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SCOPE_EXT]) && is_array($data[self::FIELD_SCOPE_EXT])) { + $ext = $data[self::FIELD_SCOPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setScope($value); + } else if (is_array($value)) { + $this->setScope(new FHIRString(array_merge($ext, $value))); + } else { + $this->setScope(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setScope(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; } else { - $this->setSource(new FHIRString($data[self::FIELD_SOURCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSource(new FHIRString($ext)); } } } @@ -449,25 +470,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getScope())) { $a[self::FIELD_SCOPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SCOPE_EXT] = $enc; } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit.php index a4b874bf12..0e9b0fe915 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRInsurancePlanBenefit extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details of a Health Insurance product/plan provided by an organization. @@ -158,20 +158,27 @@ public function __construct($data = null) $this->addLimit(new FHIRInsurancePlanLimit($data[self::FIELD_LIMIT])); } } - if (isset($data[self::FIELD_REQUIREMENT])) { - $ext = (isset($data[self::FIELD_REQUIREMENT_EXT]) && is_array($data[self::FIELD_REQUIREMENT_EXT])) - ? $data[self::FIELD_REQUIREMENT_EXT] - : null; - if ($data[self::FIELD_REQUIREMENT] instanceof FHIRString) { - $this->setRequirement($data[self::FIELD_REQUIREMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENT])) { - $this->setRequirement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENT]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENT])) { - $this->setRequirement(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENT]))); - } + if (isset($data[self::FIELD_REQUIREMENT]) || isset($data[self::FIELD_REQUIREMENT_EXT])) { + if (isset($data[self::FIELD_REQUIREMENT])) { + $value = $data[self::FIELD_REQUIREMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENT_EXT]) && is_array($data[self::FIELD_REQUIREMENT_EXT])) { + $ext = $data[self::FIELD_REQUIREMENT_EXT]; } else { - $this->setRequirement(new FHIRString($data[self::FIELD_REQUIREMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirement($value); + } else if (is_array($value)) { + $this->setRequirement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequirement(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -429,18 +436,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getLimit())) { - $a[self::FIELD_LIMIT] = $vs; + $a[self::FIELD_LIMIT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LIMIT][] = $v; + } } if (null !== ($v = $this->getRequirement())) { $a[self::FIELD_REQUIREMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1.php index f524ccd5bd..0b4540e739 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRInsurancePlanBenefit1 extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details of a Health Insurance product/plan provided by an organization. @@ -350,11 +350,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCost())) { - $a[self::FIELD_COST] = $vs; + $a[self::FIELD_COST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COST][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContact.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContact.php index d5f87c1e23..6691ce7ab1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContact.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRInsurancePlanContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An address expressed using postal conventions (as opposed to GPS or other @@ -497,7 +497,16 @@ public function jsonSerialize() $a[self::FIELD_PURPOSE] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCost.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCost.php index c64e51111a..1ab3ed1e40 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCost.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCost.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRInsurancePlanCost extends FHIRBackboneElement const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -493,16 +493,22 @@ public function jsonSerialize() $a[self::FIELD_APPLICABILITY] = $v; } if ([] !== ($vs = $this->getQualifiers())) { - $a[self::FIELD_QUALIFIERS] = $vs; + $a[self::FIELD_QUALIFIERS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUALIFIERS][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getValue())) { - $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - $a[self::FIELD_VALUE_EXT] = $enc; - } + $a[self::FIELD_VALUE] = $v; + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverage.php index 179a250b40..816f7c330a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRInsurancePlanCoverage extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details of a Health Insurance product/plan provided by an organization. @@ -454,14 +454,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBenefit())) { - $a[self::FIELD_BENEFIT] = $vs; + $a[self::FIELD_BENEFIT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BENEFIT][] = $v; + } } if ([] !== ($vs = $this->getNetwork())) { - $a[self::FIELD_NETWORK] = $vs; + $a[self::FIELD_NETWORK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NETWORK][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCost.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCost.php index 62085b45c1..ce80f2b51b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCost.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCost.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRInsurancePlanGeneralCost extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -157,20 +157,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_COST])) { @@ -180,20 +187,27 @@ public function __construct($data = null) $this->setCost(new FHIRMoney($data[self::FIELD_COST])); } } - if (isset($data[self::FIELD_GROUP_SIZE])) { - $ext = (isset($data[self::FIELD_GROUP_SIZE_EXT]) && is_array($data[self::FIELD_GROUP_SIZE_EXT])) - ? $data[self::FIELD_GROUP_SIZE_EXT] - : null; - if ($data[self::FIELD_GROUP_SIZE] instanceof FHIRPositiveInt) { - $this->setGroupSize($data[self::FIELD_GROUP_SIZE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUP_SIZE])) { - $this->setGroupSize(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_GROUP_SIZE]] + $ext)); - } else if (is_array($data[self::FIELD_GROUP_SIZE])) { - $this->setGroupSize(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_GROUP_SIZE]))); - } + if (isset($data[self::FIELD_GROUP_SIZE]) || isset($data[self::FIELD_GROUP_SIZE_EXT])) { + if (isset($data[self::FIELD_GROUP_SIZE])) { + $value = $data[self::FIELD_GROUP_SIZE]; } else { - $this->setGroupSize(new FHIRPositiveInt($data[self::FIELD_GROUP_SIZE])); + $value = null; + } + if (isset($data[self::FIELD_GROUP_SIZE_EXT]) && is_array($data[self::FIELD_GROUP_SIZE_EXT])) { + $ext = $data[self::FIELD_GROUP_SIZE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setGroupSize($value); + } else if (is_array($value)) { + $this->setGroupSize(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setGroupSize(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGroupSize(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -477,8 +491,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } @@ -487,14 +503,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getGroupSize())) { $a[self::FIELD_GROUP_SIZE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_GROUP_SIZE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimit.php index 741be8b9d3..a90d1f95d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRInsurancePlanLimit extends FHIRBackboneElement const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -325,10 +325,10 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if (null !== ($v = $this->getValue())) { - $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - $a[self::FIELD_VALUE_EXT] = $enc; - } + $a[self::FIELD_VALUE] = $v; + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlan.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlan.php index 6daf6c195d..f8d2ba0496 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlan.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRInsurancePlanPlan extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -745,23 +745,56 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCoverageArea())) { - $a[self::FIELD_COVERAGE_AREA] = $vs; + $a[self::FIELD_COVERAGE_AREA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE_AREA][] = $v; + } } if ([] !== ($vs = $this->getGeneralCost())) { - $a[self::FIELD_GENERAL_COST] = $vs; + $a[self::FIELD_GENERAL_COST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GENERAL_COST][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNetwork())) { - $a[self::FIELD_NETWORK] = $vs; + $a[self::FIELD_NETWORK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NETWORK][] = $v; + } } if ([] !== ($vs = $this->getSpecificCost())) { - $a[self::FIELD_SPECIFIC_COST] = $vs; + $a[self::FIELD_SPECIFIC_COST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIFIC_COST][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCost.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCost.php index c9636eec2f..f662f0b9e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCost.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCost.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRInsurancePlanSpecificCost extends FHIRBackboneElement const FIELD_CATEGORY = 'category'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details of a Health Insurance product/plan provided by an organization. @@ -350,11 +350,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBenefit())) { - $a[self::FIELD_BENEFIT] = $vs; + $a[self::FIELD_BENEFIT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BENEFIT][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItem.php index 7f578dca71..366c23a165 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRInvoiceLineItem extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -198,20 +198,27 @@ public function __construct($data = null) $this->addPriceComponent(new FHIRInvoicePriceComponent($data[self::FIELD_PRICE_COMPONENT])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -534,15 +541,26 @@ public function jsonSerialize() $a[self::FIELD_CHARGE_ITEM_REFERENCE] = $v; } if ([] !== ($vs = $this->getPriceComponent())) { - $a[self::FIELD_PRICE_COMPONENT] = $vs; + $a[self::FIELD_PRICE_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRICE_COMPONENT][] = $v; + } } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipant.php index 20a644cc49..1308e7e3e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRInvoiceParticipant extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponent.php index 2956a7c9b4..796fff2bf6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRInvoicePriceComponent extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -174,36 +174,50 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRInvoicePriceComponentType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRInvoicePriceComponentType([FHIRInvoicePriceComponentType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRInvoicePriceComponentType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRInvoicePriceComponentType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInvoicePriceComponentType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRInvoicePriceComponentType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRInvoicePriceComponentType([FHIRInvoicePriceComponentType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRInvoicePriceComponentType($ext)); } } } @@ -474,18 +488,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInvoicePriceComponentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInvoicePriceComponentType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php index bc979e1f4a..9cf9a97f31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRLinkageItem extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -138,20 +138,27 @@ public function __construct($data = null) $this->setResource(new FHIRReference($data[self::FIELD_RESOURCE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRLinkageType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkageType([FHIRLinkageType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkageType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRLinkageType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLinkageType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRLinkageType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRLinkageType([FHIRLinkageType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRLinkageType($ext)); } } } @@ -327,11 +334,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLinkageType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLinkageType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php index ab14e4eef3..173c87b86b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRListEntry extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -160,36 +160,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DELETED])) { - $ext = (isset($data[self::FIELD_DELETED_EXT]) && is_array($data[self::FIELD_DELETED_EXT])) - ? $data[self::FIELD_DELETED_EXT] - : null; - if ($data[self::FIELD_DELETED] instanceof FHIRBoolean) { - $this->setDeleted($data[self::FIELD_DELETED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DELETED])) { - $this->setDeleted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DELETED]] + $ext)); - } else if (is_array($data[self::FIELD_DELETED])) { - $this->setDeleted(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DELETED]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DELETED]) || isset($data[self::FIELD_DELETED_EXT])) { + if (isset($data[self::FIELD_DELETED])) { + $value = $data[self::FIELD_DELETED]; } else { - $this->setDeleted(new FHIRBoolean($data[self::FIELD_DELETED])); + $value = null; + } + if (isset($data[self::FIELD_DELETED_EXT]) && is_array($data[self::FIELD_DELETED_EXT])) { + $ext = $data[self::FIELD_DELETED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeleted($value); + } else if (is_array($value)) { + $this->setDeleted(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeleted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeleted(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FLAG])) { @@ -486,15 +500,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDeleted())) { $a[self::FIELD_DELETED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DELETED_EXT] = $enc; } } @@ -504,6 +522,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItem())) { $a[self::FIELD_ITEM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperation.php index 906ca502f6..3856771230 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRLocationHoursOfOperation extends FHIRBackboneElement const FIELD_OPENING_TIME_EXT = '_openingTime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -155,81 +155,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALL_DAY])) { - $ext = (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) - ? $data[self::FIELD_ALL_DAY_EXT] - : null; - if ($data[self::FIELD_ALL_DAY] instanceof FHIRBoolean) { - $this->setAllDay($data[self::FIELD_ALL_DAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALL_DAY]] + $ext)); - } else if (is_array($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALL_DAY]))); - } + if (isset($data[self::FIELD_ALL_DAY]) || isset($data[self::FIELD_ALL_DAY_EXT])) { + if (isset($data[self::FIELD_ALL_DAY])) { + $value = $data[self::FIELD_ALL_DAY]; } else { - $this->setAllDay(new FHIRBoolean($data[self::FIELD_ALL_DAY])); + $value = null; } - } - if (isset($data[self::FIELD_CLOSING_TIME])) { - $ext = (isset($data[self::FIELD_CLOSING_TIME_EXT]) && is_array($data[self::FIELD_CLOSING_TIME_EXT])) - ? $data[self::FIELD_CLOSING_TIME_EXT] - : null; - if ($data[self::FIELD_CLOSING_TIME] instanceof FHIRTime) { - $this->setClosingTime($data[self::FIELD_CLOSING_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLOSING_TIME])) { - $this->setClosingTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_CLOSING_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_CLOSING_TIME])) { - $this->setClosingTime(new FHIRTime(array_merge($ext, $data[self::FIELD_CLOSING_TIME]))); + if (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) { + $ext = $data[self::FIELD_ALL_DAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllDay($value); + } else if (is_array($value)) { + $this->setAllDay(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAllDay(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_CLOSING_TIME]) || isset($data[self::FIELD_CLOSING_TIME_EXT])) { + if (isset($data[self::FIELD_CLOSING_TIME])) { + $value = $data[self::FIELD_CLOSING_TIME]; } else { - $this->setClosingTime(new FHIRTime($data[self::FIELD_CLOSING_TIME])); + $value = null; + } + if (isset($data[self::FIELD_CLOSING_TIME_EXT]) && is_array($data[self::FIELD_CLOSING_TIME_EXT])) { + $ext = $data[self::FIELD_CLOSING_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setClosingTime($value); + } else if (is_array($value)) { + $this->setClosingTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setClosingTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setClosingTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_DAYS_OF_WEEK])) { - $ext = (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) - ? $data[self::FIELD_DAYS_OF_WEEK_EXT] - : null; - if (is_array($data[self::FIELD_DAYS_OF_WEEK])) { - foreach($data[self::FIELD_DAYS_OF_WEEK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DAYS_OF_WEEK]) || isset($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + if (isset($data[self::FIELD_DAYS_OF_WEEK])) { + $value = $data[self::FIELD_DAYS_OF_WEEK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + $ext = $data[self::FIELD_DAYS_OF_WEEK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $iext))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($v)); } + } elseif (is_array($value)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($ext, $value))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDaysOfWeek(new FHIRDaysOfWeek($iext)); } - } elseif ($data[self::FIELD_DAYS_OF_WEEK] instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DAYS_OF_WEEK])) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $data[self::FIELD_DAYS_OF_WEEK]] + $ext)); - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK])); } } - if (isset($data[self::FIELD_OPENING_TIME])) { - $ext = (isset($data[self::FIELD_OPENING_TIME_EXT]) && is_array($data[self::FIELD_OPENING_TIME_EXT])) - ? $data[self::FIELD_OPENING_TIME_EXT] - : null; - if ($data[self::FIELD_OPENING_TIME] instanceof FHIRTime) { - $this->setOpeningTime($data[self::FIELD_OPENING_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OPENING_TIME])) { - $this->setOpeningTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_OPENING_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OPENING_TIME])) { - $this->setOpeningTime(new FHIRTime(array_merge($ext, $data[self::FIELD_OPENING_TIME]))); - } + if (isset($data[self::FIELD_OPENING_TIME]) || isset($data[self::FIELD_OPENING_TIME_EXT])) { + if (isset($data[self::FIELD_OPENING_TIME])) { + $value = $data[self::FIELD_OPENING_TIME]; } else { - $this->setOpeningTime(new FHIRTime($data[self::FIELD_OPENING_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OPENING_TIME_EXT]) && is_array($data[self::FIELD_OPENING_TIME_EXT])) { + $ext = $data[self::FIELD_OPENING_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setOpeningTime($value); + } else if (is_array($value)) { + $this->setOpeningTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setOpeningTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOpeningTime(new FHIRTime($ext)); } } } @@ -544,40 +574,57 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllDay())) { $a[self::FIELD_ALL_DAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALL_DAY_EXT] = $enc; } } if (null !== ($v = $this->getClosingTime())) { $a[self::FIELD_CLOSING_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_CLOSING_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getDaysOfWeek())) { $a[self::FIELD_DAYS_OF_WEEK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DAYS_OF_WEEK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDaysOfWeek::FIELD_VALUE]) || array_key_exists(FHIRDaysOfWeek::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = null; + unset($enc[FHIRDaysOfWeek::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DAYS_OF_WEEK_EXT] = $encs; + } } if (null !== ($v = $this->getOpeningTime())) { $a[self::FIELD_OPENING_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_OPENING_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php index 65fab2478d..9a14b39e19 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRLocationPosition extends FHIRBackboneElement const FIELD_LONGITUDE_EXT = '_longitude'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -150,52 +150,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALTITUDE])) { - $ext = (isset($data[self::FIELD_ALTITUDE_EXT]) && is_array($data[self::FIELD_ALTITUDE_EXT])) - ? $data[self::FIELD_ALTITUDE_EXT] - : null; - if ($data[self::FIELD_ALTITUDE] instanceof FHIRDecimal) { - $this->setAltitude($data[self::FIELD_ALTITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALTITUDE])) { - $this->setAltitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ALTITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_ALTITUDE])) { - $this->setAltitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ALTITUDE]))); - } + if (isset($data[self::FIELD_ALTITUDE]) || isset($data[self::FIELD_ALTITUDE_EXT])) { + if (isset($data[self::FIELD_ALTITUDE])) { + $value = $data[self::FIELD_ALTITUDE]; } else { - $this->setAltitude(new FHIRDecimal($data[self::FIELD_ALTITUDE])); + $value = null; } - } - if (isset($data[self::FIELD_LATITUDE])) { - $ext = (isset($data[self::FIELD_LATITUDE_EXT]) && is_array($data[self::FIELD_LATITUDE_EXT])) - ? $data[self::FIELD_LATITUDE_EXT] - : null; - if ($data[self::FIELD_LATITUDE] instanceof FHIRDecimal) { - $this->setLatitude($data[self::FIELD_LATITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LATITUDE])) { - $this->setLatitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LATITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_LATITUDE])) { - $this->setLatitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LATITUDE]))); - } + if (isset($data[self::FIELD_ALTITUDE_EXT]) && is_array($data[self::FIELD_ALTITUDE_EXT])) { + $ext = $data[self::FIELD_ALTITUDE_EXT]; } else { - $this->setLatitude(new FHIRDecimal($data[self::FIELD_LATITUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAltitude($value); + } else if (is_array($value)) { + $this->setAltitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAltitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAltitude(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_LONGITUDE])) { - $ext = (isset($data[self::FIELD_LONGITUDE_EXT]) && is_array($data[self::FIELD_LONGITUDE_EXT])) - ? $data[self::FIELD_LONGITUDE_EXT] - : null; - if ($data[self::FIELD_LONGITUDE] instanceof FHIRDecimal) { - $this->setLongitude($data[self::FIELD_LONGITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LONGITUDE])) { - $this->setLongitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LONGITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_LONGITUDE])) { - $this->setLongitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LONGITUDE]))); + if (isset($data[self::FIELD_LATITUDE]) || isset($data[self::FIELD_LATITUDE_EXT])) { + if (isset($data[self::FIELD_LATITUDE])) { + $value = $data[self::FIELD_LATITUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LATITUDE_EXT]) && is_array($data[self::FIELD_LATITUDE_EXT])) { + $ext = $data[self::FIELD_LATITUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLatitude($value); + } else if (is_array($value)) { + $this->setLatitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLatitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLatitude(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_LONGITUDE]) || isset($data[self::FIELD_LONGITUDE_EXT])) { + if (isset($data[self::FIELD_LONGITUDE])) { + $value = $data[self::FIELD_LONGITUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LONGITUDE_EXT]) && is_array($data[self::FIELD_LONGITUDE_EXT])) { + $ext = $data[self::FIELD_LONGITUDE_EXT]; } else { - $this->setLongitude(new FHIRDecimal($data[self::FIELD_LONGITUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLongitude($value); + } else if (is_array($value)) { + $this->setLongitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLongitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLongitude(new FHIRDecimal($ext)); } } } @@ -462,25 +483,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAltitude())) { $a[self::FIELD_ALTITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ALTITUDE_EXT] = $enc; } } if (null !== ($v = $this->getLatitude())) { $a[self::FIELD_LATITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LATITUDE_EXT] = $enc; } } if (null !== ($v = $this->getLongitude())) { $a[self::FIELD_LONGITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LONGITUDE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMarketingStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMarketingStatus.php index 9fafd3361b..a976642e09 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMarketingStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMarketingStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRMarketingStatus extends FHIRBackboneElement const FIELD_STATUS = 'status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -211,20 +211,27 @@ public function __construct($data = null) $this->setJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_RESTORE_DATE])) { - $ext = (isset($data[self::FIELD_RESTORE_DATE_EXT]) && is_array($data[self::FIELD_RESTORE_DATE_EXT])) - ? $data[self::FIELD_RESTORE_DATE_EXT] - : null; - if ($data[self::FIELD_RESTORE_DATE] instanceof FHIRDateTime) { - $this->setRestoreDate($data[self::FIELD_RESTORE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESTORE_DATE])) { - $this->setRestoreDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RESTORE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RESTORE_DATE])) { - $this->setRestoreDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RESTORE_DATE]))); - } + if (isset($data[self::FIELD_RESTORE_DATE]) || isset($data[self::FIELD_RESTORE_DATE_EXT])) { + if (isset($data[self::FIELD_RESTORE_DATE])) { + $value = $data[self::FIELD_RESTORE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESTORE_DATE_EXT]) && is_array($data[self::FIELD_RESTORE_DATE_EXT])) { + $ext = $data[self::FIELD_RESTORE_DATE_EXT]; } else { - $this->setRestoreDate(new FHIRDateTime($data[self::FIELD_RESTORE_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRestoreDate($value); + } else if (is_array($value)) { + $this->setRestoreDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRestoreDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRestoreDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_STATUS])) { @@ -577,14 +584,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRestoreDate())) { $a[self::FIELD_RESTORE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RESTORE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponent.php index a1a984558a..3800de8a49 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMeasureComponent extends FHIRBackboneElement const FIELD_DESCRIPTION_EXT = '_description'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -163,20 +163,27 @@ public function __construct($data = null) $this->setCriteria(new FHIRExpression($data[self::FIELD_CRITERIA])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } } @@ -419,11 +426,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php index b6a5002519..14f788c887 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMeasureGroup extends FHIRBackboneElement const FIELD_STRATIFIER = 'stratifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -161,20 +161,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_POPULATION])) { @@ -538,16 +545,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getPopulation())) { - $a[self::FIELD_POPULATION] = $vs; + $a[self::FIELD_POPULATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POPULATION][] = $v; + } } if ([] !== ($vs = $this->getStratifier())) { - $a[self::FIELD_STRATIFIER] = $vs; + $a[self::FIELD_STRATIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRATIFIER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php index ad6bbba18e..792f6bc924 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMeasurePopulation extends FHIRBackboneElement const FIELD_DESCRIPTION_EXT = '_description'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -160,20 +160,27 @@ public function __construct($data = null) $this->setCriteria(new FHIRExpression($data[self::FIELD_CRITERIA])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } } @@ -410,11 +417,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php index 0ced3aba78..1414a80152 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMeasureStratifier extends FHIRBackboneElement const FIELD_DESCRIPTION_EXT = '_description'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -193,20 +193,27 @@ public function __construct($data = null) $this->setCriteria(new FHIRExpression($data[self::FIELD_CRITERIA])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } } @@ -514,18 +521,29 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getComponent())) { - $a[self::FIELD_COMPONENT] = $vs; + $a[self::FIELD_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPONENT][] = $v; + } } if (null !== ($v = $this->getCriteria())) { $a[self::FIELD_CRITERIA] = $v; } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php index 37ac6cf962..eb6468f037 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMeasureSupplementalData extends FHIRBackboneElement const FIELD_USAGE = 'usage'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -181,20 +181,27 @@ public function __construct($data = null) $this->setCriteria(new FHIRExpression($data[self::FIELD_CRITERIA])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_USAGE])) { @@ -541,13 +548,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getUsage())) { - $a[self::FIELD_USAGE] = $vs; + $a[self::FIELD_USAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USAGE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponent.php index 54e4b22e15..8eb95e2478 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMeasureReportComponent extends FHIRBackboneElement const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -319,10 +319,10 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if (null !== ($v = $this->getValue())) { - $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - $a[self::FIELD_VALUE_EXT] = $enc; - } + $a[self::FIELD_VALUE] = $v; + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php index f8cd088cd4..c94bd6f269 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMeasureReportGroup extends FHIRBackboneElement const FIELD_STRATIFIER = 'stratifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -529,10 +529,25 @@ public function jsonSerialize() $a[self::FIELD_MEASURE_SCORE] = $v; } if ([] !== ($vs = $this->getPopulation())) { - $a[self::FIELD_POPULATION] = $vs; + $a[self::FIELD_POPULATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POPULATION][] = $v; + } } if ([] !== ($vs = $this->getStratifier())) { - $a[self::FIELD_STRATIFIER] = $vs; + $a[self::FIELD_STRATIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRATIFIER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php index 09f1e93b39..660b7af167 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMeasureReportPopulation extends FHIRBackboneElement const FIELD_SUBJECT_RESULTS = 'subjectResults'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -152,20 +152,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRInteger) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; } else { - $this->setCount(new FHIRInteger($data[self::FIELD_COUNT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCount(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_SUBJECT_RESULTS])) { @@ -402,14 +409,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } if (null !== ($v = $this->getSubjectResults())) { $a[self::FIELD_SUBJECT_RESULTS] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php index 240eec9875..45bbdeddf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMeasureReportPopulation1 extends FHIRBackboneElement const FIELD_SUBJECT_RESULTS = 'subjectResults'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -152,20 +152,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRInteger) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; } else { - $this->setCount(new FHIRInteger($data[self::FIELD_COUNT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCount(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_SUBJECT_RESULTS])) { @@ -402,14 +409,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } if (null !== ($v = $this->getSubjectResults())) { $a[self::FIELD_SUBJECT_RESULTS] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php index 98600b05a3..7ea2ce8df6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMeasureReportStratifier extends FHIRBackboneElement const FIELD_STRATUM = 'stratum'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -405,10 +405,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getStratum())) { - $a[self::FIELD_STRATUM] = $vs; + $a[self::FIELD_STRATUM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRATUM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php index 616224d71d..83e4881532 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMeasureReportStratum extends FHIRBackboneElement const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The MeasureReport resource contains the results of the calculation of a measure; @@ -523,19 +523,31 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getComponent())) { - $a[self::FIELD_COMPONENT] = $vs; + $a[self::FIELD_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPONENT][] = $v; + } } if (null !== ($v = $this->getMeasureScore())) { $a[self::FIELD_MEASURE_SCORE] = $v; } if ([] !== ($vs = $this->getPopulation())) { - $a[self::FIELD_POPULATION] = $vs; + $a[self::FIELD_POPULATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POPULATION][] = $v; + } } if (null !== ($v = $this->getValue())) { - $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - $a[self::FIELD_VALUE_EXT] = $enc; - } + $a[self::FIELD_VALUE] = $v; + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php index 58babaa467..58003aa78d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMedicationBatch extends FHIRBackboneElement const FIELD_LOT_NUMBER_EXT = '_lotNumber'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -135,36 +135,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPIRATION_DATE])) { - $ext = (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) - ? $data[self::FIELD_EXPIRATION_DATE_EXT] - : null; - if ($data[self::FIELD_EXPIRATION_DATE] instanceof FHIRDateTime) { - $this->setExpirationDate($data[self::FIELD_EXPIRATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRATION_DATE]))); - } + if (isset($data[self::FIELD_EXPIRATION_DATE]) || isset($data[self::FIELD_EXPIRATION_DATE_EXT])) { + if (isset($data[self::FIELD_EXPIRATION_DATE])) { + $value = $data[self::FIELD_EXPIRATION_DATE]; } else { - $this->setExpirationDate(new FHIRDateTime($data[self::FIELD_EXPIRATION_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); + if (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) { + $ext = $data[self::FIELD_EXPIRATION_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpirationDate($value); + } else if (is_array($value)) { + $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpirationDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); } } } @@ -373,18 +387,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpirationDate())) { $a[self::FIELD_EXPIRATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRATION_DATE_EXT] = $enc; } } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php index e6cb940fed..319002e364 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMedicationIngredient extends FHIRBackboneElement const FIELD_STRENGTH = 'strength'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -163,20 +163,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IS_ACTIVE])) { - $ext = (isset($data[self::FIELD_IS_ACTIVE_EXT]) && is_array($data[self::FIELD_IS_ACTIVE_EXT])) - ? $data[self::FIELD_IS_ACTIVE_EXT] - : null; - if ($data[self::FIELD_IS_ACTIVE] instanceof FHIRBoolean) { - $this->setIsActive($data[self::FIELD_IS_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_ACTIVE])) { - $this->setIsActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_IS_ACTIVE])) { - $this->setIsActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_ACTIVE]))); - } + if (isset($data[self::FIELD_IS_ACTIVE]) || isset($data[self::FIELD_IS_ACTIVE_EXT])) { + if (isset($data[self::FIELD_IS_ACTIVE])) { + $value = $data[self::FIELD_IS_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_ACTIVE_EXT]) && is_array($data[self::FIELD_IS_ACTIVE_EXT])) { + $ext = $data[self::FIELD_IS_ACTIVE_EXT]; } else { - $this->setIsActive(new FHIRBoolean($data[self::FIELD_IS_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsActive($value); + } else if (is_array($value)) { + $this->setIsActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ITEM_CODEABLE_CONCEPT])) { @@ -468,8 +475,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIsActive())) { $a[self::FIELD_IS_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_ACTIVE_EXT] = $enc; } } @@ -482,6 +491,9 @@ public function jsonSerialize() if (null !== ($v = $this->getStrength())) { $a[self::FIELD_STRENGTH] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php index a96b7eb308..4c072a4e19 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRMedicationAdministrationDosage extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -264,20 +264,27 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -716,11 +723,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php index 74ffe5843d..d88b594962 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMedicationAdministrationPerformer extends FHIRBackboneElement const FIELD_FUNCTION = 'function'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getFunction())) { $a[self::FIELD_FUNCTION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php index ced6993432..af9d2b8ca8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicationDispensePerformer extends FHIRBackboneElement const FIELD_FUNCTION = 'function'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -326,6 +326,9 @@ public function jsonSerialize() if (null !== ($v = $this->getFunction())) { $a[self::FIELD_FUNCTION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php index 375b6e4774..19fdefa7ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMedicationDispenseSubstitution extends FHIRBackboneElement const FIELD_WAS_SUBSTITUTED_EXT = '_wasSubstituted'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -204,20 +204,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_WAS_SUBSTITUTED])) { - $ext = (isset($data[self::FIELD_WAS_SUBSTITUTED_EXT]) && is_array($data[self::FIELD_WAS_SUBSTITUTED_EXT])) - ? $data[self::FIELD_WAS_SUBSTITUTED_EXT] - : null; - if ($data[self::FIELD_WAS_SUBSTITUTED] instanceof FHIRBoolean) { - $this->setWasSubstituted($data[self::FIELD_WAS_SUBSTITUTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WAS_SUBSTITUTED])) { - $this->setWasSubstituted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WAS_SUBSTITUTED]] + $ext)); - } else if (is_array($data[self::FIELD_WAS_SUBSTITUTED])) { - $this->setWasSubstituted(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WAS_SUBSTITUTED]))); - } + if (isset($data[self::FIELD_WAS_SUBSTITUTED]) || isset($data[self::FIELD_WAS_SUBSTITUTED_EXT])) { + if (isset($data[self::FIELD_WAS_SUBSTITUTED])) { + $value = $data[self::FIELD_WAS_SUBSTITUTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WAS_SUBSTITUTED_EXT]) && is_array($data[self::FIELD_WAS_SUBSTITUTED_EXT])) { + $ext = $data[self::FIELD_WAS_SUBSTITUTED_EXT]; } else { - $this->setWasSubstituted(new FHIRBoolean($data[self::FIELD_WAS_SUBSTITUTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWasSubstituted($value); + } else if (is_array($value)) { + $this->setWasSubstituted(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWasSubstituted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWasSubstituted(new FHIRBoolean($ext)); } } } @@ -551,21 +558,38 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getResponsibleParty())) { - $a[self::FIELD_RESPONSIBLE_PARTY] = $vs; + $a[self::FIELD_RESPONSIBLE_PARTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESPONSIBLE_PARTY][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getWasSubstituted())) { $a[self::FIELD_WAS_SUBSTITUTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WAS_SUBSTITUTED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelines.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelines.php index d810023692..b79674ac04 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelines.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelines.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRMedicationKnowledgeAdministrationGuidelines extends FHIRBackboneElemen const FIELD_PATIENT_CHARACTERISTICS = 'patientCharacteristics'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Information about a medication that is used to support knowledge. @@ -504,7 +504,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if (null !== ($v = $this->getIndicationCodeableConcept())) { $a[self::FIELD_INDICATION_CODEABLE_CONCEPT] = $v; @@ -513,7 +519,16 @@ public function jsonSerialize() $a[self::FIELD_INDICATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getPatientCharacteristics())) { - $a[self::FIELD_PATIENT_CHARACTERISTICS] = $vs; + $a[self::FIELD_PATIENT_CHARACTERISTICS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PATIENT_CHARACTERISTICS][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCost.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCost.php index d120809837..43c9cb9e2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCost.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCost.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicationKnowledgeCost extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -151,20 +151,27 @@ public function __construct($data = null) $this->setCost(new FHIRMoney($data[self::FIELD_COST])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRString) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRString(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; } else { - $this->setSource(new FHIRString($data[self::FIELD_SOURCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSource(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -401,14 +408,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosage.php index c537030bcf..d6d4367868 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationKnowledgeDosage extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Indicates how the medication is/was taken or should be taken by the patient. @@ -360,11 +360,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristic.php index c613b35abb..37263d728d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMedicationKnowledgeDrugCharacteristic extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -180,20 +180,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -210,20 +217,27 @@ public function __construct($data = null) $this->setValueQuantity(new FHIRQuantity($data[self::FIELD_VALUE_QUANTITY])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -547,8 +561,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } @@ -560,11 +576,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredient.php index 04be57a116..f2f82db35e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMedicationKnowledgeIngredient extends FHIRBackboneElement const FIELD_STRENGTH = 'strength'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -161,20 +161,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IS_ACTIVE])) { - $ext = (isset($data[self::FIELD_IS_ACTIVE_EXT]) && is_array($data[self::FIELD_IS_ACTIVE_EXT])) - ? $data[self::FIELD_IS_ACTIVE_EXT] - : null; - if ($data[self::FIELD_IS_ACTIVE] instanceof FHIRBoolean) { - $this->setIsActive($data[self::FIELD_IS_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_ACTIVE])) { - $this->setIsActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_IS_ACTIVE])) { - $this->setIsActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_ACTIVE]))); - } + if (isset($data[self::FIELD_IS_ACTIVE]) || isset($data[self::FIELD_IS_ACTIVE_EXT])) { + if (isset($data[self::FIELD_IS_ACTIVE])) { + $value = $data[self::FIELD_IS_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_ACTIVE_EXT]) && is_array($data[self::FIELD_IS_ACTIVE_EXT])) { + $ext = $data[self::FIELD_IS_ACTIVE_EXT]; } else { - $this->setIsActive(new FHIRBoolean($data[self::FIELD_IS_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsActive($value); + } else if (is_array($value)) { + $this->setIsActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ITEM_CODEABLE_CONCEPT])) { @@ -466,8 +473,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIsActive())) { $a[self::FIELD_IS_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_ACTIVE_EXT] = $enc; } } @@ -480,6 +489,9 @@ public function jsonSerialize() if (null !== ($v = $this->getStrength())) { $a[self::FIELD_STRENGTH] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKinetics.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKinetics.php index 91bc508132..099a071929 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKinetics.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKinetics.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicationKnowledgeKinetics extends FHIRBackboneElement const FIELD_LETHAL_DOSE_50 = 'lethalDose50'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -471,13 +471,28 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAreaUnderCurve())) { - $a[self::FIELD_AREA_UNDER_CURVE] = $vs; + $a[self::FIELD_AREA_UNDER_CURVE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AREA_UNDER_CURVE][] = $v; + } } if (null !== ($v = $this->getHalfLifePeriod())) { $a[self::FIELD_HALF_LIFE_PERIOD] = $v; } if ([] !== ($vs = $this->getLethalDose50())) { - $a[self::FIELD_LETHAL_DOSE_50] = $vs; + $a[self::FIELD_LETHAL_DOSE_50] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LETHAL_DOSE_50][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispense.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispense.php index 13562dd8a9..ab12ce210e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationKnowledgeMaxDispense extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A length of time. @@ -320,6 +320,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassification.php index 3b6e01c20e..d0c9c83625 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRMedicationKnowledgeMedicineClassification extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -366,11 +366,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getClassification())) { - $a[self::FIELD_CLASSIFICATION] = $vs; + $a[self::FIELD_CLASSIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CLASSIFICATION][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgram.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgram.php index a34f574b72..dd94eb3577 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgram.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgram.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicationKnowledgeMonitoringProgram extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -339,14 +346,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonograph.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonograph.php index 1b5cd30daf..72c6f6de00 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonograph.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonograph.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationKnowledgeMonograph extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -320,6 +320,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackaging.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackaging.php index 6ce06ff8d5..696bab44a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackaging.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationKnowledgePackaging extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -326,6 +326,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristics.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristics.php index fda87efe5a..99848decd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristics.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristics.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicationKnowledgePatientCharacteristics extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -161,33 +161,42 @@ public function __construct($data = null) $this->setCharacteristicQuantity(new FHIRQuantity($data[self::FIELD_CHARACTERISTIC_QUANTITY])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if (is_array($data[self::FIELD_VALUE])) { - foreach($data[self::FIELD_VALUE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addValue($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addValue(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addValue(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addValue($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addValue($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addValue(new FHIRString(array_merge($v, $iext))); + } else { + $this->addValue(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addValue(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->addValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addValue(new FHIRString($iext)); } - } elseif ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->addValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_VALUE])) { - $this->addValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else { - $this->addValue(new FHIRString($data[self::FIELD_VALUE])); } } } @@ -451,18 +460,29 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getValue())) { $a[self::FIELD_VALUE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_VALUE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_VALUE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_VALUE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_VALUE_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatory.php index 2ac4949d6f..3150684ca5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicationKnowledgeRegulatory extends FHIRBackboneElement const FIELD_SUBSTITUTION = 'substitution'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Information about a medication that is used to support knowledge. @@ -494,10 +494,25 @@ public function jsonSerialize() $a[self::FIELD_REGULATORY_AUTHORITY] = $v; } if ([] !== ($vs = $this->getSchedule())) { - $a[self::FIELD_SCHEDULE] = $vs; + $a[self::FIELD_SCHEDULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SCHEDULE][] = $v; + } } if ([] !== ($vs = $this->getSubstitution())) { - $a[self::FIELD_SUBSTITUTION] = $vs; + $a[self::FIELD_SUBSTITUTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBSTITUTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledge.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledge.php index 032a7673d4..4f379074ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledge.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRMedicationKnowledgeRelatedMedicationKnowledge extends FHIRBackboneElem const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -360,11 +360,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReference())) { - $a[self::FIELD_REFERENCE] = $vs; + $a[self::FIELD_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSchedule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSchedule.php index 6fc0361804..14a1dd3a77 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRMedicationKnowledgeSchedule extends FHIRBackboneElement const FIELD_SCHEDULE = 'schedule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -258,6 +258,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSchedule())) { $a[self::FIELD_SCHEDULE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitution.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitution.php index 0ab628b164..a8e18bcc2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicationKnowledgeSubstitution extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -129,20 +129,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALLOWED])) { - $ext = (isset($data[self::FIELD_ALLOWED_EXT]) && is_array($data[self::FIELD_ALLOWED_EXT])) - ? $data[self::FIELD_ALLOWED_EXT] - : null; - if ($data[self::FIELD_ALLOWED] instanceof FHIRBoolean) { - $this->setAllowed($data[self::FIELD_ALLOWED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED])) { - $this->setAllowed(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALLOWED]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED])) { - $this->setAllowed(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALLOWED]))); - } + if (isset($data[self::FIELD_ALLOWED]) || isset($data[self::FIELD_ALLOWED_EXT])) { + if (isset($data[self::FIELD_ALLOWED])) { + $value = $data[self::FIELD_ALLOWED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALLOWED_EXT]) && is_array($data[self::FIELD_ALLOWED_EXT])) { + $ext = $data[self::FIELD_ALLOWED_EXT]; } else { - $this->setAllowed(new FHIRBoolean($data[self::FIELD_ALLOWED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllowed($value); + } else if (is_array($value)) { + $this->setAllowed(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllowed(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllowed(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -336,14 +343,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllowed())) { $a[self::FIELD_ALLOWED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALLOWED_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php index d16569034c..b3fd296e6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRMedicationRequestDispenseRequest extends FHIRBackboneElement const FIELD_VALIDITY_PERIOD = 'validityPeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A length of time. @@ -229,20 +229,27 @@ public function __construct($data = null) $this->setInitialFill(new FHIRMedicationRequestInitialFill($data[self::FIELD_INITIAL_FILL])); } } - if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]) && is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) - ? $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] instanceof FHIRUnsignedInt) { - $this->setNumberOfRepeatsAllowed($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $this->setNumberOfRepeatsAllowed(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $this->setNumberOfRepeatsAllowed(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]))); - } + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]) || isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $value = $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]) && is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]; } else { - $this->setNumberOfRepeatsAllowed(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfRepeatsAllowed($value); + } else if (is_array($value)) { + $this->setNumberOfRepeatsAllowed(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfRepeatsAllowed(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfRepeatsAllowed(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -663,8 +670,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumberOfRepeatsAllowed())) { $a[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT] = $enc; } } @@ -677,6 +686,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValidityPeriod())) { $a[self::FIELD_VALIDITY_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFill.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFill.php index 1db60ca3ae..1aa97320cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFill.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFill.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMedicationRequestInitialFill extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A length of time. @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php index feb731dfed..ed71ed0766 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRMedicationRequestSubstitution extends FHIRBackboneElement const FIELD_REASON = 'reason'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -149,20 +149,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALLOWED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_ALLOWED_BOOLEAN_EXT]) && is_array($data[self::FIELD_ALLOWED_BOOLEAN_EXT])) - ? $data[self::FIELD_ALLOWED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_ALLOWED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAllowedBoolean($data[self::FIELD_ALLOWED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED_BOOLEAN])) { - $this->setAllowedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALLOWED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED_BOOLEAN])) { - $this->setAllowedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALLOWED_BOOLEAN]))); - } + if (isset($data[self::FIELD_ALLOWED_BOOLEAN]) || isset($data[self::FIELD_ALLOWED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_ALLOWED_BOOLEAN])) { + $value = $data[self::FIELD_ALLOWED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALLOWED_BOOLEAN_EXT]) && is_array($data[self::FIELD_ALLOWED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_ALLOWED_BOOLEAN_EXT]; } else { - $this->setAllowedBoolean(new FHIRBoolean($data[self::FIELD_ALLOWED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllowedBoolean($value); + } else if (is_array($value)) { + $this->setAllowedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllowedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllowedBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ALLOWED_CODEABLE_CONCEPT])) { @@ -407,8 +414,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllowedBoolean())) { $a[self::FIELD_ALLOWED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALLOWED_BOOLEAN_EXT] = $enc; } } @@ -418,6 +427,9 @@ public function jsonSerialize() if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguage.php index 18b39513f7..5d353d1a4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicinalProductCountryLanguage extends FHIRBackboneElement const FIELD_LANGUAGE = 'language'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -381,6 +381,9 @@ public function jsonSerialize() if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperation.php index 0e35a606fd..100a0dc205 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRMedicinalProductManufacturingBusinessOperation extends FHIRBackboneEle const FIELD_REGULATOR = 'regulator'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An identifier - identifies some entity uniquely and unambiguously. Typically @@ -200,20 +200,27 @@ public function __construct($data = null) $this->setConfidentialityIndicator(new FHIRCodeableConcept($data[self::FIELD_CONFIDENTIALITY_INDICATOR])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE] instanceof FHIRDateTime) { - $this->setEffectiveDate($data[self::FIELD_EFFECTIVE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE])) { - $this->setEffectiveDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE])) { - $this->setEffectiveDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE]) || isset($data[self::FIELD_EFFECTIVE_DATE_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE])) { + $value = $data[self::FIELD_EFFECTIVE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_EXT]; } else { - $this->setEffectiveDate(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDate($value); + } else if (is_array($value)) { + $this->setEffectiveDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_MANUFACTURER])) { @@ -627,13 +634,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getEffectiveDate())) { $a[self::FIELD_EFFECTIVE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getManufacturer())) { - $a[self::FIELD_MANUFACTURER] = $vs; + $a[self::FIELD_MANUFACTURER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANUFACTURER][] = $v; + } } if (null !== ($v = $this->getOperationType())) { $a[self::FIELD_OPERATION_TYPE] = $v; @@ -641,6 +656,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRegulator())) { $a[self::FIELD_REGULATOR] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductName.php index f754c8df7f..806221e794 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRMedicinalProductName extends FHIRBackboneElement const FIELD_PRODUCT_NAME_EXT = '_productName'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Detailed definition of a medicinal product, typically for uses other than direct @@ -175,20 +175,27 @@ public function __construct($data = null) $this->addNamePart(new FHIRMedicinalProductNamePart($data[self::FIELD_NAME_PART])); } } - if (isset($data[self::FIELD_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_PRODUCT_NAME] instanceof FHIRString) { - $this->setProductName($data[self::FIELD_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRODUCT_NAME])) { - $this->setProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_PRODUCT_NAME])) { - $this->setProductName(new FHIRString(array_merge($ext, $data[self::FIELD_PRODUCT_NAME]))); - } + if (isset($data[self::FIELD_PRODUCT_NAME]) || isset($data[self::FIELD_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_PRODUCT_NAME])) { + $value = $data[self::FIELD_PRODUCT_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_PRODUCT_NAME_EXT]; } else { - $this->setProductName(new FHIRString($data[self::FIELD_PRODUCT_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setProductName($value); + } else if (is_array($value)) { + $this->setProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProductName(new FHIRString($ext)); } } } @@ -470,18 +477,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCountryLanguage())) { - $a[self::FIELD_COUNTRY_LANGUAGE] = $vs; + $a[self::FIELD_COUNTRY_LANGUAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COUNTRY_LANGUAGE][] = $v; + } } if ([] !== ($vs = $this->getNamePart())) { - $a[self::FIELD_NAME_PART] = $vs; + $a[self::FIELD_NAME_PART] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME_PART][] = $v; + } } if (null !== ($v = $this->getProductName())) { $a[self::FIELD_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PRODUCT_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePart.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePart.php index 4356b7d3b4..85640ad62b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePart.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePart.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRMedicinalProductNamePart extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_PART])) { - $ext = (isset($data[self::FIELD_PART_EXT]) && is_array($data[self::FIELD_PART_EXT])) - ? $data[self::FIELD_PART_EXT] - : null; - if ($data[self::FIELD_PART] instanceof FHIRString) { - $this->setPart($data[self::FIELD_PART]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PART])) { - $this->setPart(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PART]] + $ext)); - } else if (is_array($data[self::FIELD_PART])) { - $this->setPart(new FHIRString(array_merge($ext, $data[self::FIELD_PART]))); - } + if (isset($data[self::FIELD_PART]) || isset($data[self::FIELD_PART_EXT])) { + if (isset($data[self::FIELD_PART])) { + $value = $data[self::FIELD_PART]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PART_EXT]) && is_array($data[self::FIELD_PART_EXT])) { + $ext = $data[self::FIELD_PART_EXT]; } else { - $this->setPart(new FHIRString($data[self::FIELD_PART])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPart($value); + } else if (is_array($value)) { + $this->setPart(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPart(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPart(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -337,14 +344,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getPart())) { $a[self::FIELD_PART] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PART_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignation.php index d73afa56c5..dbf3f35e31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicinalProductSpecialDesignation extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -215,20 +215,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -747,13 +754,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIndicationCodeableConcept())) { $a[self::FIELD_INDICATION_CODEABLE_CONCEPT] = $v; @@ -773,6 +788,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorization.php index 5fd81efaf6..edd0d9eb4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMedicinalProductAuthorizationJurisdictionalAuthorization extends FHIRB const FIELD_VALIDITY_PERIOD = 'validityPeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -580,10 +580,22 @@ public function jsonSerialize() $a[self::FIELD_COUNTRY] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLegalStatusOfSupply())) { $a[self::FIELD_LEGAL_STATUS_OF_SUPPLY] = $v; @@ -591,6 +603,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValidityPeriod())) { $a[self::FIELD_VALIDITY_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedure.php index 77bb59a2a2..5551aa6deb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRMedicinalProductAuthorizationProcedure extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The regulatory authorization of a medicinal product. @@ -188,20 +188,27 @@ public function __construct($data = null) $this->addApplication(new FHIRMedicinalProductAuthorizationProcedure($data[self::FIELD_APPLICATION])); } } - if (isset($data[self::FIELD_DATE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateDateTime($data[self::FIELD_DATE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_DATE_TIME])) { - $this->setDateDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_DATE_TIME])) { - $this->setDateDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_DATE_TIME]) || isset($data[self::FIELD_DATE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_DATE_TIME])) { + $value = $data[self::FIELD_DATE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_DATE_TIME_EXT]; } else { - $this->setDateDateTime(new FHIRDateTime($data[self::FIELD_DATE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateDateTime($value); + } else if (is_array($value)) { + $this->setDateDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DATE_PERIOD])) { @@ -553,12 +560,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getApplication())) { - $a[self::FIELD_APPLICATION] = $vs; + $a[self::FIELD_APPLICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_APPLICATION][] = $v; + } } if (null !== ($v = $this->getDateDateTime())) { $a[self::FIELD_DATE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_DATE_TIME_EXT] = $enc; } } @@ -571,6 +586,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapy.php index 9a7c8285f5..d258da76f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRMedicinalProductContraindicationOtherTherapy extends FHIRBackboneEleme const FIELD_THERAPY_RELATIONSHIP_TYPE = 'therapyRelationshipType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -394,6 +394,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTherapyRelationshipType())) { $a[self::FIELD_THERAPY_RELATIONSHIP_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapy.php index 1fcfa6048d..ae792f988d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicinalProductIndicationOtherTherapy extends FHIRBackboneElement const FIELD_THERAPY_RELATIONSHIP_TYPE = 'therapyRelationshipType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -393,6 +393,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTherapyRelationshipType())) { $a[self::FIELD_THERAPY_RELATIONSHIP_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrength.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrength.php index bb47b58cf7..cc6bc10b63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMedicinalProductIngredientReferenceStrength extends FHIRBackboneElemen const FIELD_SUBSTANCE = 'substance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -188,20 +188,27 @@ public function __construct($data = null) $this->addCountry(new FHIRCodeableConcept($data[self::FIELD_COUNTRY])); } } - if (isset($data[self::FIELD_MEASUREMENT_POINT])) { - $ext = (isset($data[self::FIELD_MEASUREMENT_POINT_EXT]) && is_array($data[self::FIELD_MEASUREMENT_POINT_EXT])) - ? $data[self::FIELD_MEASUREMENT_POINT_EXT] - : null; - if ($data[self::FIELD_MEASUREMENT_POINT] instanceof FHIRString) { - $this->setMeasurementPoint($data[self::FIELD_MEASUREMENT_POINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEASUREMENT_POINT])) { - $this->setMeasurementPoint(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MEASUREMENT_POINT]] + $ext)); - } else if (is_array($data[self::FIELD_MEASUREMENT_POINT])) { - $this->setMeasurementPoint(new FHIRString(array_merge($ext, $data[self::FIELD_MEASUREMENT_POINT]))); - } + if (isset($data[self::FIELD_MEASUREMENT_POINT]) || isset($data[self::FIELD_MEASUREMENT_POINT_EXT])) { + if (isset($data[self::FIELD_MEASUREMENT_POINT])) { + $value = $data[self::FIELD_MEASUREMENT_POINT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MEASUREMENT_POINT_EXT]) && is_array($data[self::FIELD_MEASUREMENT_POINT_EXT])) { + $ext = $data[self::FIELD_MEASUREMENT_POINT_EXT]; } else { - $this->setMeasurementPoint(new FHIRString($data[self::FIELD_MEASUREMENT_POINT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMeasurementPoint($value); + } else if (is_array($value)) { + $this->setMeasurementPoint(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMeasurementPoint(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeasurementPoint(new FHIRString($ext)); } } if (isset($data[self::FIELD_STRENGTH])) { @@ -558,12 +565,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCountry())) { - $a[self::FIELD_COUNTRY] = $vs; + $a[self::FIELD_COUNTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COUNTRY][] = $v; + } } if (null !== ($v = $this->getMeasurementPoint())) { $a[self::FIELD_MEASUREMENT_POINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MEASUREMENT_POINT_EXT] = $enc; } } @@ -576,6 +591,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubstance())) { $a[self::FIELD_SUBSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstance.php index 857bb5967a..fc06ac22cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicinalProductIngredientSpecifiedSubstance extends FHIRBackboneEleme const FIELD_STRENGTH = 'strength'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -476,7 +476,16 @@ public function jsonSerialize() $a[self::FIELD_GROUP] = $v; } if ([] !== ($vs = $this->getStrength())) { - $a[self::FIELD_STRENGTH] = $vs; + $a[self::FIELD_STRENGTH] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRENGTH][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrength.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrength.php index 3487cfe69b..2b763064c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMedicinalProductIngredientStrength extends FHIRBackboneElement const FIELD_REFERENCE_STRENGTH = 'referenceStrength'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A relationship of two Quantity values - expressed as a numerator and a @@ -229,20 +229,27 @@ public function __construct($data = null) $this->addCountry(new FHIRCodeableConcept($data[self::FIELD_COUNTRY])); } } - if (isset($data[self::FIELD_MEASUREMENT_POINT])) { - $ext = (isset($data[self::FIELD_MEASUREMENT_POINT_EXT]) && is_array($data[self::FIELD_MEASUREMENT_POINT_EXT])) - ? $data[self::FIELD_MEASUREMENT_POINT_EXT] - : null; - if ($data[self::FIELD_MEASUREMENT_POINT] instanceof FHIRString) { - $this->setMeasurementPoint($data[self::FIELD_MEASUREMENT_POINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEASUREMENT_POINT])) { - $this->setMeasurementPoint(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MEASUREMENT_POINT]] + $ext)); - } else if (is_array($data[self::FIELD_MEASUREMENT_POINT])) { - $this->setMeasurementPoint(new FHIRString(array_merge($ext, $data[self::FIELD_MEASUREMENT_POINT]))); - } + if (isset($data[self::FIELD_MEASUREMENT_POINT]) || isset($data[self::FIELD_MEASUREMENT_POINT_EXT])) { + if (isset($data[self::FIELD_MEASUREMENT_POINT])) { + $value = $data[self::FIELD_MEASUREMENT_POINT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MEASUREMENT_POINT_EXT]) && is_array($data[self::FIELD_MEASUREMENT_POINT_EXT])) { + $ext = $data[self::FIELD_MEASUREMENT_POINT_EXT]; } else { - $this->setMeasurementPoint(new FHIRString($data[self::FIELD_MEASUREMENT_POINT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMeasurementPoint($value); + } else if (is_array($value)) { + $this->setMeasurementPoint(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMeasurementPoint(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeasurementPoint(new FHIRString($ext)); } } if (isset($data[self::FIELD_PRESENTATION])) { @@ -725,12 +732,20 @@ public function jsonSerialize() $a[self::FIELD_CONCENTRATION_LOW_LIMIT] = $v; } if ([] !== ($vs = $this->getCountry())) { - $a[self::FIELD_COUNTRY] = $vs; + $a[self::FIELD_COUNTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COUNTRY][] = $v; + } } if (null !== ($v = $this->getMeasurementPoint())) { $a[self::FIELD_MEASUREMENT_POINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MEASUREMENT_POINT_EXT] = $enc; } } @@ -741,7 +756,16 @@ public function jsonSerialize() $a[self::FIELD_PRESENTATION_LOW_LIMIT] = $v; } if ([] !== ($vs = $this->getReferenceStrength())) { - $a[self::FIELD_REFERENCE_STRENGTH] = $vs; + $a[self::FIELD_REFERENCE_STRENGTH] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_STRENGTH][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstance.php index dff690c138..52d82a9bdf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRMedicinalProductIngredientSubstance extends FHIRBackboneElement const FIELD_STRENGTH = 'strength'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -354,7 +354,16 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getStrength())) { - $a[self::FIELD_STRENGTH] = $vs; + $a[self::FIELD_STRENGTH] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRENGTH][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractant.php index 759ab5b97f..f1b1f86a83 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicinalProductInteractionInteractant extends FHIRBackboneElement const FIELD_ITEM_REFERENCE = 'itemReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItemReference())) { $a[self::FIELD_ITEM_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifier.php index f272c1ffd2..943b93cf54 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRMedicinalProductPackagedBatchIdentifier extends FHIRBackboneElement const FIELD_OUTER_PACKAGING = 'outerPackaging'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An identifier - identifies some entity uniquely and unambiguously. Typically @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOuterPackaging())) { $a[self::FIELD_OUTER_PACKAGING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItem.php index 4cfc8b3d58..46dfb3e4c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRMedicinalProductPackagedPackageItem extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -1286,28 +1286,76 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAlternateMaterial())) { - $a[self::FIELD_ALTERNATE_MATERIAL] = $vs; + $a[self::FIELD_ALTERNATE_MATERIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ALTERNATE_MATERIAL][] = $v; + } } if ([] !== ($vs = $this->getDevice())) { - $a[self::FIELD_DEVICE] = $vs; + $a[self::FIELD_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEVICE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getManufacturedItem())) { - $a[self::FIELD_MANUFACTURED_ITEM] = $vs; + $a[self::FIELD_MANUFACTURED_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANUFACTURED_ITEM][] = $v; + } } if ([] !== ($vs = $this->getManufacturer())) { - $a[self::FIELD_MANUFACTURER] = $vs; + $a[self::FIELD_MANUFACTURER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANUFACTURER][] = $v; + } } if ([] !== ($vs = $this->getMaterial())) { - $a[self::FIELD_MATERIAL] = $vs; + $a[self::FIELD_MATERIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MATERIAL][] = $v; + } } if ([] !== ($vs = $this->getOtherCharacteristics())) { - $a[self::FIELD_OTHER_CHARACTERISTICS] = $vs; + $a[self::FIELD_OTHER_CHARACTERISTICS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OTHER_CHARACTERISTICS][] = $v; + } } if ([] !== ($vs = $this->getPackageItem())) { - $a[self::FIELD_PACKAGE_ITEM] = $vs; + $a[self::FIELD_PACKAGE_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PACKAGE_ITEM][] = $v; + } } if (null !== ($v = $this->getPhysicalCharacteristics())) { $a[self::FIELD_PHYSICAL_CHARACTERISTICS] = $v; @@ -1316,11 +1364,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getShelfLifeStorage())) { - $a[self::FIELD_SHELF_LIFE_STORAGE] = $vs; + $a[self::FIELD_SHELF_LIFE_STORAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SHELF_LIFE_STORAGE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristics.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristics.php index d48541fe21..f089c25135 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristics.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristics.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRMedicinalProductPharmaceuticalCharacteristics extends FHIRBackboneElem const FIELD_STATUS = 'status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministration.php index d6b539f9ae..d501aeba79 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMedicinalProductPharmaceuticalRouteOfAdministration extends FHIRBackbo const FIELD_TARGET_SPECIES = 'targetSpecies'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -691,7 +691,16 @@ public function jsonSerialize() $a[self::FIELD_MAX_TREATMENT_PERIOD] = $v; } if ([] !== ($vs = $this->getTargetSpecies())) { - $a[self::FIELD_TARGET_SPECIES] = $vs; + $a[self::FIELD_TARGET_SPECIES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET_SPECIES][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpecies.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpecies.php index 5649377797..1e493e52eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpecies.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpecies.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRMedicinalProductPharmaceuticalTargetSpecies extends FHIRBackboneElemen const FIELD_WITHDRAWAL_PERIOD = 'withdrawalPeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -354,7 +354,16 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getWithdrawalPeriod())) { - $a[self::FIELD_WITHDRAWAL_PERIOD] = $vs; + $a[self::FIELD_WITHDRAWAL_PERIOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_WITHDRAWAL_PERIOD][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriod.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriod.php index b890ea8e15..509e13f58d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicinalProductPharmaceuticalWithdrawalPeriod extends FHIRBackboneEle const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -146,20 +146,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_SUPPORTING_INFORMATION])) { - $ext = (isset($data[self::FIELD_SUPPORTING_INFORMATION_EXT]) && is_array($data[self::FIELD_SUPPORTING_INFORMATION_EXT])) - ? $data[self::FIELD_SUPPORTING_INFORMATION_EXT] - : null; - if ($data[self::FIELD_SUPPORTING_INFORMATION] instanceof FHIRString) { - $this->setSupportingInformation($data[self::FIELD_SUPPORTING_INFORMATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUPPORTING_INFORMATION])) { - $this->setSupportingInformation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUPPORTING_INFORMATION]] + $ext)); - } else if (is_array($data[self::FIELD_SUPPORTING_INFORMATION])) { - $this->setSupportingInformation(new FHIRString(array_merge($ext, $data[self::FIELD_SUPPORTING_INFORMATION]))); - } + if (isset($data[self::FIELD_SUPPORTING_INFORMATION]) || isset($data[self::FIELD_SUPPORTING_INFORMATION_EXT])) { + if (isset($data[self::FIELD_SUPPORTING_INFORMATION])) { + $value = $data[self::FIELD_SUPPORTING_INFORMATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUPPORTING_INFORMATION_EXT]) && is_array($data[self::FIELD_SUPPORTING_INFORMATION_EXT])) { + $ext = $data[self::FIELD_SUPPORTING_INFORMATION_EXT]; } else { - $this->setSupportingInformation(new FHIRString($data[self::FIELD_SUPPORTING_INFORMATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSupportingInformation($value); + } else if (is_array($value)) { + $this->setSupportingInformation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSupportingInformation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSupportingInformation(new FHIRString($ext)); } } if (isset($data[self::FIELD_TISSUE])) { @@ -405,8 +412,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getSupportingInformation())) { $a[self::FIELD_SUPPORTING_INFORMATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUPPORTING_INFORMATION_EXT] = $enc; } } @@ -414,10 +423,10 @@ public function jsonSerialize() $a[self::FIELD_TISSUE] = $v; } if (null !== ($v = $this->getValue())) { - $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - $a[self::FIELD_VALUE_EXT] = $enc; - } + $a[self::FIELD_VALUE] = $v; + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php index 3ad53d36e4..7dc789e287 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRMessageDefinitionAllowedResponse extends FHIRBackboneElement const FIELD_SITUATION_EXT = '_situation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -139,36 +139,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MESSAGE])) { - $ext = (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) - ? $data[self::FIELD_MESSAGE_EXT] - : null; - if ($data[self::FIELD_MESSAGE] instanceof FHIRCanonical) { - $this->setMessage($data[self::FIELD_MESSAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_MESSAGE]] + $ext)); - } else if (is_array($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRCanonical(array_merge($ext, $data[self::FIELD_MESSAGE]))); - } + if (isset($data[self::FIELD_MESSAGE]) || isset($data[self::FIELD_MESSAGE_EXT])) { + if (isset($data[self::FIELD_MESSAGE])) { + $value = $data[self::FIELD_MESSAGE]; } else { - $this->setMessage(new FHIRCanonical($data[self::FIELD_MESSAGE])); + $value = null; } - } - if (isset($data[self::FIELD_SITUATION])) { - $ext = (isset($data[self::FIELD_SITUATION_EXT]) && is_array($data[self::FIELD_SITUATION_EXT])) - ? $data[self::FIELD_SITUATION_EXT] - : null; - if ($data[self::FIELD_SITUATION] instanceof FHIRMarkdown) { - $this->setSituation($data[self::FIELD_SITUATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SITUATION])) { - $this->setSituation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_SITUATION]] + $ext)); - } else if (is_array($data[self::FIELD_SITUATION])) { - $this->setSituation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_SITUATION]))); + if (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) { + $ext = $data[self::FIELD_MESSAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setMessage($value); + } else if (is_array($value)) { + $this->setMessage(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setMessage(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMessage(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_SITUATION]) || isset($data[self::FIELD_SITUATION_EXT])) { + if (isset($data[self::FIELD_SITUATION])) { + $value = $data[self::FIELD_SITUATION]; } else { - $this->setSituation(new FHIRMarkdown($data[self::FIELD_SITUATION])); + $value = null; + } + if (isset($data[self::FIELD_SITUATION_EXT]) && is_array($data[self::FIELD_SITUATION_EXT])) { + $ext = $data[self::FIELD_SITUATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setSituation($value); + } else if (is_array($value)) { + $this->setSituation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setSituation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSituation(new FHIRMarkdown($ext)); } } } @@ -385,18 +399,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMessage())) { $a[self::FIELD_MESSAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_MESSAGE_EXT] = $enc; } } if (null !== ($v = $this->getSituation())) { $a[self::FIELD_SITUATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_SITUATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php index 1f23564d66..05f960d477 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMessageDefinitionFocus extends FHIRBackboneElement const FIELD_PROFILE_EXT = '_profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -165,68 +165,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRUnsignedInt) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MIN]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; } else { - $this->setMin(new FHIRUnsignedInt($data[self::FIELD_MIN])); + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_PROFILE]))); + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; } else { - $this->setProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProfile(new FHIRCanonical($ext)); } } } @@ -543,32 +571,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php index 76bd3336d9..21d78fe663 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRMessageHeaderDestination extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a literal reference @@ -160,36 +160,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUrl) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUrl(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUrl($data[self::FIELD_ENDPOINT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUrl($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_RECEIVER])) { @@ -482,15 +496,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -500,6 +518,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php index 7f0b998fa1..8b8562f887 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMessageHeaderResponse extends FHIRBackboneElement const FIELD_IDENTIFIER_EXT = '_identifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of response to a message. @@ -149,20 +149,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRResponseType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResponseType([FHIRResponseType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResponseType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRResponseType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResponseType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRResponseType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRResponseType([FHIRResponseType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRResponseType($ext)); } } if (isset($data[self::FIELD_DETAILS])) { @@ -172,20 +179,27 @@ public function __construct($data = null) $this->setDetails(new FHIRReference($data[self::FIELD_DETAILS])); } } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRId) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; } else { - $this->setIdentifier(new FHIRId($data[self::FIELD_IDENTIFIER])); + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRId($ext)); } } } @@ -414,8 +428,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResponseType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResponseType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } @@ -424,11 +440,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php index ac2bd230fd..6c8b79cfe5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMessageHeaderSource extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details for all kinds of technology mediated contact points for a person or @@ -182,68 +182,96 @@ public function __construct($data = null) $this->setContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUrl) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUrl(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUrl($data[self::FIELD_ENDPOINT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_SOFTWARE])) { - $ext = (isset($data[self::FIELD_SOFTWARE_EXT]) && is_array($data[self::FIELD_SOFTWARE_EXT])) - ? $data[self::FIELD_SOFTWARE_EXT] - : null; - if ($data[self::FIELD_SOFTWARE] instanceof FHIRString) { - $this->setSoftware($data[self::FIELD_SOFTWARE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOFTWARE])) { - $this->setSoftware(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOFTWARE]] + $ext)); - } else if (is_array($data[self::FIELD_SOFTWARE])) { - $this->setSoftware(new FHIRString(array_merge($ext, $data[self::FIELD_SOFTWARE]))); + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUrl($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setSoftware(new FHIRString($data[self::FIELD_SOFTWARE])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SOFTWARE]) || isset($data[self::FIELD_SOFTWARE_EXT])) { + if (isset($data[self::FIELD_SOFTWARE])) { + $value = $data[self::FIELD_SOFTWARE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOFTWARE_EXT]) && is_array($data[self::FIELD_SOFTWARE_EXT])) { + $ext = $data[self::FIELD_SOFTWARE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSoftware($value); + } else if (is_array($value)) { + $this->setSoftware(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSoftware(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSoftware(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -595,32 +623,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getSoftware())) { $a[self::FIELD_SOFTWARE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOFTWARE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInner.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInner.php index 25ad67f5c9..e126033f00 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInner.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMolecularSequenceInner extends FHIRBackboneElement const FIELD_START_EXT = '_start'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInteger) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRInteger($data[self::FIELD_END])); + $value = null; } - } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInteger) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger(array_merge($ext, $data[self::FIELD_START]))); + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInteger($data[self::FIELD_START])); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRInteger($ext)); } } } @@ -370,18 +384,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuter.php index ced0ec51f6..6406843ae3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMolecularSequenceOuter extends FHIRBackboneElement const FIELD_START_EXT = '_start'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInteger) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRInteger($data[self::FIELD_END])); + $value = null; } - } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInteger) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger(array_merge($ext, $data[self::FIELD_START]))); + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInteger($data[self::FIELD_START])); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRInteger($ext)); } } } @@ -370,18 +384,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQuality.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQuality.php index 6a0cae8c29..3cccdfd67b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQuality.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQuality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRMolecularSequenceQuality extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -326,52 +326,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInteger) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRInteger($data[self::FIELD_END])); + $value = null; } - } - if (isset($data[self::FIELD_F_SCORE])) { - $ext = (isset($data[self::FIELD_F_SCORE_EXT]) && is_array($data[self::FIELD_F_SCORE_EXT])) - ? $data[self::FIELD_F_SCORE_EXT] - : null; - if ($data[self::FIELD_F_SCORE] instanceof FHIRDecimal) { - $this->setFScore($data[self::FIELD_F_SCORE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_F_SCORE])) { - $this->setFScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_F_SCORE]] + $ext)); - } else if (is_array($data[self::FIELD_F_SCORE])) { - $this->setFScore(new FHIRDecimal(array_merge($ext, $data[self::FIELD_F_SCORE]))); - } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setFScore(new FHIRDecimal($data[self::FIELD_F_SCORE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_GT_FP])) { - $ext = (isset($data[self::FIELD_GT_FP_EXT]) && is_array($data[self::FIELD_GT_FP_EXT])) - ? $data[self::FIELD_GT_FP_EXT] - : null; - if ($data[self::FIELD_GT_FP] instanceof FHIRDecimal) { - $this->setGtFP($data[self::FIELD_GT_FP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GT_FP])) { - $this->setGtFP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_GT_FP]] + $ext)); - } else if (is_array($data[self::FIELD_GT_FP])) { - $this->setGtFP(new FHIRDecimal(array_merge($ext, $data[self::FIELD_GT_FP]))); + if (isset($data[self::FIELD_F_SCORE]) || isset($data[self::FIELD_F_SCORE_EXT])) { + if (isset($data[self::FIELD_F_SCORE])) { + $value = $data[self::FIELD_F_SCORE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_F_SCORE_EXT]) && is_array($data[self::FIELD_F_SCORE_EXT])) { + $ext = $data[self::FIELD_F_SCORE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFScore($value); + } else if (is_array($value)) { + $this->setFScore(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFScore(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_GT_FP]) || isset($data[self::FIELD_GT_FP_EXT])) { + if (isset($data[self::FIELD_GT_FP])) { + $value = $data[self::FIELD_GT_FP]; } else { - $this->setGtFP(new FHIRDecimal($data[self::FIELD_GT_FP])); + $value = null; + } + if (isset($data[self::FIELD_GT_FP_EXT]) && is_array($data[self::FIELD_GT_FP_EXT])) { + $ext = $data[self::FIELD_GT_FP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setGtFP($value); + } else if (is_array($value)) { + $this->setGtFP(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setGtFP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGtFP(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_METHOD])) { @@ -381,68 +402,96 @@ public function __construct($data = null) $this->setMethod(new FHIRCodeableConcept($data[self::FIELD_METHOD])); } } - if (isset($data[self::FIELD_PRECISION])) { - $ext = (isset($data[self::FIELD_PRECISION_EXT]) && is_array($data[self::FIELD_PRECISION_EXT])) - ? $data[self::FIELD_PRECISION_EXT] - : null; - if ($data[self::FIELD_PRECISION] instanceof FHIRDecimal) { - $this->setPrecision($data[self::FIELD_PRECISION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRECISION])) { - $this->setPrecision(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PRECISION]] + $ext)); - } else if (is_array($data[self::FIELD_PRECISION])) { - $this->setPrecision(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PRECISION]))); - } + if (isset($data[self::FIELD_PRECISION]) || isset($data[self::FIELD_PRECISION_EXT])) { + if (isset($data[self::FIELD_PRECISION])) { + $value = $data[self::FIELD_PRECISION]; } else { - $this->setPrecision(new FHIRDecimal($data[self::FIELD_PRECISION])); + $value = null; } - } - if (isset($data[self::FIELD_QUERY_FP])) { - $ext = (isset($data[self::FIELD_QUERY_FP_EXT]) && is_array($data[self::FIELD_QUERY_FP_EXT])) - ? $data[self::FIELD_QUERY_FP_EXT] - : null; - if ($data[self::FIELD_QUERY_FP] instanceof FHIRDecimal) { - $this->setQueryFP($data[self::FIELD_QUERY_FP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUERY_FP])) { - $this->setQueryFP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_QUERY_FP]] + $ext)); - } else if (is_array($data[self::FIELD_QUERY_FP])) { - $this->setQueryFP(new FHIRDecimal(array_merge($ext, $data[self::FIELD_QUERY_FP]))); - } + if (isset($data[self::FIELD_PRECISION_EXT]) && is_array($data[self::FIELD_PRECISION_EXT])) { + $ext = $data[self::FIELD_PRECISION_EXT]; } else { - $this->setQueryFP(new FHIRDecimal($data[self::FIELD_QUERY_FP])); + $ext = []; } - } - if (isset($data[self::FIELD_QUERY_TP])) { - $ext = (isset($data[self::FIELD_QUERY_TP_EXT]) && is_array($data[self::FIELD_QUERY_TP_EXT])) - ? $data[self::FIELD_QUERY_TP_EXT] - : null; - if ($data[self::FIELD_QUERY_TP] instanceof FHIRDecimal) { - $this->setQueryTP($data[self::FIELD_QUERY_TP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUERY_TP])) { - $this->setQueryTP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_QUERY_TP]] + $ext)); - } else if (is_array($data[self::FIELD_QUERY_TP])) { - $this->setQueryTP(new FHIRDecimal(array_merge($ext, $data[self::FIELD_QUERY_TP]))); + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPrecision($value); + } else if (is_array($value)) { + $this->setPrecision(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPrecision(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPrecision(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_QUERY_FP]) || isset($data[self::FIELD_QUERY_FP_EXT])) { + if (isset($data[self::FIELD_QUERY_FP])) { + $value = $data[self::FIELD_QUERY_FP]; } else { - $this->setQueryTP(new FHIRDecimal($data[self::FIELD_QUERY_TP])); + $value = null; + } + if (isset($data[self::FIELD_QUERY_FP_EXT]) && is_array($data[self::FIELD_QUERY_FP_EXT])) { + $ext = $data[self::FIELD_QUERY_FP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setQueryFP($value); + } else if (is_array($value)) { + $this->setQueryFP(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setQueryFP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQueryFP(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_RECALL])) { - $ext = (isset($data[self::FIELD_RECALL_EXT]) && is_array($data[self::FIELD_RECALL_EXT])) - ? $data[self::FIELD_RECALL_EXT] - : null; - if ($data[self::FIELD_RECALL] instanceof FHIRDecimal) { - $this->setRecall($data[self::FIELD_RECALL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECALL])) { - $this->setRecall(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_RECALL]] + $ext)); - } else if (is_array($data[self::FIELD_RECALL])) { - $this->setRecall(new FHIRDecimal(array_merge($ext, $data[self::FIELD_RECALL]))); + if (isset($data[self::FIELD_QUERY_TP]) || isset($data[self::FIELD_QUERY_TP_EXT])) { + if (isset($data[self::FIELD_QUERY_TP])) { + $value = $data[self::FIELD_QUERY_TP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUERY_TP_EXT]) && is_array($data[self::FIELD_QUERY_TP_EXT])) { + $ext = $data[self::FIELD_QUERY_TP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setQueryTP($value); + } else if (is_array($value)) { + $this->setQueryTP(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setQueryTP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setQueryTP(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_RECALL]) || isset($data[self::FIELD_RECALL_EXT])) { + if (isset($data[self::FIELD_RECALL])) { + $value = $data[self::FIELD_RECALL]; } else { - $this->setRecall(new FHIRDecimal($data[self::FIELD_RECALL])); + $value = null; + } + if (isset($data[self::FIELD_RECALL_EXT]) && is_array($data[self::FIELD_RECALL_EXT])) { + $ext = $data[self::FIELD_RECALL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setRecall($value); + } else if (is_array($value)) { + $this->setRecall(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setRecall(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecall(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_ROC])) { @@ -466,68 +515,96 @@ public function __construct($data = null) $this->setStandardSequence(new FHIRCodeableConcept($data[self::FIELD_STANDARD_SEQUENCE])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInteger) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInteger($data[self::FIELD_START])); + $value = null; } - } - if (isset($data[self::FIELD_TRUTH_FN])) { - $ext = (isset($data[self::FIELD_TRUTH_FN_EXT]) && is_array($data[self::FIELD_TRUTH_FN_EXT])) - ? $data[self::FIELD_TRUTH_FN_EXT] - : null; - if ($data[self::FIELD_TRUTH_FN] instanceof FHIRDecimal) { - $this->setTruthFN($data[self::FIELD_TRUTH_FN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRUTH_FN])) { - $this->setTruthFN(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_TRUTH_FN]] + $ext)); - } else if (is_array($data[self::FIELD_TRUTH_FN])) { - $this->setTruthFN(new FHIRDecimal(array_merge($ext, $data[self::FIELD_TRUTH_FN]))); - } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; } else { - $this->setTruthFN(new FHIRDecimal($data[self::FIELD_TRUTH_FN])); + $ext = []; } - } - if (isset($data[self::FIELD_TRUTH_TP])) { - $ext = (isset($data[self::FIELD_TRUTH_TP_EXT]) && is_array($data[self::FIELD_TRUTH_TP_EXT])) - ? $data[self::FIELD_TRUTH_TP_EXT] - : null; - if ($data[self::FIELD_TRUTH_TP] instanceof FHIRDecimal) { - $this->setTruthTP($data[self::FIELD_TRUTH_TP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRUTH_TP])) { - $this->setTruthTP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_TRUTH_TP]] + $ext)); - } else if (is_array($data[self::FIELD_TRUTH_TP])) { - $this->setTruthTP(new FHIRDecimal(array_merge($ext, $data[self::FIELD_TRUTH_TP]))); + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStart(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_TRUTH_FN]) || isset($data[self::FIELD_TRUTH_FN_EXT])) { + if (isset($data[self::FIELD_TRUTH_FN])) { + $value = $data[self::FIELD_TRUTH_FN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRUTH_FN_EXT]) && is_array($data[self::FIELD_TRUTH_FN_EXT])) { + $ext = $data[self::FIELD_TRUTH_FN_EXT]; } else { - $this->setTruthTP(new FHIRDecimal($data[self::FIELD_TRUTH_TP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setTruthFN($value); + } else if (is_array($value)) { + $this->setTruthFN(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setTruthFN(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTruthFN(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRQualityType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRQualityType([FHIRQualityType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRQualityType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TRUTH_TP]) || isset($data[self::FIELD_TRUTH_TP_EXT])) { + if (isset($data[self::FIELD_TRUTH_TP])) { + $value = $data[self::FIELD_TRUTH_TP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRUTH_TP_EXT]) && is_array($data[self::FIELD_TRUTH_TP_EXT])) { + $ext = $data[self::FIELD_TRUTH_TP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setTruthTP($value); + } else if (is_array($value)) { + $this->setTruthTP(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setTruthTP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTruthTP(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRQualityType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQualityType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRQualityType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRQualityType([FHIRQualityType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRQualityType($ext)); } } } @@ -1382,22 +1459,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getFScore())) { $a[self::FIELD_F_SCORE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_F_SCORE_EXT] = $enc; } } if (null !== ($v = $this->getGtFP())) { $a[self::FIELD_GT_FP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_GT_FP_EXT] = $enc; } } @@ -1406,29 +1489,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getPrecision())) { $a[self::FIELD_PRECISION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PRECISION_EXT] = $enc; } } if (null !== ($v = $this->getQueryFP())) { $a[self::FIELD_QUERY_FP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_QUERY_FP_EXT] = $enc; } } if (null !== ($v = $this->getQueryTP())) { $a[self::FIELD_QUERY_TP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_QUERY_TP_EXT] = $enc; } } if (null !== ($v = $this->getRecall())) { $a[self::FIELD_RECALL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_RECALL_EXT] = $enc; } } @@ -1443,32 +1534,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getTruthFN())) { $a[self::FIELD_TRUTH_FN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_TRUTH_FN_EXT] = $enc; } } if (null !== ($v = $this->getTruthTP())) { $a[self::FIELD_TRUTH_TP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_TRUTH_TP_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQualityType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQualityType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeq.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeq.php index 0fd3c6b511..e32e12a583 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeq.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeq.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRMolecularSequenceReferenceSeq extends FHIRBackboneElement const FIELD_WINDOW_START_EXT = '_windowStart'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -245,36 +245,50 @@ public function __construct($data = null) $this->setChromosome(new FHIRCodeableConcept($data[self::FIELD_CHROMOSOME])); } } - if (isset($data[self::FIELD_GENOME_BUILD])) { - $ext = (isset($data[self::FIELD_GENOME_BUILD_EXT]) && is_array($data[self::FIELD_GENOME_BUILD_EXT])) - ? $data[self::FIELD_GENOME_BUILD_EXT] - : null; - if ($data[self::FIELD_GENOME_BUILD] instanceof FHIRString) { - $this->setGenomeBuild($data[self::FIELD_GENOME_BUILD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENOME_BUILD])) { - $this->setGenomeBuild(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GENOME_BUILD]] + $ext)); - } else if (is_array($data[self::FIELD_GENOME_BUILD])) { - $this->setGenomeBuild(new FHIRString(array_merge($ext, $data[self::FIELD_GENOME_BUILD]))); - } + if (isset($data[self::FIELD_GENOME_BUILD]) || isset($data[self::FIELD_GENOME_BUILD_EXT])) { + if (isset($data[self::FIELD_GENOME_BUILD])) { + $value = $data[self::FIELD_GENOME_BUILD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENOME_BUILD_EXT]) && is_array($data[self::FIELD_GENOME_BUILD_EXT])) { + $ext = $data[self::FIELD_GENOME_BUILD_EXT]; } else { - $this->setGenomeBuild(new FHIRString($data[self::FIELD_GENOME_BUILD])); - } - } - if (isset($data[self::FIELD_ORIENTATION])) { - $ext = (isset($data[self::FIELD_ORIENTATION_EXT]) && is_array($data[self::FIELD_ORIENTATION_EXT])) - ? $data[self::FIELD_ORIENTATION_EXT] - : null; - if ($data[self::FIELD_ORIENTATION] instanceof FHIROrientationType) { - $this->setOrientation($data[self::FIELD_ORIENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORIENTATION])) { - $this->setOrientation(new FHIROrientationType([FHIROrientationType::FIELD_VALUE => $data[self::FIELD_ORIENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_ORIENTATION])) { - $this->setOrientation(new FHIROrientationType(array_merge($ext, $data[self::FIELD_ORIENTATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setGenomeBuild($value); + } else if (is_array($value)) { + $this->setGenomeBuild(new FHIRString(array_merge($ext, $value))); + } else { + $this->setGenomeBuild(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setGenomeBuild(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ORIENTATION]) || isset($data[self::FIELD_ORIENTATION_EXT])) { + if (isset($data[self::FIELD_ORIENTATION])) { + $value = $data[self::FIELD_ORIENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ORIENTATION_EXT]) && is_array($data[self::FIELD_ORIENTATION_EXT])) { + $ext = $data[self::FIELD_ORIENTATION_EXT]; } else { - $this->setOrientation(new FHIROrientationType($data[self::FIELD_ORIENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROrientationType) { + $this->setOrientation($value); + } else if (is_array($value)) { + $this->setOrientation(new FHIROrientationType(array_merge($ext, $value))); + } else { + $this->setOrientation(new FHIROrientationType([FHIROrientationType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOrientation(new FHIROrientationType($ext)); } } if (isset($data[self::FIELD_REFERENCE_SEQ_ID])) { @@ -291,68 +305,96 @@ public function __construct($data = null) $this->setReferenceSeqPointer(new FHIRReference($data[self::FIELD_REFERENCE_SEQ_POINTER])); } } - if (isset($data[self::FIELD_REFERENCE_SEQ_STRING])) { - $ext = (isset($data[self::FIELD_REFERENCE_SEQ_STRING_EXT]) && is_array($data[self::FIELD_REFERENCE_SEQ_STRING_EXT])) - ? $data[self::FIELD_REFERENCE_SEQ_STRING_EXT] - : null; - if ($data[self::FIELD_REFERENCE_SEQ_STRING] instanceof FHIRString) { - $this->setReferenceSeqString($data[self::FIELD_REFERENCE_SEQ_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE_SEQ_STRING])) { - $this->setReferenceSeqString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE_SEQ_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE_SEQ_STRING])) { - $this->setReferenceSeqString(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE_SEQ_STRING]))); - } + if (isset($data[self::FIELD_REFERENCE_SEQ_STRING]) || isset($data[self::FIELD_REFERENCE_SEQ_STRING_EXT])) { + if (isset($data[self::FIELD_REFERENCE_SEQ_STRING])) { + $value = $data[self::FIELD_REFERENCE_SEQ_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_SEQ_STRING_EXT]) && is_array($data[self::FIELD_REFERENCE_SEQ_STRING_EXT])) { + $ext = $data[self::FIELD_REFERENCE_SEQ_STRING_EXT]; } else { - $this->setReferenceSeqString(new FHIRString($data[self::FIELD_REFERENCE_SEQ_STRING])); - } - } - if (isset($data[self::FIELD_STRAND])) { - $ext = (isset($data[self::FIELD_STRAND_EXT]) && is_array($data[self::FIELD_STRAND_EXT])) - ? $data[self::FIELD_STRAND_EXT] - : null; - if ($data[self::FIELD_STRAND] instanceof FHIRStrandType) { - $this->setStrand($data[self::FIELD_STRAND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRAND])) { - $this->setStrand(new FHIRStrandType([FHIRStrandType::FIELD_VALUE => $data[self::FIELD_STRAND]] + $ext)); - } else if (is_array($data[self::FIELD_STRAND])) { - $this->setStrand(new FHIRStrandType(array_merge($ext, $data[self::FIELD_STRAND]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReferenceSeqString($value); + } else if (is_array($value)) { + $this->setReferenceSeqString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReferenceSeqString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReferenceSeqString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STRAND]) || isset($data[self::FIELD_STRAND_EXT])) { + if (isset($data[self::FIELD_STRAND])) { + $value = $data[self::FIELD_STRAND]; } else { - $this->setStrand(new FHIRStrandType($data[self::FIELD_STRAND])); - } - } - if (isset($data[self::FIELD_WINDOW_END])) { - $ext = (isset($data[self::FIELD_WINDOW_END_EXT]) && is_array($data[self::FIELD_WINDOW_END_EXT])) - ? $data[self::FIELD_WINDOW_END_EXT] - : null; - if ($data[self::FIELD_WINDOW_END] instanceof FHIRInteger) { - $this->setWindowEnd($data[self::FIELD_WINDOW_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WINDOW_END])) { - $this->setWindowEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_WINDOW_END]] + $ext)); - } else if (is_array($data[self::FIELD_WINDOW_END])) { - $this->setWindowEnd(new FHIRInteger(array_merge($ext, $data[self::FIELD_WINDOW_END]))); + $value = null; + } + if (isset($data[self::FIELD_STRAND_EXT]) && is_array($data[self::FIELD_STRAND_EXT])) { + $ext = $data[self::FIELD_STRAND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStrandType) { + $this->setStrand($value); + } else if (is_array($value)) { + $this->setStrand(new FHIRStrandType(array_merge($ext, $value))); + } else { + $this->setStrand(new FHIRStrandType([FHIRStrandType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStrand(new FHIRStrandType($ext)); + } + } + if (isset($data[self::FIELD_WINDOW_END]) || isset($data[self::FIELD_WINDOW_END_EXT])) { + if (isset($data[self::FIELD_WINDOW_END])) { + $value = $data[self::FIELD_WINDOW_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WINDOW_END_EXT]) && is_array($data[self::FIELD_WINDOW_END_EXT])) { + $ext = $data[self::FIELD_WINDOW_END_EXT]; } else { - $this->setWindowEnd(new FHIRInteger($data[self::FIELD_WINDOW_END])); - } - } - if (isset($data[self::FIELD_WINDOW_START])) { - $ext = (isset($data[self::FIELD_WINDOW_START_EXT]) && is_array($data[self::FIELD_WINDOW_START_EXT])) - ? $data[self::FIELD_WINDOW_START_EXT] - : null; - if ($data[self::FIELD_WINDOW_START] instanceof FHIRInteger) { - $this->setWindowStart($data[self::FIELD_WINDOW_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WINDOW_START])) { - $this->setWindowStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_WINDOW_START]] + $ext)); - } else if (is_array($data[self::FIELD_WINDOW_START])) { - $this->setWindowStart(new FHIRInteger(array_merge($ext, $data[self::FIELD_WINDOW_START]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setWindowEnd($value); + } else if (is_array($value)) { + $this->setWindowEnd(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setWindowEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setWindowEnd(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_WINDOW_START]) || isset($data[self::FIELD_WINDOW_START_EXT])) { + if (isset($data[self::FIELD_WINDOW_START])) { + $value = $data[self::FIELD_WINDOW_START]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WINDOW_START_EXT]) && is_array($data[self::FIELD_WINDOW_START_EXT])) { + $ext = $data[self::FIELD_WINDOW_START_EXT]; } else { - $this->setWindowStart(new FHIRInteger($data[self::FIELD_WINDOW_START])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setWindowStart($value); + } else if (is_array($value)) { + $this->setWindowStart(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setWindowStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWindowStart(new FHIRInteger($ext)); } } } @@ -874,15 +916,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getGenomeBuild())) { $a[self::FIELD_GENOME_BUILD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_GENOME_BUILD_EXT] = $enc; } } if (null !== ($v = $this->getOrientation())) { $a[self::FIELD_ORIENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROrientationType::FIELD_VALUE, $enc)))) { + unset($enc[FHIROrientationType::FIELD_VALUE]); $a[self::FIELD_ORIENTATION_EXT] = $enc; } } @@ -894,32 +940,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getReferenceSeqString())) { $a[self::FIELD_REFERENCE_SEQ_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_SEQ_STRING_EXT] = $enc; } } if (null !== ($v = $this->getStrand())) { $a[self::FIELD_STRAND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStrandType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStrandType::FIELD_VALUE]); $a[self::FIELD_STRAND_EXT] = $enc; } } if (null !== ($v = $this->getWindowEnd())) { $a[self::FIELD_WINDOW_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_WINDOW_END_EXT] = $enc; } } if (null !== ($v = $this->getWindowStart())) { $a[self::FIELD_WINDOW_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_WINDOW_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepository.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepository.php index 8a2f9229a2..7012bbd50d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepository.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepository.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMolecularSequenceRepository extends FHIRBackboneElement const FIELD_VARIANTSET_ID_EXT = '_variantsetId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -187,100 +187,142 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATASET_ID])) { - $ext = (isset($data[self::FIELD_DATASET_ID_EXT]) && is_array($data[self::FIELD_DATASET_ID_EXT])) - ? $data[self::FIELD_DATASET_ID_EXT] - : null; - if ($data[self::FIELD_DATASET_ID] instanceof FHIRString) { - $this->setDatasetId($data[self::FIELD_DATASET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATASET_ID])) { - $this->setDatasetId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DATASET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DATASET_ID])) { - $this->setDatasetId(new FHIRString(array_merge($ext, $data[self::FIELD_DATASET_ID]))); - } + if (isset($data[self::FIELD_DATASET_ID]) || isset($data[self::FIELD_DATASET_ID_EXT])) { + if (isset($data[self::FIELD_DATASET_ID])) { + $value = $data[self::FIELD_DATASET_ID]; } else { - $this->setDatasetId(new FHIRString($data[self::FIELD_DATASET_ID])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_DATASET_ID_EXT]) && is_array($data[self::FIELD_DATASET_ID_EXT])) { + $ext = $data[self::FIELD_DATASET_ID_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_READSET_ID])) { - $ext = (isset($data[self::FIELD_READSET_ID_EXT]) && is_array($data[self::FIELD_READSET_ID_EXT])) - ? $data[self::FIELD_READSET_ID_EXT] - : null; - if ($data[self::FIELD_READSET_ID] instanceof FHIRString) { - $this->setReadsetId($data[self::FIELD_READSET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READSET_ID])) { - $this->setReadsetId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_READSET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_READSET_ID])) { - $this->setReadsetId(new FHIRString(array_merge($ext, $data[self::FIELD_READSET_ID]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDatasetId($value); + } else if (is_array($value)) { + $this->setDatasetId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDatasetId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setReadsetId(new FHIRString($data[self::FIELD_READSET_ID])); + } else if ([] !== $ext) { + $this->setDatasetId(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRRepositoryType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRRepositoryType([FHIRRepositoryType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRRepositoryType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setType(new FHIRRepositoryType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_READSET_ID]) || isset($data[self::FIELD_READSET_ID_EXT])) { + if (isset($data[self::FIELD_READSET_ID])) { + $value = $data[self::FIELD_READSET_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_READSET_ID_EXT]) && is_array($data[self::FIELD_READSET_ID_EXT])) { + $ext = $data[self::FIELD_READSET_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReadsetId($value); + } else if (is_array($value)) { + $this->setReadsetId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReadsetId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReadsetId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRepositoryType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRRepositoryType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRRepositoryType([FHIRRepositoryType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRRepositoryType($ext)); } } - if (isset($data[self::FIELD_VARIANTSET_ID])) { - $ext = (isset($data[self::FIELD_VARIANTSET_ID_EXT]) && is_array($data[self::FIELD_VARIANTSET_ID_EXT])) - ? $data[self::FIELD_VARIANTSET_ID_EXT] - : null; - if ($data[self::FIELD_VARIANTSET_ID] instanceof FHIRString) { - $this->setVariantsetId($data[self::FIELD_VARIANTSET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VARIANTSET_ID])) { - $this->setVariantsetId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VARIANTSET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VARIANTSET_ID])) { - $this->setVariantsetId(new FHIRString(array_merge($ext, $data[self::FIELD_VARIANTSET_ID]))); + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VARIANTSET_ID]) || isset($data[self::FIELD_VARIANTSET_ID_EXT])) { + if (isset($data[self::FIELD_VARIANTSET_ID])) { + $value = $data[self::FIELD_VARIANTSET_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VARIANTSET_ID_EXT]) && is_array($data[self::FIELD_VARIANTSET_ID_EXT])) { + $ext = $data[self::FIELD_VARIANTSET_ID_EXT]; } else { - $this->setVariantsetId(new FHIRString($data[self::FIELD_VARIANTSET_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVariantsetId($value); + } else if (is_array($value)) { + $this->setVariantsetId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVariantsetId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVariantsetId(new FHIRString($ext)); } } } @@ -683,46 +725,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDatasetId())) { $a[self::FIELD_DATASET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DATASET_ID_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getReadsetId())) { $a[self::FIELD_READSET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_READSET_ID_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRepositoryType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRepositoryType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getVariantsetId())) { $a[self::FIELD_VARIANTSET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VARIANTSET_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRoc.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRoc.php index 717ce05fb8..a5408a51d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRoc.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRoc.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRMolecularSequenceRoc extends FHIRBackboneElement const FIELD_SENSITIVITY_EXT = '_sensitivity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -201,207 +201,270 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_F_MEASURE])) { - $ext = (isset($data[self::FIELD_F_MEASURE_EXT]) && is_array($data[self::FIELD_F_MEASURE_EXT])) - ? $data[self::FIELD_F_MEASURE_EXT] - : null; - if (is_array($data[self::FIELD_F_MEASURE])) { - foreach($data[self::FIELD_F_MEASURE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDecimal) { - $this->addFMeasure($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFMeasure(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFMeasure(new FHIRDecimal(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_F_MEASURE]) || isset($data[self::FIELD_F_MEASURE_EXT])) { + if (isset($data[self::FIELD_F_MEASURE])) { + $value = $data[self::FIELD_F_MEASURE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_F_MEASURE_EXT]) && is_array($data[self::FIELD_F_MEASURE_EXT])) { + $ext = $data[self::FIELD_F_MEASURE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->addFMeasure($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDecimal) { + $this->addFMeasure($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFMeasure(new FHIRDecimal(array_merge($v, $iext))); + } else { + $this->addFMeasure(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFMeasure(new FHIRDecimal($v)); } + } elseif (is_array($value)) { + $this->addFMeasure(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->addFMeasure(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFMeasure(new FHIRDecimal($iext)); } - } elseif ($data[self::FIELD_F_MEASURE] instanceof FHIRDecimal) { - $this->addFMeasure($data[self::FIELD_F_MEASURE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_F_MEASURE])) { - $this->addFMeasure(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_F_MEASURE]] + $ext)); - } else { - $this->addFMeasure(new FHIRDecimal($data[self::FIELD_F_MEASURE])); } } - if (isset($data[self::FIELD_NUM_FN])) { - $ext = (isset($data[self::FIELD_NUM_FN_EXT]) && is_array($data[self::FIELD_NUM_FN_EXT])) - ? $data[self::FIELD_NUM_FN_EXT] - : null; - if (is_array($data[self::FIELD_NUM_FN])) { - foreach($data[self::FIELD_NUM_FN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRInteger) { - $this->addNumFN($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNumFN(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNumFN(new FHIRInteger(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NUM_FN]) || isset($data[self::FIELD_NUM_FN_EXT])) { + if (isset($data[self::FIELD_NUM_FN])) { + $value = $data[self::FIELD_NUM_FN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUM_FN_EXT]) && is_array($data[self::FIELD_NUM_FN_EXT])) { + $ext = $data[self::FIELD_NUM_FN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->addNumFN($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRInteger) { + $this->addNumFN($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNumFN(new FHIRInteger(array_merge($v, $iext))); + } else { + $this->addNumFN(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNumFN(new FHIRInteger($v)); } + } elseif (is_array($value)) { + $this->addNumFN(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->addNumFN(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNumFN(new FHIRInteger($iext)); } - } elseif ($data[self::FIELD_NUM_FN] instanceof FHIRInteger) { - $this->addNumFN($data[self::FIELD_NUM_FN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NUM_FN])) { - $this->addNumFN(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUM_FN]] + $ext)); - } else { - $this->addNumFN(new FHIRInteger($data[self::FIELD_NUM_FN])); } } - if (isset($data[self::FIELD_NUM_FP])) { - $ext = (isset($data[self::FIELD_NUM_FP_EXT]) && is_array($data[self::FIELD_NUM_FP_EXT])) - ? $data[self::FIELD_NUM_FP_EXT] - : null; - if (is_array($data[self::FIELD_NUM_FP])) { - foreach($data[self::FIELD_NUM_FP] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRInteger) { - $this->addNumFP($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNumFP(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNumFP(new FHIRInteger(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NUM_FP]) || isset($data[self::FIELD_NUM_FP_EXT])) { + if (isset($data[self::FIELD_NUM_FP])) { + $value = $data[self::FIELD_NUM_FP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUM_FP_EXT]) && is_array($data[self::FIELD_NUM_FP_EXT])) { + $ext = $data[self::FIELD_NUM_FP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->addNumFP($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRInteger) { + $this->addNumFP($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNumFP(new FHIRInteger(array_merge($v, $iext))); + } else { + $this->addNumFP(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNumFP(new FHIRInteger($v)); } + } elseif (is_array($value)) { + $this->addNumFP(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->addNumFP(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNumFP(new FHIRInteger($iext)); } - } elseif ($data[self::FIELD_NUM_FP] instanceof FHIRInteger) { - $this->addNumFP($data[self::FIELD_NUM_FP]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NUM_FP])) { - $this->addNumFP(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUM_FP]] + $ext)); - } else { - $this->addNumFP(new FHIRInteger($data[self::FIELD_NUM_FP])); } } - if (isset($data[self::FIELD_NUM_TP])) { - $ext = (isset($data[self::FIELD_NUM_TP_EXT]) && is_array($data[self::FIELD_NUM_TP_EXT])) - ? $data[self::FIELD_NUM_TP_EXT] - : null; - if (is_array($data[self::FIELD_NUM_TP])) { - foreach($data[self::FIELD_NUM_TP] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRInteger) { - $this->addNumTP($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNumTP(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNumTP(new FHIRInteger(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NUM_TP]) || isset($data[self::FIELD_NUM_TP_EXT])) { + if (isset($data[self::FIELD_NUM_TP])) { + $value = $data[self::FIELD_NUM_TP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUM_TP_EXT]) && is_array($data[self::FIELD_NUM_TP_EXT])) { + $ext = $data[self::FIELD_NUM_TP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->addNumTP($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRInteger) { + $this->addNumTP($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNumTP(new FHIRInteger(array_merge($v, $iext))); + } else { + $this->addNumTP(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNumTP(new FHIRInteger($v)); } + } elseif (is_array($value)) { + $this->addNumTP(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->addNumTP(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNumTP(new FHIRInteger($iext)); } - } elseif ($data[self::FIELD_NUM_TP] instanceof FHIRInteger) { - $this->addNumTP($data[self::FIELD_NUM_TP]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NUM_TP])) { - $this->addNumTP(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUM_TP]] + $ext)); - } else { - $this->addNumTP(new FHIRInteger($data[self::FIELD_NUM_TP])); } } - if (isset($data[self::FIELD_PRECISION])) { - $ext = (isset($data[self::FIELD_PRECISION_EXT]) && is_array($data[self::FIELD_PRECISION_EXT])) - ? $data[self::FIELD_PRECISION_EXT] - : null; - if (is_array($data[self::FIELD_PRECISION])) { - foreach($data[self::FIELD_PRECISION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDecimal) { - $this->addPrecision($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPrecision(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPrecision(new FHIRDecimal(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PRECISION]) || isset($data[self::FIELD_PRECISION_EXT])) { + if (isset($data[self::FIELD_PRECISION])) { + $value = $data[self::FIELD_PRECISION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRECISION_EXT]) && is_array($data[self::FIELD_PRECISION_EXT])) { + $ext = $data[self::FIELD_PRECISION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->addPrecision($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDecimal) { + $this->addPrecision($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPrecision(new FHIRDecimal(array_merge($v, $iext))); + } else { + $this->addPrecision(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPrecision(new FHIRDecimal($v)); } + } elseif (is_array($value)) { + $this->addPrecision(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->addPrecision(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPrecision(new FHIRDecimal($iext)); } - } elseif ($data[self::FIELD_PRECISION] instanceof FHIRDecimal) { - $this->addPrecision($data[self::FIELD_PRECISION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PRECISION])) { - $this->addPrecision(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PRECISION]] + $ext)); - } else { - $this->addPrecision(new FHIRDecimal($data[self::FIELD_PRECISION])); } } - if (isset($data[self::FIELD_SCORE])) { - $ext = (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) - ? $data[self::FIELD_SCORE_EXT] - : null; - if (is_array($data[self::FIELD_SCORE])) { - foreach($data[self::FIELD_SCORE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRInteger) { - $this->addScore($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addScore(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addScore(new FHIRInteger(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SCORE]) || isset($data[self::FIELD_SCORE_EXT])) { + if (isset($data[self::FIELD_SCORE])) { + $value = $data[self::FIELD_SCORE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) { + $ext = $data[self::FIELD_SCORE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->addScore($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRInteger) { + $this->addScore($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addScore(new FHIRInteger(array_merge($v, $iext))); + } else { + $this->addScore(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addScore(new FHIRInteger($v)); } + } elseif (is_array($value)) { + $this->addScore(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->addScore(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addScore(new FHIRInteger($iext)); } - } elseif ($data[self::FIELD_SCORE] instanceof FHIRInteger) { - $this->addScore($data[self::FIELD_SCORE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SCORE])) { - $this->addScore(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SCORE]] + $ext)); - } else { - $this->addScore(new FHIRInteger($data[self::FIELD_SCORE])); } } - if (isset($data[self::FIELD_SENSITIVITY])) { - $ext = (isset($data[self::FIELD_SENSITIVITY_EXT]) && is_array($data[self::FIELD_SENSITIVITY_EXT])) - ? $data[self::FIELD_SENSITIVITY_EXT] - : null; - if (is_array($data[self::FIELD_SENSITIVITY])) { - foreach($data[self::FIELD_SENSITIVITY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDecimal) { - $this->addSensitivity($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSensitivity(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSensitivity(new FHIRDecimal(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SENSITIVITY]) || isset($data[self::FIELD_SENSITIVITY_EXT])) { + if (isset($data[self::FIELD_SENSITIVITY])) { + $value = $data[self::FIELD_SENSITIVITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SENSITIVITY_EXT]) && is_array($data[self::FIELD_SENSITIVITY_EXT])) { + $ext = $data[self::FIELD_SENSITIVITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->addSensitivity($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDecimal) { + $this->addSensitivity($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSensitivity(new FHIRDecimal(array_merge($v, $iext))); + } else { + $this->addSensitivity(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSensitivity(new FHIRDecimal($v)); } + } elseif (is_array($value)) { + $this->addSensitivity(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->addSensitivity(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSensitivity(new FHIRDecimal($iext)); } - } elseif ($data[self::FIELD_SENSITIVITY] instanceof FHIRDecimal) { - $this->addSensitivity($data[self::FIELD_SENSITIVITY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SENSITIVITY])) { - $this->addSensitivity(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_SENSITIVITY]] + $ext)); - } else { - $this->addSensitivity(new FHIRDecimal($data[self::FIELD_SENSITIVITY])); } } } @@ -1057,108 +1120,167 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getFMeasure())) { $a[self::FIELD_F_MEASURE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_F_MEASURE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_F_MEASURE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDecimal::FIELD_VALUE]) || array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_F_MEASURE_EXT][] = null; + unset($enc[FHIRDecimal::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_F_MEASURE_EXT] = $encs; + } } if ([] !== ($vs = $this->getNumFN())) { $a[self::FIELD_NUM_FN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NUM_FN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NUM_FN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRInteger::FIELD_VALUE]) || array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NUM_FN_EXT][] = null; + unset($enc[FHIRInteger::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NUM_FN_EXT] = $encs; + } } if ([] !== ($vs = $this->getNumFP())) { $a[self::FIELD_NUM_FP] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NUM_FP][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NUM_FP_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRInteger::FIELD_VALUE]) || array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NUM_FP_EXT][] = null; + unset($enc[FHIRInteger::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NUM_FP_EXT] = $encs; + } } if ([] !== ($vs = $this->getNumTP())) { $a[self::FIELD_NUM_TP] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NUM_TP][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NUM_TP_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRInteger::FIELD_VALUE]) || array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NUM_TP_EXT][] = null; + unset($enc[FHIRInteger::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NUM_TP_EXT] = $encs; + } } if ([] !== ($vs = $this->getPrecision())) { $a[self::FIELD_PRECISION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PRECISION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PRECISION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDecimal::FIELD_VALUE]) || array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PRECISION_EXT][] = null; + unset($enc[FHIRDecimal::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PRECISION_EXT] = $encs; + } } if ([] !== ($vs = $this->getScore())) { $a[self::FIELD_SCORE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SCORE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SCORE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRInteger::FIELD_VALUE]) || array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SCORE_EXT][] = null; + unset($enc[FHIRInteger::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SCORE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSensitivity())) { $a[self::FIELD_SENSITIVITY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SENSITIVITY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SENSITIVITY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDecimal::FIELD_VALUE]) || array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SENSITIVITY_EXT][] = null; + unset($enc[FHIRDecimal::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SENSITIVITY_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariant.php index 5992ca8068..1d1d2fc8c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRMolecularSequenceStructureVariant extends FHIRBackboneElement const FIELD_VARIANT_TYPE = 'variantType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -163,20 +163,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXACT])) { - $ext = (isset($data[self::FIELD_EXACT_EXT]) && is_array($data[self::FIELD_EXACT_EXT])) - ? $data[self::FIELD_EXACT_EXT] - : null; - if ($data[self::FIELD_EXACT] instanceof FHIRBoolean) { - $this->setExact($data[self::FIELD_EXACT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXACT])) { - $this->setExact(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXACT]] + $ext)); - } else if (is_array($data[self::FIELD_EXACT])) { - $this->setExact(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXACT]))); - } + if (isset($data[self::FIELD_EXACT]) || isset($data[self::FIELD_EXACT_EXT])) { + if (isset($data[self::FIELD_EXACT])) { + $value = $data[self::FIELD_EXACT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXACT_EXT]) && is_array($data[self::FIELD_EXACT_EXT])) { + $ext = $data[self::FIELD_EXACT_EXT]; } else { - $this->setExact(new FHIRBoolean($data[self::FIELD_EXACT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExact($value); + } else if (is_array($value)) { + $this->setExact(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExact(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExact(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_INNER])) { @@ -186,20 +193,27 @@ public function __construct($data = null) $this->setInner(new FHIRMolecularSequenceInner($data[self::FIELD_INNER])); } } - if (isset($data[self::FIELD_LENGTH])) { - $ext = (isset($data[self::FIELD_LENGTH_EXT]) && is_array($data[self::FIELD_LENGTH_EXT])) - ? $data[self::FIELD_LENGTH_EXT] - : null; - if ($data[self::FIELD_LENGTH] instanceof FHIRInteger) { - $this->setLength($data[self::FIELD_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LENGTH])) { - $this->setLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_LENGTH])) { - $this->setLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_LENGTH]))); - } + if (isset($data[self::FIELD_LENGTH]) || isset($data[self::FIELD_LENGTH_EXT])) { + if (isset($data[self::FIELD_LENGTH])) { + $value = $data[self::FIELD_LENGTH]; } else { - $this->setLength(new FHIRInteger($data[self::FIELD_LENGTH])); + $value = null; + } + if (isset($data[self::FIELD_LENGTH_EXT]) && is_array($data[self::FIELD_LENGTH_EXT])) { + $ext = $data[self::FIELD_LENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setLength($value); + } else if (is_array($value)) { + $this->setLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLength(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_OUTER])) { @@ -516,8 +530,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExact())) { $a[self::FIELD_EXACT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXACT_EXT] = $enc; } } @@ -526,8 +542,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getLength())) { $a[self::FIELD_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_LENGTH_EXT] = $enc; } } @@ -537,6 +555,9 @@ public function jsonSerialize() if (null !== ($v = $this->getVariantType())) { $a[self::FIELD_VARIANT_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariant.php index d21a853c56..f27935e81a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMolecularSequenceVariant extends FHIRBackboneElement const FIELD_VARIANT_POINTER = 'variantPointer'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -198,84 +198,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CIGAR])) { - $ext = (isset($data[self::FIELD_CIGAR_EXT]) && is_array($data[self::FIELD_CIGAR_EXT])) - ? $data[self::FIELD_CIGAR_EXT] - : null; - if ($data[self::FIELD_CIGAR] instanceof FHIRString) { - $this->setCigar($data[self::FIELD_CIGAR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CIGAR])) { - $this->setCigar(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CIGAR]] + $ext)); - } else if (is_array($data[self::FIELD_CIGAR])) { - $this->setCigar(new FHIRString(array_merge($ext, $data[self::FIELD_CIGAR]))); - } + if (isset($data[self::FIELD_CIGAR]) || isset($data[self::FIELD_CIGAR_EXT])) { + if (isset($data[self::FIELD_CIGAR])) { + $value = $data[self::FIELD_CIGAR]; } else { - $this->setCigar(new FHIRString($data[self::FIELD_CIGAR])); + $value = null; } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInteger) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_CIGAR_EXT]) && is_array($data[self::FIELD_CIGAR_EXT])) { + $ext = $data[self::FIELD_CIGAR_EXT]; } else { - $this->setEnd(new FHIRInteger($data[self::FIELD_END])); + $ext = []; } - } - if (isset($data[self::FIELD_OBSERVED_ALLELE])) { - $ext = (isset($data[self::FIELD_OBSERVED_ALLELE_EXT]) && is_array($data[self::FIELD_OBSERVED_ALLELE_EXT])) - ? $data[self::FIELD_OBSERVED_ALLELE_EXT] - : null; - if ($data[self::FIELD_OBSERVED_ALLELE] instanceof FHIRString) { - $this->setObservedAllele($data[self::FIELD_OBSERVED_ALLELE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OBSERVED_ALLELE])) { - $this->setObservedAllele(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OBSERVED_ALLELE]] + $ext)); - } else if (is_array($data[self::FIELD_OBSERVED_ALLELE])) { - $this->setObservedAllele(new FHIRString(array_merge($ext, $data[self::FIELD_OBSERVED_ALLELE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCigar($value); + } else if (is_array($value)) { + $this->setCigar(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCigar(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setObservedAllele(new FHIRString($data[self::FIELD_OBSERVED_ALLELE])); + } else if ([] !== $ext) { + $this->setCigar(new FHIRString($ext)); } } - if (isset($data[self::FIELD_REFERENCE_ALLELE])) { - $ext = (isset($data[self::FIELD_REFERENCE_ALLELE_EXT]) && is_array($data[self::FIELD_REFERENCE_ALLELE_EXT])) - ? $data[self::FIELD_REFERENCE_ALLELE_EXT] - : null; - if ($data[self::FIELD_REFERENCE_ALLELE] instanceof FHIRString) { - $this->setReferenceAllele($data[self::FIELD_REFERENCE_ALLELE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE_ALLELE])) { - $this->setReferenceAllele(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE_ALLELE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE_ALLELE])) { - $this->setReferenceAllele(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE_ALLELE]))); + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_OBSERVED_ALLELE]) || isset($data[self::FIELD_OBSERVED_ALLELE_EXT])) { + if (isset($data[self::FIELD_OBSERVED_ALLELE])) { + $value = $data[self::FIELD_OBSERVED_ALLELE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OBSERVED_ALLELE_EXT]) && is_array($data[self::FIELD_OBSERVED_ALLELE_EXT])) { + $ext = $data[self::FIELD_OBSERVED_ALLELE_EXT]; } else { - $this->setReferenceAllele(new FHIRString($data[self::FIELD_REFERENCE_ALLELE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setObservedAllele($value); + } else if (is_array($value)) { + $this->setObservedAllele(new FHIRString(array_merge($ext, $value))); + } else { + $this->setObservedAllele(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setObservedAllele(new FHIRString($ext)); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInteger) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger(array_merge($ext, $data[self::FIELD_START]))); + if (isset($data[self::FIELD_REFERENCE_ALLELE]) || isset($data[self::FIELD_REFERENCE_ALLELE_EXT])) { + if (isset($data[self::FIELD_REFERENCE_ALLELE])) { + $value = $data[self::FIELD_REFERENCE_ALLELE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_ALLELE_EXT]) && is_array($data[self::FIELD_REFERENCE_ALLELE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_ALLELE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReferenceAllele($value); + } else if (is_array($value)) { + $this->setReferenceAllele(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReferenceAllele(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReferenceAllele(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; + } else { + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; } else { - $this->setStart(new FHIRInteger($data[self::FIELD_START])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VARIANT_POINTER])) { @@ -709,42 +744,55 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCigar())) { $a[self::FIELD_CIGAR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CIGAR_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getObservedAllele())) { $a[self::FIELD_OBSERVED_ALLELE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OBSERVED_ALLELE_EXT] = $enc; } } if (null !== ($v = $this->getReferenceAllele())) { $a[self::FIELD_REFERENCE_ALLELE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_ALLELE_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getVariantPointer())) { $a[self::FIELD_VARIANT_POINTER] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php index 28c5c21ad6..4ced216a3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRNamingSystemUniqueId extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -173,20 +173,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -196,52 +203,73 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_PREFERRED])) { - $ext = (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) - ? $data[self::FIELD_PREFERRED_EXT] - : null; - if ($data[self::FIELD_PREFERRED] instanceof FHIRBoolean) { - $this->setPreferred($data[self::FIELD_PREFERRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PREFERRED]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PREFERRED]))); - } + if (isset($data[self::FIELD_PREFERRED]) || isset($data[self::FIELD_PREFERRED_EXT])) { + if (isset($data[self::FIELD_PREFERRED])) { + $value = $data[self::FIELD_PREFERRED]; } else { - $this->setPreferred(new FHIRBoolean($data[self::FIELD_PREFERRED])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRNamingSystemIdentifierType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNamingSystemIdentifierType([FHIRNamingSystemIdentifierType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNamingSystemIdentifierType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) { + $ext = $data[self::FIELD_PREFERRED_EXT]; } else { - $this->setType(new FHIRNamingSystemIdentifierType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPreferred($value); + } else if (is_array($value)) { + $this->setPreferred(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreferred(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNamingSystemIdentifierType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRNamingSystemIdentifierType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRNamingSystemIdentifierType([FHIRNamingSystemIdentifierType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRNamingSystemIdentifierType($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -571,8 +599,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } @@ -581,25 +611,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getPreferred())) { $a[self::FIELD_PREFERRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PREFERRED_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNamingSystemIdentifierType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNamingSystemIdentifierType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php index 665b7f9669..4449d4989d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRNutritionOrderAdministration extends FHIRBackboneElement const FIELD_SCHEDULE = 'schedule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -471,6 +471,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSchedule())) { $a[self::FIELD_SCHEDULE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php index 3685f7b6d0..c651bccfca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRNutritionOrderEnteralFormula extends FHIRBackboneElement const FIELD_ROUTEOF_ADMINISTRATION = 'routeofAdministration'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -237,20 +237,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_ADDITIVE_PRODUCT_NAME] instanceof FHIRString) { - $this->setAdditiveProductName($data[self::FIELD_ADDITIVE_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { - $this->setAdditiveProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADDITIVE_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { - $this->setAdditiveProductName(new FHIRString(array_merge($ext, $data[self::FIELD_ADDITIVE_PRODUCT_NAME]))); - } + if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME]) || isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { + $value = $data[self::FIELD_ADDITIVE_PRODUCT_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT]; } else { - $this->setAdditiveProductName(new FHIRString($data[self::FIELD_ADDITIVE_PRODUCT_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAdditiveProductName($value); + } else if (is_array($value)) { + $this->setAdditiveProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAdditiveProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAdditiveProductName(new FHIRString($ext)); } } if (isset($data[self::FIELD_ADDITIVE_TYPE])) { @@ -278,36 +285,50 @@ public function __construct($data = null) $this->addAdministration(new FHIRNutritionOrderAdministration($data[self::FIELD_ADMINISTRATION])); } } - if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT]) && is_array($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT])) - ? $data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_ADMINISTRATION_INSTRUCTION] instanceof FHIRString) { - $this->setAdministrationInstruction($data[self::FIELD_ADMINISTRATION_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { - $this->setAdministrationInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADMINISTRATION_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { - $this->setAdministrationInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_ADMINISTRATION_INSTRUCTION]))); - } + if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION]) || isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { + $value = $data[self::FIELD_ADMINISTRATION_INSTRUCTION]; } else { - $this->setAdministrationInstruction(new FHIRString($data[self::FIELD_ADMINISTRATION_INSTRUCTION])); + $value = null; } - } - if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME] instanceof FHIRString) { - $this->setBaseFormulaProductName($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { - $this->setBaseFormulaProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { - $this->setBaseFormulaProductName(new FHIRString(array_merge($ext, $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]))); + if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT]) && is_array($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAdministrationInstruction($value); + } else if (is_array($value)) { + $this->setAdministrationInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAdministrationInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAdministrationInstruction(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]) || isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { + $value = $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]; } else { - $this->setBaseFormulaProductName(new FHIRString($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])); + $value = null; + } + if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBaseFormulaProductName($value); + } else if (is_array($value)) { + $this->setBaseFormulaProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBaseFormulaProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBaseFormulaProductName(new FHIRString($ext)); } } if (isset($data[self::FIELD_BASE_FORMULA_TYPE])) { @@ -881,8 +902,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAdditiveProductName())) { $a[self::FIELD_ADDITIVE_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT] = $enc; } } @@ -890,19 +913,29 @@ public function jsonSerialize() $a[self::FIELD_ADDITIVE_TYPE] = $v; } if ([] !== ($vs = $this->getAdministration())) { - $a[self::FIELD_ADMINISTRATION] = $vs; + $a[self::FIELD_ADMINISTRATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADMINISTRATION][] = $v; + } } if (null !== ($v = $this->getAdministrationInstruction())) { $a[self::FIELD_ADMINISTRATION_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT] = $enc; } } if (null !== ($v = $this->getBaseFormulaProductName())) { $a[self::FIELD_BASE_FORMULA_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT] = $enc; } } @@ -918,6 +951,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRouteofAdministration())) { $a[self::FIELD_ROUTEOF_ADMINISTRATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php index 5982439462..6d366ebb22 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRNutritionOrderNutrient extends FHIRBackboneElement const FIELD_MODIFIER = 'modifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getModifier())) { $a[self::FIELD_MODIFIER] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php index d0c95652da..f58ce3bf03 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRNutritionOrderOralDiet extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -207,20 +207,27 @@ public function __construct($data = null) $this->addFluidConsistencyType(new FHIRCodeableConcept($data[self::FIELD_FLUID_CONSISTENCY_TYPE])); } } - if (isset($data[self::FIELD_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) - ? $data[self::FIELD_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_INSTRUCTION] instanceof FHIRString) { - $this->setInstruction($data[self::FIELD_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_INSTRUCTION]))); - } + if (isset($data[self::FIELD_INSTRUCTION]) || isset($data[self::FIELD_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_INSTRUCTION])) { + $value = $data[self::FIELD_INSTRUCTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_INSTRUCTION_EXT]; } else { - $this->setInstruction(new FHIRString($data[self::FIELD_INSTRUCTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setInstruction($value); + } else if (is_array($value)) { + $this->setInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInstruction(new FHIRString($ext)); } } if (isset($data[self::FIELD_NUTRIENT])) { @@ -817,26 +824,61 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getFluidConsistencyType())) { - $a[self::FIELD_FLUID_CONSISTENCY_TYPE] = $vs; + $a[self::FIELD_FLUID_CONSISTENCY_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FLUID_CONSISTENCY_TYPE][] = $v; + } } if (null !== ($v = $this->getInstruction())) { $a[self::FIELD_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INSTRUCTION_EXT] = $enc; } } if ([] !== ($vs = $this->getNutrient())) { - $a[self::FIELD_NUTRIENT] = $vs; + $a[self::FIELD_NUTRIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NUTRIENT][] = $v; + } } if ([] !== ($vs = $this->getSchedule())) { - $a[self::FIELD_SCHEDULE] = $vs; + $a[self::FIELD_SCHEDULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SCHEDULE][] = $v; + } } if ([] !== ($vs = $this->getTexture())) { - $a[self::FIELD_TEXTURE] = $vs; + $a[self::FIELD_TEXTURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEXTURE][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php index 2962aa9ad2..2554f40f58 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRNutritionOrderSupplement extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -181,36 +181,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) - ? $data[self::FIELD_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_INSTRUCTION] instanceof FHIRString) { - $this->setInstruction($data[self::FIELD_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_INSTRUCTION]))); - } + if (isset($data[self::FIELD_INSTRUCTION]) || isset($data[self::FIELD_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_INSTRUCTION])) { + $value = $data[self::FIELD_INSTRUCTION]; } else { - $this->setInstruction(new FHIRString($data[self::FIELD_INSTRUCTION])); + $value = null; } - } - if (isset($data[self::FIELD_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_PRODUCT_NAME] instanceof FHIRString) { - $this->setProductName($data[self::FIELD_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRODUCT_NAME])) { - $this->setProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_PRODUCT_NAME])) { - $this->setProductName(new FHIRString(array_merge($ext, $data[self::FIELD_PRODUCT_NAME]))); + if (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_INSTRUCTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setInstruction($value); + } else if (is_array($value)) { + $this->setInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInstruction(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PRODUCT_NAME]) || isset($data[self::FIELD_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_PRODUCT_NAME])) { + $value = $data[self::FIELD_PRODUCT_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_PRODUCT_NAME_EXT]; } else { - $this->setProductName(new FHIRString($data[self::FIELD_PRODUCT_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setProductName($value); + } else if (is_array($value)) { + $this->setProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProductName(new FHIRString($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -616,15 +630,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getInstruction())) { $a[self::FIELD_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INSTRUCTION_EXT] = $enc; } } if (null !== ($v = $this->getProductName())) { $a[self::FIELD_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PRODUCT_NAME_EXT] = $enc; } } @@ -632,11 +650,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getSchedule())) { - $a[self::FIELD_SCHEDULE] = $vs; + $a[self::FIELD_SCHEDULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SCHEDULE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php index 7f9189d7f8..e4d6b693e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNutritionOrderTexture extends FHIRBackboneElement const FIELD_MODIFIER = 'modifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -326,6 +326,9 @@ public function jsonSerialize() if (null !== ($v = $this->getModifier())) { $a[self::FIELD_MODIFIER] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php index f2bb6633dd..adb4b63d49 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRObservationComponent extends FHIRBackboneElement const FIELD_VALUE_TIME_EXT = '_valueTime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -371,20 +371,27 @@ public function __construct($data = null) $this->addReferenceRange(new FHIRObservationReferenceRange($data[self::FIELD_REFERENCE_RANGE])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -394,36 +401,50 @@ public function __construct($data = null) $this->setValueCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_VALUE_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -461,36 +482,50 @@ public function __construct($data = null) $this->setValueSampledData(new FHIRSampledData($data[self::FIELD_VALUE_SAMPLED_DATA])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } } @@ -1326,15 +1361,29 @@ public function jsonSerialize() $a[self::FIELD_DATA_ABSENT_REASON] = $v; } if ([] !== ($vs = $this->getInterpretation())) { - $a[self::FIELD_INTERPRETATION] = $vs; + $a[self::FIELD_INTERPRETATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERPRETATION][] = $v; + } } if ([] !== ($vs = $this->getReferenceRange())) { - $a[self::FIELD_REFERENCE_RANGE] = $vs; + $a[self::FIELD_REFERENCE_RANGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_RANGE][] = $v; + } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -1343,15 +1392,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } @@ -1372,18 +1425,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php index 75d8c0221a..fd90dcacad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRObservationReferenceRange extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of ordered Quantities defined by a low and high limit. @@ -239,20 +239,27 @@ public function __construct($data = null) $this->setLow(new FHIRQuantity($data[self::FIELD_LOW])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -670,7 +677,13 @@ public function jsonSerialize() $a[self::FIELD_AGE] = $v; } if ([] !== ($vs = $this->getAppliesTo())) { - $a[self::FIELD_APPLIES_TO] = $vs; + $a[self::FIELD_APPLIES_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_APPLIES_TO][] = $v; + } } if (null !== ($v = $this->getHigh())) { $a[self::FIELD_HIGH] = $v; @@ -680,14 +693,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedInterval.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedInterval.php index c472044d4f..13ab52dca2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedInterval.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedInterval.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRObservationDefinitionQualifiedInterval extends FHIRBackboneElement const FIELD_RANGE = 'range'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of ordered Quantities defined by a low and high limit. @@ -236,36 +236,50 @@ public function __construct($data = null) $this->addAppliesTo(new FHIRCodeableConcept($data[self::FIELD_APPLIES_TO])); } } - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRObservationRangeCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRObservationRangeCategory([FHIRObservationRangeCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRObservationRangeCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; } else { - $this->setCategory(new FHIRObservationRangeCategory($data[self::FIELD_CATEGORY])); + $value = null; } - } - if (isset($data[self::FIELD_CONDITION])) { - $ext = (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) - ? $data[self::FIELD_CONDITION_EXT] - : null; - if ($data[self::FIELD_CONDITION] instanceof FHIRString) { - $this->setCondition($data[self::FIELD_CONDITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITION])) { - $this->setCondition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONDITION]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITION])) { - $this->setCondition(new FHIRString(array_merge($ext, $data[self::FIELD_CONDITION]))); + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationRangeCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRObservationRangeCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRObservationRangeCategory([FHIRObservationRangeCategory::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCategory(new FHIRObservationRangeCategory($ext)); + } + } + if (isset($data[self::FIELD_CONDITION]) || isset($data[self::FIELD_CONDITION_EXT])) { + if (isset($data[self::FIELD_CONDITION])) { + $value = $data[self::FIELD_CONDITION]; } else { - $this->setCondition(new FHIRString($data[self::FIELD_CONDITION])); + $value = null; + } + if (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) { + $ext = $data[self::FIELD_CONDITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCondition($value); + } else if (is_array($value)) { + $this->setCondition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCondition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCondition(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONTEXT])) { @@ -275,20 +289,27 @@ public function __construct($data = null) $this->setContext(new FHIRCodeableConcept($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); - } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_GESTATIONAL_AGE])) { @@ -749,19 +770,29 @@ public function jsonSerialize() $a[self::FIELD_AGE] = $v; } if ([] !== ($vs = $this->getAppliesTo())) { - $a[self::FIELD_APPLIES_TO] = $vs; + $a[self::FIELD_APPLIES_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_APPLIES_TO][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationRangeCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationRangeCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } if (null !== ($v = $this->getCondition())) { $a[self::FIELD_CONDITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONDITION_EXT] = $enc; } } @@ -770,8 +801,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } @@ -781,6 +814,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRange())) { $a[self::FIELD_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetails.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetails.php index dfd17191e0..69f36316b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetails.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetails.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRObservationDefinitionQuantitativeDetails extends FHIRBackboneElement const FIELD_UNIT = 'unit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -163,20 +163,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONVERSION_FACTOR])) { - $ext = (isset($data[self::FIELD_CONVERSION_FACTOR_EXT]) && is_array($data[self::FIELD_CONVERSION_FACTOR_EXT])) - ? $data[self::FIELD_CONVERSION_FACTOR_EXT] - : null; - if ($data[self::FIELD_CONVERSION_FACTOR] instanceof FHIRDecimal) { - $this->setConversionFactor($data[self::FIELD_CONVERSION_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONVERSION_FACTOR])) { - $this->setConversionFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_CONVERSION_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_CONVERSION_FACTOR])) { - $this->setConversionFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_CONVERSION_FACTOR]))); - } + if (isset($data[self::FIELD_CONVERSION_FACTOR]) || isset($data[self::FIELD_CONVERSION_FACTOR_EXT])) { + if (isset($data[self::FIELD_CONVERSION_FACTOR])) { + $value = $data[self::FIELD_CONVERSION_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONVERSION_FACTOR_EXT]) && is_array($data[self::FIELD_CONVERSION_FACTOR_EXT])) { + $ext = $data[self::FIELD_CONVERSION_FACTOR_EXT]; } else { - $this->setConversionFactor(new FHIRDecimal($data[self::FIELD_CONVERSION_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setConversionFactor($value); + } else if (is_array($value)) { + $this->setConversionFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setConversionFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConversionFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_CUSTOMARY_UNIT])) { @@ -186,20 +193,27 @@ public function __construct($data = null) $this->setCustomaryUnit(new FHIRCodeableConcept($data[self::FIELD_CUSTOMARY_UNIT])); } } - if (isset($data[self::FIELD_DECIMAL_PRECISION])) { - $ext = (isset($data[self::FIELD_DECIMAL_PRECISION_EXT]) && is_array($data[self::FIELD_DECIMAL_PRECISION_EXT])) - ? $data[self::FIELD_DECIMAL_PRECISION_EXT] - : null; - if ($data[self::FIELD_DECIMAL_PRECISION] instanceof FHIRInteger) { - $this->setDecimalPrecision($data[self::FIELD_DECIMAL_PRECISION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECIMAL_PRECISION])) { - $this->setDecimalPrecision(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DECIMAL_PRECISION]] + $ext)); - } else if (is_array($data[self::FIELD_DECIMAL_PRECISION])) { - $this->setDecimalPrecision(new FHIRInteger(array_merge($ext, $data[self::FIELD_DECIMAL_PRECISION]))); - } + if (isset($data[self::FIELD_DECIMAL_PRECISION]) || isset($data[self::FIELD_DECIMAL_PRECISION_EXT])) { + if (isset($data[self::FIELD_DECIMAL_PRECISION])) { + $value = $data[self::FIELD_DECIMAL_PRECISION]; } else { - $this->setDecimalPrecision(new FHIRInteger($data[self::FIELD_DECIMAL_PRECISION])); + $value = null; + } + if (isset($data[self::FIELD_DECIMAL_PRECISION_EXT]) && is_array($data[self::FIELD_DECIMAL_PRECISION_EXT])) { + $ext = $data[self::FIELD_DECIMAL_PRECISION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDecimalPrecision($value); + } else if (is_array($value)) { + $this->setDecimalPrecision(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDecimalPrecision(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDecimalPrecision(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_UNIT])) { @@ -495,8 +509,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getConversionFactor())) { $a[self::FIELD_CONVERSION_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_CONVERSION_FACTOR_EXT] = $enc; } } @@ -505,14 +521,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDecimalPrecision())) { $a[self::FIELD_DECIMAL_PRECISION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DECIMAL_PRECISION_EXT] = $enc; } } if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php index ffbad317e2..87cec64fdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIROperationDefinitionBinding extends FHIRBackboneElement const FIELD_VALUE_SET_EXT = '_valueSet'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Indication of the degree of conformance expectations associated with a binding. @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_STRENGTH])) { - $ext = (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) - ? $data[self::FIELD_STRENGTH_EXT] - : null; - if ($data[self::FIELD_STRENGTH] instanceof FHIRBindingStrength) { - $this->setStrength($data[self::FIELD_STRENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $data[self::FIELD_STRENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength(array_merge($ext, $data[self::FIELD_STRENGTH]))); - } + if (isset($data[self::FIELD_STRENGTH]) || isset($data[self::FIELD_STRENGTH_EXT])) { + if (isset($data[self::FIELD_STRENGTH])) { + $value = $data[self::FIELD_STRENGTH]; } else { - $this->setStrength(new FHIRBindingStrength($data[self::FIELD_STRENGTH])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_SET])) { - $ext = (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) - ? $data[self::FIELD_VALUE_SET_EXT] - : null; - if ($data[self::FIELD_VALUE_SET] instanceof FHIRCanonical) { - $this->setValueSet($data[self::FIELD_VALUE_SET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_SET]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRCanonical(array_merge($ext, $data[self::FIELD_VALUE_SET]))); + if (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) { + $ext = $data[self::FIELD_STRENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBindingStrength) { + $this->setStrength($value); + } else if (is_array($value)) { + $this->setStrength(new FHIRBindingStrength(array_merge($ext, $value))); + } else { + $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStrength(new FHIRBindingStrength($ext)); + } + } + if (isset($data[self::FIELD_VALUE_SET]) || isset($data[self::FIELD_VALUE_SET_EXT])) { + if (isset($data[self::FIELD_VALUE_SET])) { + $value = $data[self::FIELD_VALUE_SET]; } else { - $this->setValueSet(new FHIRCanonical($data[self::FIELD_VALUE_SET])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setValueSet($value); + } else if (is_array($value)) { + $this->setValueSet(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSet(new FHIRCanonical($ext)); } } } @@ -356,18 +370,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getStrength())) { $a[self::FIELD_STRENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBindingStrength::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBindingStrength::FIELD_VALUE]); $a[self::FIELD_STRENGTH_EXT] = $enc; } } if (null !== ($v = $this->getValueSet())) { $a[self::FIELD_VALUE_SET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php index b9b49e4f35..9fe9c236b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIROperationDefinitionOverload extends FHIRBackboneElement const FIELD_PARAMETER_NAME_EXT = '_parameterName'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,49 +130,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PARAMETER_NAME])) { - $ext = (isset($data[self::FIELD_PARAMETER_NAME_EXT]) && is_array($data[self::FIELD_PARAMETER_NAME_EXT])) - ? $data[self::FIELD_PARAMETER_NAME_EXT] - : null; - if (is_array($data[self::FIELD_PARAMETER_NAME])) { - foreach($data[self::FIELD_PARAMETER_NAME] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addParameterName($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addParameterName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addParameterName(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PARAMETER_NAME]) || isset($data[self::FIELD_PARAMETER_NAME_EXT])) { + if (isset($data[self::FIELD_PARAMETER_NAME])) { + $value = $data[self::FIELD_PARAMETER_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARAMETER_NAME_EXT]) && is_array($data[self::FIELD_PARAMETER_NAME_EXT])) { + $ext = $data[self::FIELD_PARAMETER_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addParameterName($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addParameterName($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addParameterName(new FHIRString(array_merge($v, $iext))); + } else { + $this->addParameterName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addParameterName(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addParameterName(new FHIRString(array_merge($ext, $value))); + } else { + $this->addParameterName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addParameterName(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PARAMETER_NAME] instanceof FHIRString) { - $this->addParameterName($data[self::FIELD_PARAMETER_NAME]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PARAMETER_NAME])) { - $this->addParameterName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARAMETER_NAME]] + $ext)); - } else { - $this->addParameterName(new FHIRString($data[self::FIELD_PARAMETER_NAME])); } } } @@ -400,25 +416,38 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getParameterName())) { $a[self::FIELD_PARAMETER_NAME] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PARAMETER_NAME][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PARAMETER_NAME_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PARAMETER_NAME_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PARAMETER_NAME_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php index 3082bd4535..8c6ee0ea34 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIROperationDefinitionParameter extends FHIRBackboneElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A formal computable definition of an operation (on the RESTful interface) or a @@ -264,68 +264,96 @@ public function __construct($data = null) $this->setBinding(new FHIROperationDefinitionBinding($data[self::FIELD_BINDING])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRCode) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRCode($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PART])) { @@ -364,81 +392,111 @@ public function __construct($data = null) $this->addReferencedFrom(new FHIROperationDefinitionReferencedFrom($data[self::FIELD_REFERENCED_FROM])); } } - if (isset($data[self::FIELD_SEARCH_TYPE])) { - $ext = (isset($data[self::FIELD_SEARCH_TYPE_EXT]) && is_array($data[self::FIELD_SEARCH_TYPE_EXT])) - ? $data[self::FIELD_SEARCH_TYPE_EXT] - : null; - if ($data[self::FIELD_SEARCH_TYPE] instanceof FHIRSearchParamType) { - $this->setSearchType($data[self::FIELD_SEARCH_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEARCH_TYPE])) { - $this->setSearchType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $data[self::FIELD_SEARCH_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_SEARCH_TYPE])) { - $this->setSearchType(new FHIRSearchParamType(array_merge($ext, $data[self::FIELD_SEARCH_TYPE]))); - } + if (isset($data[self::FIELD_SEARCH_TYPE]) || isset($data[self::FIELD_SEARCH_TYPE_EXT])) { + if (isset($data[self::FIELD_SEARCH_TYPE])) { + $value = $data[self::FIELD_SEARCH_TYPE]; } else { - $this->setSearchType(new FHIRSearchParamType($data[self::FIELD_SEARCH_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_SEARCH_TYPE_EXT]) && is_array($data[self::FIELD_SEARCH_TYPE_EXT])) { + $ext = $data[self::FIELD_SEARCH_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchParamType) { + $this->setSearchType($value); + } else if (is_array($value)) { + $this->setSearchType(new FHIRSearchParamType(array_merge($ext, $value))); + } else { + $this->setSearchType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSearchType(new FHIRSearchParamType($ext)); } } - if (isset($data[self::FIELD_TARGET_PROFILE])) { - $ext = (isset($data[self::FIELD_TARGET_PROFILE_EXT]) && is_array($data[self::FIELD_TARGET_PROFILE_EXT])) - ? $data[self::FIELD_TARGET_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_TARGET_PROFILE])) { - foreach($data[self::FIELD_TARGET_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addTargetProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTargetProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTargetProfile(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TARGET_PROFILE]) || isset($data[self::FIELD_TARGET_PROFILE_EXT])) { + if (isset($data[self::FIELD_TARGET_PROFILE])) { + $value = $data[self::FIELD_TARGET_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_PROFILE_EXT]) && is_array($data[self::FIELD_TARGET_PROFILE_EXT])) { + $ext = $data[self::FIELD_TARGET_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addTargetProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addTargetProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTargetProfile(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addTargetProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTargetProfile(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addTargetProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addTargetProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTargetProfile(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_TARGET_PROFILE] instanceof FHIRCanonical) { - $this->addTargetProfile($data[self::FIELD_TARGET_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TARGET_PROFILE])) { - $this->addTargetProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_TARGET_PROFILE]] + $ext)); - } else { - $this->addTargetProfile(new FHIRCanonical($data[self::FIELD_TARGET_PROFILE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIROperationParameterUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIROperationParameterUse([FHIROperationParameterUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIROperationParameterUse(array_merge($ext, $data[self::FIELD_USE]))); + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIROperationParameterUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROperationParameterUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIROperationParameterUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIROperationParameterUse([FHIROperationParameterUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIROperationParameterUse($ext)); } } } @@ -1146,74 +1204,111 @@ public function jsonSerialize() } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPart())) { - $a[self::FIELD_PART] = $vs; + $a[self::FIELD_PART] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART][] = $v; + } } if ([] !== ($vs = $this->getReferencedFrom())) { - $a[self::FIELD_REFERENCED_FROM] = $vs; + $a[self::FIELD_REFERENCED_FROM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCED_FROM][] = $v; + } } if (null !== ($v = $this->getSearchType())) { $a[self::FIELD_SEARCH_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchParamType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchParamType::FIELD_VALUE]); $a[self::FIELD_SEARCH_TYPE_EXT] = $enc; } } if ([] !== ($vs = $this->getTargetProfile())) { $a[self::FIELD_TARGET_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TARGET_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TARGET_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TARGET_PROFILE_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TARGET_PROFILE_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROperationParameterUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIROperationParameterUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFrom.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFrom.php index 5e380861f4..8fd0d9734a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFrom.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFrom.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIROperationDefinitionReferencedFrom extends FHIRBackboneElement const FIELD_SOURCE_ID_EXT = '_sourceId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRString) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRString(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRString($data[self::FIELD_SOURCE])); + $value = null; } - } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRString) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRString(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; } else { - $this->setSourceId(new FHIRString($data[self::FIELD_SOURCE_ID])); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRString($ext)); } } } @@ -368,18 +382,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php index bf4c87a42c..3c63a0d37f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIROperationOutcomeIssue extends FHIRBackboneElement const FIELD_SEVERITY_EXT = '_severity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A code that describes the type of issue. @@ -193,20 +193,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRIssueType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRIssueType([FHIRIssueType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRIssueType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRIssueType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIssueType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRIssueType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRIssueType([FHIRIssueType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRIssueType($ext)); } } if (isset($data[self::FIELD_DETAILS])) { @@ -216,94 +223,126 @@ public function __construct($data = null) $this->setDetails(new FHIRCodeableConcept($data[self::FIELD_DETAILS])); } } - if (isset($data[self::FIELD_DIAGNOSTICS])) { - $ext = (isset($data[self::FIELD_DIAGNOSTICS_EXT]) && is_array($data[self::FIELD_DIAGNOSTICS_EXT])) - ? $data[self::FIELD_DIAGNOSTICS_EXT] - : null; - if ($data[self::FIELD_DIAGNOSTICS] instanceof FHIRString) { - $this->setDiagnostics($data[self::FIELD_DIAGNOSTICS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIAGNOSTICS])) { - $this->setDiagnostics(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DIAGNOSTICS]] + $ext)); - } else if (is_array($data[self::FIELD_DIAGNOSTICS])) { - $this->setDiagnostics(new FHIRString(array_merge($ext, $data[self::FIELD_DIAGNOSTICS]))); - } + if (isset($data[self::FIELD_DIAGNOSTICS]) || isset($data[self::FIELD_DIAGNOSTICS_EXT])) { + if (isset($data[self::FIELD_DIAGNOSTICS])) { + $value = $data[self::FIELD_DIAGNOSTICS]; } else { - $this->setDiagnostics(new FHIRString($data[self::FIELD_DIAGNOSTICS])); + $value = null; + } + if (isset($data[self::FIELD_DIAGNOSTICS_EXT]) && is_array($data[self::FIELD_DIAGNOSTICS_EXT])) { + $ext = $data[self::FIELD_DIAGNOSTICS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDiagnostics($value); + } else if (is_array($value)) { + $this->setDiagnostics(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDiagnostics(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDiagnostics(new FHIRString($ext)); } } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if (is_array($data[self::FIELD_EXPRESSION])) { - foreach($data[self::FIELD_EXPRESSION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addExpression($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addExpression(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addExpression(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addExpression($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addExpression($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addExpression(new FHIRString(array_merge($v, $iext))); + } else { + $this->addExpression(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addExpression(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->addExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addExpression(new FHIRString($iext)); } - } elseif ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->addExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_EXPRESSION])) { - $this->addExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else { - $this->addExpression(new FHIRString($data[self::FIELD_EXPRESSION])); } } - if (isset($data[self::FIELD_LOCATION])) { - $ext = (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) - ? $data[self::FIELD_LOCATION_EXT] - : null; - if (is_array($data[self::FIELD_LOCATION])) { - foreach($data[self::FIELD_LOCATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLocation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLocation(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LOCATION]) || isset($data[self::FIELD_LOCATION_EXT])) { + if (isset($data[self::FIELD_LOCATION])) { + $value = $data[self::FIELD_LOCATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) { + $ext = $data[self::FIELD_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLocation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLocation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLocation(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLocation(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLocation(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_LOCATION] instanceof FHIRString) { - $this->addLocation($data[self::FIELD_LOCATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LOCATION])) { - $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOCATION]] + $ext)); - } else { - $this->addLocation(new FHIRString($data[self::FIELD_LOCATION])); - } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRIssueSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRIssueSeverity([FHIRIssueSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRIssueSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLocation(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; } else { - $this->setSeverity(new FHIRIssueSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIssueSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRIssueSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRIssueSeverity([FHIRIssueSeverity::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRIssueSeverity($ext)); } } } @@ -741,8 +780,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIssueType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIssueType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } @@ -751,48 +792,71 @@ public function jsonSerialize() } if (null !== ($v = $this->getDiagnostics())) { $a[self::FIELD_DIAGNOSTICS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DIAGNOSTICS_EXT] = $enc; } } if ([] !== ($vs = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_EXPRESSION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_EXPRESSION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_EXPRESSION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_EXPRESSION_EXT] = $encs; + } } if ([] !== ($vs = $this->getLocation())) { $a[self::FIELD_LOCATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LOCATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LOCATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LOCATION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LOCATION_EXT] = $encs; + } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIssueSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIssueSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php index e546660cf8..ec6dd324a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIROrganizationContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An address expressed using postal conventions (as opposed to GPS or other @@ -500,7 +500,16 @@ public function jsonSerialize() $a[self::FIELD_PURPOSE] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php index 19f74c1fe0..c69540e530 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -205,7 +205,7 @@ class FHIRParametersParameter extends FHIRBackboneElement const FIELD_VALUE_UUID_EXT = '_valueUuid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -862,20 +862,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART])) { @@ -950,68 +957,96 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CANONICAL])) { - $ext = (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) - ? $data[self::FIELD_VALUE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_VALUE_CANONICAL] instanceof FHIRCanonical) { - $this->setValueCanonical($data[self::FIELD_VALUE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_VALUE_CANONICAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CANONICAL]) || isset($data[self::FIELD_VALUE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_VALUE_CANONICAL])) { + $value = $data[self::FIELD_VALUE_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_VALUE_CANONICAL_EXT]; } else { - $this->setValueCanonical(new FHIRCanonical($data[self::FIELD_VALUE_CANONICAL])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setValueCanonical($value); + } else if (is_array($value)) { + $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -1063,52 +1098,73 @@ public function __construct($data = null) $this->setValueDataRequirement(new FHIRDataRequirement($data[self::FIELD_VALUE_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); - } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -1146,20 +1202,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -1169,52 +1232,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -1231,20 +1315,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PARAMETER_DEFINITION])) { @@ -1261,20 +1352,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1326,36 +1424,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1372,52 +1484,73 @@ public function __construct($data = null) $this->setValueTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_VALUE_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); - } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); - } - } - if (isset($data[self::FIELD_VALUE_URL])) { - $ext = (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) - ? $data[self::FIELD_VALUE_URL_EXT] - : null; - if ($data[self::FIELD_VALUE_URL] instanceof FHIRUrl) { - $this->setValueUrl($data[self::FIELD_VALUE_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_VALUE_URL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_VALUE_URL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URL]) || isset($data[self::FIELD_VALUE_URL_EXT])) { + if (isset($data[self::FIELD_VALUE_URL])) { + $value = $data[self::FIELD_VALUE_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) { + $ext = $data[self::FIELD_VALUE_URL_EXT]; } else { - $this->setValueUrl(new FHIRUrl($data[self::FIELD_VALUE_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setValueUrl($value); + } else if (is_array($value)) { + $this->setValueUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_VALUE_USAGE_CONTEXT])) { @@ -1427,20 +1560,27 @@ public function __construct($data = null) $this->setValueUsageContext(new FHIRUsageContext($data[self::FIELD_VALUE_USAGE_CONTEXT])); } } - if (isset($data[self::FIELD_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) - ? $data[self::FIELD_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_VALUE_UUID] instanceof FHIRUuid) { - $this->setValueUuid($data[self::FIELD_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_VALUE_UUID]))); - } + if (isset($data[self::FIELD_VALUE_UUID]) || isset($data[self::FIELD_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_VALUE_UUID])) { + $value = $data[self::FIELD_VALUE_UUID]; } else { - $this->setValueUuid(new FHIRUuid($data[self::FIELD_VALUE_UUID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_VALUE_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setValueUuid($value); + } else if (is_array($value)) { + $this->setValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUuid(new FHIRUuid($ext)); } } } @@ -3906,13 +4046,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPart())) { - $a[self::FIELD_PART] = $vs; + $a[self::FIELD_PART] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART][] = $v; + } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v; @@ -3931,29 +4079,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCanonical())) { $a[self::FIELD_VALUE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_VALUE_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -3980,22 +4136,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -4016,8 +4178,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -4026,22 +4190,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -4053,8 +4223,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -4066,8 +4238,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -4094,15 +4268,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -4114,22 +4292,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getValueUrl())) { $a[self::FIELD_VALUE_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_VALUE_URL_EXT] = $enc; } } @@ -4138,11 +4322,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUuid())) { $a[self::FIELD_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_VALUE_UUID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php index c16ab74822..2ce77e97ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPatientCommunication extends FHIRBackboneElement const FIELD_PREFERRED_EXT = '_preferred'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -141,20 +141,27 @@ public function __construct($data = null) $this->setLanguage(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_PREFERRED])) { - $ext = (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) - ? $data[self::FIELD_PREFERRED_EXT] - : null; - if ($data[self::FIELD_PREFERRED] instanceof FHIRBoolean) { - $this->setPreferred($data[self::FIELD_PREFERRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PREFERRED]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PREFERRED]))); - } + if (isset($data[self::FIELD_PREFERRED]) || isset($data[self::FIELD_PREFERRED_EXT])) { + if (isset($data[self::FIELD_PREFERRED])) { + $value = $data[self::FIELD_PREFERRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) { + $ext = $data[self::FIELD_PREFERRED_EXT]; } else { - $this->setPreferred(new FHIRBoolean($data[self::FIELD_PREFERRED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPreferred($value); + } else if (is_array($value)) { + $this->setPreferred(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreferred(new FHIRBoolean($ext)); } } } @@ -352,11 +359,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getPreferred())) { $a[self::FIELD_PREFERRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PREFERRED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php index 4c6e515506..53c2d2d703 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRPatientContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An address expressed using postal conventions (as opposed to GPS or other @@ -209,20 +209,27 @@ public function __construct($data = null) $this->setAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); - } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_NAME])) { @@ -715,8 +722,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } @@ -730,10 +739,25 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getRelationship())) { - $a[self::FIELD_RELATIONSHIP] = $vs; + $a[self::FIELD_RELATIONSHIP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATIONSHIP][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php index 69b0d19020..59981eb1da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPatientLink extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -136,20 +136,27 @@ public function __construct($data = null) $this->setOther(new FHIRReference($data[self::FIELD_OTHER])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRLinkType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkType([FHIRLinkType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRLinkType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLinkType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRLinkType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRLinkType([FHIRLinkType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRLinkType($ext)); } } } @@ -321,11 +328,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLinkType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLinkType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php index 7ff55430f1..8c1571a235 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRPaymentReconciliationDetail extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -241,20 +241,27 @@ public function __construct($data = null) $this->setAmount(new FHIRMoney($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -798,8 +805,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -827,6 +836,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php index 168109e0dc..3d3bf4bf21 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRPaymentReconciliationProcessNote extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -129,36 +129,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRNoteType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNoteType([FHIRNoteType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNoteType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRNoteType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNoteType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRNoteType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRNoteType([FHIRNoteType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRNoteType($ext)); } } } @@ -341,18 +355,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNoteType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNoteType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php index d3737116d3..d28594afe5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPersonLink extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The level of confidence that this link represents the same actual person, based @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ASSURANCE])) { - $ext = (isset($data[self::FIELD_ASSURANCE_EXT]) && is_array($data[self::FIELD_ASSURANCE_EXT])) - ? $data[self::FIELD_ASSURANCE_EXT] - : null; - if ($data[self::FIELD_ASSURANCE] instanceof FHIRIdentityAssuranceLevel) { - $this->setAssurance($data[self::FIELD_ASSURANCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ASSURANCE])) { - $this->setAssurance(new FHIRIdentityAssuranceLevel([FHIRIdentityAssuranceLevel::FIELD_VALUE => $data[self::FIELD_ASSURANCE]] + $ext)); - } else if (is_array($data[self::FIELD_ASSURANCE])) { - $this->setAssurance(new FHIRIdentityAssuranceLevel(array_merge($ext, $data[self::FIELD_ASSURANCE]))); - } + if (isset($data[self::FIELD_ASSURANCE]) || isset($data[self::FIELD_ASSURANCE_EXT])) { + if (isset($data[self::FIELD_ASSURANCE])) { + $value = $data[self::FIELD_ASSURANCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ASSURANCE_EXT]) && is_array($data[self::FIELD_ASSURANCE_EXT])) { + $ext = $data[self::FIELD_ASSURANCE_EXT]; } else { - $this->setAssurance(new FHIRIdentityAssuranceLevel($data[self::FIELD_ASSURANCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIdentityAssuranceLevel) { + $this->setAssurance($value); + } else if (is_array($value)) { + $this->setAssurance(new FHIRIdentityAssuranceLevel(array_merge($ext, $value))); + } else { + $this->setAssurance(new FHIRIdentityAssuranceLevel([FHIRIdentityAssuranceLevel::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAssurance(new FHIRIdentityAssuranceLevel($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -321,14 +328,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAssurance())) { $a[self::FIELD_ASSURANCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIdentityAssuranceLevel::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIdentityAssuranceLevel::FIELD_VALUE]); $a[self::FIELD_ASSURANCE_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php index d0d7cdfb33..814c909405 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -151,7 +151,7 @@ class FHIRPlanDefinitionAction extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource allows for the definition of various types of plans as a sharable, @@ -617,20 +617,27 @@ public function __construct($data = null) $this->addAction(new FHIRPlanDefinitionAction($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]) && is_array($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) - ? $data[self::FIELD_CARDINALITY_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_CARDINALITY_BEHAVIOR] instanceof FHIRActionCardinalityBehavior) { - $this->setCardinalityBehavior($data[self::FIELD_CARDINALITY_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior([FHIRActionCardinalityBehavior::FIELD_VALUE => $data[self::FIELD_CARDINALITY_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior(array_merge($ext, $data[self::FIELD_CARDINALITY_BEHAVIOR]))); - } + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR]) || isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR])) { + $value = $data[self::FIELD_CARDINALITY_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]) && is_array($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]; } else { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior($data[self::FIELD_CARDINALITY_BEHAVIOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionCardinalityBehavior) { + $this->setCardinalityBehavior($value); + } else if (is_array($value)) { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior(array_merge($ext, $value))); + } else { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior([FHIRActionCardinalityBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -669,52 +676,73 @@ public function __construct($data = null) $this->addCondition(new FHIRPlanDefinitionCondition($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_DEFINITION_CANONICAL])) { - $ext = (isset($data[self::FIELD_DEFINITION_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFINITION_CANONICAL_EXT])) - ? $data[self::FIELD_DEFINITION_CANONICAL_EXT] - : null; - if ($data[self::FIELD_DEFINITION_CANONICAL] instanceof FHIRCanonical) { - $this->setDefinitionCanonical($data[self::FIELD_DEFINITION_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION_CANONICAL])) { - $this->setDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFINITION_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION_CANONICAL])) { - $this->setDefinitionCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFINITION_CANONICAL]))); - } + if (isset($data[self::FIELD_DEFINITION_CANONICAL]) || isset($data[self::FIELD_DEFINITION_CANONICAL_EXT])) { + if (isset($data[self::FIELD_DEFINITION_CANONICAL])) { + $value = $data[self::FIELD_DEFINITION_CANONICAL]; } else { - $this->setDefinitionCanonical(new FHIRCanonical($data[self::FIELD_DEFINITION_CANONICAL])); + $value = null; } - } - if (isset($data[self::FIELD_DEFINITION_URI])) { - $ext = (isset($data[self::FIELD_DEFINITION_URI_EXT]) && is_array($data[self::FIELD_DEFINITION_URI_EXT])) - ? $data[self::FIELD_DEFINITION_URI_EXT] - : null; - if ($data[self::FIELD_DEFINITION_URI] instanceof FHIRUri) { - $this->setDefinitionUri($data[self::FIELD_DEFINITION_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION_URI])) { - $this->setDefinitionUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION_URI]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION_URI])) { - $this->setDefinitionUri(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION_URI]))); - } + if (isset($data[self::FIELD_DEFINITION_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFINITION_CANONICAL_EXT])) { + $ext = $data[self::FIELD_DEFINITION_CANONICAL_EXT]; } else { - $this->setDefinitionUri(new FHIRUri($data[self::FIELD_DEFINITION_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefinitionCanonical($value); + } else if (is_array($value)) { + $this->setDefinitionCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinitionCanonical(new FHIRCanonical($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DEFINITION_URI]) || isset($data[self::FIELD_DEFINITION_URI_EXT])) { + if (isset($data[self::FIELD_DEFINITION_URI])) { + $value = $data[self::FIELD_DEFINITION_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_URI_EXT]) && is_array($data[self::FIELD_DEFINITION_URI_EXT])) { + $ext = $data[self::FIELD_DEFINITION_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinitionUri($value); + } else if (is_array($value)) { + $this->setDefinitionUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinitionUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinitionUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOCUMENTATION])) { @@ -753,49 +781,65 @@ public function __construct($data = null) $this->addDynamicValue(new FHIRPlanDefinitionDynamicValue($data[self::FIELD_DYNAMIC_VALUE])); } } - if (isset($data[self::FIELD_GOAL_ID])) { - $ext = (isset($data[self::FIELD_GOAL_ID_EXT]) && is_array($data[self::FIELD_GOAL_ID_EXT])) - ? $data[self::FIELD_GOAL_ID_EXT] - : null; - if (is_array($data[self::FIELD_GOAL_ID])) { - foreach($data[self::FIELD_GOAL_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRId) { - $this->addGoalId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addGoalId(new FHIRId([FHIRId::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addGoalId(new FHIRId(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_GOAL_ID]) || isset($data[self::FIELD_GOAL_ID_EXT])) { + if (isset($data[self::FIELD_GOAL_ID])) { + $value = $data[self::FIELD_GOAL_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GOAL_ID_EXT]) && is_array($data[self::FIELD_GOAL_ID_EXT])) { + $ext = $data[self::FIELD_GOAL_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->addGoalId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRId) { + $this->addGoalId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addGoalId(new FHIRId(array_merge($v, $iext))); + } else { + $this->addGoalId(new FHIRId([FHIRId::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addGoalId(new FHIRId($v)); } + } elseif (is_array($value)) { + $this->addGoalId(new FHIRId(array_merge($ext, $value))); + } else { + $this->addGoalId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_GOAL_ID] instanceof FHIRId) { - $this->addGoalId($data[self::FIELD_GOAL_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_GOAL_ID])) { - $this->addGoalId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_GOAL_ID]] + $ext)); - } else { - $this->addGoalId(new FHIRId($data[self::FIELD_GOAL_ID])); - } - } - if (isset($data[self::FIELD_GROUPING_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT]) && is_array($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) - ? $data[self::FIELD_GROUPING_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_GROUPING_BEHAVIOR] instanceof FHIRActionGroupingBehavior) { - $this->setGroupingBehavior($data[self::FIELD_GROUPING_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUPING_BEHAVIOR])) { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior([FHIRActionGroupingBehavior::FIELD_VALUE => $data[self::FIELD_GROUPING_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_GROUPING_BEHAVIOR])) { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior(array_merge($ext, $data[self::FIELD_GROUPING_BEHAVIOR]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addGoalId(new FHIRId($iext)); } + } + } + if (isset($data[self::FIELD_GROUPING_BEHAVIOR]) || isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_GROUPING_BEHAVIOR])) { + $value = $data[self::FIELD_GROUPING_BEHAVIOR]; } else { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior($data[self::FIELD_GROUPING_BEHAVIOR])); + $value = null; + } + if (isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT]) && is_array($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_GROUPING_BEHAVIOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionGroupingBehavior) { + $this->setGroupingBehavior($value); + } else if (is_array($value)) { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior(array_merge($ext, $value))); + } else { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior([FHIRActionGroupingBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior($ext)); } } if (isset($data[self::FIELD_INPUT])) { @@ -852,52 +896,73 @@ public function __construct($data = null) $this->addParticipant(new FHIRPlanDefinitionParticipant($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT]) && is_array($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) - ? $data[self::FIELD_PRECHECK_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_PRECHECK_BEHAVIOR] instanceof FHIRActionPrecheckBehavior) { - $this->setPrecheckBehavior($data[self::FIELD_PRECHECK_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior([FHIRActionPrecheckBehavior::FIELD_VALUE => $data[self::FIELD_PRECHECK_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior(array_merge($ext, $data[self::FIELD_PRECHECK_BEHAVIOR]))); - } + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR]) || isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR])) { + $value = $data[self::FIELD_PRECHECK_BEHAVIOR]; } else { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior($data[self::FIELD_PRECHECK_BEHAVIOR])); + $value = null; } - } - if (isset($data[self::FIELD_PREFIX])) { - $ext = (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) - ? $data[self::FIELD_PREFIX_EXT] - : null; - if ($data[self::FIELD_PREFIX] instanceof FHIRString) { - $this->setPrefix($data[self::FIELD_PREFIX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFIX])) { - $this->setPrefix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREFIX]] + $ext)); - } else if (is_array($data[self::FIELD_PREFIX])) { - $this->setPrefix(new FHIRString(array_merge($ext, $data[self::FIELD_PREFIX]))); - } + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT]) && is_array($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_PRECHECK_BEHAVIOR_EXT]; } else { - $this->setPrefix(new FHIRString($data[self::FIELD_PREFIX])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionPrecheckBehavior) { + $this->setPrecheckBehavior($value); + } else if (is_array($value)) { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior(array_merge($ext, $value))); + } else { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior([FHIRActionPrecheckBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior($ext)); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); + if (isset($data[self::FIELD_PREFIX]) || isset($data[self::FIELD_PREFIX_EXT])) { + if (isset($data[self::FIELD_PREFIX])) { + $value = $data[self::FIELD_PREFIX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) { + $ext = $data[self::FIELD_PREFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPrefix($value); + } else if (is_array($value)) { + $this->setPrefix(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPrefix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPrefix(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON])) { @@ -936,36 +1001,50 @@ public function __construct($data = null) $this->addRelatedAction(new FHIRPlanDefinitionRelatedAction($data[self::FIELD_RELATED_ACTION])); } } - if (isset($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT]) && is_array($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) - ? $data[self::FIELD_REQUIRED_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_REQUIRED_BEHAVIOR] instanceof FHIRActionRequiredBehavior) { - $this->setRequiredBehavior($data[self::FIELD_REQUIRED_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior([FHIRActionRequiredBehavior::FIELD_VALUE => $data[self::FIELD_REQUIRED_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior(array_merge($ext, $data[self::FIELD_REQUIRED_BEHAVIOR]))); - } + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR]) || isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR])) { + $value = $data[self::FIELD_REQUIRED_BEHAVIOR]; } else { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior($data[self::FIELD_REQUIRED_BEHAVIOR])); + $value = null; } - } - if (isset($data[self::FIELD_SELECTION_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT]) && is_array($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) - ? $data[self::FIELD_SELECTION_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_SELECTION_BEHAVIOR] instanceof FHIRActionSelectionBehavior) { - $this->setSelectionBehavior($data[self::FIELD_SELECTION_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SELECTION_BEHAVIOR])) { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior([FHIRActionSelectionBehavior::FIELD_VALUE => $data[self::FIELD_SELECTION_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_SELECTION_BEHAVIOR])) { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior(array_merge($ext, $data[self::FIELD_SELECTION_BEHAVIOR]))); + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT]) && is_array($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_REQUIRED_BEHAVIOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionRequiredBehavior) { + $this->setRequiredBehavior($value); + } else if (is_array($value)) { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior(array_merge($ext, $value))); + } else { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior([FHIRActionRequiredBehavior::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior($ext)); + } + } + if (isset($data[self::FIELD_SELECTION_BEHAVIOR]) || isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_SELECTION_BEHAVIOR])) { + $value = $data[self::FIELD_SELECTION_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT]) && is_array($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_SELECTION_BEHAVIOR_EXT]; } else { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior($data[self::FIELD_SELECTION_BEHAVIOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionSelectionBehavior) { + $this->setSelectionBehavior($value); + } else if (is_array($value)) { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior(array_merge($ext, $value))); + } else { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior([FHIRActionSelectionBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior($ext)); } } if (isset($data[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { @@ -982,20 +1061,27 @@ public function __construct($data = null) $this->setSubjectReference(new FHIRReference($data[self::FIELD_SUBJECT_REFERENCE])); } } - if (isset($data[self::FIELD_TEXT_EQUIVALENT])) { - $ext = (isset($data[self::FIELD_TEXT_EQUIVALENT_EXT]) && is_array($data[self::FIELD_TEXT_EQUIVALENT_EXT])) - ? $data[self::FIELD_TEXT_EQUIVALENT_EXT] - : null; - if ($data[self::FIELD_TEXT_EQUIVALENT] instanceof FHIRString) { - $this->setTextEquivalent($data[self::FIELD_TEXT_EQUIVALENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT_EQUIVALENT])) { - $this->setTextEquivalent(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT_EQUIVALENT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT_EQUIVALENT])) { - $this->setTextEquivalent(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT_EQUIVALENT]))); - } + if (isset($data[self::FIELD_TEXT_EQUIVALENT]) || isset($data[self::FIELD_TEXT_EQUIVALENT_EXT])) { + if (isset($data[self::FIELD_TEXT_EQUIVALENT])) { + $value = $data[self::FIELD_TEXT_EQUIVALENT]; } else { - $this->setTextEquivalent(new FHIRString($data[self::FIELD_TEXT_EQUIVALENT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EQUIVALENT_EXT]) && is_array($data[self::FIELD_TEXT_EQUIVALENT_EXT])) { + $ext = $data[self::FIELD_TEXT_EQUIVALENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTextEquivalent($value); + } else if (is_array($value)) { + $this->setTextEquivalent(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTextEquivalent(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTextEquivalent(new FHIRString($ext)); } } if (isset($data[self::FIELD_TIMING_AGE])) { @@ -1005,20 +1091,27 @@ public function __construct($data = null) $this->setTimingAge(new FHIRAge($data[self::FIELD_TIMING_AGE])); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_DURATION])) { @@ -1049,36 +1142,50 @@ public function __construct($data = null) $this->setTimingTiming(new FHIRTiming($data[self::FIELD_TIMING_TIMING])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; } - } - if (isset($data[self::FIELD_TRANSFORM])) { - $ext = (isset($data[self::FIELD_TRANSFORM_EXT]) && is_array($data[self::FIELD_TRANSFORM_EXT])) - ? $data[self::FIELD_TRANSFORM_EXT] - : null; - if ($data[self::FIELD_TRANSFORM] instanceof FHIRCanonical) { - $this->setTransform($data[self::FIELD_TRANSFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRANSFORM])) { - $this->setTransform(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_TRANSFORM]] + $ext)); - } else if (is_array($data[self::FIELD_TRANSFORM])) { - $this->setTransform(new FHIRCanonical(array_merge($ext, $data[self::FIELD_TRANSFORM]))); + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TRANSFORM]) || isset($data[self::FIELD_TRANSFORM_EXT])) { + if (isset($data[self::FIELD_TRANSFORM])) { + $value = $data[self::FIELD_TRANSFORM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRANSFORM_EXT]) && is_array($data[self::FIELD_TRANSFORM_EXT])) { + $ext = $data[self::FIELD_TRANSFORM_EXT]; } else { - $this->setTransform(new FHIRCanonical($data[self::FIELD_TRANSFORM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setTransform($value); + } else if (is_array($value)) { + $this->setTransform(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setTransform(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTransform(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_TRIGGER])) { @@ -3083,117 +3190,205 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getCardinalityBehavior())) { $a[self::FIELD_CARDINALITY_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionCardinalityBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionCardinalityBehavior::FIELD_VALUE]); $a[self::FIELD_CARDINALITY_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if (null !== ($v = $this->getDefinitionCanonical())) { $a[self::FIELD_DEFINITION_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFINITION_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getDefinitionUri())) { $a[self::FIELD_DEFINITION_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_URI_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDocumentation())) { - $a[self::FIELD_DOCUMENTATION] = $vs; + $a[self::FIELD_DOCUMENTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENTATION][] = $v; + } } if ([] !== ($vs = $this->getDynamicValue())) { - $a[self::FIELD_DYNAMIC_VALUE] = $vs; + $a[self::FIELD_DYNAMIC_VALUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DYNAMIC_VALUE][] = $v; + } } if ([] !== ($vs = $this->getGoalId())) { $a[self::FIELD_GOAL_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_GOAL_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_GOAL_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRId::FIELD_VALUE]) || array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_GOAL_ID_EXT][] = null; + unset($enc[FHIRId::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_GOAL_ID_EXT] = $encs; + } } if (null !== ($v = $this->getGroupingBehavior())) { $a[self::FIELD_GROUPING_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionGroupingBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionGroupingBehavior::FIELD_VALUE]); $a[self::FIELD_GROUPING_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getInput())) { - $a[self::FIELD_INPUT] = $vs; + $a[self::FIELD_INPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INPUT][] = $v; + } } if ([] !== ($vs = $this->getOutput())) { - $a[self::FIELD_OUTPUT] = $vs; + $a[self::FIELD_OUTPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTPUT][] = $v; + } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPrecheckBehavior())) { $a[self::FIELD_PRECHECK_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionPrecheckBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionPrecheckBehavior::FIELD_VALUE]); $a[self::FIELD_PRECHECK_BEHAVIOR_EXT] = $enc; } } if (null !== ($v = $this->getPrefix())) { $a[self::FIELD_PREFIX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PREFIX_EXT] = $enc; } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getRelatedAction())) { - $a[self::FIELD_RELATED_ACTION] = $vs; + $a[self::FIELD_RELATED_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ACTION][] = $v; + } } if (null !== ($v = $this->getRequiredBehavior())) { $a[self::FIELD_REQUIRED_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionRequiredBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionRequiredBehavior::FIELD_VALUE]); $a[self::FIELD_REQUIRED_BEHAVIOR_EXT] = $enc; } } if (null !== ($v = $this->getSelectionBehavior())) { $a[self::FIELD_SELECTION_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionSelectionBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionSelectionBehavior::FIELD_VALUE]); $a[self::FIELD_SELECTION_BEHAVIOR_EXT] = $enc; } } @@ -3205,8 +3400,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTextEquivalent())) { $a[self::FIELD_TEXT_EQUIVALENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EQUIVALENT_EXT] = $enc; } } @@ -3215,8 +3412,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -3234,24 +3433,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getTransform())) { $a[self::FIELD_TRANSFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_TRANSFORM_EXT] = $enc; } } if ([] !== ($vs = $this->getTrigger())) { - $a[self::FIELD_TRIGGER] = $vs; + $a[self::FIELD_TRIGGER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TRIGGER][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php index 956dc5bb34..b4cded95fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRPlanDefinitionCondition extends FHIRBackboneElement const FIELD_KIND_EXT = '_kind'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A expression that is evaluated in a specified context and returns a value. The @@ -141,20 +141,27 @@ public function __construct($data = null) $this->setExpression(new FHIRExpression($data[self::FIELD_EXPRESSION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRActionConditionKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRActionConditionKind([FHIRActionConditionKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRActionConditionKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setKind(new FHIRActionConditionKind($data[self::FIELD_KIND])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionConditionKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRActionConditionKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRActionConditionKind([FHIRActionConditionKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRActionConditionKind($ext)); } } } @@ -332,11 +339,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionConditionKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionConditionKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php index ccb2301b87..dcedc472bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRPlanDefinitionDynamicValue extends FHIRBackboneElement const FIELD_PATH_EXT = '_path'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A expression that is evaluated in a specified context and returns a value. The @@ -148,20 +148,27 @@ public function __construct($data = null) $this->setExpression(new FHIRExpression($data[self::FIELD_EXPRESSION])); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } } @@ -369,11 +376,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php index dd5a336369..aaec46fc7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRPlanDefinitionGoal extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -764,7 +764,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAddresses())) { - $a[self::FIELD_ADDRESSES] = $vs; + $a[self::FIELD_ADDRESSES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESSES][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -773,7 +779,13 @@ public function jsonSerialize() $a[self::FIELD_DESCRIPTION] = $v; } if ([] !== ($vs = $this->getDocumentation())) { - $a[self::FIELD_DOCUMENTATION] = $vs; + $a[self::FIELD_DOCUMENTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENTATION][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v; @@ -782,7 +794,16 @@ public function jsonSerialize() $a[self::FIELD_START] = $v; } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php index b0b4541d6e..9756165d23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRPlanDefinitionParticipant extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -139,20 +139,27 @@ public function __construct($data = null) $this->setRole(new FHIRCodeableConcept($data[self::FIELD_ROLE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRActionParticipantType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRActionParticipantType([FHIRActionParticipantType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRActionParticipantType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRActionParticipantType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionParticipantType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRActionParticipantType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRActionParticipantType([FHIRActionParticipantType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRActionParticipantType($ext)); } } } @@ -326,11 +333,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionParticipantType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionParticipantType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php index e0987c4c91..db32cbff58 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRPlanDefinitionRelatedAction extends FHIRBackboneElement const FIELD_RELATIONSHIP_EXT = '_relationship'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -163,20 +163,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION_ID])) { - $ext = (isset($data[self::FIELD_ACTION_ID_EXT]) && is_array($data[self::FIELD_ACTION_ID_EXT])) - ? $data[self::FIELD_ACTION_ID_EXT] - : null; - if ($data[self::FIELD_ACTION_ID] instanceof FHIRId) { - $this->setActionId($data[self::FIELD_ACTION_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION_ID])) { - $this->setActionId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_ACTION_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION_ID])) { - $this->setActionId(new FHIRId(array_merge($ext, $data[self::FIELD_ACTION_ID]))); - } + if (isset($data[self::FIELD_ACTION_ID]) || isset($data[self::FIELD_ACTION_ID_EXT])) { + if (isset($data[self::FIELD_ACTION_ID])) { + $value = $data[self::FIELD_ACTION_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTION_ID_EXT]) && is_array($data[self::FIELD_ACTION_ID_EXT])) { + $ext = $data[self::FIELD_ACTION_ID_EXT]; } else { - $this->setActionId(new FHIRId($data[self::FIELD_ACTION_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setActionId($value); + } else if (is_array($value)) { + $this->setActionId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setActionId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActionId(new FHIRId($ext)); } } if (isset($data[self::FIELD_OFFSET_DURATION])) { @@ -193,20 +200,27 @@ public function __construct($data = null) $this->setOffsetRange(new FHIRRange($data[self::FIELD_OFFSET_RANGE])); } } - if (isset($data[self::FIELD_RELATIONSHIP])) { - $ext = (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) - ? $data[self::FIELD_RELATIONSHIP_EXT] - : null; - if ($data[self::FIELD_RELATIONSHIP] instanceof FHIRActionRelationshipType) { - $this->setRelationship($data[self::FIELD_RELATIONSHIP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRActionRelationshipType([FHIRActionRelationshipType::FIELD_VALUE => $data[self::FIELD_RELATIONSHIP]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRActionRelationshipType(array_merge($ext, $data[self::FIELD_RELATIONSHIP]))); - } + if (isset($data[self::FIELD_RELATIONSHIP]) || isset($data[self::FIELD_RELATIONSHIP_EXT])) { + if (isset($data[self::FIELD_RELATIONSHIP])) { + $value = $data[self::FIELD_RELATIONSHIP]; } else { - $this->setRelationship(new FHIRActionRelationshipType($data[self::FIELD_RELATIONSHIP])); + $value = null; + } + if (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) { + $ext = $data[self::FIELD_RELATIONSHIP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionRelationshipType) { + $this->setRelationship($value); + } else if (is_array($value)) { + $this->setRelationship(new FHIRActionRelationshipType(array_merge($ext, $value))); + } else { + $this->setRelationship(new FHIRActionRelationshipType([FHIRActionRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelationship(new FHIRActionRelationshipType($ext)); } } } @@ -473,8 +487,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActionId())) { $a[self::FIELD_ACTION_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_ACTION_ID_EXT] = $enc; } } @@ -486,11 +502,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionRelationshipType::FIELD_VALUE]); $a[self::FIELD_RELATIONSHIP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php index dfa7b1f121..484c5ceda9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRPlanDefinitionTarget extends FHIRBackboneElement const FIELD_MEASURE = 'measure'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -556,6 +556,9 @@ public function jsonSerialize() if (null !== ($v = $this->getMeasure())) { $a[self::FIELD_MEASURE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPopulation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPopulation.php index 69c365ca60..56087b3ce2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRPopulation extends FHIRBackboneElement const FIELD_RACE = 'race'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -505,6 +505,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRace())) { $a[self::FIELD_RACE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php index f5f0fb54e5..0f97996525 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRPractitionerQualification extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -476,7 +476,13 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIssuer())) { $a[self::FIELD_ISSUER] = $v; @@ -484,6 +490,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php index e190b52820..5db24f948f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRPractitionerRoleAvailableTime extends FHIRBackboneElement const FIELD_DAYS_OF_WEEK_EXT = '_daysOfWeek'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -156,81 +156,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALL_DAY])) { - $ext = (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) - ? $data[self::FIELD_ALL_DAY_EXT] - : null; - if ($data[self::FIELD_ALL_DAY] instanceof FHIRBoolean) { - $this->setAllDay($data[self::FIELD_ALL_DAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALL_DAY]] + $ext)); - } else if (is_array($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALL_DAY]))); - } + if (isset($data[self::FIELD_ALL_DAY]) || isset($data[self::FIELD_ALL_DAY_EXT])) { + if (isset($data[self::FIELD_ALL_DAY])) { + $value = $data[self::FIELD_ALL_DAY]; } else { - $this->setAllDay(new FHIRBoolean($data[self::FIELD_ALL_DAY])); + $value = null; } - } - if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_END_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_END_TIME] instanceof FHIRTime) { - $this->setAvailableEndTime($data[self::FIELD_AVAILABLE_END_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_END_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_END_TIME]))); - } + if (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) { + $ext = $data[self::FIELD_ALL_DAY_EXT]; } else { - $this->setAvailableEndTime(new FHIRTime($data[self::FIELD_AVAILABLE_END_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllDay($value); + } else if (is_array($value)) { + $this->setAllDay(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllDay(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_START_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_START_TIME] instanceof FHIRTime) { - $this->setAvailableStartTime($data[self::FIELD_AVAILABLE_START_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_START_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_START_TIME]))); + if (isset($data[self::FIELD_AVAILABLE_END_TIME]) || isset($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { + $value = $data[self::FIELD_AVAILABLE_END_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_END_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableEndTime($value); + } else if (is_array($value)) { + $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAvailableEndTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME]) || isset($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { + $value = $data[self::FIELD_AVAILABLE_START_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_START_TIME_EXT]; } else { - $this->setAvailableStartTime(new FHIRTime($data[self::FIELD_AVAILABLE_START_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableStartTime($value); + } else if (is_array($value)) { + $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailableStartTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_DAYS_OF_WEEK])) { - $ext = (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) - ? $data[self::FIELD_DAYS_OF_WEEK_EXT] - : null; - if (is_array($data[self::FIELD_DAYS_OF_WEEK])) { - foreach($data[self::FIELD_DAYS_OF_WEEK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DAYS_OF_WEEK]) || isset($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + if (isset($data[self::FIELD_DAYS_OF_WEEK])) { + $value = $data[self::FIELD_DAYS_OF_WEEK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + $ext = $data[self::FIELD_DAYS_OF_WEEK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $iext))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($v)); } + } elseif (is_array($value)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($ext, $value))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDaysOfWeek(new FHIRDaysOfWeek($iext)); } - } elseif ($data[self::FIELD_DAYS_OF_WEEK] instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DAYS_OF_WEEK])) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $data[self::FIELD_DAYS_OF_WEEK]] + $ext)); - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK])); } } } @@ -549,39 +579,56 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllDay())) { $a[self::FIELD_ALL_DAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALL_DAY_EXT] = $enc; } } if (null !== ($v = $this->getAvailableEndTime())) { $a[self::FIELD_AVAILABLE_END_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_END_TIME_EXT] = $enc; } } if (null !== ($v = $this->getAvailableStartTime())) { $a[self::FIELD_AVAILABLE_START_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_START_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getDaysOfWeek())) { $a[self::FIELD_DAYS_OF_WEEK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DAYS_OF_WEEK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDaysOfWeek::FIELD_VALUE]) || array_key_exists(FHIRDaysOfWeek::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = null; + unset($enc[FHIRDaysOfWeek::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DAYS_OF_WEEK_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php index ce5a93bc3b..f6141a03f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPractitionerRoleNotAvailable extends FHIRBackboneElement const FIELD_DURING = 'during'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DURING])) { @@ -340,14 +347,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDuring())) { $a[self::FIELD_DURING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php index c653520b1d..f59379b1b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRProcedureFocalDevice extends FHIRBackboneElement const FIELD_MANIPULATED = 'manipulated'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getManipulated())) { $a[self::FIELD_MANIPULATED] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php index 508fdee238..6820050f14 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRProcedurePerformer extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -380,6 +380,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristic.php index 79f897b274..dd3ec88f2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRProdCharacteristic extends FHIRBackboneElement const FIELD_WIDTH = 'width'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -279,33 +279,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COLOR])) { - $ext = (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) - ? $data[self::FIELD_COLOR_EXT] - : null; - if (is_array($data[self::FIELD_COLOR])) { - foreach($data[self::FIELD_COLOR] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addColor($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addColor(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addColor(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COLOR]) || isset($data[self::FIELD_COLOR_EXT])) { + if (isset($data[self::FIELD_COLOR])) { + $value = $data[self::FIELD_COLOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) { + $ext = $data[self::FIELD_COLOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addColor($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addColor($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addColor(new FHIRString(array_merge($v, $iext))); + } else { + $this->addColor(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addColor(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addColor(new FHIRString(array_merge($ext, $value))); + } else { + $this->addColor(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addColor(new FHIRString($iext)); } - } elseif ($data[self::FIELD_COLOR] instanceof FHIRString) { - $this->addColor($data[self::FIELD_COLOR]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COLOR])) { - $this->addColor(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COLOR]] + $ext)); - } else { - $this->addColor(new FHIRString($data[self::FIELD_COLOR])); } } if (isset($data[self::FIELD_DEPTH])) { @@ -347,33 +356,42 @@ public function __construct($data = null) $this->addImage(new FHIRAttachment($data[self::FIELD_IMAGE])); } } - if (isset($data[self::FIELD_IMPRINT])) { - $ext = (isset($data[self::FIELD_IMPRINT_EXT]) && is_array($data[self::FIELD_IMPRINT_EXT])) - ? $data[self::FIELD_IMPRINT_EXT] - : null; - if (is_array($data[self::FIELD_IMPRINT])) { - foreach($data[self::FIELD_IMPRINT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addImprint($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addImprint(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addImprint(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_IMPRINT]) || isset($data[self::FIELD_IMPRINT_EXT])) { + if (isset($data[self::FIELD_IMPRINT])) { + $value = $data[self::FIELD_IMPRINT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPRINT_EXT]) && is_array($data[self::FIELD_IMPRINT_EXT])) { + $ext = $data[self::FIELD_IMPRINT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addImprint($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addImprint($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addImprint(new FHIRString(array_merge($v, $iext))); + } else { + $this->addImprint(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addImprint(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addImprint(new FHIRString(array_merge($ext, $value))); + } else { + $this->addImprint(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addImprint(new FHIRString($iext)); } - } elseif ($data[self::FIELD_IMPRINT] instanceof FHIRString) { - $this->addImprint($data[self::FIELD_IMPRINT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_IMPRINT])) { - $this->addImprint(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IMPRINT]] + $ext)); - } else { - $this->addImprint(new FHIRString($data[self::FIELD_IMPRINT])); } } if (isset($data[self::FIELD_NOMINAL_VOLUME])) { @@ -390,20 +408,27 @@ public function __construct($data = null) $this->setScoring(new FHIRCodeableConcept($data[self::FIELD_SCORING])); } } - if (isset($data[self::FIELD_SHAPE])) { - $ext = (isset($data[self::FIELD_SHAPE_EXT]) && is_array($data[self::FIELD_SHAPE_EXT])) - ? $data[self::FIELD_SHAPE_EXT] - : null; - if ($data[self::FIELD_SHAPE] instanceof FHIRString) { - $this->setShape($data[self::FIELD_SHAPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SHAPE])) { - $this->setShape(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SHAPE]] + $ext)); - } else if (is_array($data[self::FIELD_SHAPE])) { - $this->setShape(new FHIRString(array_merge($ext, $data[self::FIELD_SHAPE]))); - } + if (isset($data[self::FIELD_SHAPE]) || isset($data[self::FIELD_SHAPE_EXT])) { + if (isset($data[self::FIELD_SHAPE])) { + $value = $data[self::FIELD_SHAPE]; } else { - $this->setShape(new FHIRString($data[self::FIELD_SHAPE])); + $value = null; + } + if (isset($data[self::FIELD_SHAPE_EXT]) && is_array($data[self::FIELD_SHAPE_EXT])) { + $ext = $data[self::FIELD_SHAPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setShape($value); + } else if (is_array($value)) { + $this->setShape(new FHIRString(array_merge($ext, $value))); + } else { + $this->setShape(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setShape(new FHIRString($ext)); } } if (isset($data[self::FIELD_WEIGHT])) { @@ -1115,18 +1140,26 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getColor())) { $a[self::FIELD_COLOR] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COLOR][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COLOR_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COLOR_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COLOR_EXT] = $encs; + } } if (null !== ($v = $this->getDepth())) { $a[self::FIELD_DEPTH] = $v; @@ -1138,22 +1171,36 @@ public function jsonSerialize() $a[self::FIELD_HEIGHT] = $v; } if ([] !== ($vs = $this->getImage())) { - $a[self::FIELD_IMAGE] = $vs; + $a[self::FIELD_IMAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGE][] = $v; + } } if ([] !== ($vs = $this->getImprint())) { $a[self::FIELD_IMPRINT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_IMPRINT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_IMPRINT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_IMPRINT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_IMPRINT_EXT] = $encs; + } } if (null !== ($v = $this->getNominalVolume())) { $a[self::FIELD_NOMINAL_VOLUME] = $v; @@ -1163,8 +1210,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getShape())) { $a[self::FIELD_SHAPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SHAPE_EXT] = $enc; } } @@ -1174,6 +1223,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWidth())) { $a[self::FIELD_WIDTH] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProductShelfLife.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProductShelfLife.php index 6ad75ee279..305baace8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProductShelfLife.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProductShelfLife.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRProductShelfLife extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An identifier - identifies some entity uniquely and unambiguously. Typically @@ -521,11 +521,20 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getSpecialPrecautionsForStorage())) { - $a[self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE] = $vs; + $a[self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_PRECAUTIONS_FOR_STORAGE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php index afc4b28a03..42f581ec65 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRProvenanceAgent extends FHIRBackboneElement const FIELD_WHO = 'who'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -485,7 +485,13 @@ public function jsonSerialize() $a[self::FIELD_ON_BEHALF_OF] = $v; } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; @@ -493,6 +499,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWho())) { $a[self::FIELD_WHO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php index f96863d1aa..af7553e663 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRProvenanceEntity extends FHIRBackboneElement const FIELD_WHAT = 'what'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Provenance of a resource is a record that describes entities and processes @@ -176,20 +176,27 @@ public function __construct($data = null) $this->addAgent(new FHIRProvenanceAgent($data[self::FIELD_AGENT])); } } - if (isset($data[self::FIELD_ROLE])) { - $ext = (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) - ? $data[self::FIELD_ROLE_EXT] - : null; - if ($data[self::FIELD_ROLE] instanceof FHIRProvenanceEntityRole) { - $this->setRole($data[self::FIELD_ROLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRProvenanceEntityRole([FHIRProvenanceEntityRole::FIELD_VALUE => $data[self::FIELD_ROLE]] + $ext)); - } else if (is_array($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRProvenanceEntityRole(array_merge($ext, $data[self::FIELD_ROLE]))); - } + if (isset($data[self::FIELD_ROLE]) || isset($data[self::FIELD_ROLE_EXT])) { + if (isset($data[self::FIELD_ROLE])) { + $value = $data[self::FIELD_ROLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) { + $ext = $data[self::FIELD_ROLE_EXT]; } else { - $this->setRole(new FHIRProvenanceEntityRole($data[self::FIELD_ROLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRProvenanceEntityRole) { + $this->setRole($value); + } else if (is_array($value)) { + $this->setRole(new FHIRProvenanceEntityRole(array_merge($ext, $value))); + } else { + $this->setRole(new FHIRProvenanceEntityRole([FHIRProvenanceEntityRole::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRole(new FHIRProvenanceEntityRole($ext)); } } if (isset($data[self::FIELD_WHAT])) { @@ -462,18 +469,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRProvenanceEntityRole::FIELD_VALUE, $enc)))) { + unset($enc[FHIRProvenanceEntityRole::FIELD_VALUE]); $a[self::FIELD_ROLE_EXT] = $enc; } } if (null !== ($v = $this->getWhat())) { $a[self::FIELD_WHAT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOption.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOption.php index 3b1349525b..62f14de746 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOption.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOption.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRQuestionnaireAnswerOption extends FHIRBackboneElement const FIELD_VALUE_TIME_EXT = '_valueTime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -206,20 +206,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INITIAL_SELECTED])) { - $ext = (isset($data[self::FIELD_INITIAL_SELECTED_EXT]) && is_array($data[self::FIELD_INITIAL_SELECTED_EXT])) - ? $data[self::FIELD_INITIAL_SELECTED_EXT] - : null; - if ($data[self::FIELD_INITIAL_SELECTED] instanceof FHIRBoolean) { - $this->setInitialSelected($data[self::FIELD_INITIAL_SELECTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL_SELECTED])) { - $this->setInitialSelected(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INITIAL_SELECTED]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL_SELECTED])) { - $this->setInitialSelected(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INITIAL_SELECTED]))); - } + if (isset($data[self::FIELD_INITIAL_SELECTED]) || isset($data[self::FIELD_INITIAL_SELECTED_EXT])) { + if (isset($data[self::FIELD_INITIAL_SELECTED])) { + $value = $data[self::FIELD_INITIAL_SELECTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INITIAL_SELECTED_EXT]) && is_array($data[self::FIELD_INITIAL_SELECTED_EXT])) { + $ext = $data[self::FIELD_INITIAL_SELECTED_EXT]; } else { - $this->setInitialSelected(new FHIRBoolean($data[self::FIELD_INITIAL_SELECTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInitialSelected($value); + } else if (is_array($value)) { + $this->setInitialSelected(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInitialSelected(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInitialSelected(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODING])) { @@ -229,36 +236,50 @@ public function __construct($data = null) $this->setValueCoding(new FHIRCoding($data[self::FIELD_VALUE_CODING])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VALUE_REFERENCE])) { @@ -268,36 +289,50 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } } @@ -740,8 +775,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getInitialSelected())) { $a[self::FIELD_INITIAL_SELECTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INITIAL_SELECTED_EXT] = $enc; } } @@ -750,15 +787,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } @@ -767,18 +808,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php index 6a06c01b81..8dfb020946 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRQuestionnaireEnableWhen extends FHIRBackboneElement const FIELD_QUESTION_EXT = '_question'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -283,20 +283,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ANSWER_BOOLEAN])) { - $ext = (isset($data[self::FIELD_ANSWER_BOOLEAN_EXT]) && is_array($data[self::FIELD_ANSWER_BOOLEAN_EXT])) - ? $data[self::FIELD_ANSWER_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_ANSWER_BOOLEAN] instanceof FHIRBoolean) { - $this->setAnswerBoolean($data[self::FIELD_ANSWER_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_BOOLEAN])) { - $this->setAnswerBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ANSWER_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_BOOLEAN])) { - $this->setAnswerBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ANSWER_BOOLEAN]))); - } + if (isset($data[self::FIELD_ANSWER_BOOLEAN]) || isset($data[self::FIELD_ANSWER_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_ANSWER_BOOLEAN])) { + $value = $data[self::FIELD_ANSWER_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_BOOLEAN_EXT]) && is_array($data[self::FIELD_ANSWER_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_ANSWER_BOOLEAN_EXT]; } else { - $this->setAnswerBoolean(new FHIRBoolean($data[self::FIELD_ANSWER_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAnswerBoolean($value); + } else if (is_array($value)) { + $this->setAnswerBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAnswerBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ANSWER_CODING])) { @@ -306,68 +313,96 @@ public function __construct($data = null) $this->setAnswerCoding(new FHIRCoding($data[self::FIELD_ANSWER_CODING])); } } - if (isset($data[self::FIELD_ANSWER_DATE])) { - $ext = (isset($data[self::FIELD_ANSWER_DATE_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_EXT])) - ? $data[self::FIELD_ANSWER_DATE_EXT] - : null; - if ($data[self::FIELD_ANSWER_DATE] instanceof FHIRDate) { - $this->setAnswerDate($data[self::FIELD_ANSWER_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_DATE])) { - $this->setAnswerDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_ANSWER_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_DATE])) { - $this->setAnswerDate(new FHIRDate(array_merge($ext, $data[self::FIELD_ANSWER_DATE]))); - } + if (isset($data[self::FIELD_ANSWER_DATE]) || isset($data[self::FIELD_ANSWER_DATE_EXT])) { + if (isset($data[self::FIELD_ANSWER_DATE])) { + $value = $data[self::FIELD_ANSWER_DATE]; } else { - $this->setAnswerDate(new FHIRDate($data[self::FIELD_ANSWER_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_ANSWER_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ANSWER_DATE_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_TIME_EXT])) - ? $data[self::FIELD_ANSWER_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ANSWER_DATE_TIME] instanceof FHIRDateTime) { - $this->setAnswerDateTime($data[self::FIELD_ANSWER_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_DATE_TIME])) { - $this->setAnswerDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ANSWER_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_DATE_TIME])) { - $this->setAnswerDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ANSWER_DATE_TIME]))); - } + if (isset($data[self::FIELD_ANSWER_DATE_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_EXT])) { + $ext = $data[self::FIELD_ANSWER_DATE_EXT]; } else { - $this->setAnswerDateTime(new FHIRDateTime($data[self::FIELD_ANSWER_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_ANSWER_DECIMAL])) { - $ext = (isset($data[self::FIELD_ANSWER_DECIMAL_EXT]) && is_array($data[self::FIELD_ANSWER_DECIMAL_EXT])) - ? $data[self::FIELD_ANSWER_DECIMAL_EXT] - : null; - if ($data[self::FIELD_ANSWER_DECIMAL] instanceof FHIRDecimal) { - $this->setAnswerDecimal($data[self::FIELD_ANSWER_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_DECIMAL])) { - $this->setAnswerDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ANSWER_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_DECIMAL])) { - $this->setAnswerDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ANSWER_DECIMAL]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setAnswerDate($value); + } else if (is_array($value)) { + $this->setAnswerDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setAnswerDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAnswerDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_ANSWER_DATE_TIME]) || isset($data[self::FIELD_ANSWER_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ANSWER_DATE_TIME])) { + $value = $data[self::FIELD_ANSWER_DATE_TIME]; } else { - $this->setAnswerDecimal(new FHIRDecimal($data[self::FIELD_ANSWER_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_ANSWER_DATE_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ANSWER_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAnswerDateTime($value); + } else if (is_array($value)) { + $this->setAnswerDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAnswerDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerDateTime(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_ANSWER_INTEGER])) { - $ext = (isset($data[self::FIELD_ANSWER_INTEGER_EXT]) && is_array($data[self::FIELD_ANSWER_INTEGER_EXT])) - ? $data[self::FIELD_ANSWER_INTEGER_EXT] - : null; - if ($data[self::FIELD_ANSWER_INTEGER] instanceof FHIRInteger) { - $this->setAnswerInteger($data[self::FIELD_ANSWER_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_INTEGER])) { - $this->setAnswerInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_ANSWER_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_INTEGER])) { - $this->setAnswerInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_ANSWER_INTEGER]))); + if (isset($data[self::FIELD_ANSWER_DECIMAL]) || isset($data[self::FIELD_ANSWER_DECIMAL_EXT])) { + if (isset($data[self::FIELD_ANSWER_DECIMAL])) { + $value = $data[self::FIELD_ANSWER_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_DECIMAL_EXT]) && is_array($data[self::FIELD_ANSWER_DECIMAL_EXT])) { + $ext = $data[self::FIELD_ANSWER_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAnswerDecimal($value); + } else if (is_array($value)) { + $this->setAnswerDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAnswerDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAnswerDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_ANSWER_INTEGER]) || isset($data[self::FIELD_ANSWER_INTEGER_EXT])) { + if (isset($data[self::FIELD_ANSWER_INTEGER])) { + $value = $data[self::FIELD_ANSWER_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_INTEGER_EXT]) && is_array($data[self::FIELD_ANSWER_INTEGER_EXT])) { + $ext = $data[self::FIELD_ANSWER_INTEGER_EXT]; } else { - $this->setAnswerInteger(new FHIRInteger($data[self::FIELD_ANSWER_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setAnswerInteger($value); + } else if (is_array($value)) { + $this->setAnswerInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setAnswerInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_ANSWER_QUANTITY])) { @@ -384,68 +419,96 @@ public function __construct($data = null) $this->setAnswerReference(new FHIRReference($data[self::FIELD_ANSWER_REFERENCE])); } } - if (isset($data[self::FIELD_ANSWER_STRING])) { - $ext = (isset($data[self::FIELD_ANSWER_STRING_EXT]) && is_array($data[self::FIELD_ANSWER_STRING_EXT])) - ? $data[self::FIELD_ANSWER_STRING_EXT] - : null; - if ($data[self::FIELD_ANSWER_STRING] instanceof FHIRString) { - $this->setAnswerString($data[self::FIELD_ANSWER_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_STRING])) { - $this->setAnswerString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ANSWER_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_STRING])) { - $this->setAnswerString(new FHIRString(array_merge($ext, $data[self::FIELD_ANSWER_STRING]))); - } + if (isset($data[self::FIELD_ANSWER_STRING]) || isset($data[self::FIELD_ANSWER_STRING_EXT])) { + if (isset($data[self::FIELD_ANSWER_STRING])) { + $value = $data[self::FIELD_ANSWER_STRING]; } else { - $this->setAnswerString(new FHIRString($data[self::FIELD_ANSWER_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_ANSWER_TIME])) { - $ext = (isset($data[self::FIELD_ANSWER_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_TIME_EXT])) - ? $data[self::FIELD_ANSWER_TIME_EXT] - : null; - if ($data[self::FIELD_ANSWER_TIME] instanceof FHIRTime) { - $this->setAnswerTime($data[self::FIELD_ANSWER_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_TIME])) { - $this->setAnswerTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_ANSWER_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_TIME])) { - $this->setAnswerTime(new FHIRTime(array_merge($ext, $data[self::FIELD_ANSWER_TIME]))); - } + if (isset($data[self::FIELD_ANSWER_STRING_EXT]) && is_array($data[self::FIELD_ANSWER_STRING_EXT])) { + $ext = $data[self::FIELD_ANSWER_STRING_EXT]; } else { - $this->setAnswerTime(new FHIRTime($data[self::FIELD_ANSWER_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_OPERATOR])) { - $ext = (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) - ? $data[self::FIELD_OPERATOR_EXT] - : null; - if ($data[self::FIELD_OPERATOR] instanceof FHIRQuestionnaireItemOperator) { - $this->setOperator($data[self::FIELD_OPERATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OPERATOR])) { - $this->setOperator(new FHIRQuestionnaireItemOperator([FHIRQuestionnaireItemOperator::FIELD_VALUE => $data[self::FIELD_OPERATOR]] + $ext)); - } else if (is_array($data[self::FIELD_OPERATOR])) { - $this->setOperator(new FHIRQuestionnaireItemOperator(array_merge($ext, $data[self::FIELD_OPERATOR]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAnswerString($value); + } else if (is_array($value)) { + $this->setAnswerString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAnswerString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAnswerString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ANSWER_TIME]) || isset($data[self::FIELD_ANSWER_TIME_EXT])) { + if (isset($data[self::FIELD_ANSWER_TIME])) { + $value = $data[self::FIELD_ANSWER_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_TIME_EXT])) { + $ext = $data[self::FIELD_ANSWER_TIME_EXT]; } else { - $this->setOperator(new FHIRQuestionnaireItemOperator($data[self::FIELD_OPERATOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAnswerTime($value); + } else if (is_array($value)) { + $this->setAnswerTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAnswerTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_QUESTION])) { - $ext = (isset($data[self::FIELD_QUESTION_EXT]) && is_array($data[self::FIELD_QUESTION_EXT])) - ? $data[self::FIELD_QUESTION_EXT] - : null; - if ($data[self::FIELD_QUESTION] instanceof FHIRString) { - $this->setQuestion($data[self::FIELD_QUESTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUESTION])) { - $this->setQuestion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_QUESTION]] + $ext)); - } else if (is_array($data[self::FIELD_QUESTION])) { - $this->setQuestion(new FHIRString(array_merge($ext, $data[self::FIELD_QUESTION]))); + if (isset($data[self::FIELD_OPERATOR]) || isset($data[self::FIELD_OPERATOR_EXT])) { + if (isset($data[self::FIELD_OPERATOR])) { + $value = $data[self::FIELD_OPERATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) { + $ext = $data[self::FIELD_OPERATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuestionnaireItemOperator) { + $this->setOperator($value); + } else if (is_array($value)) { + $this->setOperator(new FHIRQuestionnaireItemOperator(array_merge($ext, $value))); + } else { + $this->setOperator(new FHIRQuestionnaireItemOperator([FHIRQuestionnaireItemOperator::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOperator(new FHIRQuestionnaireItemOperator($ext)); + } + } + if (isset($data[self::FIELD_QUESTION]) || isset($data[self::FIELD_QUESTION_EXT])) { + if (isset($data[self::FIELD_QUESTION])) { + $value = $data[self::FIELD_QUESTION]; } else { - $this->setQuestion(new FHIRString($data[self::FIELD_QUESTION])); + $value = null; + } + if (isset($data[self::FIELD_QUESTION_EXT]) && is_array($data[self::FIELD_QUESTION_EXT])) { + $ext = $data[self::FIELD_QUESTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setQuestion($value); + } else if (is_array($value)) { + $this->setQuestion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setQuestion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQuestion(new FHIRString($ext)); } } } @@ -1134,8 +1197,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAnswerBoolean())) { $a[self::FIELD_ANSWER_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ANSWER_BOOLEAN_EXT] = $enc; } } @@ -1144,29 +1209,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getAnswerDate())) { $a[self::FIELD_ANSWER_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_ANSWER_DATE_EXT] = $enc; } } if (null !== ($v = $this->getAnswerDateTime())) { $a[self::FIELD_ANSWER_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ANSWER_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getAnswerDecimal())) { $a[self::FIELD_ANSWER_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ANSWER_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getAnswerInteger())) { $a[self::FIELD_ANSWER_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_ANSWER_INTEGER_EXT] = $enc; } } @@ -1178,32 +1251,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getAnswerString())) { $a[self::FIELD_ANSWER_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ANSWER_STRING_EXT] = $enc; } } if (null !== ($v = $this->getAnswerTime())) { $a[self::FIELD_ANSWER_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_ANSWER_TIME_EXT] = $enc; } } if (null !== ($v = $this->getOperator())) { $a[self::FIELD_OPERATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuestionnaireItemOperator::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuestionnaireItemOperator::FIELD_VALUE]); $a[self::FIELD_OPERATOR_EXT] = $enc; } } if (null !== ($v = $this->getQuestion())) { $a[self::FIELD_QUESTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_QUESTION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitial.php index 32833a24eb..8ccfc28346 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRQuestionnaireInitial extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -292,20 +292,27 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODING])) { @@ -315,68 +322,96 @@ public function __construct($data = null) $this->setValueCoding(new FHIRCoding($data[self::FIELD_VALUE_CODING])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -393,52 +428,73 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -1134,8 +1190,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -1144,29 +1202,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } @@ -1178,25 +1244,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php index df2ee4311a..cde8f9f361 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRQuestionnaireItem extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of questions intended to guide the collection of answers from @@ -356,20 +356,27 @@ public function __construct($data = null) $this->addAnswerOption(new FHIRQuestionnaireAnswerOption($data[self::FIELD_ANSWER_OPTION])); } } - if (isset($data[self::FIELD_ANSWER_VALUE_SET])) { - $ext = (isset($data[self::FIELD_ANSWER_VALUE_SET_EXT]) && is_array($data[self::FIELD_ANSWER_VALUE_SET_EXT])) - ? $data[self::FIELD_ANSWER_VALUE_SET_EXT] - : null; - if ($data[self::FIELD_ANSWER_VALUE_SET] instanceof FHIRCanonical) { - $this->setAnswerValueSet($data[self::FIELD_ANSWER_VALUE_SET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_VALUE_SET])) { - $this->setAnswerValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_ANSWER_VALUE_SET]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_VALUE_SET])) { - $this->setAnswerValueSet(new FHIRCanonical(array_merge($ext, $data[self::FIELD_ANSWER_VALUE_SET]))); - } + if (isset($data[self::FIELD_ANSWER_VALUE_SET]) || isset($data[self::FIELD_ANSWER_VALUE_SET_EXT])) { + if (isset($data[self::FIELD_ANSWER_VALUE_SET])) { + $value = $data[self::FIELD_ANSWER_VALUE_SET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_VALUE_SET_EXT]) && is_array($data[self::FIELD_ANSWER_VALUE_SET_EXT])) { + $ext = $data[self::FIELD_ANSWER_VALUE_SET_EXT]; } else { - $this->setAnswerValueSet(new FHIRCanonical($data[self::FIELD_ANSWER_VALUE_SET])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setAnswerValueSet($value); + } else if (is_array($value)) { + $this->setAnswerValueSet(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setAnswerValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerValueSet(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -390,36 +397,50 @@ public function __construct($data = null) $this->addCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRUri) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; } else { - $this->setDefinition(new FHIRUri($data[self::FIELD_DEFINITION])); - } - } - if (isset($data[self::FIELD_ENABLE_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_ENABLE_BEHAVIOR_EXT]) && is_array($data[self::FIELD_ENABLE_BEHAVIOR_EXT])) - ? $data[self::FIELD_ENABLE_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_ENABLE_BEHAVIOR] instanceof FHIREnableWhenBehavior) { - $this->setEnableBehavior($data[self::FIELD_ENABLE_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENABLE_BEHAVIOR])) { - $this->setEnableBehavior(new FHIREnableWhenBehavior([FHIREnableWhenBehavior::FIELD_VALUE => $data[self::FIELD_ENABLE_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_ENABLE_BEHAVIOR])) { - $this->setEnableBehavior(new FHIREnableWhenBehavior(array_merge($ext, $data[self::FIELD_ENABLE_BEHAVIOR]))); + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_ENABLE_BEHAVIOR]) || isset($data[self::FIELD_ENABLE_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_ENABLE_BEHAVIOR])) { + $value = $data[self::FIELD_ENABLE_BEHAVIOR]; } else { - $this->setEnableBehavior(new FHIREnableWhenBehavior($data[self::FIELD_ENABLE_BEHAVIOR])); + $value = null; + } + if (isset($data[self::FIELD_ENABLE_BEHAVIOR_EXT]) && is_array($data[self::FIELD_ENABLE_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_ENABLE_BEHAVIOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREnableWhenBehavior) { + $this->setEnableBehavior($value); + } else if (is_array($value)) { + $this->setEnableBehavior(new FHIREnableWhenBehavior(array_merge($ext, $value))); + } else { + $this->setEnableBehavior(new FHIREnableWhenBehavior([FHIREnableWhenBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnableBehavior(new FHIREnableWhenBehavior($ext)); } } if (isset($data[self::FIELD_ENABLE_WHEN])) { @@ -476,132 +497,188 @@ public function __construct($data = null) $this->addItem(new FHIRQuestionnaireItem($data[self::FIELD_ITEM])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->setLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString(array_merge($ext, $data[self::FIELD_LINK_ID]))); - } + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; } else { - $this->setLinkId(new FHIRString($data[self::FIELD_LINK_ID])); - } - } - if (isset($data[self::FIELD_MAX_LENGTH])) { - $ext = (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) - ? $data[self::FIELD_MAX_LENGTH_EXT] - : null; - if ($data[self::FIELD_MAX_LENGTH] instanceof FHIRInteger) { - $this->setMaxLength($data[self::FIELD_MAX_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MAX_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_MAX_LENGTH]))); + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLinkId($value); + } else if (is_array($value)) { + $this->setLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLinkId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX_LENGTH]) || isset($data[self::FIELD_MAX_LENGTH_EXT])) { + if (isset($data[self::FIELD_MAX_LENGTH])) { + $value = $data[self::FIELD_MAX_LENGTH]; } else { - $this->setMaxLength(new FHIRInteger($data[self::FIELD_MAX_LENGTH])); - } - } - if (isset($data[self::FIELD_PREFIX])) { - $ext = (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) - ? $data[self::FIELD_PREFIX_EXT] - : null; - if ($data[self::FIELD_PREFIX] instanceof FHIRString) { - $this->setPrefix($data[self::FIELD_PREFIX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFIX])) { - $this->setPrefix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREFIX]] + $ext)); - } else if (is_array($data[self::FIELD_PREFIX])) { - $this->setPrefix(new FHIRString(array_merge($ext, $data[self::FIELD_PREFIX]))); + $value = null; + } + if (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) { + $ext = $data[self::FIELD_MAX_LENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMaxLength($value); + } else if (is_array($value)) { + $this->setMaxLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMaxLength(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_PREFIX]) || isset($data[self::FIELD_PREFIX_EXT])) { + if (isset($data[self::FIELD_PREFIX])) { + $value = $data[self::FIELD_PREFIX]; } else { - $this->setPrefix(new FHIRString($data[self::FIELD_PREFIX])); - } - } - if (isset($data[self::FIELD_READ_ONLY])) { - $ext = (isset($data[self::FIELD_READ_ONLY_EXT]) && is_array($data[self::FIELD_READ_ONLY_EXT])) - ? $data[self::FIELD_READ_ONLY_EXT] - : null; - if ($data[self::FIELD_READ_ONLY] instanceof FHIRBoolean) { - $this->setReadOnly($data[self::FIELD_READ_ONLY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READ_ONLY])) { - $this->setReadOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_READ_ONLY]] + $ext)); - } else if (is_array($data[self::FIELD_READ_ONLY])) { - $this->setReadOnly(new FHIRBoolean(array_merge($ext, $data[self::FIELD_READ_ONLY]))); + $value = null; + } + if (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) { + $ext = $data[self::FIELD_PREFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPrefix($value); + } else if (is_array($value)) { + $this->setPrefix(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPrefix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPrefix(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_READ_ONLY]) || isset($data[self::FIELD_READ_ONLY_EXT])) { + if (isset($data[self::FIELD_READ_ONLY])) { + $value = $data[self::FIELD_READ_ONLY]; } else { - $this->setReadOnly(new FHIRBoolean($data[self::FIELD_READ_ONLY])); - } - } - if (isset($data[self::FIELD_REPEATS])) { - $ext = (isset($data[self::FIELD_REPEATS_EXT]) && is_array($data[self::FIELD_REPEATS_EXT])) - ? $data[self::FIELD_REPEATS_EXT] - : null; - if ($data[self::FIELD_REPEATS] instanceof FHIRBoolean) { - $this->setRepeats($data[self::FIELD_REPEATS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPEATS])) { - $this->setRepeats(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPEATS]] + $ext)); - } else if (is_array($data[self::FIELD_REPEATS])) { - $this->setRepeats(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPEATS]))); + $value = null; + } + if (isset($data[self::FIELD_READ_ONLY_EXT]) && is_array($data[self::FIELD_READ_ONLY_EXT])) { + $ext = $data[self::FIELD_READ_ONLY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReadOnly($value); + } else if (is_array($value)) { + $this->setReadOnly(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReadOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReadOnly(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_REPEATS]) || isset($data[self::FIELD_REPEATS_EXT])) { + if (isset($data[self::FIELD_REPEATS])) { + $value = $data[self::FIELD_REPEATS]; } else { - $this->setRepeats(new FHIRBoolean($data[self::FIELD_REPEATS])); - } - } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRBoolean) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUIRED]))); + $value = null; + } + if (isset($data[self::FIELD_REPEATS_EXT]) && is_array($data[self::FIELD_REPEATS_EXT])) { + $ext = $data[self::FIELD_REPEATS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRepeats($value); + } else if (is_array($value)) { + $this->setRepeats(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRepeats(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRepeats(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; } else { - $this->setRequired(new FHIRBoolean($data[self::FIELD_REQUIRED])); - } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + $value = null; + } + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRQuestionnaireItemType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRQuestionnaireItemType([FHIRQuestionnaireItemType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRQuestionnaireItemType(array_merge($ext, $data[self::FIELD_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRQuestionnaireItemType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuestionnaireItemType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRQuestionnaireItemType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRQuestionnaireItemType([FHIRQuestionnaireItemType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRQuestionnaireItemType($ext)); } } } @@ -1633,97 +1710,152 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAnswerOption())) { - $a[self::FIELD_ANSWER_OPTION] = $vs; + $a[self::FIELD_ANSWER_OPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ANSWER_OPTION][] = $v; + } } if (null !== ($v = $this->getAnswerValueSet())) { $a[self::FIELD_ANSWER_VALUE_SET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_ANSWER_VALUE_SET_EXT] = $enc; } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getEnableBehavior())) { $a[self::FIELD_ENABLE_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREnableWhenBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIREnableWhenBehavior::FIELD_VALUE]); $a[self::FIELD_ENABLE_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getEnableWhen())) { - $a[self::FIELD_ENABLE_WHEN] = $vs; + $a[self::FIELD_ENABLE_WHEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENABLE_WHEN][] = $v; + } } if ([] !== ($vs = $this->getInitial())) { - $a[self::FIELD_INITIAL] = $vs; + $a[self::FIELD_INITIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INITIAL][] = $v; + } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LINK_ID_EXT] = $enc; } } if (null !== ($v = $this->getMaxLength())) { $a[self::FIELD_MAX_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MAX_LENGTH_EXT] = $enc; } } if (null !== ($v = $this->getPrefix())) { $a[self::FIELD_PREFIX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PREFIX_EXT] = $enc; } } if (null !== ($v = $this->getReadOnly())) { $a[self::FIELD_READ_ONLY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_READ_ONLY_EXT] = $enc; } } if (null !== ($v = $this->getRepeats())) { $a[self::FIELD_REPEATS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPEATS_EXT] = $enc; } } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuestionnaireItemType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuestionnaireItemType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php index d96e7c586c..25a56a13af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRQuestionnaireResponseAnswer extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of questions and their answers. The questions are ordered and @@ -322,20 +322,27 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODING])) { @@ -345,68 +352,96 @@ public function __construct($data = null) $this->setValueCoding(new FHIRCoding($data[self::FIELD_VALUE_CODING])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -423,52 +458,73 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -1229,15 +1285,23 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getValueAttachment())) { $a[self::FIELD_VALUE_ATTACHMENT] = $v; } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -1246,29 +1310,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } @@ -1280,25 +1352,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php index 52187f803f..122fc5e5a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRQuestionnaireResponseItem extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of questions and their answers. The questions are ordered and @@ -190,20 +190,27 @@ public function __construct($data = null) $this->addAnswer(new FHIRQuestionnaireResponseAnswer($data[self::FIELD_ANSWER])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRUri) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRUri($data[self::FIELD_DEFINITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRUri($ext)); } } if (isset($data[self::FIELD_ITEM])) { @@ -224,36 +231,50 @@ public function __construct($data = null) $this->addItem(new FHIRQuestionnaireResponseItem($data[self::FIELD_ITEM])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->setLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString(array_merge($ext, $data[self::FIELD_LINK_ID]))); - } + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; } else { - $this->setLinkId(new FHIRString($data[self::FIELD_LINK_ID])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLinkId($value); + } else if (is_array($value)) { + $this->setLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLinkId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -651,32 +672,53 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAnswer())) { - $a[self::FIELD_ANSWER] = $vs; + $a[self::FIELD_ANSWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ANSWER][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LINK_ID_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunication.php index 271e0fc1b3..f2965e85d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRRelatedPersonCommunication extends FHIRBackboneElement const FIELD_PREFERRED_EXT = '_preferred'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -142,20 +142,27 @@ public function __construct($data = null) $this->setLanguage(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_PREFERRED])) { - $ext = (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) - ? $data[self::FIELD_PREFERRED_EXT] - : null; - if ($data[self::FIELD_PREFERRED] instanceof FHIRBoolean) { - $this->setPreferred($data[self::FIELD_PREFERRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PREFERRED]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PREFERRED]))); - } + if (isset($data[self::FIELD_PREFERRED]) || isset($data[self::FIELD_PREFERRED_EXT])) { + if (isset($data[self::FIELD_PREFERRED])) { + $value = $data[self::FIELD_PREFERRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) { + $ext = $data[self::FIELD_PREFERRED_EXT]; } else { - $this->setPreferred(new FHIRBoolean($data[self::FIELD_PREFERRED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPreferred($value); + } else if (is_array($value)) { + $this->setPreferred(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreferred(new FHIRBoolean($ext)); } } } @@ -353,11 +360,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getPreferred())) { $a[self::FIELD_PREFERRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PREFERRED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php index 4628bf6c96..6eb177011e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRRequestGroupAction extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A group of related requests that can be used to capture intended activities that @@ -453,20 +453,27 @@ public function __construct($data = null) $this->addAction(new FHIRRequestGroupAction($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]) && is_array($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) - ? $data[self::FIELD_CARDINALITY_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_CARDINALITY_BEHAVIOR] instanceof FHIRActionCardinalityBehavior) { - $this->setCardinalityBehavior($data[self::FIELD_CARDINALITY_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior([FHIRActionCardinalityBehavior::FIELD_VALUE => $data[self::FIELD_CARDINALITY_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior(array_merge($ext, $data[self::FIELD_CARDINALITY_BEHAVIOR]))); - } + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR]) || isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR])) { + $value = $data[self::FIELD_CARDINALITY_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]) && is_array($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]; } else { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior($data[self::FIELD_CARDINALITY_BEHAVIOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionCardinalityBehavior) { + $this->setCardinalityBehavior($value); + } else if (is_array($value)) { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior(array_merge($ext, $value))); + } else { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior([FHIRActionCardinalityBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -505,20 +512,27 @@ public function __construct($data = null) $this->addCondition(new FHIRRequestGroupCondition($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOCUMENTATION])) { @@ -539,20 +553,27 @@ public function __construct($data = null) $this->addDocumentation(new FHIRRelatedArtifact($data[self::FIELD_DOCUMENTATION])); } } - if (isset($data[self::FIELD_GROUPING_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT]) && is_array($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) - ? $data[self::FIELD_GROUPING_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_GROUPING_BEHAVIOR] instanceof FHIRActionGroupingBehavior) { - $this->setGroupingBehavior($data[self::FIELD_GROUPING_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUPING_BEHAVIOR])) { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior([FHIRActionGroupingBehavior::FIELD_VALUE => $data[self::FIELD_GROUPING_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_GROUPING_BEHAVIOR])) { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior(array_merge($ext, $data[self::FIELD_GROUPING_BEHAVIOR]))); - } + if (isset($data[self::FIELD_GROUPING_BEHAVIOR]) || isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_GROUPING_BEHAVIOR])) { + $value = $data[self::FIELD_GROUPING_BEHAVIOR]; } else { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior($data[self::FIELD_GROUPING_BEHAVIOR])); + $value = null; + } + if (isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT]) && is_array($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_GROUPING_BEHAVIOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionGroupingBehavior) { + $this->setGroupingBehavior($value); + } else if (is_array($value)) { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior(array_merge($ext, $value))); + } else { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior([FHIRActionGroupingBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior($ext)); } } if (isset($data[self::FIELD_PARTICIPANT])) { @@ -573,52 +594,73 @@ public function __construct($data = null) $this->addParticipant(new FHIRReference($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT]) && is_array($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) - ? $data[self::FIELD_PRECHECK_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_PRECHECK_BEHAVIOR] instanceof FHIRActionPrecheckBehavior) { - $this->setPrecheckBehavior($data[self::FIELD_PRECHECK_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior([FHIRActionPrecheckBehavior::FIELD_VALUE => $data[self::FIELD_PRECHECK_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior(array_merge($ext, $data[self::FIELD_PRECHECK_BEHAVIOR]))); - } + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR]) || isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR])) { + $value = $data[self::FIELD_PRECHECK_BEHAVIOR]; } else { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior($data[self::FIELD_PRECHECK_BEHAVIOR])); - } - } - if (isset($data[self::FIELD_PREFIX])) { - $ext = (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) - ? $data[self::FIELD_PREFIX_EXT] - : null; - if ($data[self::FIELD_PREFIX] instanceof FHIRString) { - $this->setPrefix($data[self::FIELD_PREFIX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFIX])) { - $this->setPrefix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREFIX]] + $ext)); - } else if (is_array($data[self::FIELD_PREFIX])) { - $this->setPrefix(new FHIRString(array_merge($ext, $data[self::FIELD_PREFIX]))); + $value = null; + } + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT]) && is_array($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_PRECHECK_BEHAVIOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionPrecheckBehavior) { + $this->setPrecheckBehavior($value); + } else if (is_array($value)) { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior(array_merge($ext, $value))); + } else { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior([FHIRActionPrecheckBehavior::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior($ext)); + } + } + if (isset($data[self::FIELD_PREFIX]) || isset($data[self::FIELD_PREFIX_EXT])) { + if (isset($data[self::FIELD_PREFIX])) { + $value = $data[self::FIELD_PREFIX]; } else { - $this->setPrefix(new FHIRString($data[self::FIELD_PREFIX])); - } - } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); + $value = null; + } + if (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) { + $ext = $data[self::FIELD_PREFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPrefix($value); + } else if (is_array($value)) { + $this->setPrefix(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPrefix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPrefix(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_RELATED_ACTION])) { @@ -639,20 +681,27 @@ public function __construct($data = null) $this->addRelatedAction(new FHIRRequestGroupRelatedAction($data[self::FIELD_RELATED_ACTION])); } } - if (isset($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT]) && is_array($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) - ? $data[self::FIELD_REQUIRED_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_REQUIRED_BEHAVIOR] instanceof FHIRActionRequiredBehavior) { - $this->setRequiredBehavior($data[self::FIELD_REQUIRED_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior([FHIRActionRequiredBehavior::FIELD_VALUE => $data[self::FIELD_REQUIRED_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior(array_merge($ext, $data[self::FIELD_REQUIRED_BEHAVIOR]))); - } + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR]) || isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR])) { + $value = $data[self::FIELD_REQUIRED_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT]) && is_array($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_REQUIRED_BEHAVIOR_EXT]; } else { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior($data[self::FIELD_REQUIRED_BEHAVIOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionRequiredBehavior) { + $this->setRequiredBehavior($value); + } else if (is_array($value)) { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior(array_merge($ext, $value))); + } else { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior([FHIRActionRequiredBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -662,36 +711,50 @@ public function __construct($data = null) $this->setResource(new FHIRReference($data[self::FIELD_RESOURCE])); } } - if (isset($data[self::FIELD_SELECTION_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT]) && is_array($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) - ? $data[self::FIELD_SELECTION_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_SELECTION_BEHAVIOR] instanceof FHIRActionSelectionBehavior) { - $this->setSelectionBehavior($data[self::FIELD_SELECTION_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SELECTION_BEHAVIOR])) { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior([FHIRActionSelectionBehavior::FIELD_VALUE => $data[self::FIELD_SELECTION_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_SELECTION_BEHAVIOR])) { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior(array_merge($ext, $data[self::FIELD_SELECTION_BEHAVIOR]))); - } + if (isset($data[self::FIELD_SELECTION_BEHAVIOR]) || isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_SELECTION_BEHAVIOR])) { + $value = $data[self::FIELD_SELECTION_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT]) && is_array($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_SELECTION_BEHAVIOR_EXT]; } else { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior($data[self::FIELD_SELECTION_BEHAVIOR])); - } - } - if (isset($data[self::FIELD_TEXT_EQUIVALENT])) { - $ext = (isset($data[self::FIELD_TEXT_EQUIVALENT_EXT]) && is_array($data[self::FIELD_TEXT_EQUIVALENT_EXT])) - ? $data[self::FIELD_TEXT_EQUIVALENT_EXT] - : null; - if ($data[self::FIELD_TEXT_EQUIVALENT] instanceof FHIRString) { - $this->setTextEquivalent($data[self::FIELD_TEXT_EQUIVALENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT_EQUIVALENT])) { - $this->setTextEquivalent(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT_EQUIVALENT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT_EQUIVALENT])) { - $this->setTextEquivalent(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT_EQUIVALENT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionSelectionBehavior) { + $this->setSelectionBehavior($value); + } else if (is_array($value)) { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior(array_merge($ext, $value))); + } else { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior([FHIRActionSelectionBehavior::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior($ext)); + } + } + if (isset($data[self::FIELD_TEXT_EQUIVALENT]) || isset($data[self::FIELD_TEXT_EQUIVALENT_EXT])) { + if (isset($data[self::FIELD_TEXT_EQUIVALENT])) { + $value = $data[self::FIELD_TEXT_EQUIVALENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EQUIVALENT_EXT]) && is_array($data[self::FIELD_TEXT_EQUIVALENT_EXT])) { + $ext = $data[self::FIELD_TEXT_EQUIVALENT_EXT]; } else { - $this->setTextEquivalent(new FHIRString($data[self::FIELD_TEXT_EQUIVALENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTextEquivalent($value); + } else if (is_array($value)) { + $this->setTextEquivalent(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTextEquivalent(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTextEquivalent(new FHIRString($ext)); } } if (isset($data[self::FIELD_TIMING_AGE])) { @@ -701,20 +764,27 @@ public function __construct($data = null) $this->setTimingAge(new FHIRAge($data[self::FIELD_TIMING_AGE])); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_DURATION])) { @@ -745,20 +815,27 @@ public function __construct($data = null) $this->setTimingTiming(new FHIRTiming($data[self::FIELD_TIMING_TIMING])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -2043,69 +2120,119 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getCardinalityBehavior())) { $a[self::FIELD_CARDINALITY_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionCardinalityBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionCardinalityBehavior::FIELD_VALUE]); $a[self::FIELD_CARDINALITY_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDocumentation())) { - $a[self::FIELD_DOCUMENTATION] = $vs; + $a[self::FIELD_DOCUMENTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENTATION][] = $v; + } } if (null !== ($v = $this->getGroupingBehavior())) { $a[self::FIELD_GROUPING_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionGroupingBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionGroupingBehavior::FIELD_VALUE]); $a[self::FIELD_GROUPING_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPrecheckBehavior())) { $a[self::FIELD_PRECHECK_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionPrecheckBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionPrecheckBehavior::FIELD_VALUE]); $a[self::FIELD_PRECHECK_BEHAVIOR_EXT] = $enc; } } if (null !== ($v = $this->getPrefix())) { $a[self::FIELD_PREFIX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PREFIX_EXT] = $enc; } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedAction())) { - $a[self::FIELD_RELATED_ACTION] = $vs; + $a[self::FIELD_RELATED_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ACTION][] = $v; + } } if (null !== ($v = $this->getRequiredBehavior())) { $a[self::FIELD_REQUIRED_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionRequiredBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionRequiredBehavior::FIELD_VALUE]); $a[self::FIELD_REQUIRED_BEHAVIOR_EXT] = $enc; } } @@ -2114,15 +2241,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSelectionBehavior())) { $a[self::FIELD_SELECTION_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionSelectionBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionSelectionBehavior::FIELD_VALUE]); $a[self::FIELD_SELECTION_BEHAVIOR_EXT] = $enc; } } if (null !== ($v = $this->getTextEquivalent())) { $a[self::FIELD_TEXT_EQUIVALENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EQUIVALENT_EXT] = $enc; } } @@ -2131,8 +2262,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -2150,14 +2283,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php index 5a2e4d15b2..4525b96ee0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRRequestGroupCondition extends FHIRBackboneElement const FIELD_KIND_EXT = '_kind'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A expression that is evaluated in a specified context and returns a value. The @@ -139,20 +139,27 @@ public function __construct($data = null) $this->setExpression(new FHIRExpression($data[self::FIELD_EXPRESSION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRActionConditionKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRActionConditionKind([FHIRActionConditionKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRActionConditionKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setKind(new FHIRActionConditionKind($data[self::FIELD_KIND])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionConditionKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRActionConditionKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRActionConditionKind([FHIRActionConditionKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRActionConditionKind($ext)); } } } @@ -330,11 +337,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionConditionKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionConditionKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php index a89b964527..959dd712dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRRequestGroupRelatedAction extends FHIRBackboneElement const FIELD_RELATIONSHIP_EXT = '_relationship'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -161,20 +161,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION_ID])) { - $ext = (isset($data[self::FIELD_ACTION_ID_EXT]) && is_array($data[self::FIELD_ACTION_ID_EXT])) - ? $data[self::FIELD_ACTION_ID_EXT] - : null; - if ($data[self::FIELD_ACTION_ID] instanceof FHIRId) { - $this->setActionId($data[self::FIELD_ACTION_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION_ID])) { - $this->setActionId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_ACTION_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION_ID])) { - $this->setActionId(new FHIRId(array_merge($ext, $data[self::FIELD_ACTION_ID]))); - } + if (isset($data[self::FIELD_ACTION_ID]) || isset($data[self::FIELD_ACTION_ID_EXT])) { + if (isset($data[self::FIELD_ACTION_ID])) { + $value = $data[self::FIELD_ACTION_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTION_ID_EXT]) && is_array($data[self::FIELD_ACTION_ID_EXT])) { + $ext = $data[self::FIELD_ACTION_ID_EXT]; } else { - $this->setActionId(new FHIRId($data[self::FIELD_ACTION_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setActionId($value); + } else if (is_array($value)) { + $this->setActionId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setActionId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActionId(new FHIRId($ext)); } } if (isset($data[self::FIELD_OFFSET_DURATION])) { @@ -191,20 +198,27 @@ public function __construct($data = null) $this->setOffsetRange(new FHIRRange($data[self::FIELD_OFFSET_RANGE])); } } - if (isset($data[self::FIELD_RELATIONSHIP])) { - $ext = (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) - ? $data[self::FIELD_RELATIONSHIP_EXT] - : null; - if ($data[self::FIELD_RELATIONSHIP] instanceof FHIRActionRelationshipType) { - $this->setRelationship($data[self::FIELD_RELATIONSHIP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRActionRelationshipType([FHIRActionRelationshipType::FIELD_VALUE => $data[self::FIELD_RELATIONSHIP]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRActionRelationshipType(array_merge($ext, $data[self::FIELD_RELATIONSHIP]))); - } + if (isset($data[self::FIELD_RELATIONSHIP]) || isset($data[self::FIELD_RELATIONSHIP_EXT])) { + if (isset($data[self::FIELD_RELATIONSHIP])) { + $value = $data[self::FIELD_RELATIONSHIP]; } else { - $this->setRelationship(new FHIRActionRelationshipType($data[self::FIELD_RELATIONSHIP])); + $value = null; + } + if (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) { + $ext = $data[self::FIELD_RELATIONSHIP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionRelationshipType) { + $this->setRelationship($value); + } else if (is_array($value)) { + $this->setRelationship(new FHIRActionRelationshipType(array_merge($ext, $value))); + } else { + $this->setRelationship(new FHIRActionRelationshipType([FHIRActionRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelationship(new FHIRActionRelationshipType($ext)); } } } @@ -471,8 +485,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActionId())) { $a[self::FIELD_ACTION_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_ACTION_ID_EXT] = $enc; } } @@ -484,11 +500,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionRelationshipType::FIELD_VALUE]); $a[self::FIELD_RELATIONSHIP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristic.php index 1509905c63..e6cc7cd053 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRResearchElementDefinitionCharacteristic extends FHIRBackboneElement const FIELD_USAGE_CONTEXT = 'usageContext'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -416,20 +416,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFINITION_CANONICAL])) { - $ext = (isset($data[self::FIELD_DEFINITION_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFINITION_CANONICAL_EXT])) - ? $data[self::FIELD_DEFINITION_CANONICAL_EXT] - : null; - if ($data[self::FIELD_DEFINITION_CANONICAL] instanceof FHIRCanonical) { - $this->setDefinitionCanonical($data[self::FIELD_DEFINITION_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION_CANONICAL])) { - $this->setDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFINITION_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION_CANONICAL])) { - $this->setDefinitionCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFINITION_CANONICAL]))); - } + if (isset($data[self::FIELD_DEFINITION_CANONICAL]) || isset($data[self::FIELD_DEFINITION_CANONICAL_EXT])) { + if (isset($data[self::FIELD_DEFINITION_CANONICAL])) { + $value = $data[self::FIELD_DEFINITION_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFINITION_CANONICAL_EXT])) { + $ext = $data[self::FIELD_DEFINITION_CANONICAL_EXT]; } else { - $this->setDefinitionCanonical(new FHIRCanonical($data[self::FIELD_DEFINITION_CANONICAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefinitionCanonical($value); + } else if (is_array($value)) { + $this->setDefinitionCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinitionCanonical(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_DEFINITION_CODEABLE_CONCEPT])) { @@ -453,52 +460,73 @@ public function __construct($data = null) $this->setDefinitionExpression(new FHIRExpression($data[self::FIELD_DEFINITION_EXPRESSION])); } } - if (isset($data[self::FIELD_EXCLUDE])) { - $ext = (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) - ? $data[self::FIELD_EXCLUDE_EXT] - : null; - if ($data[self::FIELD_EXCLUDE] instanceof FHIRBoolean) { - $this->setExclude($data[self::FIELD_EXCLUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDE]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDE]))); - } + if (isset($data[self::FIELD_EXCLUDE]) || isset($data[self::FIELD_EXCLUDE_EXT])) { + if (isset($data[self::FIELD_EXCLUDE])) { + $value = $data[self::FIELD_EXCLUDE]; } else { - $this->setExclude(new FHIRBoolean($data[self::FIELD_EXCLUDE])); + $value = null; } - } - if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setParticipantEffectiveDateTime($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { - $this->setParticipantEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { - $this->setParticipantEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_EXT]; } else { - $this->setParticipantEffectiveDateTime(new FHIRDateTime($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExclude($value); + } else if (is_array($value)) { + $this->setExclude(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExclude(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION_EXT]) && is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION_EXT])) - ? $data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION] instanceof FHIRString) { - $this->setParticipantEffectiveDescription($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION])) { - $this->setParticipantEffectiveDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION])) { - $this->setParticipantEffectiveDescription(new FHIRString(array_merge($ext, $data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION]))); + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setParticipantEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setParticipantEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setParticipantEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setParticipantEffectiveDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION]) || isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION])) { + $value = $data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION_EXT]) && is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION_EXT]; } else { - $this->setParticipantEffectiveDescription(new FHIRString($data[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setParticipantEffectiveDescription($value); + } else if (is_array($value)) { + $this->setParticipantEffectiveDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setParticipantEffectiveDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParticipantEffectiveDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION])) { @@ -508,20 +536,27 @@ public function __construct($data = null) $this->setParticipantEffectiveDuration(new FHIRDuration($data[self::FIELD_PARTICIPANT_EFFECTIVE_DURATION])); } } - if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE])) { - $ext = (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE_EXT]) && is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE_EXT])) - ? $data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE_EXT] - : null; - if ($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE] instanceof FHIRGroupMeasure) { - $this->setParticipantEffectiveGroupMeasure($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE])) { - $this->setParticipantEffectiveGroupMeasure(new FHIRGroupMeasure([FHIRGroupMeasure::FIELD_VALUE => $data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE]] + $ext)); - } else if (is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE])) { - $this->setParticipantEffectiveGroupMeasure(new FHIRGroupMeasure(array_merge($ext, $data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE]))); - } + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE]) || isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE_EXT])) { + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE])) { + $value = $data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE_EXT]) && is_array($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE_EXT])) { + $ext = $data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE_EXT]; } else { - $this->setParticipantEffectiveGroupMeasure(new FHIRGroupMeasure($data[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGroupMeasure) { + $this->setParticipantEffectiveGroupMeasure($value); + } else if (is_array($value)) { + $this->setParticipantEffectiveGroupMeasure(new FHIRGroupMeasure(array_merge($ext, $value))); + } else { + $this->setParticipantEffectiveGroupMeasure(new FHIRGroupMeasure([FHIRGroupMeasure::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParticipantEffectiveGroupMeasure(new FHIRGroupMeasure($ext)); } } if (isset($data[self::FIELD_PARTICIPANT_EFFECTIVE_PERIOD])) { @@ -545,36 +580,50 @@ public function __construct($data = null) $this->setParticipantEffectiveTiming(new FHIRTiming($data[self::FIELD_PARTICIPANT_EFFECTIVE_TIMING])); } } - if (isset($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setStudyEffectiveDateTime($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME])) { - $this->setStudyEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME])) { - $this->setStudyEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME]; } else { - $this->setStudyEffectiveDateTime(new FHIRDateTime($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION_EXT]) && is_array($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION_EXT])) - ? $data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION] instanceof FHIRString) { - $this->setStudyEffectiveDescription($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION])) { - $this->setStudyEffectiveDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION])) { - $this->setStudyEffectiveDescription(new FHIRString(array_merge($ext, $data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION]))); + if (isset($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_STUDY_EFFECTIVE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStudyEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setStudyEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStudyEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStudyEffectiveDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION]) || isset($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION])) { + $value = $data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION_EXT]) && is_array($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION_EXT]; } else { - $this->setStudyEffectiveDescription(new FHIRString($data[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setStudyEffectiveDescription($value); + } else if (is_array($value)) { + $this->setStudyEffectiveDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setStudyEffectiveDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStudyEffectiveDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_STUDY_EFFECTIVE_DURATION])) { @@ -584,20 +633,27 @@ public function __construct($data = null) $this->setStudyEffectiveDuration(new FHIRDuration($data[self::FIELD_STUDY_EFFECTIVE_DURATION])); } } - if (isset($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE])) { - $ext = (isset($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE_EXT]) && is_array($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE_EXT])) - ? $data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE_EXT] - : null; - if ($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE] instanceof FHIRGroupMeasure) { - $this->setStudyEffectiveGroupMeasure($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE])) { - $this->setStudyEffectiveGroupMeasure(new FHIRGroupMeasure([FHIRGroupMeasure::FIELD_VALUE => $data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE]] + $ext)); - } else if (is_array($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE])) { - $this->setStudyEffectiveGroupMeasure(new FHIRGroupMeasure(array_merge($ext, $data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE]))); - } + if (isset($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE]) || isset($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE_EXT])) { + if (isset($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE])) { + $value = $data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE_EXT]) && is_array($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE_EXT])) { + $ext = $data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE_EXT]; } else { - $this->setStudyEffectiveGroupMeasure(new FHIRGroupMeasure($data[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGroupMeasure) { + $this->setStudyEffectiveGroupMeasure($value); + } else if (is_array($value)) { + $this->setStudyEffectiveGroupMeasure(new FHIRGroupMeasure(array_merge($ext, $value))); + } else { + $this->setStudyEffectiveGroupMeasure(new FHIRGroupMeasure([FHIRGroupMeasure::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStudyEffectiveGroupMeasure(new FHIRGroupMeasure($ext)); } } if (isset($data[self::FIELD_STUDY_EFFECTIVE_PERIOD])) { @@ -1713,8 +1769,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefinitionCanonical())) { $a[self::FIELD_DEFINITION_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFINITION_CANONICAL_EXT] = $enc; } } @@ -1729,22 +1787,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getExclude())) { $a[self::FIELD_EXCLUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDE_EXT] = $enc; } } if (null !== ($v = $this->getParticipantEffectiveDateTime())) { $a[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PARTICIPANT_EFFECTIVE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getParticipantEffectiveDescription())) { $a[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PARTICIPANT_EFFECTIVE_DESCRIPTION_EXT] = $enc; } } @@ -1753,8 +1817,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getParticipantEffectiveGroupMeasure())) { $a[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGroupMeasure::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGroupMeasure::FIELD_VALUE]); $a[self::FIELD_PARTICIPANT_EFFECTIVE_GROUP_MEASURE_EXT] = $enc; } } @@ -1769,15 +1835,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStudyEffectiveDateTime())) { $a[self::FIELD_STUDY_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STUDY_EFFECTIVE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getStudyEffectiveDescription())) { $a[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STUDY_EFFECTIVE_DESCRIPTION_EXT] = $enc; } } @@ -1786,8 +1856,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStudyEffectiveGroupMeasure())) { $a[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGroupMeasure::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGroupMeasure::FIELD_VALUE]); $a[self::FIELD_STUDY_EFFECTIVE_GROUP_MEASURE_EXT] = $enc; } } @@ -1804,7 +1876,16 @@ public function jsonSerialize() $a[self::FIELD_UNIT_OF_MEASURE] = $v; } if ([] !== ($vs = $this->getUsageContext())) { - $a[self::FIELD_USAGE_CONTEXT] = $vs; + $a[self::FIELD_USAGE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USAGE_CONTEXT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php index cf68bee933..6547d58cf2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRResearchStudyArm extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -150,36 +150,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -431,21 +445,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjective.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjective.php index 9212999faa..5c6914fcab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjective.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjective.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRResearchStudyObjective extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -135,20 +135,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -344,14 +351,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php index 70173b1e3a..00a9d3cefd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRRiskAssessmentPrediction extends FHIRBackboneElement const FIELD_WHEN_RANGE = 'whenRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -227,20 +227,27 @@ public function __construct($data = null) $this->setOutcome(new FHIRCodeableConcept($data[self::FIELD_OUTCOME])); } } - if (isset($data[self::FIELD_PROBABILITY_DECIMAL])) { - $ext = (isset($data[self::FIELD_PROBABILITY_DECIMAL_EXT]) && is_array($data[self::FIELD_PROBABILITY_DECIMAL_EXT])) - ? $data[self::FIELD_PROBABILITY_DECIMAL_EXT] - : null; - if ($data[self::FIELD_PROBABILITY_DECIMAL] instanceof FHIRDecimal) { - $this->setProbabilityDecimal($data[self::FIELD_PROBABILITY_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROBABILITY_DECIMAL])) { - $this->setProbabilityDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PROBABILITY_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_PROBABILITY_DECIMAL])) { - $this->setProbabilityDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PROBABILITY_DECIMAL]))); - } + if (isset($data[self::FIELD_PROBABILITY_DECIMAL]) || isset($data[self::FIELD_PROBABILITY_DECIMAL_EXT])) { + if (isset($data[self::FIELD_PROBABILITY_DECIMAL])) { + $value = $data[self::FIELD_PROBABILITY_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROBABILITY_DECIMAL_EXT]) && is_array($data[self::FIELD_PROBABILITY_DECIMAL_EXT])) { + $ext = $data[self::FIELD_PROBABILITY_DECIMAL_EXT]; } else { - $this->setProbabilityDecimal(new FHIRDecimal($data[self::FIELD_PROBABILITY_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setProbabilityDecimal($value); + } else if (is_array($value)) { + $this->setProbabilityDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setProbabilityDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProbabilityDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PROBABILITY_RANGE])) { @@ -257,36 +264,50 @@ public function __construct($data = null) $this->setQualitativeRisk(new FHIRCodeableConcept($data[self::FIELD_QUALITATIVE_RISK])); } } - if (isset($data[self::FIELD_RATIONALE])) { - $ext = (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) - ? $data[self::FIELD_RATIONALE_EXT] - : null; - if ($data[self::FIELD_RATIONALE] instanceof FHIRString) { - $this->setRationale($data[self::FIELD_RATIONALE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RATIONALE]] + $ext)); - } else if (is_array($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRString(array_merge($ext, $data[self::FIELD_RATIONALE]))); - } + if (isset($data[self::FIELD_RATIONALE]) || isset($data[self::FIELD_RATIONALE_EXT])) { + if (isset($data[self::FIELD_RATIONALE])) { + $value = $data[self::FIELD_RATIONALE]; } else { - $this->setRationale(new FHIRString($data[self::FIELD_RATIONALE])); + $value = null; } - } - if (isset($data[self::FIELD_RELATIVE_RISK])) { - $ext = (isset($data[self::FIELD_RELATIVE_RISK_EXT]) && is_array($data[self::FIELD_RELATIVE_RISK_EXT])) - ? $data[self::FIELD_RELATIVE_RISK_EXT] - : null; - if ($data[self::FIELD_RELATIVE_RISK] instanceof FHIRDecimal) { - $this->setRelativeRisk($data[self::FIELD_RELATIVE_RISK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIVE_RISK])) { - $this->setRelativeRisk(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_RELATIVE_RISK]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIVE_RISK])) { - $this->setRelativeRisk(new FHIRDecimal(array_merge($ext, $data[self::FIELD_RELATIVE_RISK]))); + if (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) { + $ext = $data[self::FIELD_RATIONALE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRationale($value); + } else if (is_array($value)) { + $this->setRationale(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRationale(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRationale(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RELATIVE_RISK]) || isset($data[self::FIELD_RELATIVE_RISK_EXT])) { + if (isset($data[self::FIELD_RELATIVE_RISK])) { + $value = $data[self::FIELD_RELATIVE_RISK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELATIVE_RISK_EXT]) && is_array($data[self::FIELD_RELATIVE_RISK_EXT])) { + $ext = $data[self::FIELD_RELATIVE_RISK_EXT]; } else { - $this->setRelativeRisk(new FHIRDecimal($data[self::FIELD_RELATIVE_RISK])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setRelativeRisk($value); + } else if (is_array($value)) { + $this->setRelativeRisk(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setRelativeRisk(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelativeRisk(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_WHEN_PERIOD])) { @@ -764,8 +785,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getProbabilityDecimal())) { $a[self::FIELD_PROBABILITY_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PROBABILITY_DECIMAL_EXT] = $enc; } } @@ -777,15 +800,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRationale())) { $a[self::FIELD_RATIONALE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RATIONALE_EXT] = $enc; } } if (null !== ($v = $this->getRelativeRisk())) { $a[self::FIELD_RELATIVE_RISK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_RELATIVE_RISK_EXT] = $enc; } } @@ -795,6 +822,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhenRange())) { $a[self::FIELD_WHEN_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertainty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertainty.php index 2e2590fbb0..761c0c7b1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertainty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertainty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRRiskEvidenceSynthesisCertainty extends FHIRBackboneElement const FIELD_RATING = 'rating'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a @@ -506,13 +506,34 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCertaintySubcomponent())) { - $a[self::FIELD_CERTAINTY_SUBCOMPONENT] = $vs; + $a[self::FIELD_CERTAINTY_SUBCOMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CERTAINTY_SUBCOMPONENT][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getRating())) { - $a[self::FIELD_RATING] = $vs; + $a[self::FIELD_RATING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RATING][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponent.php index 9cfa604d83..433198354f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRRiskEvidenceSynthesisCertaintySubcomponent extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A text note which also contains information about who made the statement and @@ -465,14 +465,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getRating())) { - $a[self::FIELD_RATING] = $vs; + $a[self::FIELD_RATING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RATING][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimate.php index 198e0f45f0..834848ebcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRRiskEvidenceSynthesisPrecisionEstimate extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -161,52 +161,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FROM])) { - $ext = (isset($data[self::FIELD_FROM_EXT]) && is_array($data[self::FIELD_FROM_EXT])) - ? $data[self::FIELD_FROM_EXT] - : null; - if ($data[self::FIELD_FROM] instanceof FHIRDecimal) { - $this->setFrom($data[self::FIELD_FROM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FROM])) { - $this->setFrom(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FROM]] + $ext)); - } else if (is_array($data[self::FIELD_FROM])) { - $this->setFrom(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FROM]))); - } + if (isset($data[self::FIELD_FROM]) || isset($data[self::FIELD_FROM_EXT])) { + if (isset($data[self::FIELD_FROM])) { + $value = $data[self::FIELD_FROM]; } else { - $this->setFrom(new FHIRDecimal($data[self::FIELD_FROM])); + $value = null; } - } - if (isset($data[self::FIELD_LEVEL])) { - $ext = (isset($data[self::FIELD_LEVEL_EXT]) && is_array($data[self::FIELD_LEVEL_EXT])) - ? $data[self::FIELD_LEVEL_EXT] - : null; - if ($data[self::FIELD_LEVEL] instanceof FHIRDecimal) { - $this->setLevel($data[self::FIELD_LEVEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LEVEL])) { - $this->setLevel(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LEVEL]] + $ext)); - } else if (is_array($data[self::FIELD_LEVEL])) { - $this->setLevel(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LEVEL]))); - } + if (isset($data[self::FIELD_FROM_EXT]) && is_array($data[self::FIELD_FROM_EXT])) { + $ext = $data[self::FIELD_FROM_EXT]; } else { - $this->setLevel(new FHIRDecimal($data[self::FIELD_LEVEL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFrom($value); + } else if (is_array($value)) { + $this->setFrom(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFrom(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFrom(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_TO])) { - $ext = (isset($data[self::FIELD_TO_EXT]) && is_array($data[self::FIELD_TO_EXT])) - ? $data[self::FIELD_TO_EXT] - : null; - if ($data[self::FIELD_TO] instanceof FHIRDecimal) { - $this->setTo($data[self::FIELD_TO]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TO])) { - $this->setTo(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_TO]] + $ext)); - } else if (is_array($data[self::FIELD_TO])) { - $this->setTo(new FHIRDecimal(array_merge($ext, $data[self::FIELD_TO]))); + if (isset($data[self::FIELD_LEVEL]) || isset($data[self::FIELD_LEVEL_EXT])) { + if (isset($data[self::FIELD_LEVEL])) { + $value = $data[self::FIELD_LEVEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LEVEL_EXT]) && is_array($data[self::FIELD_LEVEL_EXT])) { + $ext = $data[self::FIELD_LEVEL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLevel($value); + } else if (is_array($value)) { + $this->setLevel(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLevel(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLevel(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_TO]) || isset($data[self::FIELD_TO_EXT])) { + if (isset($data[self::FIELD_TO])) { + $value = $data[self::FIELD_TO]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TO_EXT]) && is_array($data[self::FIELD_TO_EXT])) { + $ext = $data[self::FIELD_TO_EXT]; } else { - $this->setTo(new FHIRDecimal($data[self::FIELD_TO])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setTo($value); + } else if (is_array($value)) { + $this->setTo(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setTo(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTo(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -512,28 +533,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFrom())) { $a[self::FIELD_FROM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FROM_EXT] = $enc; } } if (null !== ($v = $this->getLevel())) { $a[self::FIELD_LEVEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LEVEL_EXT] = $enc; } } if (null !== ($v = $this->getTo())) { $a[self::FIELD_TO] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_TO_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimate.php index accd955d8f..ef5f0e4292 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRRiskEvidenceSynthesisRiskEstimate extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -199,52 +199,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DENOMINATOR_COUNT])) { - $ext = (isset($data[self::FIELD_DENOMINATOR_COUNT_EXT]) && is_array($data[self::FIELD_DENOMINATOR_COUNT_EXT])) - ? $data[self::FIELD_DENOMINATOR_COUNT_EXT] - : null; - if ($data[self::FIELD_DENOMINATOR_COUNT] instanceof FHIRInteger) { - $this->setDenominatorCount($data[self::FIELD_DENOMINATOR_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DENOMINATOR_COUNT])) { - $this->setDenominatorCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DENOMINATOR_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_DENOMINATOR_COUNT])) { - $this->setDenominatorCount(new FHIRInteger(array_merge($ext, $data[self::FIELD_DENOMINATOR_COUNT]))); - } + if (isset($data[self::FIELD_DENOMINATOR_COUNT]) || isset($data[self::FIELD_DENOMINATOR_COUNT_EXT])) { + if (isset($data[self::FIELD_DENOMINATOR_COUNT])) { + $value = $data[self::FIELD_DENOMINATOR_COUNT]; } else { - $this->setDenominatorCount(new FHIRInteger($data[self::FIELD_DENOMINATOR_COUNT])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DENOMINATOR_COUNT_EXT]) && is_array($data[self::FIELD_DENOMINATOR_COUNT_EXT])) { + $ext = $data[self::FIELD_DENOMINATOR_COUNT_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDenominatorCount($value); + } else if (is_array($value)) { + $this->setDenominatorCount(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDenominatorCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDenominatorCount(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_NUMERATOR_COUNT])) { - $ext = (isset($data[self::FIELD_NUMERATOR_COUNT_EXT]) && is_array($data[self::FIELD_NUMERATOR_COUNT_EXT])) - ? $data[self::FIELD_NUMERATOR_COUNT_EXT] - : null; - if ($data[self::FIELD_NUMERATOR_COUNT] instanceof FHIRInteger) { - $this->setNumeratorCount($data[self::FIELD_NUMERATOR_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMERATOR_COUNT])) { - $this->setNumeratorCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMERATOR_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_NUMERATOR_COUNT])) { - $this->setNumeratorCount(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMERATOR_COUNT]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NUMERATOR_COUNT]) || isset($data[self::FIELD_NUMERATOR_COUNT_EXT])) { + if (isset($data[self::FIELD_NUMERATOR_COUNT])) { + $value = $data[self::FIELD_NUMERATOR_COUNT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMERATOR_COUNT_EXT]) && is_array($data[self::FIELD_NUMERATOR_COUNT_EXT])) { + $ext = $data[self::FIELD_NUMERATOR_COUNT_EXT]; } else { - $this->setNumeratorCount(new FHIRInteger($data[self::FIELD_NUMERATOR_COUNT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumeratorCount($value); + } else if (is_array($value)) { + $this->setNumeratorCount(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumeratorCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumeratorCount(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_PRECISION_ESTIMATE])) { @@ -279,20 +300,27 @@ public function __construct($data = null) $this->setUnitOfMeasure(new FHIRCodeableConcept($data[self::FIELD_UNIT_OF_MEASURE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -747,27 +775,39 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDenominatorCount())) { $a[self::FIELD_DENOMINATOR_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DENOMINATOR_COUNT_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getNumeratorCount())) { $a[self::FIELD_NUMERATOR_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMERATOR_COUNT_EXT] = $enc; } } if ([] !== ($vs = $this->getPrecisionEstimate())) { - $a[self::FIELD_PRECISION_ESTIMATE] = $vs; + $a[self::FIELD_PRECISION_ESTIMATE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRECISION_ESTIMATE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; @@ -777,11 +817,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSize.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSize.php index a88ccdc864..dffc37086c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSize.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSize.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRRiskEvidenceSynthesisSampleSize extends FHIRBackboneElement const FIELD_NUMBER_OF_STUDIES_EXT = '_numberOfStudies'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -145,52 +145,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT])) - ? $data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_PARTICIPANTS] instanceof FHIRInteger) { - $this->setNumberOfParticipants($data[self::FIELD_NUMBER_OF_PARTICIPANTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_PARTICIPANTS])) { - $this->setNumberOfParticipants(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_PARTICIPANTS]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_PARTICIPANTS])) { - $this->setNumberOfParticipants(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_PARTICIPANTS]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setNumberOfParticipants(new FHIRInteger($data[self::FIELD_NUMBER_OF_PARTICIPANTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_NUMBER_OF_STUDIES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_STUDIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_STUDIES_EXT])) - ? $data[self::FIELD_NUMBER_OF_STUDIES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_STUDIES] instanceof FHIRInteger) { - $this->setNumberOfStudies($data[self::FIELD_NUMBER_OF_STUDIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_STUDIES])) { - $this->setNumberOfStudies(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_STUDIES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_STUDIES])) { - $this->setNumberOfStudies(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_STUDIES]))); + if (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS]) || isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS])) { + $value = $data[self::FIELD_NUMBER_OF_PARTICIPANTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfParticipants($value); + } else if (is_array($value)) { + $this->setNumberOfParticipants(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfParticipants(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumberOfParticipants(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_STUDIES]) || isset($data[self::FIELD_NUMBER_OF_STUDIES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_STUDIES])) { + $value = $data[self::FIELD_NUMBER_OF_STUDIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_STUDIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_STUDIES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_STUDIES_EXT]; } else { - $this->setNumberOfStudies(new FHIRInteger($data[self::FIELD_NUMBER_OF_STUDIES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfStudies($value); + } else if (is_array($value)) { + $this->setNumberOfStudies(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfStudies(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfStudies(new FHIRInteger($ext)); } } } @@ -445,25 +466,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfParticipants())) { $a[self::FIELD_NUMBER_OF_PARTICIPANTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_PARTICIPANTS_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfStudies())) { $a[self::FIELD_NUMBER_OF_STUDIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_STUDIES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php index 0bf4d66456..b66441d83b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSearchParameterComponent extends FHIRBackboneElement const FIELD_EXPRESSION_EXT = '_expression'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRCanonical) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; } else { - $this->setDefinition(new FHIRCanonical($data[self::FIELD_DEFINITION])); + $value = null; } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); } } } @@ -369,18 +383,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php index a5b3f67799..98adbe249b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRSpecimenCollection extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -241,20 +241,27 @@ public function __construct($data = null) $this->setBodySite(new FHIRCodeableConcept($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) - ? $data[self::FIELD_COLLECTED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_COLLECTED_DATE_TIME] instanceof FHIRDateTime) { - $this->setCollectedDateTime($data[self::FIELD_COLLECTED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_COLLECTED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_COLLECTED_DATE_TIME]))); - } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME]) || isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { + $value = $data[self::FIELD_COLLECTED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_COLLECTED_DATE_TIME_EXT]; } else { - $this->setCollectedDateTime(new FHIRDateTime($data[self::FIELD_COLLECTED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCollectedDateTime($value); + } else if (is_array($value)) { + $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCollectedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_COLLECTED_PERIOD])) { @@ -779,8 +786,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getCollectedDateTime())) { $a[self::FIELD_COLLECTED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_COLLECTED_DATE_TIME_EXT] = $enc; } } @@ -805,6 +814,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php index 2000edd5ce..d4180cb8cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSpecimenContainer extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -225,20 +225,27 @@ public function __construct($data = null) $this->setCapacity(new FHIRQuantity($data[self::FIELD_CAPACITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -706,13 +713,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getSpecimenQuantity())) { $a[self::FIELD_SPECIMEN_QUANTITY] = $v; @@ -720,6 +735,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php index 58d68ee857..84b399e927 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRSpecimenProcessing extends FHIRBackboneElement const FIELD_TIME_PERIOD = 'timePeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -195,20 +195,27 @@ public function __construct($data = null) $this->addAdditive(new FHIRReference($data[self::FIELD_ADDITIVE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROCEDURE])) { @@ -218,20 +225,27 @@ public function __construct($data = null) $this->setProcedure(new FHIRCodeableConcept($data[self::FIELD_PROCEDURE])); } } - if (isset($data[self::FIELD_TIME_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIME_DATE_TIME_EXT])) - ? $data[self::FIELD_TIME_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIME_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimeDateTime($data[self::FIELD_TIME_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME_DATE_TIME])) { - $this->setTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME_DATE_TIME])) { - $this->setTimeDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIME_DATE_TIME]) || isset($data[self::FIELD_TIME_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIME_DATE_TIME])) { + $value = $data[self::FIELD_TIME_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIME_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_DATE_TIME_EXT]; } else { - $this->setTimeDateTime(new FHIRDateTime($data[self::FIELD_TIME_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimeDateTime($value); + } else if (is_array($value)) { + $this->setTimeDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimeDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIME_PERIOD])) { @@ -597,12 +611,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdditive())) { - $a[self::FIELD_ADDITIVE] = $vs; + $a[self::FIELD_ADDITIVE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIVE][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -611,14 +633,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimeDateTime())) { $a[self::FIELD_TIME_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getTimePeriod())) { $a[self::FIELD_TIME_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditive.php index 49304ebc80..8851dff22e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSpecimenDefinitionAdditive extends FHIRBackboneElement const FIELD_ADDITIVE_REFERENCE = 'additiveReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -329,6 +329,9 @@ public function jsonSerialize() if (null !== ($v = $this->getAdditiveReference())) { $a[self::FIELD_ADDITIVE_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainer.php index 185dd732c5..24f1492c50 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSpecimenDefinitionContainer extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A kind of specimen with associated set of requirements. @@ -257,20 +257,27 @@ public function __construct($data = null) $this->setCapacity(new FHIRQuantity($data[self::FIELD_CAPACITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_MATERIAL])) { @@ -287,36 +294,50 @@ public function __construct($data = null) $this->setMinimumVolumeQuantity(new FHIRQuantity($data[self::FIELD_MINIMUM_VOLUME_QUANTITY])); } } - if (isset($data[self::FIELD_MINIMUM_VOLUME_STRING])) { - $ext = (isset($data[self::FIELD_MINIMUM_VOLUME_STRING_EXT]) && is_array($data[self::FIELD_MINIMUM_VOLUME_STRING_EXT])) - ? $data[self::FIELD_MINIMUM_VOLUME_STRING_EXT] - : null; - if ($data[self::FIELD_MINIMUM_VOLUME_STRING] instanceof FHIRString) { - $this->setMinimumVolumeString($data[self::FIELD_MINIMUM_VOLUME_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MINIMUM_VOLUME_STRING])) { - $this->setMinimumVolumeString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MINIMUM_VOLUME_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_MINIMUM_VOLUME_STRING])) { - $this->setMinimumVolumeString(new FHIRString(array_merge($ext, $data[self::FIELD_MINIMUM_VOLUME_STRING]))); - } + if (isset($data[self::FIELD_MINIMUM_VOLUME_STRING]) || isset($data[self::FIELD_MINIMUM_VOLUME_STRING_EXT])) { + if (isset($data[self::FIELD_MINIMUM_VOLUME_STRING])) { + $value = $data[self::FIELD_MINIMUM_VOLUME_STRING]; } else { - $this->setMinimumVolumeString(new FHIRString($data[self::FIELD_MINIMUM_VOLUME_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_PREPARATION])) { - $ext = (isset($data[self::FIELD_PREPARATION_EXT]) && is_array($data[self::FIELD_PREPARATION_EXT])) - ? $data[self::FIELD_PREPARATION_EXT] - : null; - if ($data[self::FIELD_PREPARATION] instanceof FHIRString) { - $this->setPreparation($data[self::FIELD_PREPARATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREPARATION])) { - $this->setPreparation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREPARATION]] + $ext)); - } else if (is_array($data[self::FIELD_PREPARATION])) { - $this->setPreparation(new FHIRString(array_merge($ext, $data[self::FIELD_PREPARATION]))); + if (isset($data[self::FIELD_MINIMUM_VOLUME_STRING_EXT]) && is_array($data[self::FIELD_MINIMUM_VOLUME_STRING_EXT])) { + $ext = $data[self::FIELD_MINIMUM_VOLUME_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMinimumVolumeString($value); + } else if (is_array($value)) { + $this->setMinimumVolumeString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMinimumVolumeString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinimumVolumeString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PREPARATION]) || isset($data[self::FIELD_PREPARATION_EXT])) { + if (isset($data[self::FIELD_PREPARATION])) { + $value = $data[self::FIELD_PREPARATION]; } else { - $this->setPreparation(new FHIRString($data[self::FIELD_PREPARATION])); + $value = null; + } + if (isset($data[self::FIELD_PREPARATION_EXT]) && is_array($data[self::FIELD_PREPARATION_EXT])) { + $ext = $data[self::FIELD_PREPARATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPreparation($value); + } else if (is_array($value)) { + $this->setPreparation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPreparation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreparation(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -843,7 +864,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdditive())) { - $a[self::FIELD_ADDITIVE] = $vs; + $a[self::FIELD_ADDITIVE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIVE][] = $v; + } } if (null !== ($v = $this->getCap())) { $a[self::FIELD_CAP] = $v; @@ -853,8 +880,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -866,21 +895,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinimumVolumeString())) { $a[self::FIELD_MINIMUM_VOLUME_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MINIMUM_VOLUME_STRING_EXT] = $enc; } } if (null !== ($v = $this->getPreparation())) { $a[self::FIELD_PREPARATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PREPARATION_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandling.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandling.php index 7f2c638819..905c5b093b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandling.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandling.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSpecimenDefinitionHandling extends FHIRBackboneElement const FIELD_TEMPERATURE_RANGE = 'temperatureRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -159,20 +159,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) - ? $data[self::FIELD_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_INSTRUCTION] instanceof FHIRString) { - $this->setInstruction($data[self::FIELD_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_INSTRUCTION]))); - } + if (isset($data[self::FIELD_INSTRUCTION]) || isset($data[self::FIELD_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_INSTRUCTION])) { + $value = $data[self::FIELD_INSTRUCTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_INSTRUCTION_EXT]; } else { - $this->setInstruction(new FHIRString($data[self::FIELD_INSTRUCTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setInstruction($value); + } else if (is_array($value)) { + $this->setInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInstruction(new FHIRString($ext)); } } if (isset($data[self::FIELD_MAX_DURATION])) { @@ -460,8 +467,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getInstruction())) { $a[self::FIELD_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INSTRUCTION_EXT] = $enc; } } @@ -474,6 +483,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTemperatureRange())) { $a[self::FIELD_TEMPERATURE_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTested.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTested.php index 4bc3b4bbbd..9e3e856735 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTested.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTested.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRSpecimenDefinitionTypeTested extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A kind of specimen with associated set of requirements. @@ -230,36 +230,50 @@ public function __construct($data = null) $this->addHandling(new FHIRSpecimenDefinitionHandling($data[self::FIELD_HANDLING])); } } - if (isset($data[self::FIELD_IS_DERIVED])) { - $ext = (isset($data[self::FIELD_IS_DERIVED_EXT]) && is_array($data[self::FIELD_IS_DERIVED_EXT])) - ? $data[self::FIELD_IS_DERIVED_EXT] - : null; - if ($data[self::FIELD_IS_DERIVED] instanceof FHIRBoolean) { - $this->setIsDerived($data[self::FIELD_IS_DERIVED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_DERIVED])) { - $this->setIsDerived(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_DERIVED]] + $ext)); - } else if (is_array($data[self::FIELD_IS_DERIVED])) { - $this->setIsDerived(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_DERIVED]))); - } + if (isset($data[self::FIELD_IS_DERIVED]) || isset($data[self::FIELD_IS_DERIVED_EXT])) { + if (isset($data[self::FIELD_IS_DERIVED])) { + $value = $data[self::FIELD_IS_DERIVED]; } else { - $this->setIsDerived(new FHIRBoolean($data[self::FIELD_IS_DERIVED])); + $value = null; } - } - if (isset($data[self::FIELD_PREFERENCE])) { - $ext = (isset($data[self::FIELD_PREFERENCE_EXT]) && is_array($data[self::FIELD_PREFERENCE_EXT])) - ? $data[self::FIELD_PREFERENCE_EXT] - : null; - if ($data[self::FIELD_PREFERENCE] instanceof FHIRSpecimenContainedPreference) { - $this->setPreference($data[self::FIELD_PREFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERENCE])) { - $this->setPreference(new FHIRSpecimenContainedPreference([FHIRSpecimenContainedPreference::FIELD_VALUE => $data[self::FIELD_PREFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERENCE])) { - $this->setPreference(new FHIRSpecimenContainedPreference(array_merge($ext, $data[self::FIELD_PREFERENCE]))); + if (isset($data[self::FIELD_IS_DERIVED_EXT]) && is_array($data[self::FIELD_IS_DERIVED_EXT])) { + $ext = $data[self::FIELD_IS_DERIVED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsDerived($value); + } else if (is_array($value)) { + $this->setIsDerived(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsDerived(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIsDerived(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_PREFERENCE]) || isset($data[self::FIELD_PREFERENCE_EXT])) { + if (isset($data[self::FIELD_PREFERENCE])) { + $value = $data[self::FIELD_PREFERENCE]; } else { - $this->setPreference(new FHIRSpecimenContainedPreference($data[self::FIELD_PREFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_PREFERENCE_EXT]) && is_array($data[self::FIELD_PREFERENCE_EXT])) { + $ext = $data[self::FIELD_PREFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSpecimenContainedPreference) { + $this->setPreference($value); + } else if (is_array($value)) { + $this->setPreference(new FHIRSpecimenContainedPreference(array_merge($ext, $value))); + } else { + $this->setPreference(new FHIRSpecimenContainedPreference([FHIRSpecimenContainedPreference::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreference(new FHIRSpecimenContainedPreference($ext)); } } if (isset($data[self::FIELD_REJECTION_CRITERION])) { @@ -280,20 +294,27 @@ public function __construct($data = null) $this->addRejectionCriterion(new FHIRCodeableConcept($data[self::FIELD_REJECTION_CRITERION])); } } - if (isset($data[self::FIELD_REQUIREMENT])) { - $ext = (isset($data[self::FIELD_REQUIREMENT_EXT]) && is_array($data[self::FIELD_REQUIREMENT_EXT])) - ? $data[self::FIELD_REQUIREMENT_EXT] - : null; - if ($data[self::FIELD_REQUIREMENT] instanceof FHIRString) { - $this->setRequirement($data[self::FIELD_REQUIREMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENT])) { - $this->setRequirement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENT]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENT])) { - $this->setRequirement(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENT]))); - } + if (isset($data[self::FIELD_REQUIREMENT]) || isset($data[self::FIELD_REQUIREMENT_EXT])) { + if (isset($data[self::FIELD_REQUIREMENT])) { + $value = $data[self::FIELD_REQUIREMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENT_EXT]) && is_array($data[self::FIELD_REQUIREMENT_EXT])) { + $ext = $data[self::FIELD_REQUIREMENT_EXT]; } else { - $this->setRequirement(new FHIRString($data[self::FIELD_REQUIREMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirement($value); + } else if (is_array($value)) { + $this->setRequirement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequirement(new FHIRString($ext)); } } if (isset($data[self::FIELD_RETENTION_TIME])) { @@ -792,29 +813,47 @@ public function jsonSerialize() $a[self::FIELD_CONTAINER] = $v; } if ([] !== ($vs = $this->getHandling())) { - $a[self::FIELD_HANDLING] = $vs; + $a[self::FIELD_HANDLING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_HANDLING][] = $v; + } } if (null !== ($v = $this->getIsDerived())) { $a[self::FIELD_IS_DERIVED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_DERIVED_EXT] = $enc; } } if (null !== ($v = $this->getPreference())) { $a[self::FIELD_PREFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSpecimenContainedPreference::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSpecimenContainedPreference::FIELD_VALUE]); $a[self::FIELD_PREFERENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getRejectionCriterion())) { - $a[self::FIELD_REJECTION_CRITERION] = $vs; + $a[self::FIELD_REJECTION_CRITERION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REJECTION_CRITERION][] = $v; + } } if (null !== ($v = $this->getRequirement())) { $a[self::FIELD_REQUIREMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENT_EXT] = $enc; } } @@ -824,6 +863,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContext.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContext.php index e30f7c0f2a..ab5a6b6d6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContext.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRStructureDefinitionContext extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRExtensionContextType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRExtensionContextType([FHIRExtensionContextType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRExtensionContextType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRExtensionContextType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExtensionContextType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRExtensionContextType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRExtensionContextType([FHIRExtensionContextType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRExtensionContextType($ext)); } } } @@ -348,18 +362,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExtensionContextType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExtensionContextType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php index 6691687dc9..39abeed01f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureDefinitionDifferential extends FHIRBackboneElement const FIELD_ELEMENT = 'element'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Captures constraints on each element within the resource, profile, or extension. @@ -303,7 +303,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php index c3dbba409f..77e06aa7f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRStructureDefinitionMapping extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -165,68 +165,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -545,32 +573,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php index c716349789..1fc2d0c6d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureDefinitionSnapshot extends FHIRBackboneElement const FIELD_ELEMENT = 'element'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Captures constraints on each element within the resource, profile, or extension. @@ -303,7 +303,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php index 1ae3d0e496..efa0374598 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRStructureMapDependent extends FHIRBackboneElement const FIELD_VARIABLE_EXT = '_variable'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -137,49 +137,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRId) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRId(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRId($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRId(array_merge($ext, $value))); + } else { + $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRId($ext)); } } - if (isset($data[self::FIELD_VARIABLE])) { - $ext = (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) - ? $data[self::FIELD_VARIABLE_EXT] - : null; - if (is_array($data[self::FIELD_VARIABLE])) { - foreach($data[self::FIELD_VARIABLE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addVariable($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addVariable(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addVariable(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_VARIABLE]) || isset($data[self::FIELD_VARIABLE_EXT])) { + if (isset($data[self::FIELD_VARIABLE])) { + $value = $data[self::FIELD_VARIABLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) { + $ext = $data[self::FIELD_VARIABLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addVariable($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addVariable($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addVariable(new FHIRString(array_merge($v, $iext))); + } else { + $this->addVariable(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addVariable(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addVariable(new FHIRString(array_merge($ext, $value))); + } else { + $this->addVariable(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addVariable(new FHIRString($iext)); } - } elseif ($data[self::FIELD_VARIABLE] instanceof FHIRString) { - $this->addVariable($data[self::FIELD_VARIABLE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_VARIABLE])) { - $this->addVariable(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VARIABLE]] + $ext)); - } else { - $this->addVariable(new FHIRString($data[self::FIELD_VARIABLE])); } } } @@ -413,25 +429,38 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getVariable())) { $a[self::FIELD_VARIABLE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_VARIABLE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_VARIABLE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_VARIABLE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_VARIABLE_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php index 00f94f1248..b5aaee4742 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRStructureMapGroup extends FHIRBackboneElement const FIELD_TYPE_MODE_EXT = '_typeMode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -194,36 +194,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_EXTENDS])) { - $ext = (isset($data[self::FIELD_EXTENDS_EXT]) && is_array($data[self::FIELD_EXTENDS_EXT])) - ? $data[self::FIELD_EXTENDS_EXT] - : null; - if ($data[self::FIELD_EXTENDS] instanceof FHIRId) { - $this->setExtends($data[self::FIELD_EXTENDS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXTENDS])) { - $this->setExtends(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_EXTENDS]] + $ext)); - } else if (is_array($data[self::FIELD_EXTENDS])) { - $this->setExtends(new FHIRId(array_merge($ext, $data[self::FIELD_EXTENDS]))); + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXTENDS]) || isset($data[self::FIELD_EXTENDS_EXT])) { + if (isset($data[self::FIELD_EXTENDS])) { + $value = $data[self::FIELD_EXTENDS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXTENDS_EXT]) && is_array($data[self::FIELD_EXTENDS_EXT])) { + $ext = $data[self::FIELD_EXTENDS_EXT]; } else { - $this->setExtends(new FHIRId($data[self::FIELD_EXTENDS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setExtends($value); + } else if (is_array($value)) { + $this->setExtends(new FHIRId(array_merge($ext, $value))); + } else { + $this->setExtends(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExtends(new FHIRId($ext)); } } if (isset($data[self::FIELD_INPUT])) { @@ -244,20 +258,27 @@ public function __construct($data = null) $this->addInput(new FHIRStructureMapInput($data[self::FIELD_INPUT])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRId) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRId(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRId($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRId(array_merge($ext, $value))); + } else { + $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRId($ext)); } } if (isset($data[self::FIELD_RULE])) { @@ -278,20 +299,27 @@ public function __construct($data = null) $this->addRule(new FHIRStructureMapRule($data[self::FIELD_RULE])); } } - if (isset($data[self::FIELD_TYPE_MODE])) { - $ext = (isset($data[self::FIELD_TYPE_MODE_EXT]) && is_array($data[self::FIELD_TYPE_MODE_EXT])) - ? $data[self::FIELD_TYPE_MODE_EXT] - : null; - if ($data[self::FIELD_TYPE_MODE] instanceof FHIRStructureMapGroupTypeMode) { - $this->setTypeMode($data[self::FIELD_TYPE_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE_MODE])) { - $this->setTypeMode(new FHIRStructureMapGroupTypeMode([FHIRStructureMapGroupTypeMode::FIELD_VALUE => $data[self::FIELD_TYPE_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE_MODE])) { - $this->setTypeMode(new FHIRStructureMapGroupTypeMode(array_merge($ext, $data[self::FIELD_TYPE_MODE]))); - } + if (isset($data[self::FIELD_TYPE_MODE]) || isset($data[self::FIELD_TYPE_MODE_EXT])) { + if (isset($data[self::FIELD_TYPE_MODE])) { + $value = $data[self::FIELD_TYPE_MODE]; } else { - $this->setTypeMode(new FHIRStructureMapGroupTypeMode($data[self::FIELD_TYPE_MODE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_MODE_EXT]) && is_array($data[self::FIELD_TYPE_MODE_EXT])) { + $ext = $data[self::FIELD_TYPE_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapGroupTypeMode) { + $this->setTypeMode($value); + } else if (is_array($value)) { + $this->setTypeMode(new FHIRStructureMapGroupTypeMode(array_merge($ext, $value))); + } else { + $this->setTypeMode(new FHIRStructureMapGroupTypeMode([FHIRStructureMapGroupTypeMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTypeMode(new FHIRStructureMapGroupTypeMode($ext)); } } } @@ -727,38 +755,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getExtends())) { $a[self::FIELD_EXTENDS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_EXTENDS_EXT] = $enc; } } if ([] !== ($vs = $this->getInput())) { - $a[self::FIELD_INPUT] = $vs; + $a[self::FIELD_INPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INPUT][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } } if (null !== ($v = $this->getTypeMode())) { $a[self::FIELD_TYPE_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapGroupTypeMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapGroupTypeMode::FIELD_VALUE]); $a[self::FIELD_TYPE_MODE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php index 72eacf1a3a..6a09ab7b64 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRStructureMapInput extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -159,68 +159,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRStructureMapInputMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRStructureMapInputMode([FHIRStructureMapInputMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRStructureMapInputMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setMode(new FHIRStructureMapInputMode($data[self::FIELD_MODE])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRId) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRId(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setName(new FHIRId($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapInputMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRStructureMapInputMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRStructureMapInputMode([FHIRStructureMapInputMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRStructureMapInputMode($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRId(array_merge($ext, $value))); + } else { + $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); } } } @@ -515,32 +543,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapInputMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapInputMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php index c80d07b17e..68e0bebd77 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRStructureMapParameter extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -175,84 +175,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $ext = []; } - } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -617,39 +652,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php index 8264f5e5a7..52277c2052 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRStructureMapRule extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A Map of relationships between 2 structures that can be used to transform data. @@ -195,36 +195,50 @@ public function __construct($data = null) $this->addDependent(new FHIRStructureMapDependent($data[self::FIELD_DEPENDENT])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRId) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRId(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRId($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRId(array_merge($ext, $value))); + } else { + $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRId($ext)); } } if (isset($data[self::FIELD_RULE])) { @@ -738,30 +752,61 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDependent())) { - $a[self::FIELD_DEPENDENT] = $vs; + $a[self::FIELD_DEPENDENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEPENDENT][] = $v; + } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php index 6bef797d06..1610fd38fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -218,7 +218,7 @@ class FHIRStructureMapSource extends FHIRBackboneElement const FIELD_VARIABLE_EXT = '_variable'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -1015,52 +1015,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CHECK])) { - $ext = (isset($data[self::FIELD_CHECK_EXT]) && is_array($data[self::FIELD_CHECK_EXT])) - ? $data[self::FIELD_CHECK_EXT] - : null; - if ($data[self::FIELD_CHECK] instanceof FHIRString) { - $this->setCheck($data[self::FIELD_CHECK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CHECK])) { - $this->setCheck(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CHECK]] + $ext)); - } else if (is_array($data[self::FIELD_CHECK])) { - $this->setCheck(new FHIRString(array_merge($ext, $data[self::FIELD_CHECK]))); - } + if (isset($data[self::FIELD_CHECK]) || isset($data[self::FIELD_CHECK_EXT])) { + if (isset($data[self::FIELD_CHECK])) { + $value = $data[self::FIELD_CHECK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CHECK_EXT]) && is_array($data[self::FIELD_CHECK_EXT])) { + $ext = $data[self::FIELD_CHECK_EXT]; } else { - $this->setCheck(new FHIRString($data[self::FIELD_CHECK])); - } - } - if (isset($data[self::FIELD_CONDITION])) { - $ext = (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) - ? $data[self::FIELD_CONDITION_EXT] - : null; - if ($data[self::FIELD_CONDITION] instanceof FHIRString) { - $this->setCondition($data[self::FIELD_CONDITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITION])) { - $this->setCondition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONDITION]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITION])) { - $this->setCondition(new FHIRString(array_merge($ext, $data[self::FIELD_CONDITION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCheck($value); + } else if (is_array($value)) { + $this->setCheck(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCheck(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCheck(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CONDITION]) || isset($data[self::FIELD_CONDITION_EXT])) { + if (isset($data[self::FIELD_CONDITION])) { + $value = $data[self::FIELD_CONDITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) { + $ext = $data[self::FIELD_CONDITION_EXT]; } else { - $this->setCondition(new FHIRString($data[self::FIELD_CONDITION])); - } - } - if (isset($data[self::FIELD_CONTEXT])) { - $ext = (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) - ? $data[self::FIELD_CONTEXT_EXT] - : null; - if ($data[self::FIELD_CONTEXT] instanceof FHIRId) { - $this->setContext($data[self::FIELD_CONTEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTEXT])) { - $this->setContext(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_CONTEXT]] + $ext)); - } else if (is_array($data[self::FIELD_CONTEXT])) { - $this->setContext(new FHIRId(array_merge($ext, $data[self::FIELD_CONTEXT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCondition($value); + } else if (is_array($value)) { + $this->setCondition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCondition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCondition(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CONTEXT]) || isset($data[self::FIELD_CONTEXT_EXT])) { + if (isset($data[self::FIELD_CONTEXT])) { + $value = $data[self::FIELD_CONTEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) { + $ext = $data[self::FIELD_CONTEXT_EXT]; } else { - $this->setContext(new FHIRId($data[self::FIELD_CONTEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setContext($value); + } else if (is_array($value)) { + $this->setContext(new FHIRId(array_merge($ext, $value))); + } else { + $this->setContext(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContext(new FHIRId($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_ADDRESS])) { @@ -1091,68 +1112,96 @@ public function __construct($data = null) $this->setDefaultValueAttachment(new FHIRAttachment($data[self::FIELD_DEFAULT_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setDefaultValueBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]; } else { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setDefaultValueBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setDefaultValueBase64Binary($value); + } else if (is_array($value)) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]) || isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]; } else { - $this->setDefaultValueBoolean(new FHIRBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_CANONICAL] instanceof FHIRCanonical) { - $this->setDefaultValueCanonical($data[self::FIELD_DEFAULT_VALUE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_CANONICAL])) { - $this->setDefaultValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_CANONICAL])) { - $this->setDefaultValueCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_CANONICAL]))); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDefaultValueBoolean($value); + } else if (is_array($value)) { + $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL]) || isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL])) { + $value = $data[self::FIELD_DEFAULT_VALUE_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT]; } else { - $this->setDefaultValueCanonical(new FHIRCanonical($data[self::FIELD_DEFAULT_VALUE_CANONICAL])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_CODE] instanceof FHIRCode) { - $this->setDefaultValueCode($data[self::FIELD_DEFAULT_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefaultValueCanonical($value); + } else if (is_array($value)) { + $this->setDefaultValueCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefaultValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE]) || isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_CODE_EXT]; } else { - $this->setDefaultValueCode(new FHIRCode($data[self::FIELD_DEFAULT_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setDefaultValueCode($value); + } else if (is_array($value)) { + $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { @@ -1204,52 +1253,73 @@ public function __construct($data = null) $this->setDefaultValueDataRequirement(new FHIRDataRequirement($data[self::FIELD_DEFAULT_VALUE_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE] instanceof FHIRDate) { - $this->setDefaultValueDate($data[self::FIELD_DEFAULT_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE]; } else { - $this->setDefaultValueDate(new FHIRDate($data[self::FIELD_DEFAULT_VALUE_DATE])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setDefaultValueDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDefaultValueDate($value); + } else if (is_array($value)) { + $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]; } else { - $this->setDefaultValueDateTime(new FHIRDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setDefaultValueDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DECIMAL]))); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDefaultValueDateTime($value); + } else if (is_array($value)) { + $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL]) || isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DECIMAL]; } else { - $this->setDefaultValueDecimal(new FHIRDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDefaultValueDecimal($value); + } else if (is_array($value)) { + $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_DISTANCE])) { @@ -1287,20 +1357,27 @@ public function __construct($data = null) $this->setDefaultValueHumanName(new FHIRHumanName($data[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_ID] instanceof FHIRId) { - $this->setDefaultValueId($data[self::FIELD_DEFAULT_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_ID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID]) || isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_ID]; } else { - $this->setDefaultValueId(new FHIRId($data[self::FIELD_DEFAULT_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setDefaultValueId($value); + } else if (is_array($value)) { + $this->setDefaultValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { @@ -1310,52 +1387,73 @@ public function __construct($data = null) $this->setDefaultValueIdentifier(new FHIRIdentifier($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setDefaultValueInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT]) || isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]; } else { - $this->setDefaultValueInstant(new FHIRInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setDefaultValueInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INTEGER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setDefaultValueInstant($value); + } else if (is_array($value)) { + $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER]) || isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]; } else { - $this->setDefaultValueInteger(new FHIRInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setDefaultValueMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDefaultValueInteger($value); + } else if (is_array($value)) { + $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]) || isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]; } else { - $this->setDefaultValueMarkdown(new FHIRMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDefaultValueMarkdown($value); + } else if (is_array($value)) { + $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_META])) { @@ -1372,20 +1470,27 @@ public function __construct($data = null) $this->setDefaultValueMoney(new FHIRMoney($data[self::FIELD_DEFAULT_VALUE_MONEY])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_OID] instanceof FHIROid) { - $this->setDefaultValueOid($data[self::FIELD_DEFAULT_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_OID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID]) || isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_OID_EXT]; } else { - $this->setDefaultValueOid(new FHIROid($data[self::FIELD_DEFAULT_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setDefaultValueOid($value); + } else if (is_array($value)) { + $this->setDefaultValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_PARAMETER_DEFINITION])) { @@ -1402,20 +1507,27 @@ public function __construct($data = null) $this->setDefaultValuePeriod(new FHIRPeriod($data[self::FIELD_DEFAULT_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setDefaultValuePositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]; } else { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDefaultValuePositiveInt($value); + } else if (is_array($value)) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_QUANTITY])) { @@ -1467,36 +1579,50 @@ public function __construct($data = null) $this->setDefaultValueSignature(new FHIRSignature($data[self::FIELD_DEFAULT_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_STRING] instanceof FHIRString) { - $this->setDefaultValueString($data[self::FIELD_DEFAULT_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_STRING]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING]) || isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { + $value = $data[self::FIELD_DEFAULT_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_STRING_EXT]; } else { - $this->setDefaultValueString(new FHIRString($data[self::FIELD_DEFAULT_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_TIME] instanceof FHIRTime) { - $this->setDefaultValueTime($data[self::FIELD_DEFAULT_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefaultValueString($value); + } else if (is_array($value)) { + $this->setDefaultValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_TIME_EXT]; } else { - $this->setDefaultValueTime(new FHIRTime($data[self::FIELD_DEFAULT_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setDefaultValueTime($value); + } else if (is_array($value)) { + $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_TIMING])) { @@ -1513,52 +1639,73 @@ public function __construct($data = null) $this->setDefaultValueTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_DEFAULT_VALUE_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setDefaultValueUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]; } else { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_URI] instanceof FHIRUri) { - $this->setDefaultValueUri($data[self::FIELD_DEFAULT_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_URI]))); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setDefaultValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URI]) || isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { + $value = $data[self::FIELD_DEFAULT_VALUE_URI]; } else { - $this->setDefaultValueUri(new FHIRUri($data[self::FIELD_DEFAULT_VALUE_URI])); - } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_URL])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_URL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URL_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_URL_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_URL] instanceof FHIRUrl) { - $this->setDefaultValueUrl($data[self::FIELD_DEFAULT_VALUE_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_URL])) { - $this->setDefaultValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_URL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_URL])) { - $this->setDefaultValueUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_URL]))); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefaultValueUri($value); + } else if (is_array($value)) { + $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URL]) || isset($data[self::FIELD_DEFAULT_VALUE_URL_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_URL])) { + $value = $data[self::FIELD_DEFAULT_VALUE_URL]; } else { - $this->setDefaultValueUrl(new FHIRUrl($data[self::FIELD_DEFAULT_VALUE_URL])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URL_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setDefaultValueUrl($value); + } else if (is_array($value)) { + $this->setDefaultValueUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setDefaultValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT])) { @@ -1568,132 +1715,188 @@ public function __construct($data = null) $this->setDefaultValueUsageContext(new FHIRUsageContext($data[self::FIELD_DEFAULT_VALUE_USAGE_CONTEXT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_UUID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UUID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_UUID] instanceof FHIRUuid) { - $this->setDefaultValueUuid($data[self::FIELD_DEFAULT_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_UUID])) { - $this->setDefaultValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_UUID])) { - $this->setDefaultValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_UUID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UUID]) || isset($data[self::FIELD_DEFAULT_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_UUID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_UUID]; } else { - $this->setDefaultValueUuid(new FHIRUuid($data[self::FIELD_DEFAULT_VALUE_UUID])); - } - } - if (isset($data[self::FIELD_ELEMENT])) { - $ext = (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) - ? $data[self::FIELD_ELEMENT_EXT] - : null; - if ($data[self::FIELD_ELEMENT] instanceof FHIRString) { - $this->setElement($data[self::FIELD_ELEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ELEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRString(array_merge($ext, $data[self::FIELD_ELEMENT]))); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_UUID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_UUID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setDefaultValueUuid($value); + } else if (is_array($value)) { + $this->setDefaultValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setDefaultValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueUuid(new FHIRUuid($ext)); + } + } + if (isset($data[self::FIELD_ELEMENT]) || isset($data[self::FIELD_ELEMENT_EXT])) { + if (isset($data[self::FIELD_ELEMENT])) { + $value = $data[self::FIELD_ELEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) { + $ext = $data[self::FIELD_ELEMENT_EXT]; } else { - $this->setElement(new FHIRString($data[self::FIELD_ELEMENT])); - } - } - if (isset($data[self::FIELD_LIST_MODE])) { - $ext = (isset($data[self::FIELD_LIST_MODE_EXT]) && is_array($data[self::FIELD_LIST_MODE_EXT])) - ? $data[self::FIELD_LIST_MODE_EXT] - : null; - if ($data[self::FIELD_LIST_MODE] instanceof FHIRStructureMapSourceListMode) { - $this->setListMode($data[self::FIELD_LIST_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LIST_MODE])) { - $this->setListMode(new FHIRStructureMapSourceListMode([FHIRStructureMapSourceListMode::FIELD_VALUE => $data[self::FIELD_LIST_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_LIST_MODE])) { - $this->setListMode(new FHIRStructureMapSourceListMode(array_merge($ext, $data[self::FIELD_LIST_MODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setElement($value); + } else if (is_array($value)) { + $this->setElement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setElement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setElement(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_LIST_MODE]) || isset($data[self::FIELD_LIST_MODE_EXT])) { + if (isset($data[self::FIELD_LIST_MODE])) { + $value = $data[self::FIELD_LIST_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIST_MODE_EXT]) && is_array($data[self::FIELD_LIST_MODE_EXT])) { + $ext = $data[self::FIELD_LIST_MODE_EXT]; } else { - $this->setListMode(new FHIRStructureMapSourceListMode($data[self::FIELD_LIST_MODE])); - } - } - if (isset($data[self::FIELD_LOG_MESSAGE])) { - $ext = (isset($data[self::FIELD_LOG_MESSAGE_EXT]) && is_array($data[self::FIELD_LOG_MESSAGE_EXT])) - ? $data[self::FIELD_LOG_MESSAGE_EXT] - : null; - if ($data[self::FIELD_LOG_MESSAGE] instanceof FHIRString) { - $this->setLogMessage($data[self::FIELD_LOG_MESSAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOG_MESSAGE])) { - $this->setLogMessage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOG_MESSAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LOG_MESSAGE])) { - $this->setLogMessage(new FHIRString(array_merge($ext, $data[self::FIELD_LOG_MESSAGE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapSourceListMode) { + $this->setListMode($value); + } else if (is_array($value)) { + $this->setListMode(new FHIRStructureMapSourceListMode(array_merge($ext, $value))); + } else { + $this->setListMode(new FHIRStructureMapSourceListMode([FHIRStructureMapSourceListMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setListMode(new FHIRStructureMapSourceListMode($ext)); + } + } + if (isset($data[self::FIELD_LOG_MESSAGE]) || isset($data[self::FIELD_LOG_MESSAGE_EXT])) { + if (isset($data[self::FIELD_LOG_MESSAGE])) { + $value = $data[self::FIELD_LOG_MESSAGE]; } else { - $this->setLogMessage(new FHIRString($data[self::FIELD_LOG_MESSAGE])); - } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); + $value = null; + } + if (isset($data[self::FIELD_LOG_MESSAGE_EXT]) && is_array($data[self::FIELD_LOG_MESSAGE_EXT])) { + $ext = $data[self::FIELD_LOG_MESSAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLogMessage($value); + } else if (is_array($value)) { + $this->setLogMessage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLogMessage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLogMessage(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); - } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_VARIABLE])) { - $ext = (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) - ? $data[self::FIELD_VARIABLE_EXT] - : null; - if ($data[self::FIELD_VARIABLE] instanceof FHIRId) { - $this->setVariable($data[self::FIELD_VARIABLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VARIABLE])) { - $this->setVariable(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VARIABLE]] + $ext)); - } else if (is_array($data[self::FIELD_VARIABLE])) { - $this->setVariable(new FHIRId(array_merge($ext, $data[self::FIELD_VARIABLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VARIABLE]) || isset($data[self::FIELD_VARIABLE_EXT])) { + if (isset($data[self::FIELD_VARIABLE])) { + $value = $data[self::FIELD_VARIABLE]; } else { - $this->setVariable(new FHIRId($data[self::FIELD_VARIABLE])); + $value = null; + } + if (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) { + $ext = $data[self::FIELD_VARIABLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setVariable($value); + } else if (is_array($value)) { + $this->setVariable(new FHIRId(array_merge($ext, $value))); + } else { + $this->setVariable(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVariable(new FHIRId($ext)); } } } @@ -4626,22 +4829,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCheck())) { $a[self::FIELD_CHECK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CHECK_EXT] = $enc; } } if (null !== ($v = $this->getCondition())) { $a[self::FIELD_CONDITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONDITION_EXT] = $enc; } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_CONTEXT_EXT] = $enc; } } @@ -4659,29 +4868,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueBase64Binary())) { $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueBoolean())) { $a[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueCanonical())) { $a[self::FIELD_DEFAULT_VALUE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueCode())) { $a[self::FIELD_DEFAULT_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_CODE_EXT] = $enc; } } @@ -4708,22 +4925,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueDate())) { $a[self::FIELD_DEFAULT_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDateTime())) { $a[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDecimal())) { $a[self::FIELD_DEFAULT_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] = $enc; } } @@ -4744,8 +4967,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueId())) { $a[self::FIELD_DEFAULT_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_ID_EXT] = $enc; } } @@ -4754,22 +4979,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueInstant())) { $a[self::FIELD_DEFAULT_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueInteger())) { $a[self::FIELD_DEFAULT_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueMarkdown())) { $a[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] = $enc; } } @@ -4781,8 +5012,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueOid())) { $a[self::FIELD_DEFAULT_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_OID_EXT] = $enc; } } @@ -4794,8 +5027,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValuePositiveInt())) { $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -4822,15 +5057,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueString())) { $a[self::FIELD_DEFAULT_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueTime())) { $a[self::FIELD_DEFAULT_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_TIME_EXT] = $enc; } } @@ -4842,22 +5081,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueUnsignedInt())) { $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueUri())) { $a[self::FIELD_DEFAULT_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueUrl())) { $a[self::FIELD_DEFAULT_VALUE_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_URL_EXT] = $enc; } } @@ -4866,60 +5111,79 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueUuid())) { $a[self::FIELD_DEFAULT_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_UUID_EXT] = $enc; } } if (null !== ($v = $this->getElement())) { $a[self::FIELD_ELEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ELEMENT_EXT] = $enc; } } if (null !== ($v = $this->getListMode())) { $a[self::FIELD_LIST_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapSourceListMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapSourceListMode::FIELD_VALUE]); $a[self::FIELD_LIST_MODE_EXT] = $enc; } } if (null !== ($v = $this->getLogMessage())) { $a[self::FIELD_LOG_MESSAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOG_MESSAGE_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getVariable())) { $a[self::FIELD_VARIABLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VARIABLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php index 107e03b7a4..77e2d965fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRStructureMapStructure extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -157,68 +157,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->setAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALIAS])) { - $this->setAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else if (is_array($data[self::FIELD_ALIAS])) { - $this->setAlias(new FHIRString(array_merge($ext, $data[self::FIELD_ALIAS]))); - } + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; } else { - $this->setAlias(new FHIRString($data[self::FIELD_ALIAS])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRStructureMapModelMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRStructureMapModelMode([FHIRStructureMapModelMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRStructureMapModelMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAlias($value); + } else if (is_array($value)) { + $this->setAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAlias(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setMode(new FHIRStructureMapModelMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRCanonical) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRCanonical(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapModelMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRStructureMapModelMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRStructureMapModelMode([FHIRStructureMapModelMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRStructureMapModelMode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRCanonical($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRCanonical($ext)); } } } @@ -509,32 +537,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAlias())) { $a[self::FIELD_ALIAS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALIAS_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapModelMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapModelMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php index 47946a7e3a..f8510a13cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRStructureMapTarget extends FHIRBackboneElement const FIELD_VARIABLE_EXT = '_variable'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -214,97 +214,134 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONTEXT])) { - $ext = (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) - ? $data[self::FIELD_CONTEXT_EXT] - : null; - if ($data[self::FIELD_CONTEXT] instanceof FHIRId) { - $this->setContext($data[self::FIELD_CONTEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTEXT])) { - $this->setContext(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_CONTEXT]] + $ext)); - } else if (is_array($data[self::FIELD_CONTEXT])) { - $this->setContext(new FHIRId(array_merge($ext, $data[self::FIELD_CONTEXT]))); - } + if (isset($data[self::FIELD_CONTEXT]) || isset($data[self::FIELD_CONTEXT_EXT])) { + if (isset($data[self::FIELD_CONTEXT])) { + $value = $data[self::FIELD_CONTEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) { + $ext = $data[self::FIELD_CONTEXT_EXT]; } else { - $this->setContext(new FHIRId($data[self::FIELD_CONTEXT])); - } - } - if (isset($data[self::FIELD_CONTEXT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) - ? $data[self::FIELD_CONTEXT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTEXT_TYPE] instanceof FHIRStructureMapContextType) { - $this->setContextType($data[self::FIELD_CONTEXT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRStructureMapContextType([FHIRStructureMapContextType::FIELD_VALUE => $data[self::FIELD_CONTEXT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRStructureMapContextType(array_merge($ext, $data[self::FIELD_CONTEXT_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setContext($value); + } else if (is_array($value)) { + $this->setContext(new FHIRId(array_merge($ext, $value))); + } else { + $this->setContext(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContext(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_CONTEXT_TYPE]) || isset($data[self::FIELD_CONTEXT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTEXT_TYPE])) { + $value = $data[self::FIELD_CONTEXT_TYPE]; } else { - $this->setContextType(new FHIRStructureMapContextType($data[self::FIELD_CONTEXT_TYPE])); - } - } - if (isset($data[self::FIELD_ELEMENT])) { - $ext = (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) - ? $data[self::FIELD_ELEMENT_EXT] - : null; - if ($data[self::FIELD_ELEMENT] instanceof FHIRString) { - $this->setElement($data[self::FIELD_ELEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ELEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRString(array_merge($ext, $data[self::FIELD_ELEMENT]))); + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTEXT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapContextType) { + $this->setContextType($value); + } else if (is_array($value)) { + $this->setContextType(new FHIRStructureMapContextType(array_merge($ext, $value))); + } else { + $this->setContextType(new FHIRStructureMapContextType([FHIRStructureMapContextType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContextType(new FHIRStructureMapContextType($ext)); + } + } + if (isset($data[self::FIELD_ELEMENT]) || isset($data[self::FIELD_ELEMENT_EXT])) { + if (isset($data[self::FIELD_ELEMENT])) { + $value = $data[self::FIELD_ELEMENT]; } else { - $this->setElement(new FHIRString($data[self::FIELD_ELEMENT])); + $value = null; + } + if (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) { + $ext = $data[self::FIELD_ELEMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setElement($value); + } else if (is_array($value)) { + $this->setElement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setElement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setElement(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LIST_MODE])) { - $ext = (isset($data[self::FIELD_LIST_MODE_EXT]) && is_array($data[self::FIELD_LIST_MODE_EXT])) - ? $data[self::FIELD_LIST_MODE_EXT] - : null; - if (is_array($data[self::FIELD_LIST_MODE])) { - foreach($data[self::FIELD_LIST_MODE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRStructureMapTargetListMode) { - $this->addListMode($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addListMode(new FHIRStructureMapTargetListMode([FHIRStructureMapTargetListMode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addListMode(new FHIRStructureMapTargetListMode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LIST_MODE]) || isset($data[self::FIELD_LIST_MODE_EXT])) { + if (isset($data[self::FIELD_LIST_MODE])) { + $value = $data[self::FIELD_LIST_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIST_MODE_EXT]) && is_array($data[self::FIELD_LIST_MODE_EXT])) { + $ext = $data[self::FIELD_LIST_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapTargetListMode) { + $this->addListMode($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRStructureMapTargetListMode) { + $this->addListMode($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addListMode(new FHIRStructureMapTargetListMode(array_merge($v, $iext))); + } else { + $this->addListMode(new FHIRStructureMapTargetListMode([FHIRStructureMapTargetListMode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addListMode(new FHIRStructureMapTargetListMode($v)); } + } elseif (is_array($value)) { + $this->addListMode(new FHIRStructureMapTargetListMode(array_merge($ext, $value))); + } else { + $this->addListMode(new FHIRStructureMapTargetListMode([FHIRStructureMapTargetListMode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_LIST_MODE] instanceof FHIRStructureMapTargetListMode) { - $this->addListMode($data[self::FIELD_LIST_MODE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LIST_MODE])) { - $this->addListMode(new FHIRStructureMapTargetListMode([FHIRStructureMapTargetListMode::FIELD_VALUE => $data[self::FIELD_LIST_MODE]] + $ext)); - } else { - $this->addListMode(new FHIRStructureMapTargetListMode($data[self::FIELD_LIST_MODE])); - } - } - if (isset($data[self::FIELD_LIST_RULE_ID])) { - $ext = (isset($data[self::FIELD_LIST_RULE_ID_EXT]) && is_array($data[self::FIELD_LIST_RULE_ID_EXT])) - ? $data[self::FIELD_LIST_RULE_ID_EXT] - : null; - if ($data[self::FIELD_LIST_RULE_ID] instanceof FHIRId) { - $this->setListRuleId($data[self::FIELD_LIST_RULE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LIST_RULE_ID])) { - $this->setListRuleId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_LIST_RULE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LIST_RULE_ID])) { - $this->setListRuleId(new FHIRId(array_merge($ext, $data[self::FIELD_LIST_RULE_ID]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addListMode(new FHIRStructureMapTargetListMode($iext)); } + } + } + if (isset($data[self::FIELD_LIST_RULE_ID]) || isset($data[self::FIELD_LIST_RULE_ID_EXT])) { + if (isset($data[self::FIELD_LIST_RULE_ID])) { + $value = $data[self::FIELD_LIST_RULE_ID]; } else { - $this->setListRuleId(new FHIRId($data[self::FIELD_LIST_RULE_ID])); + $value = null; + } + if (isset($data[self::FIELD_LIST_RULE_ID_EXT]) && is_array($data[self::FIELD_LIST_RULE_ID_EXT])) { + $ext = $data[self::FIELD_LIST_RULE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setListRuleId($value); + } else if (is_array($value)) { + $this->setListRuleId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setListRuleId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setListRuleId(new FHIRId($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -325,36 +362,50 @@ public function __construct($data = null) $this->addParameter(new FHIRStructureMapParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_TRANSFORM])) { - $ext = (isset($data[self::FIELD_TRANSFORM_EXT]) && is_array($data[self::FIELD_TRANSFORM_EXT])) - ? $data[self::FIELD_TRANSFORM_EXT] - : null; - if ($data[self::FIELD_TRANSFORM] instanceof FHIRStructureMapTransform) { - $this->setTransform($data[self::FIELD_TRANSFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRANSFORM])) { - $this->setTransform(new FHIRStructureMapTransform([FHIRStructureMapTransform::FIELD_VALUE => $data[self::FIELD_TRANSFORM]] + $ext)); - } else if (is_array($data[self::FIELD_TRANSFORM])) { - $this->setTransform(new FHIRStructureMapTransform(array_merge($ext, $data[self::FIELD_TRANSFORM]))); - } + if (isset($data[self::FIELD_TRANSFORM]) || isset($data[self::FIELD_TRANSFORM_EXT])) { + if (isset($data[self::FIELD_TRANSFORM])) { + $value = $data[self::FIELD_TRANSFORM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRANSFORM_EXT]) && is_array($data[self::FIELD_TRANSFORM_EXT])) { + $ext = $data[self::FIELD_TRANSFORM_EXT]; } else { - $this->setTransform(new FHIRStructureMapTransform($data[self::FIELD_TRANSFORM])); - } - } - if (isset($data[self::FIELD_VARIABLE])) { - $ext = (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) - ? $data[self::FIELD_VARIABLE_EXT] - : null; - if ($data[self::FIELD_VARIABLE] instanceof FHIRId) { - $this->setVariable($data[self::FIELD_VARIABLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VARIABLE])) { - $this->setVariable(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VARIABLE]] + $ext)); - } else if (is_array($data[self::FIELD_VARIABLE])) { - $this->setVariable(new FHIRId(array_merge($ext, $data[self::FIELD_VARIABLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapTransform) { + $this->setTransform($value); + } else if (is_array($value)) { + $this->setTransform(new FHIRStructureMapTransform(array_merge($ext, $value))); + } else { + $this->setTransform(new FHIRStructureMapTransform([FHIRStructureMapTransform::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTransform(new FHIRStructureMapTransform($ext)); + } + } + if (isset($data[self::FIELD_VARIABLE]) || isset($data[self::FIELD_VARIABLE_EXT])) { + if (isset($data[self::FIELD_VARIABLE])) { + $value = $data[self::FIELD_VARIABLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) { + $ext = $data[self::FIELD_VARIABLE_EXT]; } else { - $this->setVariable(new FHIRId($data[self::FIELD_VARIABLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setVariable($value); + } else if (is_array($value)) { + $this->setVariable(new FHIRId(array_merge($ext, $value))); + } else { + $this->setVariable(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVariable(new FHIRId($ext)); } } } @@ -876,64 +927,93 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_CONTEXT_EXT] = $enc; } } if (null !== ($v = $this->getContextType())) { $a[self::FIELD_CONTEXT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapContextType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapContextType::FIELD_VALUE]); $a[self::FIELD_CONTEXT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getElement())) { $a[self::FIELD_ELEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ELEMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getListMode())) { $a[self::FIELD_LIST_MODE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LIST_MODE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LIST_MODE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRStructureMapTargetListMode::FIELD_VALUE]) || array_key_exists(FHIRStructureMapTargetListMode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LIST_MODE_EXT][] = null; + unset($enc[FHIRStructureMapTargetListMode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LIST_MODE_EXT] = $encs; + } } if (null !== ($v = $this->getListRuleId())) { $a[self::FIELD_LIST_RULE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_LIST_RULE_ID_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getTransform())) { $a[self::FIELD_TRANSFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapTransform::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapTransform::FIELD_VALUE]); $a[self::FIELD_TRANSFORM_EXT] = $enc; } } if (null !== ($v = $this->getVariable())) { $a[self::FIELD_VARIABLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VARIABLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php index 2837269f43..8f16330476 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRSubscriptionChannel extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a literal reference @@ -165,81 +165,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUrl) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUrl(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; } else { - $this->setEndpoint(new FHIRUrl($data[self::FIELD_ENDPOINT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUrl($ext)); } } - if (isset($data[self::FIELD_HEADER])) { - $ext = (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) - ? $data[self::FIELD_HEADER_EXT] - : null; - if (is_array($data[self::FIELD_HEADER])) { - foreach($data[self::FIELD_HEADER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addHeader($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addHeader(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_HEADER]) || isset($data[self::FIELD_HEADER_EXT])) { + if (isset($data[self::FIELD_HEADER])) { + $value = $data[self::FIELD_HEADER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) { + $ext = $data[self::FIELD_HEADER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addHeader($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addHeader($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addHeader(new FHIRString(array_merge($v, $iext))); + } else { + $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addHeader(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addHeader(new FHIRString(array_merge($ext, $value))); + } else { + $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addHeader(new FHIRString($iext)); } - } elseif ($data[self::FIELD_HEADER] instanceof FHIRString) { - $this->addHeader($data[self::FIELD_HEADER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_HEADER])) { - $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER]] + $ext)); - } else { - $this->addHeader(new FHIRString($data[self::FIELD_HEADER])); } } - if (isset($data[self::FIELD_PAYLOAD])) { - $ext = (isset($data[self::FIELD_PAYLOAD_EXT]) && is_array($data[self::FIELD_PAYLOAD_EXT])) - ? $data[self::FIELD_PAYLOAD_EXT] - : null; - if ($data[self::FIELD_PAYLOAD] instanceof FHIRCode) { - $this->setPayload($data[self::FIELD_PAYLOAD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAYLOAD])) { - $this->setPayload(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PAYLOAD]] + $ext)); - } else if (is_array($data[self::FIELD_PAYLOAD])) { - $this->setPayload(new FHIRCode(array_merge($ext, $data[self::FIELD_PAYLOAD]))); - } + if (isset($data[self::FIELD_PAYLOAD]) || isset($data[self::FIELD_PAYLOAD_EXT])) { + if (isset($data[self::FIELD_PAYLOAD])) { + $value = $data[self::FIELD_PAYLOAD]; } else { - $this->setPayload(new FHIRCode($data[self::FIELD_PAYLOAD])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSubscriptionChannelType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSubscriptionChannelType([FHIRSubscriptionChannelType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSubscriptionChannelType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_PAYLOAD_EXT]) && is_array($data[self::FIELD_PAYLOAD_EXT])) { + $ext = $data[self::FIELD_PAYLOAD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setPayload($value); + } else if (is_array($value)) { + $this->setPayload(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setPayload(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPayload(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRSubscriptionChannelType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSubscriptionChannelType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSubscriptionChannelType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSubscriptionChannelType([FHIRSubscriptionChannelType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRSubscriptionChannelType($ext)); } } } @@ -561,40 +591,57 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if ([] !== ($vs = $this->getHeader())) { $a[self::FIELD_HEADER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_HEADER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_HEADER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_HEADER_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_HEADER_EXT] = $encs; + } } if (null !== ($v = $this->getPayload())) { $a[self::FIELD_PAYLOAD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_PAYLOAD_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSubscriptionChannelType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSubscriptionChannelType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php index 7781134687..d5133653e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSubstanceIngredient extends FHIRBackboneElement const FIELD_SUBSTANCE_REFERENCE = 'substanceReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A relationship of two Quantity values - expressed as a numerator and a @@ -385,6 +385,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubstanceReference())) { $a[self::FIELD_SUBSTANCE_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php index a5053c09a6..563e47f38b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSubstanceInstance extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -150,20 +150,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPIRY])) { - $ext = (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) - ? $data[self::FIELD_EXPIRY_EXT] - : null; - if ($data[self::FIELD_EXPIRY] instanceof FHIRDateTime) { - $this->setExpiry($data[self::FIELD_EXPIRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRY]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRY]))); - } + if (isset($data[self::FIELD_EXPIRY]) || isset($data[self::FIELD_EXPIRY_EXT])) { + if (isset($data[self::FIELD_EXPIRY])) { + $value = $data[self::FIELD_EXPIRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) { + $ext = $data[self::FIELD_EXPIRY_EXT]; } else { - $this->setExpiry(new FHIRDateTime($data[self::FIELD_EXPIRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpiry($value); + } else if (is_array($value)) { + $this->setExpiry(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpiry(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -416,8 +423,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpiry())) { $a[self::FIELD_EXPIRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRY_EXT] = $enc; } } @@ -427,6 +436,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount.php index e404d2c248..271a8c8eeb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRSubstanceAmount extends FHIRBackboneElement const FIELD_REFERENCE_RANGE = 'referenceRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -225,36 +225,50 @@ public function __construct($data = null) $this->setAmountRange(new FHIRRange($data[self::FIELD_AMOUNT_RANGE])); } } - if (isset($data[self::FIELD_AMOUNT_STRING])) { - $ext = (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) - ? $data[self::FIELD_AMOUNT_STRING_EXT] - : null; - if ($data[self::FIELD_AMOUNT_STRING] instanceof FHIRString) { - $this->setAmountString($data[self::FIELD_AMOUNT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AMOUNT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString(array_merge($ext, $data[self::FIELD_AMOUNT_STRING]))); - } + if (isset($data[self::FIELD_AMOUNT_STRING]) || isset($data[self::FIELD_AMOUNT_STRING_EXT])) { + if (isset($data[self::FIELD_AMOUNT_STRING])) { + $value = $data[self::FIELD_AMOUNT_STRING]; } else { - $this->setAmountString(new FHIRString($data[self::FIELD_AMOUNT_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_AMOUNT_TEXT])) { - $ext = (isset($data[self::FIELD_AMOUNT_TEXT_EXT]) && is_array($data[self::FIELD_AMOUNT_TEXT_EXT])) - ? $data[self::FIELD_AMOUNT_TEXT_EXT] - : null; - if ($data[self::FIELD_AMOUNT_TEXT] instanceof FHIRString) { - $this->setAmountText($data[self::FIELD_AMOUNT_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AMOUNT_TEXT])) { - $this->setAmountText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AMOUNT_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_AMOUNT_TEXT])) { - $this->setAmountText(new FHIRString(array_merge($ext, $data[self::FIELD_AMOUNT_TEXT]))); + if (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) { + $ext = $data[self::FIELD_AMOUNT_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAmountString($value); + } else if (is_array($value)) { + $this->setAmountString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAmountString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_AMOUNT_TEXT]) || isset($data[self::FIELD_AMOUNT_TEXT_EXT])) { + if (isset($data[self::FIELD_AMOUNT_TEXT])) { + $value = $data[self::FIELD_AMOUNT_TEXT]; } else { - $this->setAmountText(new FHIRString($data[self::FIELD_AMOUNT_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_AMOUNT_TEXT_EXT]) && is_array($data[self::FIELD_AMOUNT_TEXT_EXT])) { + $ext = $data[self::FIELD_AMOUNT_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAmountText($value); + } else if (is_array($value)) { + $this->setAmountText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAmountText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAmountText(new FHIRString($ext)); } } if (isset($data[self::FIELD_AMOUNT_TYPE])) { @@ -667,15 +681,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAmountString())) { $a[self::FIELD_AMOUNT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AMOUNT_STRING_EXT] = $enc; } } if (null !== ($v = $this->getAmountText())) { $a[self::FIELD_AMOUNT_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AMOUNT_TEXT_EXT] = $enc; } } @@ -685,6 +703,9 @@ public function jsonSerialize() if (null !== ($v = $this->getReferenceRange())) { $a[self::FIELD_REFERENCE_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRange.php index e4223e80bd..935e713205 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRSubstanceAmountReferenceRange extends FHIRBackboneElement const FIELD_LOW_LIMIT = 'lowLimit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -332,6 +332,9 @@ public function jsonSerialize() if (null !== ($v = $this->getLowLimit())) { $a[self::FIELD_LOW_LIMIT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkage.php index f4fadb26c8..46c7cbf741 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRSubstanceNucleicAcidLinkage extends FHIRBackboneElement const FIELD_RESIDUE_SITE_EXT = '_residueSite'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -164,20 +164,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONNECTIVITY])) { - $ext = (isset($data[self::FIELD_CONNECTIVITY_EXT]) && is_array($data[self::FIELD_CONNECTIVITY_EXT])) - ? $data[self::FIELD_CONNECTIVITY_EXT] - : null; - if ($data[self::FIELD_CONNECTIVITY] instanceof FHIRString) { - $this->setConnectivity($data[self::FIELD_CONNECTIVITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONNECTIVITY])) { - $this->setConnectivity(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONNECTIVITY]] + $ext)); - } else if (is_array($data[self::FIELD_CONNECTIVITY])) { - $this->setConnectivity(new FHIRString(array_merge($ext, $data[self::FIELD_CONNECTIVITY]))); - } + if (isset($data[self::FIELD_CONNECTIVITY]) || isset($data[self::FIELD_CONNECTIVITY_EXT])) { + if (isset($data[self::FIELD_CONNECTIVITY])) { + $value = $data[self::FIELD_CONNECTIVITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONNECTIVITY_EXT]) && is_array($data[self::FIELD_CONNECTIVITY_EXT])) { + $ext = $data[self::FIELD_CONNECTIVITY_EXT]; } else { - $this->setConnectivity(new FHIRString($data[self::FIELD_CONNECTIVITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setConnectivity($value); + } else if (is_array($value)) { + $this->setConnectivity(new FHIRString(array_merge($ext, $value))); + } else { + $this->setConnectivity(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConnectivity(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -187,36 +194,50 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_RESIDUE_SITE])) { - $ext = (isset($data[self::FIELD_RESIDUE_SITE_EXT]) && is_array($data[self::FIELD_RESIDUE_SITE_EXT])) - ? $data[self::FIELD_RESIDUE_SITE_EXT] - : null; - if ($data[self::FIELD_RESIDUE_SITE] instanceof FHIRString) { - $this->setResidueSite($data[self::FIELD_RESIDUE_SITE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESIDUE_SITE])) { - $this->setResidueSite(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESIDUE_SITE]] + $ext)); - } else if (is_array($data[self::FIELD_RESIDUE_SITE])) { - $this->setResidueSite(new FHIRString(array_merge($ext, $data[self::FIELD_RESIDUE_SITE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RESIDUE_SITE]) || isset($data[self::FIELD_RESIDUE_SITE_EXT])) { + if (isset($data[self::FIELD_RESIDUE_SITE])) { + $value = $data[self::FIELD_RESIDUE_SITE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESIDUE_SITE_EXT]) && is_array($data[self::FIELD_RESIDUE_SITE_EXT])) { + $ext = $data[self::FIELD_RESIDUE_SITE_EXT]; } else { - $this->setResidueSite(new FHIRString($data[self::FIELD_RESIDUE_SITE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResidueSite($value); + } else if (is_array($value)) { + $this->setResidueSite(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResidueSite(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResidueSite(new FHIRString($ext)); } } } @@ -519,8 +540,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getConnectivity())) { $a[self::FIELD_CONNECTIVITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONNECTIVITY_EXT] = $enc; } } @@ -529,18 +552,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getResidueSite())) { $a[self::FIELD_RESIDUE_SITE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESIDUE_SITE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunit.php index 5c41decd53..2f1d7b7809 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRSubstanceNucleicAcidSubunit extends FHIRBackboneElement const FIELD_THREE_PRIME = 'threePrime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -229,20 +229,27 @@ public function __construct($data = null) $this->setFivePrime(new FHIRCodeableConcept($data[self::FIELD_FIVE_PRIME])); } } - if (isset($data[self::FIELD_LENGTH])) { - $ext = (isset($data[self::FIELD_LENGTH_EXT]) && is_array($data[self::FIELD_LENGTH_EXT])) - ? $data[self::FIELD_LENGTH_EXT] - : null; - if ($data[self::FIELD_LENGTH] instanceof FHIRInteger) { - $this->setLength($data[self::FIELD_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LENGTH])) { - $this->setLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_LENGTH])) { - $this->setLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_LENGTH]))); - } + if (isset($data[self::FIELD_LENGTH]) || isset($data[self::FIELD_LENGTH_EXT])) { + if (isset($data[self::FIELD_LENGTH])) { + $value = $data[self::FIELD_LENGTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LENGTH_EXT]) && is_array($data[self::FIELD_LENGTH_EXT])) { + $ext = $data[self::FIELD_LENGTH_EXT]; } else { - $this->setLength(new FHIRInteger($data[self::FIELD_LENGTH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setLength($value); + } else if (is_array($value)) { + $this->setLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLength(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_LINKAGE])) { @@ -263,20 +270,27 @@ public function __construct($data = null) $this->addLinkage(new FHIRSubstanceNucleicAcidLinkage($data[self::FIELD_LINKAGE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRString) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRString(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRString($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRString($ext)); } } if (isset($data[self::FIELD_SEQUENCE_ATTACHMENT])) { @@ -286,20 +300,27 @@ public function __construct($data = null) $this->setSequenceAttachment(new FHIRAttachment($data[self::FIELD_SEQUENCE_ATTACHMENT])); } } - if (isset($data[self::FIELD_SUBUNIT])) { - $ext = (isset($data[self::FIELD_SUBUNIT_EXT]) && is_array($data[self::FIELD_SUBUNIT_EXT])) - ? $data[self::FIELD_SUBUNIT_EXT] - : null; - if ($data[self::FIELD_SUBUNIT] instanceof FHIRInteger) { - $this->setSubunit($data[self::FIELD_SUBUNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBUNIT])) { - $this->setSubunit(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SUBUNIT]] + $ext)); - } else if (is_array($data[self::FIELD_SUBUNIT])) { - $this->setSubunit(new FHIRInteger(array_merge($ext, $data[self::FIELD_SUBUNIT]))); - } + if (isset($data[self::FIELD_SUBUNIT]) || isset($data[self::FIELD_SUBUNIT_EXT])) { + if (isset($data[self::FIELD_SUBUNIT])) { + $value = $data[self::FIELD_SUBUNIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBUNIT_EXT]) && is_array($data[self::FIELD_SUBUNIT_EXT])) { + $ext = $data[self::FIELD_SUBUNIT_EXT]; } else { - $this->setSubunit(new FHIRInteger($data[self::FIELD_SUBUNIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setSubunit($value); + } else if (is_array($value)) { + $this->setSubunit(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setSubunit(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubunit(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_SUGAR])) { @@ -858,18 +879,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getLength())) { $a[self::FIELD_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_LENGTH_EXT] = $enc; } } if ([] !== ($vs = $this->getLinkage())) { - $a[self::FIELD_LINKAGE] = $vs; + $a[self::FIELD_LINKAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINKAGE][] = $v; + } } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -878,17 +909,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubunit())) { $a[self::FIELD_SUBUNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_SUBUNIT_EXT] = $enc; } } if ([] !== ($vs = $this->getSugar())) { - $a[self::FIELD_SUGAR] = $vs; + $a[self::FIELD_SUGAR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUGAR][] = $v; + } } if (null !== ($v = $this->getThreePrime())) { $a[self::FIELD_THREE_PRIME] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugar.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugar.php index 9057137f67..7c74562877 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugar.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugar.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRSubstanceNucleicAcidSugar extends FHIRBackboneElement const FIELD_RESIDUE_SITE_EXT = '_residueSite'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An identifier - identifies some entity uniquely and unambiguously. Typically @@ -156,36 +156,50 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_RESIDUE_SITE])) { - $ext = (isset($data[self::FIELD_RESIDUE_SITE_EXT]) && is_array($data[self::FIELD_RESIDUE_SITE_EXT])) - ? $data[self::FIELD_RESIDUE_SITE_EXT] - : null; - if ($data[self::FIELD_RESIDUE_SITE] instanceof FHIRString) { - $this->setResidueSite($data[self::FIELD_RESIDUE_SITE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESIDUE_SITE])) { - $this->setResidueSite(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESIDUE_SITE]] + $ext)); - } else if (is_array($data[self::FIELD_RESIDUE_SITE])) { - $this->setResidueSite(new FHIRString(array_merge($ext, $data[self::FIELD_RESIDUE_SITE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RESIDUE_SITE]) || isset($data[self::FIELD_RESIDUE_SITE_EXT])) { + if (isset($data[self::FIELD_RESIDUE_SITE])) { + $value = $data[self::FIELD_RESIDUE_SITE]; } else { - $this->setResidueSite(new FHIRString($data[self::FIELD_RESIDUE_SITE])); + $value = null; + } + if (isset($data[self::FIELD_RESIDUE_SITE_EXT]) && is_array($data[self::FIELD_RESIDUE_SITE_EXT])) { + $ext = $data[self::FIELD_RESIDUE_SITE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResidueSite($value); + } else if (is_array($value)) { + $this->setResidueSite(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResidueSite(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResidueSite(new FHIRString($ext)); } } } @@ -435,18 +449,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getResidueSite())) { $a[self::FIELD_RESIDUE_SITE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESIDUE_SITE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisation.php index a754cd12ac..ab2963ffa8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSubstancePolymerDegreeOfPolymerisation extends FHIRBackboneElement const FIELD_DEGREE = 'degree'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Chemical substances are a single substance type whose primary defining element @@ -332,6 +332,9 @@ public function jsonSerialize() if (null !== ($v = $this->getDegree())) { $a[self::FIELD_DEGREE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSet.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSet.php index 1979599b1f..25a7a47371 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSet.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRSubstancePolymerMonomerSet extends FHIRBackboneElement const FIELD_STARTING_MATERIAL = 'startingMaterial'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -350,7 +350,16 @@ public function jsonSerialize() $a[self::FIELD_RATIO_TYPE] = $v; } if ([] !== ($vs = $this->getStartingMaterial())) { - $a[self::FIELD_STARTING_MATERIAL] = $vs; + $a[self::FIELD_STARTING_MATERIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STARTING_MATERIAL][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeat.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeat.php index d54f998346..83354c8b47 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSubstancePolymerRepeat extends FHIRBackboneElement const FIELD_REPEAT_UNIT_AMOUNT_TYPE = 'repeatUnitAmountType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -154,36 +154,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA])) { - $ext = (isset($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA_EXT]) && is_array($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA_EXT])) - ? $data[self::FIELD_AVERAGE_MOLECULAR_FORMULA_EXT] - : null; - if ($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA] instanceof FHIRString) { - $this->setAverageMolecularFormula($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA])) { - $this->setAverageMolecularFormula(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AVERAGE_MOLECULAR_FORMULA]] + $ext)); - } else if (is_array($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA])) { - $this->setAverageMolecularFormula(new FHIRString(array_merge($ext, $data[self::FIELD_AVERAGE_MOLECULAR_FORMULA]))); - } + if (isset($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA]) || isset($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA_EXT])) { + if (isset($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA])) { + $value = $data[self::FIELD_AVERAGE_MOLECULAR_FORMULA]; } else { - $this->setAverageMolecularFormula(new FHIRString($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA])); + $value = null; } - } - if (isset($data[self::FIELD_NUMBER_OF_UNITS])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_UNITS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_UNITS_EXT])) - ? $data[self::FIELD_NUMBER_OF_UNITS_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_UNITS] instanceof FHIRInteger) { - $this->setNumberOfUnits($data[self::FIELD_NUMBER_OF_UNITS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_UNITS])) { - $this->setNumberOfUnits(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_UNITS]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_UNITS])) { - $this->setNumberOfUnits(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_UNITS]))); + if (isset($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA_EXT]) && is_array($data[self::FIELD_AVERAGE_MOLECULAR_FORMULA_EXT])) { + $ext = $data[self::FIELD_AVERAGE_MOLECULAR_FORMULA_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAverageMolecularFormula($value); + } else if (is_array($value)) { + $this->setAverageMolecularFormula(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAverageMolecularFormula(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAverageMolecularFormula(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_UNITS]) || isset($data[self::FIELD_NUMBER_OF_UNITS_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_UNITS])) { + $value = $data[self::FIELD_NUMBER_OF_UNITS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_UNITS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_UNITS_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_UNITS_EXT]; } else { - $this->setNumberOfUnits(new FHIRInteger($data[self::FIELD_NUMBER_OF_UNITS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfUnits($value); + } else if (is_array($value)) { + $this->setNumberOfUnits(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfUnits(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfUnits(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_REPEAT_UNIT])) { @@ -512,24 +526,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAverageMolecularFormula())) { $a[self::FIELD_AVERAGE_MOLECULAR_FORMULA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AVERAGE_MOLECULAR_FORMULA_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfUnits())) { $a[self::FIELD_NUMBER_OF_UNITS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_UNITS_EXT] = $enc; } } if ([] !== ($vs = $this->getRepeatUnit())) { - $a[self::FIELD_REPEAT_UNIT] = $vs; + $a[self::FIELD_REPEAT_UNIT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPEAT_UNIT][] = $v; + } } if (null !== ($v = $this->getRepeatUnitAmountType())) { $a[self::FIELD_REPEAT_UNIT_AMOUNT_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnit.php index 9e11e03806..b44f7c5376 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSubstancePolymerRepeatUnit extends FHIRBackboneElement const FIELD_STRUCTURAL_REPRESENTATION = 'structuralRepresentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Chemical substances are a single substance type whose primary defining element @@ -200,20 +200,27 @@ public function __construct($data = null) $this->setOrientationOfPolymerisation(new FHIRCodeableConcept($data[self::FIELD_ORIENTATION_OF_POLYMERISATION])); } } - if (isset($data[self::FIELD_REPEAT_UNIT])) { - $ext = (isset($data[self::FIELD_REPEAT_UNIT_EXT]) && is_array($data[self::FIELD_REPEAT_UNIT_EXT])) - ? $data[self::FIELD_REPEAT_UNIT_EXT] - : null; - if ($data[self::FIELD_REPEAT_UNIT] instanceof FHIRString) { - $this->setRepeatUnit($data[self::FIELD_REPEAT_UNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPEAT_UNIT])) { - $this->setRepeatUnit(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REPEAT_UNIT]] + $ext)); - } else if (is_array($data[self::FIELD_REPEAT_UNIT])) { - $this->setRepeatUnit(new FHIRString(array_merge($ext, $data[self::FIELD_REPEAT_UNIT]))); - } + if (isset($data[self::FIELD_REPEAT_UNIT]) || isset($data[self::FIELD_REPEAT_UNIT_EXT])) { + if (isset($data[self::FIELD_REPEAT_UNIT])) { + $value = $data[self::FIELD_REPEAT_UNIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPEAT_UNIT_EXT]) && is_array($data[self::FIELD_REPEAT_UNIT_EXT])) { + $ext = $data[self::FIELD_REPEAT_UNIT_EXT]; } else { - $this->setRepeatUnit(new FHIRString($data[self::FIELD_REPEAT_UNIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRepeatUnit($value); + } else if (is_array($value)) { + $this->setRepeatUnit(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRepeatUnit(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRepeatUnit(new FHIRString($ext)); } } if (isset($data[self::FIELD_STRUCTURAL_REPRESENTATION])) { @@ -594,20 +601,37 @@ public function jsonSerialize() $a[self::FIELD_AMOUNT] = $v; } if ([] !== ($vs = $this->getDegreeOfPolymerisation())) { - $a[self::FIELD_DEGREE_OF_POLYMERISATION] = $vs; + $a[self::FIELD_DEGREE_OF_POLYMERISATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEGREE_OF_POLYMERISATION][] = $v; + } } if (null !== ($v = $this->getOrientationOfPolymerisation())) { $a[self::FIELD_ORIENTATION_OF_POLYMERISATION] = $v; } if (null !== ($v = $this->getRepeatUnit())) { $a[self::FIELD_REPEAT_UNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REPEAT_UNIT_EXT] = $enc; } } if ([] !== ($vs = $this->getStructuralRepresentation())) { - $a[self::FIELD_STRUCTURAL_REPRESENTATION] = $vs; + $a[self::FIELD_STRUCTURAL_REPRESENTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRUCTURAL_REPRESENTATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterial.php index 814d343ced..90cb9a6933 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRSubstancePolymerStartingMaterial extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Chemical substances are a single substance type whose primary defining element @@ -167,20 +167,27 @@ public function __construct($data = null) $this->setAmount(new FHIRSubstanceAmount($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_IS_DEFINING])) { - $ext = (isset($data[self::FIELD_IS_DEFINING_EXT]) && is_array($data[self::FIELD_IS_DEFINING_EXT])) - ? $data[self::FIELD_IS_DEFINING_EXT] - : null; - if ($data[self::FIELD_IS_DEFINING] instanceof FHIRBoolean) { - $this->setIsDefining($data[self::FIELD_IS_DEFINING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_DEFINING])) { - $this->setIsDefining(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_DEFINING]] + $ext)); - } else if (is_array($data[self::FIELD_IS_DEFINING])) { - $this->setIsDefining(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_DEFINING]))); - } + if (isset($data[self::FIELD_IS_DEFINING]) || isset($data[self::FIELD_IS_DEFINING_EXT])) { + if (isset($data[self::FIELD_IS_DEFINING])) { + $value = $data[self::FIELD_IS_DEFINING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_DEFINING_EXT]) && is_array($data[self::FIELD_IS_DEFINING_EXT])) { + $ext = $data[self::FIELD_IS_DEFINING_EXT]; } else { - $this->setIsDefining(new FHIRBoolean($data[self::FIELD_IS_DEFINING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsDefining($value); + } else if (is_array($value)) { + $this->setIsDefining(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsDefining(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsDefining(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_MATERIAL])) { @@ -468,8 +475,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getIsDefining())) { $a[self::FIELD_IS_DEFINING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_DEFINING_EXT] = $enc; } } @@ -479,6 +488,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentation.php index 5933e4b5db..0d50369b72 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSubstancePolymerStructuralRepresentation extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -150,20 +150,27 @@ public function __construct($data = null) $this->setAttachment(new FHIRAttachment($data[self::FIELD_ATTACHMENT])); } } - if (isset($data[self::FIELD_REPRESENTATION])) { - $ext = (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) - ? $data[self::FIELD_REPRESENTATION_EXT] - : null; - if ($data[self::FIELD_REPRESENTATION] instanceof FHIRString) { - $this->setRepresentation($data[self::FIELD_REPRESENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPRESENTATION])) { - $this->setRepresentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REPRESENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_REPRESENTATION])) { - $this->setRepresentation(new FHIRString(array_merge($ext, $data[self::FIELD_REPRESENTATION]))); - } + if (isset($data[self::FIELD_REPRESENTATION]) || isset($data[self::FIELD_REPRESENTATION_EXT])) { + if (isset($data[self::FIELD_REPRESENTATION])) { + $value = $data[self::FIELD_REPRESENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) { + $ext = $data[self::FIELD_REPRESENTATION_EXT]; } else { - $this->setRepresentation(new FHIRString($data[self::FIELD_REPRESENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRepresentation($value); + } else if (is_array($value)) { + $this->setRepresentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRepresentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRepresentation(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -398,14 +405,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRepresentation())) { $a[self::FIELD_REPRESENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REPRESENTATION_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunit.php index 4feb36aef9..a8c504a837 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRSubstanceProteinSubunit extends FHIRBackboneElement const FIELD_SUBUNIT_EXT = '_subunit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -234,20 +234,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_C_TERMINAL_MODIFICATION])) { - $ext = (isset($data[self::FIELD_C_TERMINAL_MODIFICATION_EXT]) && is_array($data[self::FIELD_C_TERMINAL_MODIFICATION_EXT])) - ? $data[self::FIELD_C_TERMINAL_MODIFICATION_EXT] - : null; - if ($data[self::FIELD_C_TERMINAL_MODIFICATION] instanceof FHIRString) { - $this->setCTerminalModification($data[self::FIELD_C_TERMINAL_MODIFICATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_C_TERMINAL_MODIFICATION])) { - $this->setCTerminalModification(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_C_TERMINAL_MODIFICATION]] + $ext)); - } else if (is_array($data[self::FIELD_C_TERMINAL_MODIFICATION])) { - $this->setCTerminalModification(new FHIRString(array_merge($ext, $data[self::FIELD_C_TERMINAL_MODIFICATION]))); - } + if (isset($data[self::FIELD_C_TERMINAL_MODIFICATION]) || isset($data[self::FIELD_C_TERMINAL_MODIFICATION_EXT])) { + if (isset($data[self::FIELD_C_TERMINAL_MODIFICATION])) { + $value = $data[self::FIELD_C_TERMINAL_MODIFICATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_C_TERMINAL_MODIFICATION_EXT]) && is_array($data[self::FIELD_C_TERMINAL_MODIFICATION_EXT])) { + $ext = $data[self::FIELD_C_TERMINAL_MODIFICATION_EXT]; } else { - $this->setCTerminalModification(new FHIRString($data[self::FIELD_C_TERMINAL_MODIFICATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCTerminalModification($value); + } else if (is_array($value)) { + $this->setCTerminalModification(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCTerminalModification(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCTerminalModification(new FHIRString($ext)); } } if (isset($data[self::FIELD_C_TERMINAL_MODIFICATION_ID])) { @@ -257,36 +264,50 @@ public function __construct($data = null) $this->setCTerminalModificationId(new FHIRIdentifier($data[self::FIELD_C_TERMINAL_MODIFICATION_ID])); } } - if (isset($data[self::FIELD_LENGTH])) { - $ext = (isset($data[self::FIELD_LENGTH_EXT]) && is_array($data[self::FIELD_LENGTH_EXT])) - ? $data[self::FIELD_LENGTH_EXT] - : null; - if ($data[self::FIELD_LENGTH] instanceof FHIRInteger) { - $this->setLength($data[self::FIELD_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LENGTH])) { - $this->setLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_LENGTH])) { - $this->setLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_LENGTH]))); - } + if (isset($data[self::FIELD_LENGTH]) || isset($data[self::FIELD_LENGTH_EXT])) { + if (isset($data[self::FIELD_LENGTH])) { + $value = $data[self::FIELD_LENGTH]; } else { - $this->setLength(new FHIRInteger($data[self::FIELD_LENGTH])); + $value = null; } - } - if (isset($data[self::FIELD_N_TERMINAL_MODIFICATION])) { - $ext = (isset($data[self::FIELD_N_TERMINAL_MODIFICATION_EXT]) && is_array($data[self::FIELD_N_TERMINAL_MODIFICATION_EXT])) - ? $data[self::FIELD_N_TERMINAL_MODIFICATION_EXT] - : null; - if ($data[self::FIELD_N_TERMINAL_MODIFICATION] instanceof FHIRString) { - $this->setNTerminalModification($data[self::FIELD_N_TERMINAL_MODIFICATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_N_TERMINAL_MODIFICATION])) { - $this->setNTerminalModification(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_N_TERMINAL_MODIFICATION]] + $ext)); - } else if (is_array($data[self::FIELD_N_TERMINAL_MODIFICATION])) { - $this->setNTerminalModification(new FHIRString(array_merge($ext, $data[self::FIELD_N_TERMINAL_MODIFICATION]))); + if (isset($data[self::FIELD_LENGTH_EXT]) && is_array($data[self::FIELD_LENGTH_EXT])) { + $ext = $data[self::FIELD_LENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setLength($value); + } else if (is_array($value)) { + $this->setLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLength(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_N_TERMINAL_MODIFICATION]) || isset($data[self::FIELD_N_TERMINAL_MODIFICATION_EXT])) { + if (isset($data[self::FIELD_N_TERMINAL_MODIFICATION])) { + $value = $data[self::FIELD_N_TERMINAL_MODIFICATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_N_TERMINAL_MODIFICATION_EXT]) && is_array($data[self::FIELD_N_TERMINAL_MODIFICATION_EXT])) { + $ext = $data[self::FIELD_N_TERMINAL_MODIFICATION_EXT]; } else { - $this->setNTerminalModification(new FHIRString($data[self::FIELD_N_TERMINAL_MODIFICATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNTerminalModification($value); + } else if (is_array($value)) { + $this->setNTerminalModification(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNTerminalModification(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNTerminalModification(new FHIRString($ext)); } } if (isset($data[self::FIELD_N_TERMINAL_MODIFICATION_ID])) { @@ -296,20 +317,27 @@ public function __construct($data = null) $this->setNTerminalModificationId(new FHIRIdentifier($data[self::FIELD_N_TERMINAL_MODIFICATION_ID])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRString) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRString(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRString($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRString($ext)); } } if (isset($data[self::FIELD_SEQUENCE_ATTACHMENT])) { @@ -319,20 +347,27 @@ public function __construct($data = null) $this->setSequenceAttachment(new FHIRAttachment($data[self::FIELD_SEQUENCE_ATTACHMENT])); } } - if (isset($data[self::FIELD_SUBUNIT])) { - $ext = (isset($data[self::FIELD_SUBUNIT_EXT]) && is_array($data[self::FIELD_SUBUNIT_EXT])) - ? $data[self::FIELD_SUBUNIT_EXT] - : null; - if ($data[self::FIELD_SUBUNIT] instanceof FHIRInteger) { - $this->setSubunit($data[self::FIELD_SUBUNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBUNIT])) { - $this->setSubunit(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SUBUNIT]] + $ext)); - } else if (is_array($data[self::FIELD_SUBUNIT])) { - $this->setSubunit(new FHIRInteger(array_merge($ext, $data[self::FIELD_SUBUNIT]))); - } + if (isset($data[self::FIELD_SUBUNIT]) || isset($data[self::FIELD_SUBUNIT_EXT])) { + if (isset($data[self::FIELD_SUBUNIT])) { + $value = $data[self::FIELD_SUBUNIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBUNIT_EXT]) && is_array($data[self::FIELD_SUBUNIT_EXT])) { + $ext = $data[self::FIELD_SUBUNIT_EXT]; } else { - $this->setSubunit(new FHIRInteger($data[self::FIELD_SUBUNIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setSubunit($value); + } else if (is_array($value)) { + $this->setSubunit(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setSubunit(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubunit(new FHIRInteger($ext)); } } } @@ -839,8 +874,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCTerminalModification())) { $a[self::FIELD_C_TERMINAL_MODIFICATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_C_TERMINAL_MODIFICATION_EXT] = $enc; } } @@ -849,15 +886,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getLength())) { $a[self::FIELD_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_LENGTH_EXT] = $enc; } } if (null !== ($v = $this->getNTerminalModification())) { $a[self::FIELD_N_TERMINAL_MODIFICATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_N_TERMINAL_MODIFICATION_EXT] = $enc; } } @@ -866,8 +907,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -876,11 +919,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubunit())) { $a[self::FIELD_SUBUNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_SUBUNIT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassification.php index c78e359cc7..c9ae6118d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSubstanceReferenceInformationClassification extends FHIRBackboneElemen const FIELD_SUBTYPE = 'subtype'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -523,10 +523,25 @@ public function jsonSerialize() $a[self::FIELD_DOMAIN] = $v; } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if ([] !== ($vs = $this->getSubtype())) { - $a[self::FIELD_SUBTYPE] = $vs; + $a[self::FIELD_SUBTYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBTYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGene.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGene.php index a289db844f..530fd65bc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGene.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGene.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRSubstanceReferenceInformationGene extends FHIRBackboneElement const FIELD_SOURCE = 'source'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -420,7 +420,16 @@ public function jsonSerialize() $a[self::FIELD_GENE_SEQUENCE_ORIGIN] = $v; } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElement.php index c6a0b4babf..0181be1e86 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSubstanceReferenceInformationGeneElement extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An identifier - identifies some entity uniquely and unambiguously. Typically @@ -418,11 +418,20 @@ public function jsonSerialize() $a[self::FIELD_ELEMENT] = $v; } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTarget.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTarget.php index a51ba0ec8e..7f21dd9378 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRSubstanceReferenceInformationTarget extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -251,20 +251,27 @@ public function __construct($data = null) $this->setAmountRange(new FHIRRange($data[self::FIELD_AMOUNT_RANGE])); } } - if (isset($data[self::FIELD_AMOUNT_STRING])) { - $ext = (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) - ? $data[self::FIELD_AMOUNT_STRING_EXT] - : null; - if ($data[self::FIELD_AMOUNT_STRING] instanceof FHIRString) { - $this->setAmountString($data[self::FIELD_AMOUNT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AMOUNT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString(array_merge($ext, $data[self::FIELD_AMOUNT_STRING]))); - } + if (isset($data[self::FIELD_AMOUNT_STRING]) || isset($data[self::FIELD_AMOUNT_STRING_EXT])) { + if (isset($data[self::FIELD_AMOUNT_STRING])) { + $value = $data[self::FIELD_AMOUNT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) { + $ext = $data[self::FIELD_AMOUNT_STRING_EXT]; } else { - $this->setAmountString(new FHIRString($data[self::FIELD_AMOUNT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAmountString($value); + } else if (is_array($value)) { + $this->setAmountString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAmountString(new FHIRString($ext)); } } if (isset($data[self::FIELD_AMOUNT_TYPE])) { @@ -854,8 +861,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAmountString())) { $a[self::FIELD_AMOUNT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AMOUNT_STRING_EXT] = $enc; } } @@ -872,7 +881,13 @@ public function jsonSerialize() $a[self::FIELD_ORGANISM_TYPE] = $v; } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; @@ -880,6 +895,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthor.php index f281b41dff..372d72d6ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRSubstanceSourceMaterialAuthor extends FHIRBackboneElement const FIELD_AUTHOR_TYPE = 'authorType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -147,20 +147,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHOR_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_AUTHOR_DESCRIPTION_EXT]) && is_array($data[self::FIELD_AUTHOR_DESCRIPTION_EXT])) - ? $data[self::FIELD_AUTHOR_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_AUTHOR_DESCRIPTION] instanceof FHIRString) { - $this->setAuthorDescription($data[self::FIELD_AUTHOR_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHOR_DESCRIPTION])) { - $this->setAuthorDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AUTHOR_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHOR_DESCRIPTION])) { - $this->setAuthorDescription(new FHIRString(array_merge($ext, $data[self::FIELD_AUTHOR_DESCRIPTION]))); - } + if (isset($data[self::FIELD_AUTHOR_DESCRIPTION]) || isset($data[self::FIELD_AUTHOR_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_AUTHOR_DESCRIPTION])) { + $value = $data[self::FIELD_AUTHOR_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHOR_DESCRIPTION_EXT]) && is_array($data[self::FIELD_AUTHOR_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_AUTHOR_DESCRIPTION_EXT]; } else { - $this->setAuthorDescription(new FHIRString($data[self::FIELD_AUTHOR_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAuthorDescription($value); + } else if (is_array($value)) { + $this->setAuthorDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAuthorDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthorDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_AUTHOR_TYPE])) { @@ -366,14 +373,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthorDescription())) { $a[self::FIELD_AUTHOR_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AUTHOR_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getAuthorType())) { $a[self::FIELD_AUTHOR_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescription.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescription.php index 61b376644c..fb46d0f9d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescription.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRSubstanceSourceMaterialFractionDescription extends FHIRBackboneElement const FIELD_MATERIAL_TYPE = 'materialType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -145,20 +145,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FRACTION])) { - $ext = (isset($data[self::FIELD_FRACTION_EXT]) && is_array($data[self::FIELD_FRACTION_EXT])) - ? $data[self::FIELD_FRACTION_EXT] - : null; - if ($data[self::FIELD_FRACTION] instanceof FHIRString) { - $this->setFraction($data[self::FIELD_FRACTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FRACTION])) { - $this->setFraction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FRACTION]] + $ext)); - } else if (is_array($data[self::FIELD_FRACTION])) { - $this->setFraction(new FHIRString(array_merge($ext, $data[self::FIELD_FRACTION]))); - } + if (isset($data[self::FIELD_FRACTION]) || isset($data[self::FIELD_FRACTION_EXT])) { + if (isset($data[self::FIELD_FRACTION])) { + $value = $data[self::FIELD_FRACTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FRACTION_EXT]) && is_array($data[self::FIELD_FRACTION_EXT])) { + $ext = $data[self::FIELD_FRACTION_EXT]; } else { - $this->setFraction(new FHIRString($data[self::FIELD_FRACTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setFraction($value); + } else if (is_array($value)) { + $this->setFraction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setFraction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFraction(new FHIRString($ext)); } } if (isset($data[self::FIELD_MATERIAL_TYPE])) { @@ -360,14 +367,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFraction())) { $a[self::FIELD_FRACTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FRACTION_EXT] = $enc; } } if (null !== ($v = $this->getMaterialType())) { $a[self::FIELD_MATERIAL_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybrid.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybrid.php index 92ec6a2790..403fbc8b77 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybrid.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybrid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRSubstanceSourceMaterialHybrid extends FHIRBackboneElement const FIELD_PATERNAL_ORGANISM_NAME_EXT = '_paternalOrganismName'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -195,68 +195,96 @@ public function __construct($data = null) $this->setHybridType(new FHIRCodeableConcept($data[self::FIELD_HYBRID_TYPE])); } } - if (isset($data[self::FIELD_MATERNAL_ORGANISM_ID])) { - $ext = (isset($data[self::FIELD_MATERNAL_ORGANISM_ID_EXT]) && is_array($data[self::FIELD_MATERNAL_ORGANISM_ID_EXT])) - ? $data[self::FIELD_MATERNAL_ORGANISM_ID_EXT] - : null; - if ($data[self::FIELD_MATERNAL_ORGANISM_ID] instanceof FHIRString) { - $this->setMaternalOrganismId($data[self::FIELD_MATERNAL_ORGANISM_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MATERNAL_ORGANISM_ID])) { - $this->setMaternalOrganismId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MATERNAL_ORGANISM_ID]] + $ext)); - } else if (is_array($data[self::FIELD_MATERNAL_ORGANISM_ID])) { - $this->setMaternalOrganismId(new FHIRString(array_merge($ext, $data[self::FIELD_MATERNAL_ORGANISM_ID]))); - } + if (isset($data[self::FIELD_MATERNAL_ORGANISM_ID]) || isset($data[self::FIELD_MATERNAL_ORGANISM_ID_EXT])) { + if (isset($data[self::FIELD_MATERNAL_ORGANISM_ID])) { + $value = $data[self::FIELD_MATERNAL_ORGANISM_ID]; } else { - $this->setMaternalOrganismId(new FHIRString($data[self::FIELD_MATERNAL_ORGANISM_ID])); + $value = null; } - } - if (isset($data[self::FIELD_MATERNAL_ORGANISM_NAME])) { - $ext = (isset($data[self::FIELD_MATERNAL_ORGANISM_NAME_EXT]) && is_array($data[self::FIELD_MATERNAL_ORGANISM_NAME_EXT])) - ? $data[self::FIELD_MATERNAL_ORGANISM_NAME_EXT] - : null; - if ($data[self::FIELD_MATERNAL_ORGANISM_NAME] instanceof FHIRString) { - $this->setMaternalOrganismName($data[self::FIELD_MATERNAL_ORGANISM_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MATERNAL_ORGANISM_NAME])) { - $this->setMaternalOrganismName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MATERNAL_ORGANISM_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_MATERNAL_ORGANISM_NAME])) { - $this->setMaternalOrganismName(new FHIRString(array_merge($ext, $data[self::FIELD_MATERNAL_ORGANISM_NAME]))); - } + if (isset($data[self::FIELD_MATERNAL_ORGANISM_ID_EXT]) && is_array($data[self::FIELD_MATERNAL_ORGANISM_ID_EXT])) { + $ext = $data[self::FIELD_MATERNAL_ORGANISM_ID_EXT]; } else { - $this->setMaternalOrganismName(new FHIRString($data[self::FIELD_MATERNAL_ORGANISM_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_PATERNAL_ORGANISM_ID])) { - $ext = (isset($data[self::FIELD_PATERNAL_ORGANISM_ID_EXT]) && is_array($data[self::FIELD_PATERNAL_ORGANISM_ID_EXT])) - ? $data[self::FIELD_PATERNAL_ORGANISM_ID_EXT] - : null; - if ($data[self::FIELD_PATERNAL_ORGANISM_ID] instanceof FHIRString) { - $this->setPaternalOrganismId($data[self::FIELD_PATERNAL_ORGANISM_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATERNAL_ORGANISM_ID])) { - $this->setPaternalOrganismId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATERNAL_ORGANISM_ID]] + $ext)); - } else if (is_array($data[self::FIELD_PATERNAL_ORGANISM_ID])) { - $this->setPaternalOrganismId(new FHIRString(array_merge($ext, $data[self::FIELD_PATERNAL_ORGANISM_ID]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMaternalOrganismId($value); + } else if (is_array($value)) { + $this->setMaternalOrganismId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMaternalOrganismId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMaternalOrganismId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MATERNAL_ORGANISM_NAME]) || isset($data[self::FIELD_MATERNAL_ORGANISM_NAME_EXT])) { + if (isset($data[self::FIELD_MATERNAL_ORGANISM_NAME])) { + $value = $data[self::FIELD_MATERNAL_ORGANISM_NAME]; } else { - $this->setPaternalOrganismId(new FHIRString($data[self::FIELD_PATERNAL_ORGANISM_ID])); + $value = null; + } + if (isset($data[self::FIELD_MATERNAL_ORGANISM_NAME_EXT]) && is_array($data[self::FIELD_MATERNAL_ORGANISM_NAME_EXT])) { + $ext = $data[self::FIELD_MATERNAL_ORGANISM_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMaternalOrganismName($value); + } else if (is_array($value)) { + $this->setMaternalOrganismName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMaternalOrganismName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaternalOrganismName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PATERNAL_ORGANISM_NAME])) { - $ext = (isset($data[self::FIELD_PATERNAL_ORGANISM_NAME_EXT]) && is_array($data[self::FIELD_PATERNAL_ORGANISM_NAME_EXT])) - ? $data[self::FIELD_PATERNAL_ORGANISM_NAME_EXT] - : null; - if ($data[self::FIELD_PATERNAL_ORGANISM_NAME] instanceof FHIRString) { - $this->setPaternalOrganismName($data[self::FIELD_PATERNAL_ORGANISM_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATERNAL_ORGANISM_NAME])) { - $this->setPaternalOrganismName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATERNAL_ORGANISM_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_PATERNAL_ORGANISM_NAME])) { - $this->setPaternalOrganismName(new FHIRString(array_merge($ext, $data[self::FIELD_PATERNAL_ORGANISM_NAME]))); + if (isset($data[self::FIELD_PATERNAL_ORGANISM_ID]) || isset($data[self::FIELD_PATERNAL_ORGANISM_ID_EXT])) { + if (isset($data[self::FIELD_PATERNAL_ORGANISM_ID])) { + $value = $data[self::FIELD_PATERNAL_ORGANISM_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATERNAL_ORGANISM_ID_EXT]) && is_array($data[self::FIELD_PATERNAL_ORGANISM_ID_EXT])) { + $ext = $data[self::FIELD_PATERNAL_ORGANISM_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPaternalOrganismId($value); + } else if (is_array($value)) { + $this->setPaternalOrganismId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPaternalOrganismId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPaternalOrganismId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATERNAL_ORGANISM_NAME]) || isset($data[self::FIELD_PATERNAL_ORGANISM_NAME_EXT])) { + if (isset($data[self::FIELD_PATERNAL_ORGANISM_NAME])) { + $value = $data[self::FIELD_PATERNAL_ORGANISM_NAME]; } else { - $this->setPaternalOrganismName(new FHIRString($data[self::FIELD_PATERNAL_ORGANISM_NAME])); + $value = null; + } + if (isset($data[self::FIELD_PATERNAL_ORGANISM_NAME_EXT]) && is_array($data[self::FIELD_PATERNAL_ORGANISM_NAME_EXT])) { + $ext = $data[self::FIELD_PATERNAL_ORGANISM_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPaternalOrganismName($value); + } else if (is_array($value)) { + $this->setPaternalOrganismName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPaternalOrganismName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPaternalOrganismName(new FHIRString($ext)); } } } @@ -618,32 +646,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaternalOrganismId())) { $a[self::FIELD_MATERNAL_ORGANISM_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MATERNAL_ORGANISM_ID_EXT] = $enc; } } if (null !== ($v = $this->getMaternalOrganismName())) { $a[self::FIELD_MATERNAL_ORGANISM_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MATERNAL_ORGANISM_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPaternalOrganismId())) { $a[self::FIELD_PATERNAL_ORGANISM_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATERNAL_ORGANISM_ID_EXT] = $enc; } } if (null !== ($v = $this->getPaternalOrganismName())) { $a[self::FIELD_PATERNAL_ORGANISM_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATERNAL_ORGANISM_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganism.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganism.php index 6febd0134d..723b889351 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganism.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganism.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRSubstanceSourceMaterialOrganism extends FHIRBackboneElement const FIELD_SPECIES = 'species'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Source material shall capture information on the taxonomic and anatomical @@ -292,20 +292,27 @@ public function __construct($data = null) $this->setHybrid(new FHIRSubstanceSourceMaterialHybrid($data[self::FIELD_HYBRID])); } } - if (isset($data[self::FIELD_INTRASPECIFIC_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_INTRASPECIFIC_DESCRIPTION_EXT]) && is_array($data[self::FIELD_INTRASPECIFIC_DESCRIPTION_EXT])) - ? $data[self::FIELD_INTRASPECIFIC_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_INTRASPECIFIC_DESCRIPTION] instanceof FHIRString) { - $this->setIntraspecificDescription($data[self::FIELD_INTRASPECIFIC_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTRASPECIFIC_DESCRIPTION])) { - $this->setIntraspecificDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INTRASPECIFIC_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_INTRASPECIFIC_DESCRIPTION])) { - $this->setIntraspecificDescription(new FHIRString(array_merge($ext, $data[self::FIELD_INTRASPECIFIC_DESCRIPTION]))); - } + if (isset($data[self::FIELD_INTRASPECIFIC_DESCRIPTION]) || isset($data[self::FIELD_INTRASPECIFIC_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_INTRASPECIFIC_DESCRIPTION])) { + $value = $data[self::FIELD_INTRASPECIFIC_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INTRASPECIFIC_DESCRIPTION_EXT]) && is_array($data[self::FIELD_INTRASPECIFIC_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_INTRASPECIFIC_DESCRIPTION_EXT]; } else { - $this->setIntraspecificDescription(new FHIRString($data[self::FIELD_INTRASPECIFIC_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIntraspecificDescription($value); + } else if (is_array($value)) { + $this->setIntraspecificDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIntraspecificDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntraspecificDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_INTRASPECIFIC_TYPE])) { @@ -851,7 +858,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getFamily())) { $a[self::FIELD_FAMILY] = $v; @@ -864,8 +877,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getIntraspecificDescription())) { $a[self::FIELD_INTRASPECIFIC_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INTRASPECIFIC_DESCRIPTION_EXT] = $enc; } } @@ -878,6 +893,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSpecies())) { $a[self::FIELD_SPECIES] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneral.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneral.php index da19dd8fea..8a1c9181a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneral.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneral.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRSubstanceSourceMaterialOrganismGeneral extends FHIRBackboneElement const FIELD_PHYLUM = 'phylum'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -453,6 +453,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPhylum())) { $a[self::FIELD_PHYLUM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescription.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescription.php index cb24a6871c..251e6b1cd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescription.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSubstanceSourceMaterialPartDescription extends FHIRBackboneElement const FIELD_PART_LOCATION = 'partLocation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -334,6 +334,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPartLocation())) { $a[self::FIELD_PART_LOCATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCode.php index 5d843484c9..837bbc9078 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRSubstanceSpecificationCode extends FHIRBackboneElement const FIELD_STATUS_DATE_EXT = '_statusDate'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -182,20 +182,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -223,20 +230,27 @@ public function __construct($data = null) $this->setStatus(new FHIRCodeableConcept($data[self::FIELD_STATUS])); } } - if (isset($data[self::FIELD_STATUS_DATE])) { - $ext = (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) - ? $data[self::FIELD_STATUS_DATE_EXT] - : null; - if ($data[self::FIELD_STATUS_DATE] instanceof FHIRDateTime) { - $this->setStatusDate($data[self::FIELD_STATUS_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STATUS_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STATUS_DATE]))); - } + if (isset($data[self::FIELD_STATUS_DATE]) || isset($data[self::FIELD_STATUS_DATE_EXT])) { + if (isset($data[self::FIELD_STATUS_DATE])) { + $value = $data[self::FIELD_STATUS_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) { + $ext = $data[self::FIELD_STATUS_DATE_EXT]; } else { - $this->setStatusDate(new FHIRDateTime($data[self::FIELD_STATUS_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStatusDate($value); + } else if (is_array($value)) { + $this->setStatusDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStatusDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatusDate(new FHIRDateTime($ext)); } } } @@ -595,24 +609,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v; } if (null !== ($v = $this->getStatusDate())) { $a[self::FIELD_STATUS_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STATUS_DATE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotope.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotope.php index 53852d5d42..a776d17730 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotope.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotope.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRSubstanceSpecificationIsotope extends FHIRBackboneElement const FIELD_SUBSTITUTION = 'substitution'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -502,6 +502,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubstitution())) { $a[self::FIELD_SUBSTITUTION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoiety.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoiety.php index c1cd021003..14c18bb0bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoiety.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoiety.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRSubstanceSpecificationMoiety extends FHIRBackboneElement const FIELD_STEREOCHEMISTRY = 'stereochemistry'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -219,20 +219,27 @@ public function __construct($data = null) $this->setAmountQuantity(new FHIRQuantity($data[self::FIELD_AMOUNT_QUANTITY])); } } - if (isset($data[self::FIELD_AMOUNT_STRING])) { - $ext = (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) - ? $data[self::FIELD_AMOUNT_STRING_EXT] - : null; - if ($data[self::FIELD_AMOUNT_STRING] instanceof FHIRString) { - $this->setAmountString($data[self::FIELD_AMOUNT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AMOUNT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString(array_merge($ext, $data[self::FIELD_AMOUNT_STRING]))); - } + if (isset($data[self::FIELD_AMOUNT_STRING]) || isset($data[self::FIELD_AMOUNT_STRING_EXT])) { + if (isset($data[self::FIELD_AMOUNT_STRING])) { + $value = $data[self::FIELD_AMOUNT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) { + $ext = $data[self::FIELD_AMOUNT_STRING_EXT]; } else { - $this->setAmountString(new FHIRString($data[self::FIELD_AMOUNT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAmountString($value); + } else if (is_array($value)) { + $this->setAmountString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAmountString(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -242,36 +249,50 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MOLECULAR_FORMULA])) { - $ext = (isset($data[self::FIELD_MOLECULAR_FORMULA_EXT]) && is_array($data[self::FIELD_MOLECULAR_FORMULA_EXT])) - ? $data[self::FIELD_MOLECULAR_FORMULA_EXT] - : null; - if ($data[self::FIELD_MOLECULAR_FORMULA] instanceof FHIRString) { - $this->setMolecularFormula($data[self::FIELD_MOLECULAR_FORMULA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MOLECULAR_FORMULA])) { - $this->setMolecularFormula(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MOLECULAR_FORMULA]] + $ext)); - } else if (is_array($data[self::FIELD_MOLECULAR_FORMULA])) { - $this->setMolecularFormula(new FHIRString(array_merge($ext, $data[self::FIELD_MOLECULAR_FORMULA]))); - } + if (isset($data[self::FIELD_MOLECULAR_FORMULA]) || isset($data[self::FIELD_MOLECULAR_FORMULA_EXT])) { + if (isset($data[self::FIELD_MOLECULAR_FORMULA])) { + $value = $data[self::FIELD_MOLECULAR_FORMULA]; } else { - $this->setMolecularFormula(new FHIRString($data[self::FIELD_MOLECULAR_FORMULA])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_MOLECULAR_FORMULA_EXT]) && is_array($data[self::FIELD_MOLECULAR_FORMULA_EXT])) { + $ext = $data[self::FIELD_MOLECULAR_FORMULA_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMolecularFormula($value); + } else if (is_array($value)) { + $this->setMolecularFormula(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMolecularFormula(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMolecularFormula(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OPTICAL_ACTIVITY])) { @@ -742,8 +763,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAmountString())) { $a[self::FIELD_AMOUNT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AMOUNT_STRING_EXT] = $enc; } } @@ -752,15 +775,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getMolecularFormula())) { $a[self::FIELD_MOLECULAR_FORMULA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MOLECULAR_FORMULA_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -773,6 +800,9 @@ public function jsonSerialize() if (null !== ($v = $this->getStereochemistry())) { $a[self::FIELD_STEREOCHEMISTRY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeight.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeight.php index 9c834426ea..559803ec3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeight.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeight.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSubstanceSpecificationMolecularWeight extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -394,6 +394,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationName.php index feac72dd08..3675b7db45 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRSubstanceSpecificationName extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -297,20 +297,27 @@ public function __construct($data = null) $this->addLanguage(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OFFICIAL])) { @@ -331,20 +338,27 @@ public function __construct($data = null) $this->addOfficial(new FHIRSubstanceSpecificationOfficial($data[self::FIELD_OFFICIAL])); } } - if (isset($data[self::FIELD_PREFERRED])) { - $ext = (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) - ? $data[self::FIELD_PREFERRED_EXT] - : null; - if ($data[self::FIELD_PREFERRED] instanceof FHIRBoolean) { - $this->setPreferred($data[self::FIELD_PREFERRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PREFERRED]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PREFERRED]))); - } + if (isset($data[self::FIELD_PREFERRED]) || isset($data[self::FIELD_PREFERRED_EXT])) { + if (isset($data[self::FIELD_PREFERRED])) { + $value = $data[self::FIELD_PREFERRED]; } else { - $this->setPreferred(new FHIRBoolean($data[self::FIELD_PREFERRED])); + $value = null; + } + if (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) { + $ext = $data[self::FIELD_PREFERRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPreferred($value); + } else if (is_array($value)) { + $this->setPreferred(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreferred(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -1174,46 +1188,95 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDomain())) { - $a[self::FIELD_DOMAIN] = $vs; + $a[self::FIELD_DOMAIN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOMAIN][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getLanguage())) { - $a[self::FIELD_LANGUAGE] = $vs; + $a[self::FIELD_LANGUAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LANGUAGE][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getOfficial())) { - $a[self::FIELD_OFFICIAL] = $vs; + $a[self::FIELD_OFFICIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OFFICIAL][] = $v; + } } if (null !== ($v = $this->getPreferred())) { $a[self::FIELD_PREFERRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PREFERRED_EXT] = $enc; } } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v; } if ([] !== ($vs = $this->getSynonym())) { - $a[self::FIELD_SYNONYM] = $vs; + $a[self::FIELD_SYNONYM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SYNONYM][] = $v; + } } if ([] !== ($vs = $this->getTranslation())) { - $a[self::FIELD_TRANSLATION] = $vs; + $a[self::FIELD_TRANSLATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TRANSLATION][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficial.php index 95a1592129..1455e37b39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSubstanceSpecificationOfficial extends FHIRBackboneElement const FIELD_STATUS = 'status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -154,20 +154,27 @@ public function __construct($data = null) $this->setAuthority(new FHIRCodeableConcept($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_STATUS])) { @@ -410,14 +417,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationProperty.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationProperty.php index fcfa99c917..3a8f56feb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSubstanceSpecificationProperty extends FHIRBackboneElement const FIELD_PARAMETERS_EXT = '_parameters'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -208,20 +208,27 @@ public function __construct($data = null) $this->setAmountQuantity(new FHIRQuantity($data[self::FIELD_AMOUNT_QUANTITY])); } } - if (isset($data[self::FIELD_AMOUNT_STRING])) { - $ext = (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) - ? $data[self::FIELD_AMOUNT_STRING_EXT] - : null; - if ($data[self::FIELD_AMOUNT_STRING] instanceof FHIRString) { - $this->setAmountString($data[self::FIELD_AMOUNT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AMOUNT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString(array_merge($ext, $data[self::FIELD_AMOUNT_STRING]))); - } + if (isset($data[self::FIELD_AMOUNT_STRING]) || isset($data[self::FIELD_AMOUNT_STRING_EXT])) { + if (isset($data[self::FIELD_AMOUNT_STRING])) { + $value = $data[self::FIELD_AMOUNT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) { + $ext = $data[self::FIELD_AMOUNT_STRING_EXT]; } else { - $this->setAmountString(new FHIRString($data[self::FIELD_AMOUNT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAmountString($value); + } else if (is_array($value)) { + $this->setAmountString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAmountString(new FHIRString($ext)); } } if (isset($data[self::FIELD_CATEGORY])) { @@ -252,20 +259,27 @@ public function __construct($data = null) $this->setDefiningSubstanceReference(new FHIRReference($data[self::FIELD_DEFINING_SUBSTANCE_REFERENCE])); } } - if (isset($data[self::FIELD_PARAMETERS])) { - $ext = (isset($data[self::FIELD_PARAMETERS_EXT]) && is_array($data[self::FIELD_PARAMETERS_EXT])) - ? $data[self::FIELD_PARAMETERS_EXT] - : null; - if ($data[self::FIELD_PARAMETERS] instanceof FHIRString) { - $this->setParameters($data[self::FIELD_PARAMETERS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARAMETERS])) { - $this->setParameters(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARAMETERS]] + $ext)); - } else if (is_array($data[self::FIELD_PARAMETERS])) { - $this->setParameters(new FHIRString(array_merge($ext, $data[self::FIELD_PARAMETERS]))); - } + if (isset($data[self::FIELD_PARAMETERS]) || isset($data[self::FIELD_PARAMETERS_EXT])) { + if (isset($data[self::FIELD_PARAMETERS])) { + $value = $data[self::FIELD_PARAMETERS]; } else { - $this->setParameters(new FHIRString($data[self::FIELD_PARAMETERS])); + $value = null; + } + if (isset($data[self::FIELD_PARAMETERS_EXT]) && is_array($data[self::FIELD_PARAMETERS_EXT])) { + $ext = $data[self::FIELD_PARAMETERS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setParameters($value); + } else if (is_array($value)) { + $this->setParameters(new FHIRString(array_merge($ext, $value))); + } else { + $this->setParameters(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParameters(new FHIRString($ext)); } } } @@ -667,8 +681,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAmountString())) { $a[self::FIELD_AMOUNT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AMOUNT_STRING_EXT] = $enc; } } @@ -686,11 +702,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getParameters())) { $a[self::FIELD_PARAMETERS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PARAMETERS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationship.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationship.php index 09a24159aa..5bb1f21655 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationship.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationship.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRSubstanceSpecificationRelationship extends FHIRBackboneElement const FIELD_SUBSTANCE_REFERENCE = 'substanceReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -290,20 +290,27 @@ public function __construct($data = null) $this->setAmountRatioLowLimit(new FHIRRatio($data[self::FIELD_AMOUNT_RATIO_LOW_LIMIT])); } } - if (isset($data[self::FIELD_AMOUNT_STRING])) { - $ext = (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) - ? $data[self::FIELD_AMOUNT_STRING_EXT] - : null; - if ($data[self::FIELD_AMOUNT_STRING] instanceof FHIRString) { - $this->setAmountString($data[self::FIELD_AMOUNT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AMOUNT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AMOUNT_STRING])) { - $this->setAmountString(new FHIRString(array_merge($ext, $data[self::FIELD_AMOUNT_STRING]))); - } + if (isset($data[self::FIELD_AMOUNT_STRING]) || isset($data[self::FIELD_AMOUNT_STRING_EXT])) { + if (isset($data[self::FIELD_AMOUNT_STRING])) { + $value = $data[self::FIELD_AMOUNT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AMOUNT_STRING_EXT]) && is_array($data[self::FIELD_AMOUNT_STRING_EXT])) { + $ext = $data[self::FIELD_AMOUNT_STRING_EXT]; } else { - $this->setAmountString(new FHIRString($data[self::FIELD_AMOUNT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAmountString($value); + } else if (is_array($value)) { + $this->setAmountString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAmountString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAmountString(new FHIRString($ext)); } } if (isset($data[self::FIELD_AMOUNT_TYPE])) { @@ -313,20 +320,27 @@ public function __construct($data = null) $this->setAmountType(new FHIRCodeableConcept($data[self::FIELD_AMOUNT_TYPE])); } } - if (isset($data[self::FIELD_IS_DEFINING])) { - $ext = (isset($data[self::FIELD_IS_DEFINING_EXT]) && is_array($data[self::FIELD_IS_DEFINING_EXT])) - ? $data[self::FIELD_IS_DEFINING_EXT] - : null; - if ($data[self::FIELD_IS_DEFINING] instanceof FHIRBoolean) { - $this->setIsDefining($data[self::FIELD_IS_DEFINING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_DEFINING])) { - $this->setIsDefining(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_DEFINING]] + $ext)); - } else if (is_array($data[self::FIELD_IS_DEFINING])) { - $this->setIsDefining(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_DEFINING]))); - } + if (isset($data[self::FIELD_IS_DEFINING]) || isset($data[self::FIELD_IS_DEFINING_EXT])) { + if (isset($data[self::FIELD_IS_DEFINING])) { + $value = $data[self::FIELD_IS_DEFINING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_DEFINING_EXT]) && is_array($data[self::FIELD_IS_DEFINING_EXT])) { + $ext = $data[self::FIELD_IS_DEFINING_EXT]; } else { - $this->setIsDefining(new FHIRBoolean($data[self::FIELD_IS_DEFINING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsDefining($value); + } else if (is_array($value)) { + $this->setIsDefining(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsDefining(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsDefining(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_RELATIONSHIP])) { @@ -973,8 +987,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAmountString())) { $a[self::FIELD_AMOUNT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AMOUNT_STRING_EXT] = $enc; } } @@ -983,8 +999,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getIsDefining())) { $a[self::FIELD_IS_DEFINING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_DEFINING_EXT] = $enc; } } @@ -992,7 +1010,13 @@ public function jsonSerialize() $a[self::FIELD_RELATIONSHIP] = $v; } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if (null !== ($v = $this->getSubstanceCodeableConcept())) { $a[self::FIELD_SUBSTANCE_CODEABLE_CONCEPT] = $v; @@ -1000,6 +1024,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubstanceReference())) { $a[self::FIELD_SUBSTANCE_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentation.php index 32e0ddc5ac..7117e44fe3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRSubstanceSpecificationRepresentation extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -152,20 +152,27 @@ public function __construct($data = null) $this->setAttachment(new FHIRAttachment($data[self::FIELD_ATTACHMENT])); } } - if (isset($data[self::FIELD_REPRESENTATION])) { - $ext = (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) - ? $data[self::FIELD_REPRESENTATION_EXT] - : null; - if ($data[self::FIELD_REPRESENTATION] instanceof FHIRString) { - $this->setRepresentation($data[self::FIELD_REPRESENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPRESENTATION])) { - $this->setRepresentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REPRESENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_REPRESENTATION])) { - $this->setRepresentation(new FHIRString(array_merge($ext, $data[self::FIELD_REPRESENTATION]))); - } + if (isset($data[self::FIELD_REPRESENTATION]) || isset($data[self::FIELD_REPRESENTATION_EXT])) { + if (isset($data[self::FIELD_REPRESENTATION])) { + $value = $data[self::FIELD_REPRESENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) { + $ext = $data[self::FIELD_REPRESENTATION_EXT]; } else { - $this->setRepresentation(new FHIRString($data[self::FIELD_REPRESENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRepresentation($value); + } else if (is_array($value)) { + $this->setRepresentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRepresentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRepresentation(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -402,14 +409,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRepresentation())) { $a[self::FIELD_REPRESENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REPRESENTATION_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructure.php index 6cf72ab534..e432212b81 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSubstanceSpecificationStructure extends FHIRBackboneElement const FIELD_STEREOCHEMISTRY = 'stereochemistry'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The detailed description of a substance, typically at a level beyond what is @@ -223,36 +223,50 @@ public function __construct($data = null) $this->addIsotope(new FHIRSubstanceSpecificationIsotope($data[self::FIELD_ISOTOPE])); } } - if (isset($data[self::FIELD_MOLECULAR_FORMULA])) { - $ext = (isset($data[self::FIELD_MOLECULAR_FORMULA_EXT]) && is_array($data[self::FIELD_MOLECULAR_FORMULA_EXT])) - ? $data[self::FIELD_MOLECULAR_FORMULA_EXT] - : null; - if ($data[self::FIELD_MOLECULAR_FORMULA] instanceof FHIRString) { - $this->setMolecularFormula($data[self::FIELD_MOLECULAR_FORMULA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MOLECULAR_FORMULA])) { - $this->setMolecularFormula(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MOLECULAR_FORMULA]] + $ext)); - } else if (is_array($data[self::FIELD_MOLECULAR_FORMULA])) { - $this->setMolecularFormula(new FHIRString(array_merge($ext, $data[self::FIELD_MOLECULAR_FORMULA]))); - } + if (isset($data[self::FIELD_MOLECULAR_FORMULA]) || isset($data[self::FIELD_MOLECULAR_FORMULA_EXT])) { + if (isset($data[self::FIELD_MOLECULAR_FORMULA])) { + $value = $data[self::FIELD_MOLECULAR_FORMULA]; } else { - $this->setMolecularFormula(new FHIRString($data[self::FIELD_MOLECULAR_FORMULA])); + $value = null; } - } - if (isset($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY])) { - $ext = (isset($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY_EXT]) && is_array($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY_EXT])) - ? $data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY_EXT] - : null; - if ($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY] instanceof FHIRString) { - $this->setMolecularFormulaByMoiety($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY])) { - $this->setMolecularFormulaByMoiety(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY]] + $ext)); - } else if (is_array($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY])) { - $this->setMolecularFormulaByMoiety(new FHIRString(array_merge($ext, $data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY]))); + if (isset($data[self::FIELD_MOLECULAR_FORMULA_EXT]) && is_array($data[self::FIELD_MOLECULAR_FORMULA_EXT])) { + $ext = $data[self::FIELD_MOLECULAR_FORMULA_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMolecularFormula($value); + } else if (is_array($value)) { + $this->setMolecularFormula(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMolecularFormula(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMolecularFormula(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY]) || isset($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY_EXT])) { + if (isset($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY])) { + $value = $data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY]; } else { - $this->setMolecularFormulaByMoiety(new FHIRString($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY])); + $value = null; + } + if (isset($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY_EXT]) && is_array($data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY_EXT])) { + $ext = $data[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMolecularFormulaByMoiety($value); + } else if (is_array($value)) { + $this->setMolecularFormulaByMoiety(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMolecularFormulaByMoiety(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMolecularFormulaByMoiety(new FHIRString($ext)); } } if (isset($data[self::FIELD_MOLECULAR_WEIGHT])) { @@ -827,19 +841,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIsotope())) { - $a[self::FIELD_ISOTOPE] = $vs; + $a[self::FIELD_ISOTOPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ISOTOPE][] = $v; + } } if (null !== ($v = $this->getMolecularFormula())) { $a[self::FIELD_MOLECULAR_FORMULA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MOLECULAR_FORMULA_EXT] = $enc; } } if (null !== ($v = $this->getMolecularFormulaByMoiety())) { $a[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MOLECULAR_FORMULA_BY_MOIETY_EXT] = $enc; } } @@ -850,14 +874,29 @@ public function jsonSerialize() $a[self::FIELD_OPTICAL_ACTIVITY] = $v; } if ([] !== ($vs = $this->getRepresentation())) { - $a[self::FIELD_REPRESENTATION] = $vs; + $a[self::FIELD_REPRESENTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPRESENTATION][] = $v; + } } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if (null !== ($v = $this->getStereochemistry())) { $a[self::FIELD_STEREOCHEMISTRY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php index d3c4d09206..1f97d2adaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSupplyDeliverySuppliedItem extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -394,6 +394,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameter.php index fc818689ae..b69b7d0255 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRSupplyRequestParameter extends FHIRBackboneElement const FIELD_VALUE_RANGE = 'valueRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -178,20 +178,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -516,8 +523,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -530,6 +539,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValueRange())) { $a[self::FIELD_VALUE_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php index c06691224f..96ef88c435 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -198,7 +198,7 @@ class FHIRTaskInput extends FHIRBackboneElement const FIELD_VALUE_UUID_EXT = '_valueUuid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -922,68 +922,96 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CANONICAL])) { - $ext = (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) - ? $data[self::FIELD_VALUE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_VALUE_CANONICAL] instanceof FHIRCanonical) { - $this->setValueCanonical($data[self::FIELD_VALUE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_VALUE_CANONICAL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CANONICAL]) || isset($data[self::FIELD_VALUE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_VALUE_CANONICAL])) { + $value = $data[self::FIELD_VALUE_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_VALUE_CANONICAL_EXT]; } else { - $this->setValueCanonical(new FHIRCanonical($data[self::FIELD_VALUE_CANONICAL])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setValueCanonical($value); + } else if (is_array($value)) { + $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -1035,52 +1063,73 @@ public function __construct($data = null) $this->setValueDataRequirement(new FHIRDataRequirement($data[self::FIELD_VALUE_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); - } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -1118,20 +1167,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -1141,52 +1197,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -1203,20 +1280,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PARAMETER_DEFINITION])) { @@ -1233,20 +1317,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1298,36 +1389,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1344,52 +1449,73 @@ public function __construct($data = null) $this->setValueTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_VALUE_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); - } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); - } - } - if (isset($data[self::FIELD_VALUE_URL])) { - $ext = (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) - ? $data[self::FIELD_VALUE_URL_EXT] - : null; - if ($data[self::FIELD_VALUE_URL] instanceof FHIRUrl) { - $this->setValueUrl($data[self::FIELD_VALUE_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_VALUE_URL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_VALUE_URL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URL]) || isset($data[self::FIELD_VALUE_URL_EXT])) { + if (isset($data[self::FIELD_VALUE_URL])) { + $value = $data[self::FIELD_VALUE_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) { + $ext = $data[self::FIELD_VALUE_URL_EXT]; } else { - $this->setValueUrl(new FHIRUrl($data[self::FIELD_VALUE_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setValueUrl($value); + } else if (is_array($value)) { + $this->setValueUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_VALUE_USAGE_CONTEXT])) { @@ -1399,20 +1525,27 @@ public function __construct($data = null) $this->setValueUsageContext(new FHIRUsageContext($data[self::FIELD_VALUE_USAGE_CONTEXT])); } } - if (isset($data[self::FIELD_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) - ? $data[self::FIELD_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_VALUE_UUID] instanceof FHIRUuid) { - $this->setValueUuid($data[self::FIELD_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_VALUE_UUID]))); - } + if (isset($data[self::FIELD_VALUE_UUID]) || isset($data[self::FIELD_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_VALUE_UUID])) { + $value = $data[self::FIELD_VALUE_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_VALUE_UUID_EXT]; } else { - $this->setValueUuid(new FHIRUuid($data[self::FIELD_VALUE_UUID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setValueUuid($value); + } else if (is_array($value)) { + $this->setValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUuid(new FHIRUuid($ext)); } } } @@ -3874,29 +4007,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCanonical())) { $a[self::FIELD_VALUE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_VALUE_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -3923,22 +4064,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -3959,8 +4106,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -3969,22 +4118,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -3996,8 +4151,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -4009,8 +4166,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -4037,15 +4196,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -4057,22 +4220,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getValueUrl())) { $a[self::FIELD_VALUE_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_VALUE_URL_EXT] = $enc; } } @@ -4081,11 +4250,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUuid())) { $a[self::FIELD_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_VALUE_UUID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php index b882a45c59..aee072e576 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -198,7 +198,7 @@ class FHIRTaskOutput extends FHIRBackboneElement const FIELD_VALUE_UUID_EXT = '_valueUuid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -921,68 +921,96 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CANONICAL])) { - $ext = (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) - ? $data[self::FIELD_VALUE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_VALUE_CANONICAL] instanceof FHIRCanonical) { - $this->setValueCanonical($data[self::FIELD_VALUE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_VALUE_CANONICAL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CANONICAL]) || isset($data[self::FIELD_VALUE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_VALUE_CANONICAL])) { + $value = $data[self::FIELD_VALUE_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_VALUE_CANONICAL_EXT]; } else { - $this->setValueCanonical(new FHIRCanonical($data[self::FIELD_VALUE_CANONICAL])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setValueCanonical($value); + } else if (is_array($value)) { + $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -1034,52 +1062,73 @@ public function __construct($data = null) $this->setValueDataRequirement(new FHIRDataRequirement($data[self::FIELD_VALUE_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); - } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -1117,20 +1166,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -1140,52 +1196,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -1202,20 +1279,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PARAMETER_DEFINITION])) { @@ -1232,20 +1316,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1297,36 +1388,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1343,52 +1448,73 @@ public function __construct($data = null) $this->setValueTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_VALUE_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); - } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); - } - } - if (isset($data[self::FIELD_VALUE_URL])) { - $ext = (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) - ? $data[self::FIELD_VALUE_URL_EXT] - : null; - if ($data[self::FIELD_VALUE_URL] instanceof FHIRUrl) { - $this->setValueUrl($data[self::FIELD_VALUE_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_VALUE_URL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_VALUE_URL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URL]) || isset($data[self::FIELD_VALUE_URL_EXT])) { + if (isset($data[self::FIELD_VALUE_URL])) { + $value = $data[self::FIELD_VALUE_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) { + $ext = $data[self::FIELD_VALUE_URL_EXT]; } else { - $this->setValueUrl(new FHIRUrl($data[self::FIELD_VALUE_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setValueUrl($value); + } else if (is_array($value)) { + $this->setValueUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_VALUE_USAGE_CONTEXT])) { @@ -1398,20 +1524,27 @@ public function __construct($data = null) $this->setValueUsageContext(new FHIRUsageContext($data[self::FIELD_VALUE_USAGE_CONTEXT])); } } - if (isset($data[self::FIELD_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) - ? $data[self::FIELD_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_VALUE_UUID] instanceof FHIRUuid) { - $this->setValueUuid($data[self::FIELD_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_VALUE_UUID]))); - } + if (isset($data[self::FIELD_VALUE_UUID]) || isset($data[self::FIELD_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_VALUE_UUID])) { + $value = $data[self::FIELD_VALUE_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_VALUE_UUID_EXT]; } else { - $this->setValueUuid(new FHIRUuid($data[self::FIELD_VALUE_UUID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setValueUuid($value); + } else if (is_array($value)) { + $this->setValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUuid(new FHIRUuid($ext)); } } } @@ -3871,29 +4004,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCanonical())) { $a[self::FIELD_VALUE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_VALUE_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -3920,22 +4061,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -3956,8 +4103,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -3966,22 +4115,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -3993,8 +4148,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -4006,8 +4163,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -4034,15 +4193,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -4054,22 +4217,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getValueUrl())) { $a[self::FIELD_VALUE_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_VALUE_URL_EXT] = $enc; } } @@ -4078,11 +4247,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUuid())) { $a[self::FIELD_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_VALUE_UUID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php index dc3ad0a0e5..22b65da471 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRTaskRestriction extends FHIRBackboneElement const FIELD_REPETITIONS_EXT = '_repetitions'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -168,20 +168,27 @@ public function __construct($data = null) $this->addRecipient(new FHIRReference($data[self::FIELD_RECIPIENT])); } } - if (isset($data[self::FIELD_REPETITIONS])) { - $ext = (isset($data[self::FIELD_REPETITIONS_EXT]) && is_array($data[self::FIELD_REPETITIONS_EXT])) - ? $data[self::FIELD_REPETITIONS_EXT] - : null; - if ($data[self::FIELD_REPETITIONS] instanceof FHIRPositiveInt) { - $this->setRepetitions($data[self::FIELD_REPETITIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPETITIONS])) { - $this->setRepetitions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_REPETITIONS]] + $ext)); - } else if (is_array($data[self::FIELD_REPETITIONS])) { - $this->setRepetitions(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_REPETITIONS]))); - } + if (isset($data[self::FIELD_REPETITIONS]) || isset($data[self::FIELD_REPETITIONS_EXT])) { + if (isset($data[self::FIELD_REPETITIONS])) { + $value = $data[self::FIELD_REPETITIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPETITIONS_EXT]) && is_array($data[self::FIELD_REPETITIONS_EXT])) { + $ext = $data[self::FIELD_REPETITIONS_EXT]; } else { - $this->setRepetitions(new FHIRPositiveInt($data[self::FIELD_REPETITIONS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setRepetitions($value); + } else if (is_array($value)) { + $this->setRepetitions(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setRepetitions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRepetitions(new FHIRPositiveInt($ext)); } } } @@ -442,15 +449,26 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if (null !== ($v = $this->getRepetitions())) { $a[self::FIELD_REPETITIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_REPETITIONS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosure.php index 0ab6d8a139..74a20950d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRTerminologyCapabilitiesClosure extends FHIRBackboneElement const FIELD_TRANSLATION_EXT = '_translation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -117,20 +117,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TRANSLATION])) { - $ext = (isset($data[self::FIELD_TRANSLATION_EXT]) && is_array($data[self::FIELD_TRANSLATION_EXT])) - ? $data[self::FIELD_TRANSLATION_EXT] - : null; - if ($data[self::FIELD_TRANSLATION] instanceof FHIRBoolean) { - $this->setTranslation($data[self::FIELD_TRANSLATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRANSLATION])) { - $this->setTranslation(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_TRANSLATION]] + $ext)); - } else if (is_array($data[self::FIELD_TRANSLATION])) { - $this->setTranslation(new FHIRBoolean(array_merge($ext, $data[self::FIELD_TRANSLATION]))); - } + if (isset($data[self::FIELD_TRANSLATION]) || isset($data[self::FIELD_TRANSLATION_EXT])) { + if (isset($data[self::FIELD_TRANSLATION])) { + $value = $data[self::FIELD_TRANSLATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRANSLATION_EXT]) && is_array($data[self::FIELD_TRANSLATION_EXT])) { + $ext = $data[self::FIELD_TRANSLATION_EXT]; } else { - $this->setTranslation(new FHIRBoolean($data[self::FIELD_TRANSLATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setTranslation($value); + } else if (is_array($value)) { + $this->setTranslation(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setTranslation(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTranslation(new FHIRBoolean($ext)); } } } @@ -279,11 +286,16 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getTranslation())) { $a[self::FIELD_TRANSLATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_TRANSLATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystem.php index f7b330f8e8..f34f1c34be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRTerminologyCapabilitiesCodeSystem extends FHIRBackboneElement const FIELD_VERSION = 'version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -144,36 +144,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_SUBSUMPTION])) { - $ext = (isset($data[self::FIELD_SUBSUMPTION_EXT]) && is_array($data[self::FIELD_SUBSUMPTION_EXT])) - ? $data[self::FIELD_SUBSUMPTION_EXT] - : null; - if ($data[self::FIELD_SUBSUMPTION] instanceof FHIRBoolean) { - $this->setSubsumption($data[self::FIELD_SUBSUMPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBSUMPTION])) { - $this->setSubsumption(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_SUBSUMPTION]] + $ext)); - } else if (is_array($data[self::FIELD_SUBSUMPTION])) { - $this->setSubsumption(new FHIRBoolean(array_merge($ext, $data[self::FIELD_SUBSUMPTION]))); - } + if (isset($data[self::FIELD_SUBSUMPTION]) || isset($data[self::FIELD_SUBSUMPTION_EXT])) { + if (isset($data[self::FIELD_SUBSUMPTION])) { + $value = $data[self::FIELD_SUBSUMPTION]; } else { - $this->setSubsumption(new FHIRBoolean($data[self::FIELD_SUBSUMPTION])); + $value = null; } - } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRCanonical) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRCanonical(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_SUBSUMPTION_EXT]) && is_array($data[self::FIELD_SUBSUMPTION_EXT])) { + $ext = $data[self::FIELD_SUBSUMPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setSubsumption($value); + } else if (is_array($value)) { + $this->setSubsumption(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setSubsumption(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubsumption(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; } else { - $this->setUri(new FHIRCanonical($data[self::FIELD_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_VERSION])) { @@ -463,20 +477,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getSubsumption())) { $a[self::FIELD_SUBSUMPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_SUBSUMPTION_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } if ([] !== ($vs = $this->getVersion())) { - $a[self::FIELD_VERSION] = $vs; + $a[self::FIELD_VERSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VERSION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansion.php index afb4eaa132..65cf8483f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRTerminologyCapabilitiesExpansion extends FHIRBackboneElement const FIELD_TEXT_FILTER_EXT = '_textFilter'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -171,52 +171,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_HIERARCHICAL])) { - $ext = (isset($data[self::FIELD_HIERARCHICAL_EXT]) && is_array($data[self::FIELD_HIERARCHICAL_EXT])) - ? $data[self::FIELD_HIERARCHICAL_EXT] - : null; - if ($data[self::FIELD_HIERARCHICAL] instanceof FHIRBoolean) { - $this->setHierarchical($data[self::FIELD_HIERARCHICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HIERARCHICAL])) { - $this->setHierarchical(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_HIERARCHICAL]] + $ext)); - } else if (is_array($data[self::FIELD_HIERARCHICAL])) { - $this->setHierarchical(new FHIRBoolean(array_merge($ext, $data[self::FIELD_HIERARCHICAL]))); - } + if (isset($data[self::FIELD_HIERARCHICAL]) || isset($data[self::FIELD_HIERARCHICAL_EXT])) { + if (isset($data[self::FIELD_HIERARCHICAL])) { + $value = $data[self::FIELD_HIERARCHICAL]; } else { - $this->setHierarchical(new FHIRBoolean($data[self::FIELD_HIERARCHICAL])); + $value = null; } - } - if (isset($data[self::FIELD_INCOMPLETE])) { - $ext = (isset($data[self::FIELD_INCOMPLETE_EXT]) && is_array($data[self::FIELD_INCOMPLETE_EXT])) - ? $data[self::FIELD_INCOMPLETE_EXT] - : null; - if ($data[self::FIELD_INCOMPLETE] instanceof FHIRBoolean) { - $this->setIncomplete($data[self::FIELD_INCOMPLETE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INCOMPLETE])) { - $this->setIncomplete(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INCOMPLETE]] + $ext)); - } else if (is_array($data[self::FIELD_INCOMPLETE])) { - $this->setIncomplete(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INCOMPLETE]))); - } + if (isset($data[self::FIELD_HIERARCHICAL_EXT]) && is_array($data[self::FIELD_HIERARCHICAL_EXT])) { + $ext = $data[self::FIELD_HIERARCHICAL_EXT]; } else { - $this->setIncomplete(new FHIRBoolean($data[self::FIELD_INCOMPLETE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setHierarchical($value); + } else if (is_array($value)) { + $this->setHierarchical(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setHierarchical(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHierarchical(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PAGING])) { - $ext = (isset($data[self::FIELD_PAGING_EXT]) && is_array($data[self::FIELD_PAGING_EXT])) - ? $data[self::FIELD_PAGING_EXT] - : null; - if ($data[self::FIELD_PAGING] instanceof FHIRBoolean) { - $this->setPaging($data[self::FIELD_PAGING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAGING])) { - $this->setPaging(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PAGING]] + $ext)); - } else if (is_array($data[self::FIELD_PAGING])) { - $this->setPaging(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PAGING]))); + if (isset($data[self::FIELD_INCOMPLETE]) || isset($data[self::FIELD_INCOMPLETE_EXT])) { + if (isset($data[self::FIELD_INCOMPLETE])) { + $value = $data[self::FIELD_INCOMPLETE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INCOMPLETE_EXT]) && is_array($data[self::FIELD_INCOMPLETE_EXT])) { + $ext = $data[self::FIELD_INCOMPLETE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIncomplete($value); + } else if (is_array($value)) { + $this->setIncomplete(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIncomplete(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIncomplete(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_PAGING]) || isset($data[self::FIELD_PAGING_EXT])) { + if (isset($data[self::FIELD_PAGING])) { + $value = $data[self::FIELD_PAGING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PAGING_EXT]) && is_array($data[self::FIELD_PAGING_EXT])) { + $ext = $data[self::FIELD_PAGING_EXT]; } else { - $this->setPaging(new FHIRBoolean($data[self::FIELD_PAGING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPaging($value); + } else if (is_array($value)) { + $this->setPaging(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPaging(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPaging(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -237,20 +258,27 @@ public function __construct($data = null) $this->addParameter(new FHIRTerminologyCapabilitiesParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_TEXT_FILTER])) { - $ext = (isset($data[self::FIELD_TEXT_FILTER_EXT]) && is_array($data[self::FIELD_TEXT_FILTER_EXT])) - ? $data[self::FIELD_TEXT_FILTER_EXT] - : null; - if ($data[self::FIELD_TEXT_FILTER] instanceof FHIRMarkdown) { - $this->setTextFilter($data[self::FIELD_TEXT_FILTER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT_FILTER])) { - $this->setTextFilter(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_TEXT_FILTER]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT_FILTER])) { - $this->setTextFilter(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_TEXT_FILTER]))); - } + if (isset($data[self::FIELD_TEXT_FILTER]) || isset($data[self::FIELD_TEXT_FILTER_EXT])) { + if (isset($data[self::FIELD_TEXT_FILTER])) { + $value = $data[self::FIELD_TEXT_FILTER]; } else { - $this->setTextFilter(new FHIRMarkdown($data[self::FIELD_TEXT_FILTER])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_FILTER_EXT]) && is_array($data[self::FIELD_TEXT_FILTER_EXT])) { + $ext = $data[self::FIELD_TEXT_FILTER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setTextFilter($value); + } else if (is_array($value)) { + $this->setTextFilter(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setTextFilter(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTextFilter(new FHIRMarkdown($ext)); } } } @@ -628,35 +656,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getHierarchical())) { $a[self::FIELD_HIERARCHICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_HIERARCHICAL_EXT] = $enc; } } if (null !== ($v = $this->getIncomplete())) { $a[self::FIELD_INCOMPLETE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INCOMPLETE_EXT] = $enc; } } if (null !== ($v = $this->getPaging())) { $a[self::FIELD_PAGING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PAGING_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getTextFilter())) { $a[self::FIELD_TEXT_FILTER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_TEXT_FILTER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilter.php index bc8242bf13..65c2eef8b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRTerminologyCapabilitiesFilter extends FHIRBackboneElement const FIELD_OP_EXT = '_op'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -137,49 +137,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_OP])) { - $ext = (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) - ? $data[self::FIELD_OP_EXT] - : null; - if (is_array($data[self::FIELD_OP])) { - foreach($data[self::FIELD_OP] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addOp($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addOp(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addOp(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_OP]) || isset($data[self::FIELD_OP_EXT])) { + if (isset($data[self::FIELD_OP])) { + $value = $data[self::FIELD_OP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) { + $ext = $data[self::FIELD_OP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addOp($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addOp($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addOp(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addOp(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addOp(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addOp(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addOp(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addOp(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_OP] instanceof FHIRCode) { - $this->addOp($data[self::FIELD_OP]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_OP])) { - $this->addOp(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_OP]] + $ext)); - } else { - $this->addOp(new FHIRCode($data[self::FIELD_OP])); } } } @@ -412,25 +428,38 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getOp())) { $a[self::FIELD_OP] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_OP][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_OP_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_OP_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_OP_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementation.php index 58a89f931b..5ba5510090 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRTerminologyCapabilitiesImplementation extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUrl) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUrl($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUrl($ext)); } } } @@ -367,18 +381,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameter.php index 44375b742d..65c20271a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRTerminologyCapabilitiesParameter extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRCode) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRCode($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRCode($ext)); } } } @@ -367,18 +381,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftware.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftware.php index 4bdf333fbb..1478726396 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRTerminologyCapabilitiesSoftware extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -363,18 +377,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslation.php index 2d2bc89579..de85370158 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRTerminologyCapabilitiesTranslation extends FHIRBackboneElement const FIELD_NEEDS_MAP_EXT = '_needsMap'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -117,20 +117,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NEEDS_MAP])) { - $ext = (isset($data[self::FIELD_NEEDS_MAP_EXT]) && is_array($data[self::FIELD_NEEDS_MAP_EXT])) - ? $data[self::FIELD_NEEDS_MAP_EXT] - : null; - if ($data[self::FIELD_NEEDS_MAP] instanceof FHIRBoolean) { - $this->setNeedsMap($data[self::FIELD_NEEDS_MAP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NEEDS_MAP])) { - $this->setNeedsMap(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NEEDS_MAP]] + $ext)); - } else if (is_array($data[self::FIELD_NEEDS_MAP])) { - $this->setNeedsMap(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NEEDS_MAP]))); - } + if (isset($data[self::FIELD_NEEDS_MAP]) || isset($data[self::FIELD_NEEDS_MAP_EXT])) { + if (isset($data[self::FIELD_NEEDS_MAP])) { + $value = $data[self::FIELD_NEEDS_MAP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NEEDS_MAP_EXT]) && is_array($data[self::FIELD_NEEDS_MAP_EXT])) { + $ext = $data[self::FIELD_NEEDS_MAP_EXT]; } else { - $this->setNeedsMap(new FHIRBoolean($data[self::FIELD_NEEDS_MAP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNeedsMap($value); + } else if (is_array($value)) { + $this->setNeedsMap(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNeedsMap(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNeedsMap(new FHIRBoolean($ext)); } } } @@ -279,11 +286,16 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getNeedsMap())) { $a[self::FIELD_NEEDS_MAP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NEEDS_MAP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCode.php index 8192ad5ef6..20fd3a369f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRTerminologyCapabilitiesValidateCode extends FHIRBackboneElement const FIELD_TRANSLATIONS_EXT = '_translations'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -117,20 +117,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TRANSLATIONS])) { - $ext = (isset($data[self::FIELD_TRANSLATIONS_EXT]) && is_array($data[self::FIELD_TRANSLATIONS_EXT])) - ? $data[self::FIELD_TRANSLATIONS_EXT] - : null; - if ($data[self::FIELD_TRANSLATIONS] instanceof FHIRBoolean) { - $this->setTranslations($data[self::FIELD_TRANSLATIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRANSLATIONS])) { - $this->setTranslations(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_TRANSLATIONS]] + $ext)); - } else if (is_array($data[self::FIELD_TRANSLATIONS])) { - $this->setTranslations(new FHIRBoolean(array_merge($ext, $data[self::FIELD_TRANSLATIONS]))); - } + if (isset($data[self::FIELD_TRANSLATIONS]) || isset($data[self::FIELD_TRANSLATIONS_EXT])) { + if (isset($data[self::FIELD_TRANSLATIONS])) { + $value = $data[self::FIELD_TRANSLATIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRANSLATIONS_EXT]) && is_array($data[self::FIELD_TRANSLATIONS_EXT])) { + $ext = $data[self::FIELD_TRANSLATIONS_EXT]; } else { - $this->setTranslations(new FHIRBoolean($data[self::FIELD_TRANSLATIONS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setTranslations($value); + } else if (is_array($value)) { + $this->setTranslations(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setTranslations(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTranslations(new FHIRBoolean($ext)); } } } @@ -279,11 +286,16 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getTranslations())) { $a[self::FIELD_TRANSLATIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_TRANSLATIONS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersion.php index 8deac8a189..d71e7b70e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRTerminologyCapabilitiesVersion extends FHIRBackboneElement const FIELD_PROPERTY_EXT = '_property'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -185,36 +185,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRString) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRString(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRString($data[self::FIELD_CODE])); - } - } - if (isset($data[self::FIELD_COMPOSITIONAL])) { - $ext = (isset($data[self::FIELD_COMPOSITIONAL_EXT]) && is_array($data[self::FIELD_COMPOSITIONAL_EXT])) - ? $data[self::FIELD_COMPOSITIONAL_EXT] - : null; - if ($data[self::FIELD_COMPOSITIONAL] instanceof FHIRBoolean) { - $this->setCompositional($data[self::FIELD_COMPOSITIONAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPOSITIONAL])) { - $this->setCompositional(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_COMPOSITIONAL]] + $ext)); - } else if (is_array($data[self::FIELD_COMPOSITIONAL])) { - $this->setCompositional(new FHIRBoolean(array_merge($ext, $data[self::FIELD_COMPOSITIONAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COMPOSITIONAL]) || isset($data[self::FIELD_COMPOSITIONAL_EXT])) { + if (isset($data[self::FIELD_COMPOSITIONAL])) { + $value = $data[self::FIELD_COMPOSITIONAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPOSITIONAL_EXT]) && is_array($data[self::FIELD_COMPOSITIONAL_EXT])) { + $ext = $data[self::FIELD_COMPOSITIONAL_EXT]; } else { - $this->setCompositional(new FHIRBoolean($data[self::FIELD_COMPOSITIONAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCompositional($value); + } else if (is_array($value)) { + $this->setCompositional(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCompositional(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCompositional(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FILTER])) { @@ -235,78 +249,103 @@ public function __construct($data = null) $this->addFilter(new FHIRTerminologyCapabilitiesFilter($data[self::FIELD_FILTER])); } } - if (isset($data[self::FIELD_IS_DEFAULT])) { - $ext = (isset($data[self::FIELD_IS_DEFAULT_EXT]) && is_array($data[self::FIELD_IS_DEFAULT_EXT])) - ? $data[self::FIELD_IS_DEFAULT_EXT] - : null; - if ($data[self::FIELD_IS_DEFAULT] instanceof FHIRBoolean) { - $this->setIsDefault($data[self::FIELD_IS_DEFAULT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_DEFAULT])) { - $this->setIsDefault(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_DEFAULT]] + $ext)); - } else if (is_array($data[self::FIELD_IS_DEFAULT])) { - $this->setIsDefault(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_DEFAULT]))); - } + if (isset($data[self::FIELD_IS_DEFAULT]) || isset($data[self::FIELD_IS_DEFAULT_EXT])) { + if (isset($data[self::FIELD_IS_DEFAULT])) { + $value = $data[self::FIELD_IS_DEFAULT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_DEFAULT_EXT]) && is_array($data[self::FIELD_IS_DEFAULT_EXT])) { + $ext = $data[self::FIELD_IS_DEFAULT_EXT]; } else { - $this->setIsDefault(new FHIRBoolean($data[self::FIELD_IS_DEFAULT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsDefault($value); + } else if (is_array($value)) { + $this->setIsDefault(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsDefault(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsDefault(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if (is_array($data[self::FIELD_LANGUAGE])) { - foreach($data[self::FIELD_LANGUAGE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addLanguage($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLanguage(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addLanguage($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addLanguage($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLanguage(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLanguage(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLanguage(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->addLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LANGUAGE])) { - $this->addLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else { - $this->addLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_PROPERTY])) { - $ext = (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) - ? $data[self::FIELD_PROPERTY_EXT] - : null; - if (is_array($data[self::FIELD_PROPERTY])) { - foreach($data[self::FIELD_PROPERTY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addProperty($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProperty(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROPERTY]) || isset($data[self::FIELD_PROPERTY_EXT])) { + if (isset($data[self::FIELD_PROPERTY])) { + $value = $data[self::FIELD_PROPERTY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) { + $ext = $data[self::FIELD_PROPERTY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addProperty($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addProperty($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProperty(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProperty(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addProperty(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProperty(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_PROPERTY] instanceof FHIRCode) { - $this->addProperty($data[self::FIELD_PROPERTY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROPERTY])) { - $this->addProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PROPERTY]] + $ext)); - } else { - $this->addProperty(new FHIRCode($data[self::FIELD_PROPERTY])); } } } @@ -788,57 +827,88 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getCompositional())) { $a[self::FIELD_COMPOSITIONAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_COMPOSITIONAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFilter())) { - $a[self::FIELD_FILTER] = $vs; + $a[self::FIELD_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FILTER][] = $v; + } } if (null !== ($v = $this->getIsDefault())) { $a[self::FIELD_IS_DEFAULT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_DEFAULT_EXT] = $enc; } } if ([] !== ($vs = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LANGUAGE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LANGUAGE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LANGUAGE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LANGUAGE_EXT] = $encs; + } } if ([] !== ($vs = $this->getProperty())) { $a[self::FIELD_PROPERTY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROPERTY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROPERTY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROPERTY_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROPERTY_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php index 37535ed103..55a0c29f55 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestReportAction extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -300,6 +300,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php index 1d32e1d3e8..105fa72881 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestReportAction1 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -300,6 +300,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php index 1f77306b8c..d93510d284 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRTestReportAction2 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -248,6 +248,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php index 8c5a90a12d..d0a36e59bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRTestReportAssert extends FHIRBackboneElement const FIELD_RESULT_EXT = '_result'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -147,52 +147,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DETAIL])) { - $ext = (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) - ? $data[self::FIELD_DETAIL_EXT] - : null; - if ($data[self::FIELD_DETAIL] instanceof FHIRString) { - $this->setDetail($data[self::FIELD_DETAIL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DETAIL]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString(array_merge($ext, $data[self::FIELD_DETAIL]))); - } + if (isset($data[self::FIELD_DETAIL]) || isset($data[self::FIELD_DETAIL_EXT])) { + if (isset($data[self::FIELD_DETAIL])) { + $value = $data[self::FIELD_DETAIL]; } else { - $this->setDetail(new FHIRString($data[self::FIELD_DETAIL])); + $value = null; } - } - if (isset($data[self::FIELD_MESSAGE])) { - $ext = (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) - ? $data[self::FIELD_MESSAGE_EXT] - : null; - if ($data[self::FIELD_MESSAGE] instanceof FHIRMarkdown) { - $this->setMessage($data[self::FIELD_MESSAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_MESSAGE]] + $ext)); - } else if (is_array($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_MESSAGE]))); - } + if (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) { + $ext = $data[self::FIELD_DETAIL_EXT]; } else { - $this->setMessage(new FHIRMarkdown($data[self::FIELD_MESSAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDetail($value); + } else if (is_array($value)) { + $this->setDetail(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetail(new FHIRString($ext)); } } - if (isset($data[self::FIELD_RESULT])) { - $ext = (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) - ? $data[self::FIELD_RESULT_EXT] - : null; - if ($data[self::FIELD_RESULT] instanceof FHIRTestReportActionResult) { - $this->setResult($data[self::FIELD_RESULT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportActionResult([FHIRTestReportActionResult::FIELD_VALUE => $data[self::FIELD_RESULT]] + $ext)); - } else if (is_array($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportActionResult(array_merge($ext, $data[self::FIELD_RESULT]))); + if (isset($data[self::FIELD_MESSAGE]) || isset($data[self::FIELD_MESSAGE_EXT])) { + if (isset($data[self::FIELD_MESSAGE])) { + $value = $data[self::FIELD_MESSAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) { + $ext = $data[self::FIELD_MESSAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setMessage($value); + } else if (is_array($value)) { + $this->setMessage(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setMessage(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMessage(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_RESULT]) || isset($data[self::FIELD_RESULT_EXT])) { + if (isset($data[self::FIELD_RESULT])) { + $value = $data[self::FIELD_RESULT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) { + $ext = $data[self::FIELD_RESULT_EXT]; } else { - $this->setResult(new FHIRTestReportActionResult($data[self::FIELD_RESULT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportActionResult) { + $this->setResult($value); + } else if (is_array($value)) { + $this->setResult(new FHIRTestReportActionResult(array_merge($ext, $value))); + } else { + $this->setResult(new FHIRTestReportActionResult([FHIRTestReportActionResult::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResult(new FHIRTestReportActionResult($ext)); } } } @@ -437,25 +458,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DETAIL_EXT] = $enc; } } if (null !== ($v = $this->getMessage())) { $a[self::FIELD_MESSAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_MESSAGE_EXT] = $enc; } } if (null !== ($v = $this->getResult())) { $a[self::FIELD_RESULT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportActionResult::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportActionResult::FIELD_VALUE]); $a[self::FIELD_RESULT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php index e95f276fe0..de3a683180 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRTestReportOperation extends FHIRBackboneElement const FIELD_RESULT_EXT = '_result'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -147,52 +147,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DETAIL])) { - $ext = (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) - ? $data[self::FIELD_DETAIL_EXT] - : null; - if ($data[self::FIELD_DETAIL] instanceof FHIRUri) { - $this->setDetail($data[self::FIELD_DETAIL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DETAIL]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRUri(array_merge($ext, $data[self::FIELD_DETAIL]))); - } + if (isset($data[self::FIELD_DETAIL]) || isset($data[self::FIELD_DETAIL_EXT])) { + if (isset($data[self::FIELD_DETAIL])) { + $value = $data[self::FIELD_DETAIL]; } else { - $this->setDetail(new FHIRUri($data[self::FIELD_DETAIL])); + $value = null; } - } - if (isset($data[self::FIELD_MESSAGE])) { - $ext = (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) - ? $data[self::FIELD_MESSAGE_EXT] - : null; - if ($data[self::FIELD_MESSAGE] instanceof FHIRMarkdown) { - $this->setMessage($data[self::FIELD_MESSAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_MESSAGE]] + $ext)); - } else if (is_array($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_MESSAGE]))); - } + if (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) { + $ext = $data[self::FIELD_DETAIL_EXT]; } else { - $this->setMessage(new FHIRMarkdown($data[self::FIELD_MESSAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDetail($value); + } else if (is_array($value)) { + $this->setDetail(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDetail(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetail(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_RESULT])) { - $ext = (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) - ? $data[self::FIELD_RESULT_EXT] - : null; - if ($data[self::FIELD_RESULT] instanceof FHIRTestReportActionResult) { - $this->setResult($data[self::FIELD_RESULT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportActionResult([FHIRTestReportActionResult::FIELD_VALUE => $data[self::FIELD_RESULT]] + $ext)); - } else if (is_array($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportActionResult(array_merge($ext, $data[self::FIELD_RESULT]))); + if (isset($data[self::FIELD_MESSAGE]) || isset($data[self::FIELD_MESSAGE_EXT])) { + if (isset($data[self::FIELD_MESSAGE])) { + $value = $data[self::FIELD_MESSAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) { + $ext = $data[self::FIELD_MESSAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setMessage($value); + } else if (is_array($value)) { + $this->setMessage(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setMessage(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMessage(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_RESULT]) || isset($data[self::FIELD_RESULT_EXT])) { + if (isset($data[self::FIELD_RESULT])) { + $value = $data[self::FIELD_RESULT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) { + $ext = $data[self::FIELD_RESULT_EXT]; } else { - $this->setResult(new FHIRTestReportActionResult($data[self::FIELD_RESULT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportActionResult) { + $this->setResult($value); + } else if (is_array($value)) { + $this->setResult(new FHIRTestReportActionResult(array_merge($ext, $value))); + } else { + $this->setResult(new FHIRTestReportActionResult([FHIRTestReportActionResult::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResult(new FHIRTestReportActionResult($ext)); } } } @@ -437,25 +458,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DETAIL_EXT] = $enc; } } if (null !== ($v = $this->getMessage())) { $a[self::FIELD_MESSAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_MESSAGE_EXT] = $enc; } } if (null !== ($v = $this->getResult())) { $a[self::FIELD_RESULT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportActionResult::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportActionResult::FIELD_VALUE]); $a[self::FIELD_RESULT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php index 51a51525e7..be1e37b7ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRTestReportParticipant extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -143,52 +143,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRTestReportParticipantType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRTestReportParticipantType([FHIRTestReportParticipantType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRTestReportParticipantType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setType(new FHIRTestReportParticipantType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportParticipantType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRTestReportParticipantType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRTestReportParticipantType([FHIRTestReportParticipantType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRTestReportParticipantType($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -425,25 +446,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportParticipantType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportParticipantType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php index 72e01bbb4f..cecd94ded0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRTestReportSetup extends FHIRBackboneElement const FIELD_ACTION = 'action'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -292,7 +292,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php index bd979ab87a..a6232478e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRTestReportTeardown extends FHIRBackboneElement const FIELD_ACTION = 'action'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -292,7 +292,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php index 78dccf6f21..77f9863c8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestReportTest extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -162,36 +162,50 @@ public function __construct($data = null) $this->addAction(new FHIRTestReportAction1($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -458,22 +472,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php index 78718bd6cf..551217d571 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptAction extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server or client implementation to @@ -310,6 +310,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php index bc0cd4e704..f67c149e42 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptAction1 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server or client implementation to @@ -310,6 +310,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php index 5cea4c7801..b98bf2548b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestScriptAction2 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server or client implementation to @@ -252,6 +252,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php index 2e6828536c..d38c297a5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRTestScriptAssert extends FHIRBackboneElement const FIELD_WARNING_ONLY_EXT = '_warningOnly'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -414,356 +414,510 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { - $ext = (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT])) - ? $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] instanceof FHIRString) { - $this->setCompareToSourceExpression($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { - $this->setCompareToSourceExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { - $this->setCompareToSourceExpression(new FHIRString(array_merge($ext, $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]))); - } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]) || isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { + $value = $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT]; } else { - $this->setCompareToSourceExpression(new FHIRString($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])); - } - } - if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT])) - ? $data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_COMPARE_TO_SOURCE_ID] instanceof FHIRString) { - $this->setCompareToSourceId($data[self::FIELD_COMPARE_TO_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { - $this->setCompareToSourceId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMPARE_TO_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { - $this->setCompareToSourceId(new FHIRString(array_merge($ext, $data[self::FIELD_COMPARE_TO_SOURCE_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCompareToSourceExpression($value); + } else if (is_array($value)) { + $this->setCompareToSourceExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCompareToSourceExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCompareToSourceExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID]) || isset($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { + $value = $data[self::FIELD_COMPARE_TO_SOURCE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT]; } else { - $this->setCompareToSourceId(new FHIRString($data[self::FIELD_COMPARE_TO_SOURCE_ID])); - } - } - if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { - $ext = (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT])) - ? $data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT] - : null; - if ($data[self::FIELD_COMPARE_TO_SOURCE_PATH] instanceof FHIRString) { - $this->setCompareToSourcePath($data[self::FIELD_COMPARE_TO_SOURCE_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { - $this->setCompareToSourcePath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMPARE_TO_SOURCE_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { - $this->setCompareToSourcePath(new FHIRString(array_merge($ext, $data[self::FIELD_COMPARE_TO_SOURCE_PATH]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCompareToSourceId($value); + } else if (is_array($value)) { + $this->setCompareToSourceId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCompareToSourceId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCompareToSourceId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH]) || isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT])) { + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { + $value = $data[self::FIELD_COMPARE_TO_SOURCE_PATH]; } else { - $this->setCompareToSourcePath(new FHIRString($data[self::FIELD_COMPARE_TO_SOURCE_PATH])); - } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT])) { + $ext = $data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCompareToSourcePath($value); + } else if (is_array($value)) { + $this->setCompareToSourcePath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCompareToSourcePath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCompareToSourcePath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DIRECTION])) { - $ext = (isset($data[self::FIELD_DIRECTION_EXT]) && is_array($data[self::FIELD_DIRECTION_EXT])) - ? $data[self::FIELD_DIRECTION_EXT] - : null; - if ($data[self::FIELD_DIRECTION] instanceof FHIRAssertionDirectionType) { - $this->setDirection($data[self::FIELD_DIRECTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIRECTION])) { - $this->setDirection(new FHIRAssertionDirectionType([FHIRAssertionDirectionType::FIELD_VALUE => $data[self::FIELD_DIRECTION]] + $ext)); - } else if (is_array($data[self::FIELD_DIRECTION])) { - $this->setDirection(new FHIRAssertionDirectionType(array_merge($ext, $data[self::FIELD_DIRECTION]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DIRECTION]) || isset($data[self::FIELD_DIRECTION_EXT])) { + if (isset($data[self::FIELD_DIRECTION])) { + $value = $data[self::FIELD_DIRECTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIRECTION_EXT]) && is_array($data[self::FIELD_DIRECTION_EXT])) { + $ext = $data[self::FIELD_DIRECTION_EXT]; } else { - $this->setDirection(new FHIRAssertionDirectionType($data[self::FIELD_DIRECTION])); - } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAssertionDirectionType) { + $this->setDirection($value); + } else if (is_array($value)) { + $this->setDirection(new FHIRAssertionDirectionType(array_merge($ext, $value))); + } else { + $this->setDirection(new FHIRAssertionDirectionType([FHIRAssertionDirectionType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDirection(new FHIRAssertionDirectionType($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); - } - } - if (isset($data[self::FIELD_HEADER_FIELD])) { - $ext = (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) - ? $data[self::FIELD_HEADER_FIELD_EXT] - : null; - if ($data[self::FIELD_HEADER_FIELD] instanceof FHIRString) { - $this->setHeaderField($data[self::FIELD_HEADER_FIELD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER_FIELD]] + $ext)); - } else if (is_array($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString(array_merge($ext, $data[self::FIELD_HEADER_FIELD]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_HEADER_FIELD]) || isset($data[self::FIELD_HEADER_FIELD_EXT])) { + if (isset($data[self::FIELD_HEADER_FIELD])) { + $value = $data[self::FIELD_HEADER_FIELD]; } else { - $this->setHeaderField(new FHIRString($data[self::FIELD_HEADER_FIELD])); - } - } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); + $value = null; + } + if (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) { + $ext = $data[self::FIELD_HEADER_FIELD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHeaderField($value); + } else if (is_array($value)) { + $this->setHeaderField(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHeaderField(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); - } - } - if (isset($data[self::FIELD_MINIMUM_ID])) { - $ext = (isset($data[self::FIELD_MINIMUM_ID_EXT]) && is_array($data[self::FIELD_MINIMUM_ID_EXT])) - ? $data[self::FIELD_MINIMUM_ID_EXT] - : null; - if ($data[self::FIELD_MINIMUM_ID] instanceof FHIRString) { - $this->setMinimumId($data[self::FIELD_MINIMUM_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MINIMUM_ID])) { - $this->setMinimumId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MINIMUM_ID]] + $ext)); - } else if (is_array($data[self::FIELD_MINIMUM_ID])) { - $this->setMinimumId(new FHIRString(array_merge($ext, $data[self::FIELD_MINIMUM_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MINIMUM_ID]) || isset($data[self::FIELD_MINIMUM_ID_EXT])) { + if (isset($data[self::FIELD_MINIMUM_ID])) { + $value = $data[self::FIELD_MINIMUM_ID]; } else { - $this->setMinimumId(new FHIRString($data[self::FIELD_MINIMUM_ID])); - } - } - if (isset($data[self::FIELD_NAVIGATION_LINKS])) { - $ext = (isset($data[self::FIELD_NAVIGATION_LINKS_EXT]) && is_array($data[self::FIELD_NAVIGATION_LINKS_EXT])) - ? $data[self::FIELD_NAVIGATION_LINKS_EXT] - : null; - if ($data[self::FIELD_NAVIGATION_LINKS] instanceof FHIRBoolean) { - $this->setNavigationLinks($data[self::FIELD_NAVIGATION_LINKS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAVIGATION_LINKS])) { - $this->setNavigationLinks(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NAVIGATION_LINKS]] + $ext)); - } else if (is_array($data[self::FIELD_NAVIGATION_LINKS])) { - $this->setNavigationLinks(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NAVIGATION_LINKS]))); + $value = null; + } + if (isset($data[self::FIELD_MINIMUM_ID_EXT]) && is_array($data[self::FIELD_MINIMUM_ID_EXT])) { + $ext = $data[self::FIELD_MINIMUM_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMinimumId($value); + } else if (is_array($value)) { + $this->setMinimumId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMinimumId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinimumId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAVIGATION_LINKS]) || isset($data[self::FIELD_NAVIGATION_LINKS_EXT])) { + if (isset($data[self::FIELD_NAVIGATION_LINKS])) { + $value = $data[self::FIELD_NAVIGATION_LINKS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAVIGATION_LINKS_EXT]) && is_array($data[self::FIELD_NAVIGATION_LINKS_EXT])) { + $ext = $data[self::FIELD_NAVIGATION_LINKS_EXT]; } else { - $this->setNavigationLinks(new FHIRBoolean($data[self::FIELD_NAVIGATION_LINKS])); - } - } - if (isset($data[self::FIELD_OPERATOR])) { - $ext = (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) - ? $data[self::FIELD_OPERATOR_EXT] - : null; - if ($data[self::FIELD_OPERATOR] instanceof FHIRAssertionOperatorType) { - $this->setOperator($data[self::FIELD_OPERATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OPERATOR])) { - $this->setOperator(new FHIRAssertionOperatorType([FHIRAssertionOperatorType::FIELD_VALUE => $data[self::FIELD_OPERATOR]] + $ext)); - } else if (is_array($data[self::FIELD_OPERATOR])) { - $this->setOperator(new FHIRAssertionOperatorType(array_merge($ext, $data[self::FIELD_OPERATOR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNavigationLinks($value); + } else if (is_array($value)) { + $this->setNavigationLinks(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNavigationLinks(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNavigationLinks(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_OPERATOR]) || isset($data[self::FIELD_OPERATOR_EXT])) { + if (isset($data[self::FIELD_OPERATOR])) { + $value = $data[self::FIELD_OPERATOR]; } else { - $this->setOperator(new FHIRAssertionOperatorType($data[self::FIELD_OPERATOR])); - } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + $value = null; + } + if (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) { + $ext = $data[self::FIELD_OPERATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAssertionOperatorType) { + $this->setOperator($value); + } else if (is_array($value)) { + $this->setOperator(new FHIRAssertionOperatorType(array_merge($ext, $value))); + } else { + $this->setOperator(new FHIRAssertionOperatorType([FHIRAssertionOperatorType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOperator(new FHIRAssertionOperatorType($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); - } - } - if (isset($data[self::FIELD_REQUEST_METHOD])) { - $ext = (isset($data[self::FIELD_REQUEST_METHOD_EXT]) && is_array($data[self::FIELD_REQUEST_METHOD_EXT])) - ? $data[self::FIELD_REQUEST_METHOD_EXT] - : null; - if ($data[self::FIELD_REQUEST_METHOD] instanceof FHIRTestScriptRequestMethodCode) { - $this->setRequestMethod($data[self::FIELD_REQUEST_METHOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUEST_METHOD])) { - $this->setRequestMethod(new FHIRTestScriptRequestMethodCode([FHIRTestScriptRequestMethodCode::FIELD_VALUE => $data[self::FIELD_REQUEST_METHOD]] + $ext)); - } else if (is_array($data[self::FIELD_REQUEST_METHOD])) { - $this->setRequestMethod(new FHIRTestScriptRequestMethodCode(array_merge($ext, $data[self::FIELD_REQUEST_METHOD]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REQUEST_METHOD]) || isset($data[self::FIELD_REQUEST_METHOD_EXT])) { + if (isset($data[self::FIELD_REQUEST_METHOD])) { + $value = $data[self::FIELD_REQUEST_METHOD]; } else { - $this->setRequestMethod(new FHIRTestScriptRequestMethodCode($data[self::FIELD_REQUEST_METHOD])); - } - } - if (isset($data[self::FIELD_REQUEST_URL])) { - $ext = (isset($data[self::FIELD_REQUEST_URL_EXT]) && is_array($data[self::FIELD_REQUEST_URL_EXT])) - ? $data[self::FIELD_REQUEST_URL_EXT] - : null; - if ($data[self::FIELD_REQUEST_URL] instanceof FHIRString) { - $this->setRequestURL($data[self::FIELD_REQUEST_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUEST_URL])) { - $this->setRequestURL(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUEST_URL]] + $ext)); - } else if (is_array($data[self::FIELD_REQUEST_URL])) { - $this->setRequestURL(new FHIRString(array_merge($ext, $data[self::FIELD_REQUEST_URL]))); + $value = null; + } + if (isset($data[self::FIELD_REQUEST_METHOD_EXT]) && is_array($data[self::FIELD_REQUEST_METHOD_EXT])) { + $ext = $data[self::FIELD_REQUEST_METHOD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestScriptRequestMethodCode) { + $this->setRequestMethod($value); + } else if (is_array($value)) { + $this->setRequestMethod(new FHIRTestScriptRequestMethodCode(array_merge($ext, $value))); + } else { + $this->setRequestMethod(new FHIRTestScriptRequestMethodCode([FHIRTestScriptRequestMethodCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequestMethod(new FHIRTestScriptRequestMethodCode($ext)); + } + } + if (isset($data[self::FIELD_REQUEST_URL]) || isset($data[self::FIELD_REQUEST_URL_EXT])) { + if (isset($data[self::FIELD_REQUEST_URL])) { + $value = $data[self::FIELD_REQUEST_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUEST_URL_EXT]) && is_array($data[self::FIELD_REQUEST_URL_EXT])) { + $ext = $data[self::FIELD_REQUEST_URL_EXT]; } else { - $this->setRequestURL(new FHIRString($data[self::FIELD_REQUEST_URL])); - } - } - if (isset($data[self::FIELD_RESOURCE])) { - $ext = (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) - ? $data[self::FIELD_RESOURCE_EXT] - : null; - if ($data[self::FIELD_RESOURCE] instanceof FHIRCode) { - $this->setResource($data[self::FIELD_RESOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_RESOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCode(array_merge($ext, $data[self::FIELD_RESOURCE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequestURL($value); + } else if (is_array($value)) { + $this->setRequestURL(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequestURL(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequestURL(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RESOURCE]) || isset($data[self::FIELD_RESOURCE_EXT])) { + if (isset($data[self::FIELD_RESOURCE])) { + $value = $data[self::FIELD_RESOURCE]; } else { - $this->setResource(new FHIRCode($data[self::FIELD_RESOURCE])); - } - } - if (isset($data[self::FIELD_RESPONSE])) { - $ext = (isset($data[self::FIELD_RESPONSE_EXT]) && is_array($data[self::FIELD_RESPONSE_EXT])) - ? $data[self::FIELD_RESPONSE_EXT] - : null; - if ($data[self::FIELD_RESPONSE] instanceof FHIRAssertionResponseTypes) { - $this->setResponse($data[self::FIELD_RESPONSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE])) { - $this->setResponse(new FHIRAssertionResponseTypes([FHIRAssertionResponseTypes::FIELD_VALUE => $data[self::FIELD_RESPONSE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE])) { - $this->setResponse(new FHIRAssertionResponseTypes(array_merge($ext, $data[self::FIELD_RESPONSE]))); + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setResource($value); + } else if (is_array($value)) { + $this->setResource(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setResource(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResource(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_RESPONSE]) || isset($data[self::FIELD_RESPONSE_EXT])) { + if (isset($data[self::FIELD_RESPONSE])) { + $value = $data[self::FIELD_RESPONSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_EXT]) && is_array($data[self::FIELD_RESPONSE_EXT])) { + $ext = $data[self::FIELD_RESPONSE_EXT]; } else { - $this->setResponse(new FHIRAssertionResponseTypes($data[self::FIELD_RESPONSE])); - } - } - if (isset($data[self::FIELD_RESPONSE_CODE])) { - $ext = (isset($data[self::FIELD_RESPONSE_CODE_EXT]) && is_array($data[self::FIELD_RESPONSE_CODE_EXT])) - ? $data[self::FIELD_RESPONSE_CODE_EXT] - : null; - if ($data[self::FIELD_RESPONSE_CODE] instanceof FHIRString) { - $this->setResponseCode($data[self::FIELD_RESPONSE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE_CODE])) { - $this->setResponseCode(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESPONSE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE_CODE])) { - $this->setResponseCode(new FHIRString(array_merge($ext, $data[self::FIELD_RESPONSE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAssertionResponseTypes) { + $this->setResponse($value); + } else if (is_array($value)) { + $this->setResponse(new FHIRAssertionResponseTypes(array_merge($ext, $value))); + } else { + $this->setResponse(new FHIRAssertionResponseTypes([FHIRAssertionResponseTypes::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponse(new FHIRAssertionResponseTypes($ext)); + } + } + if (isset($data[self::FIELD_RESPONSE_CODE]) || isset($data[self::FIELD_RESPONSE_CODE_EXT])) { + if (isset($data[self::FIELD_RESPONSE_CODE])) { + $value = $data[self::FIELD_RESPONSE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_CODE_EXT]) && is_array($data[self::FIELD_RESPONSE_CODE_EXT])) { + $ext = $data[self::FIELD_RESPONSE_CODE_EXT]; } else { - $this->setResponseCode(new FHIRString($data[self::FIELD_RESPONSE_CODE])); - } - } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRId) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResponseCode($value); + } else if (is_array($value)) { + $this->setResponseCode(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResponseCode(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponseCode(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; } else { - $this->setSourceId(new FHIRId($data[self::FIELD_SOURCE_ID])); - } - } - if (isset($data[self::FIELD_VALIDATE_PROFILE_ID])) { - $ext = (isset($data[self::FIELD_VALIDATE_PROFILE_ID_EXT]) && is_array($data[self::FIELD_VALIDATE_PROFILE_ID_EXT])) - ? $data[self::FIELD_VALIDATE_PROFILE_ID_EXT] - : null; - if ($data[self::FIELD_VALIDATE_PROFILE_ID] instanceof FHIRId) { - $this->setValidateProfileId($data[self::FIELD_VALIDATE_PROFILE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALIDATE_PROFILE_ID])) { - $this->setValidateProfileId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALIDATE_PROFILE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALIDATE_PROFILE_ID])) { - $this->setValidateProfileId(new FHIRId(array_merge($ext, $data[self::FIELD_VALIDATE_PROFILE_ID]))); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_VALIDATE_PROFILE_ID]) || isset($data[self::FIELD_VALIDATE_PROFILE_ID_EXT])) { + if (isset($data[self::FIELD_VALIDATE_PROFILE_ID])) { + $value = $data[self::FIELD_VALIDATE_PROFILE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALIDATE_PROFILE_ID_EXT]) && is_array($data[self::FIELD_VALIDATE_PROFILE_ID_EXT])) { + $ext = $data[self::FIELD_VALIDATE_PROFILE_ID_EXT]; } else { - $this->setValidateProfileId(new FHIRId($data[self::FIELD_VALIDATE_PROFILE_ID])); - } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValidateProfileId($value); + } else if (is_array($value)) { + $this->setValidateProfileId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValidateProfileId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValidateProfileId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); - } - } - if (isset($data[self::FIELD_WARNING_ONLY])) { - $ext = (isset($data[self::FIELD_WARNING_ONLY_EXT]) && is_array($data[self::FIELD_WARNING_ONLY_EXT])) - ? $data[self::FIELD_WARNING_ONLY_EXT] - : null; - if ($data[self::FIELD_WARNING_ONLY] instanceof FHIRBoolean) { - $this->setWarningOnly($data[self::FIELD_WARNING_ONLY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WARNING_ONLY])) { - $this->setWarningOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WARNING_ONLY]] + $ext)); - } else if (is_array($data[self::FIELD_WARNING_ONLY])) { - $this->setWarningOnly(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WARNING_ONLY]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_WARNING_ONLY]) || isset($data[self::FIELD_WARNING_ONLY_EXT])) { + if (isset($data[self::FIELD_WARNING_ONLY])) { + $value = $data[self::FIELD_WARNING_ONLY]; } else { - $this->setWarningOnly(new FHIRBoolean($data[self::FIELD_WARNING_ONLY])); + $value = null; + } + if (isset($data[self::FIELD_WARNING_ONLY_EXT]) && is_array($data[self::FIELD_WARNING_ONLY_EXT])) { + $ext = $data[self::FIELD_WARNING_ONLY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWarningOnly($value); + } else if (is_array($value)) { + $this->setWarningOnly(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWarningOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWarningOnly(new FHIRBoolean($ext)); } } } @@ -1977,158 +2131,205 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCompareToSourceExpression())) { $a[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getCompareToSourceId())) { $a[self::FIELD_COMPARE_TO_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMPARE_TO_SOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getCompareToSourcePath())) { $a[self::FIELD_COMPARE_TO_SOURCE_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDirection())) { $a[self::FIELD_DIRECTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAssertionDirectionType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAssertionDirectionType::FIELD_VALUE]); $a[self::FIELD_DIRECTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getHeaderField())) { $a[self::FIELD_HEADER_FIELD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HEADER_FIELD_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if (null !== ($v = $this->getMinimumId())) { $a[self::FIELD_MINIMUM_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MINIMUM_ID_EXT] = $enc; } } if (null !== ($v = $this->getNavigationLinks())) { $a[self::FIELD_NAVIGATION_LINKS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NAVIGATION_LINKS_EXT] = $enc; } } if (null !== ($v = $this->getOperator())) { $a[self::FIELD_OPERATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAssertionOperatorType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAssertionOperatorType::FIELD_VALUE]); $a[self::FIELD_OPERATOR_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getRequestMethod())) { $a[self::FIELD_REQUEST_METHOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestScriptRequestMethodCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestScriptRequestMethodCode::FIELD_VALUE]); $a[self::FIELD_REQUEST_METHOD_EXT] = $enc; } } if (null !== ($v = $this->getRequestURL())) { $a[self::FIELD_REQUEST_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUEST_URL_EXT] = $enc; } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_RESOURCE_EXT] = $enc; } } if (null !== ($v = $this->getResponse())) { $a[self::FIELD_RESPONSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAssertionResponseTypes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAssertionResponseTypes::FIELD_VALUE]); $a[self::FIELD_RESPONSE_EXT] = $enc; } } if (null !== ($v = $this->getResponseCode())) { $a[self::FIELD_RESPONSE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESPONSE_CODE_EXT] = $enc; } } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getValidateProfileId())) { $a[self::FIELD_VALIDATE_PROFILE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALIDATE_PROFILE_ID_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } if (null !== ($v = $this->getWarningOnly())) { $a[self::FIELD_WARNING_ONLY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WARNING_ONLY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php index 607d9f8dce..39712a0738 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRTestScriptCapability extends FHIRBackboneElement const FIELD_VALIDATED_EXT = '_validated'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a reference to a canonical URL on a FHIR resource @@ -204,142 +204,195 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CAPABILITIES])) { - $ext = (isset($data[self::FIELD_CAPABILITIES_EXT]) && is_array($data[self::FIELD_CAPABILITIES_EXT])) - ? $data[self::FIELD_CAPABILITIES_EXT] - : null; - if ($data[self::FIELD_CAPABILITIES] instanceof FHIRCanonical) { - $this->setCapabilities($data[self::FIELD_CAPABILITIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CAPABILITIES])) { - $this->setCapabilities(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_CAPABILITIES]] + $ext)); - } else if (is_array($data[self::FIELD_CAPABILITIES])) { - $this->setCapabilities(new FHIRCanonical(array_merge($ext, $data[self::FIELD_CAPABILITIES]))); - } + if (isset($data[self::FIELD_CAPABILITIES]) || isset($data[self::FIELD_CAPABILITIES_EXT])) { + if (isset($data[self::FIELD_CAPABILITIES])) { + $value = $data[self::FIELD_CAPABILITIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CAPABILITIES_EXT]) && is_array($data[self::FIELD_CAPABILITIES_EXT])) { + $ext = $data[self::FIELD_CAPABILITIES_EXT]; } else { - $this->setCapabilities(new FHIRCanonical($data[self::FIELD_CAPABILITIES])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setCapabilities($value); + } else if (is_array($value)) { + $this->setCapabilities(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setCapabilities(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCapabilities(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DESTINATION])) { - $ext = (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) - ? $data[self::FIELD_DESTINATION_EXT] - : null; - if ($data[self::FIELD_DESTINATION] instanceof FHIRInteger) { - $this->setDestination($data[self::FIELD_DESTINATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DESTINATION]] + $ext)); - } else if (is_array($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger(array_merge($ext, $data[self::FIELD_DESTINATION]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESTINATION]) || isset($data[self::FIELD_DESTINATION_EXT])) { + if (isset($data[self::FIELD_DESTINATION])) { + $value = $data[self::FIELD_DESTINATION]; } else { - $this->setDestination(new FHIRInteger($data[self::FIELD_DESTINATION])); + $value = null; + } + if (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) { + $ext = $data[self::FIELD_DESTINATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDestination($value); + } else if (is_array($value)) { + $this->setDestination(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDestination(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_LINK])) { - $ext = (isset($data[self::FIELD_LINK_EXT]) && is_array($data[self::FIELD_LINK_EXT])) - ? $data[self::FIELD_LINK_EXT] - : null; - if (is_array($data[self::FIELD_LINK])) { - foreach($data[self::FIELD_LINK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addLink($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLink(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINK]) || isset($data[self::FIELD_LINK_EXT])) { + if (isset($data[self::FIELD_LINK])) { + $value = $data[self::FIELD_LINK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_EXT]) && is_array($data[self::FIELD_LINK_EXT])) { + $ext = $data[self::FIELD_LINK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addLink($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addLink($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLink(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLink(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addLink(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLink(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_LINK] instanceof FHIRUri) { - $this->addLink($data[self::FIELD_LINK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINK])) { - $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_LINK]] + $ext)); - } else { - $this->addLink(new FHIRUri($data[self::FIELD_LINK])); } } - if (isset($data[self::FIELD_ORIGIN])) { - $ext = (isset($data[self::FIELD_ORIGIN_EXT]) && is_array($data[self::FIELD_ORIGIN_EXT])) - ? $data[self::FIELD_ORIGIN_EXT] - : null; - if (is_array($data[self::FIELD_ORIGIN])) { - foreach($data[self::FIELD_ORIGIN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRInteger) { - $this->addOrigin($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addOrigin(new FHIRInteger(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ORIGIN]) || isset($data[self::FIELD_ORIGIN_EXT])) { + if (isset($data[self::FIELD_ORIGIN])) { + $value = $data[self::FIELD_ORIGIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ORIGIN_EXT]) && is_array($data[self::FIELD_ORIGIN_EXT])) { + $ext = $data[self::FIELD_ORIGIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->addOrigin($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRInteger) { + $this->addOrigin($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addOrigin(new FHIRInteger(array_merge($v, $iext))); + } else { + $this->addOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addOrigin(new FHIRInteger($v)); } + } elseif (is_array($value)) { + $this->addOrigin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->addOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_ORIGIN] instanceof FHIRInteger) { - $this->addOrigin($data[self::FIELD_ORIGIN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ORIGIN])) { - $this->addOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_ORIGIN]] + $ext)); - } else { - $this->addOrigin(new FHIRInteger($data[self::FIELD_ORIGIN])); - } - } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRBoolean) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUIRED]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addOrigin(new FHIRInteger($iext)); } + } + } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; } else { - $this->setRequired(new FHIRBoolean($data[self::FIELD_REQUIRED])); - } - } - if (isset($data[self::FIELD_VALIDATED])) { - $ext = (isset($data[self::FIELD_VALIDATED_EXT]) && is_array($data[self::FIELD_VALIDATED_EXT])) - ? $data[self::FIELD_VALIDATED_EXT] - : null; - if ($data[self::FIELD_VALIDATED] instanceof FHIRBoolean) { - $this->setValidated($data[self::FIELD_VALIDATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALIDATED])) { - $this->setValidated(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALIDATED]] + $ext)); - } else if (is_array($data[self::FIELD_VALIDATED])) { - $this->setValidated(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALIDATED]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALIDATED]) || isset($data[self::FIELD_VALIDATED_EXT])) { + if (isset($data[self::FIELD_VALIDATED])) { + $value = $data[self::FIELD_VALIDATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALIDATED_EXT]) && is_array($data[self::FIELD_VALIDATED_EXT])) { + $ext = $data[self::FIELD_VALIDATED_EXT]; } else { - $this->setValidated(new FHIRBoolean($data[self::FIELD_VALIDATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValidated($value); + } else if (is_array($value)) { + $this->setValidated(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValidated(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValidated(new FHIRBoolean($ext)); } } } @@ -863,69 +916,98 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCapabilities())) { $a[self::FIELD_CAPABILITIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_CAPABILITIES_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDestination())) { $a[self::FIELD_DESTINATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DESTINATION_EXT] = $enc; } } if ([] !== ($vs = $this->getLink())) { $a[self::FIELD_LINK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINK_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINK_EXT] = $encs; + } } if ([] !== ($vs = $this->getOrigin())) { $a[self::FIELD_ORIGIN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ORIGIN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ORIGIN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRInteger::FIELD_VALUE]) || array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ORIGIN_EXT][] = null; + unset($enc[FHIRInteger::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ORIGIN_EXT] = $encs; + } } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getValidated())) { $a[self::FIELD_VALIDATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALIDATED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php index 44149e107b..31885315b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptDestination extends FHIRBackboneElement const FIELD_PROFILE = 'profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INDEX])) { - $ext = (isset($data[self::FIELD_INDEX_EXT]) && is_array($data[self::FIELD_INDEX_EXT])) - ? $data[self::FIELD_INDEX_EXT] - : null; - if ($data[self::FIELD_INDEX] instanceof FHIRInteger) { - $this->setIndex($data[self::FIELD_INDEX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INDEX])) { - $this->setIndex(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_INDEX]] + $ext)); - } else if (is_array($data[self::FIELD_INDEX])) { - $this->setIndex(new FHIRInteger(array_merge($ext, $data[self::FIELD_INDEX]))); - } + if (isset($data[self::FIELD_INDEX]) || isset($data[self::FIELD_INDEX_EXT])) { + if (isset($data[self::FIELD_INDEX])) { + $value = $data[self::FIELD_INDEX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INDEX_EXT]) && is_array($data[self::FIELD_INDEX_EXT])) { + $ext = $data[self::FIELD_INDEX_EXT]; } else { - $this->setIndex(new FHIRInteger($data[self::FIELD_INDEX])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setIndex($value); + } else if (is_array($value)) { + $this->setIndex(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setIndex(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIndex(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -340,14 +347,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIndex())) { $a[self::FIELD_INDEX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_INDEX_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php index f26df1fe47..bbe2ff20b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRTestScriptFixture extends FHIRBackboneElement const FIELD_RESOURCE = 'resource'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -148,36 +148,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTOCREATE])) { - $ext = (isset($data[self::FIELD_AUTOCREATE_EXT]) && is_array($data[self::FIELD_AUTOCREATE_EXT])) - ? $data[self::FIELD_AUTOCREATE_EXT] - : null; - if ($data[self::FIELD_AUTOCREATE] instanceof FHIRBoolean) { - $this->setAutocreate($data[self::FIELD_AUTOCREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTOCREATE])) { - $this->setAutocreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AUTOCREATE]] + $ext)); - } else if (is_array($data[self::FIELD_AUTOCREATE])) { - $this->setAutocreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AUTOCREATE]))); - } + if (isset($data[self::FIELD_AUTOCREATE]) || isset($data[self::FIELD_AUTOCREATE_EXT])) { + if (isset($data[self::FIELD_AUTOCREATE])) { + $value = $data[self::FIELD_AUTOCREATE]; } else { - $this->setAutocreate(new FHIRBoolean($data[self::FIELD_AUTOCREATE])); + $value = null; } - } - if (isset($data[self::FIELD_AUTODELETE])) { - $ext = (isset($data[self::FIELD_AUTODELETE_EXT]) && is_array($data[self::FIELD_AUTODELETE_EXT])) - ? $data[self::FIELD_AUTODELETE_EXT] - : null; - if ($data[self::FIELD_AUTODELETE] instanceof FHIRBoolean) { - $this->setAutodelete($data[self::FIELD_AUTODELETE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTODELETE])) { - $this->setAutodelete(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AUTODELETE]] + $ext)); - } else if (is_array($data[self::FIELD_AUTODELETE])) { - $this->setAutodelete(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AUTODELETE]))); + if (isset($data[self::FIELD_AUTOCREATE_EXT]) && is_array($data[self::FIELD_AUTOCREATE_EXT])) { + $ext = $data[self::FIELD_AUTOCREATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAutocreate($value); + } else if (is_array($value)) { + $this->setAutocreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAutocreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAutocreate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_AUTODELETE]) || isset($data[self::FIELD_AUTODELETE_EXT])) { + if (isset($data[self::FIELD_AUTODELETE])) { + $value = $data[self::FIELD_AUTODELETE]; } else { - $this->setAutodelete(new FHIRBoolean($data[self::FIELD_AUTODELETE])); + $value = null; + } + if (isset($data[self::FIELD_AUTODELETE_EXT]) && is_array($data[self::FIELD_AUTODELETE_EXT])) { + $ext = $data[self::FIELD_AUTODELETE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAutodelete($value); + } else if (is_array($value)) { + $this->setAutodelete(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAutodelete(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAutodelete(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -433,21 +447,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAutocreate())) { $a[self::FIELD_AUTOCREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AUTOCREATE_EXT] = $enc; } } if (null !== ($v = $this->getAutodelete())) { $a[self::FIELD_AUTODELETE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AUTODELETE_EXT] = $enc; } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php index ca59df3942..7b42ba2f12 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRTestScriptLink extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -363,18 +377,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php index 2f2d74a599..2d7dd78def 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptMetadata extends FHIRBackboneElement const FIELD_LINK = 'link'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server or client implementation to @@ -396,10 +396,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCapability())) { - $a[self::FIELD_CAPABILITY] = $vs; + $a[self::FIELD_CAPABILITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CAPABILITY][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php index dd124e9d0e..75e5f81d51 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRTestScriptOperation extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -348,148 +348,211 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACCEPT])) { - $ext = (isset($data[self::FIELD_ACCEPT_EXT]) && is_array($data[self::FIELD_ACCEPT_EXT])) - ? $data[self::FIELD_ACCEPT_EXT] - : null; - if ($data[self::FIELD_ACCEPT] instanceof FHIRCode) { - $this->setAccept($data[self::FIELD_ACCEPT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACCEPT])) { - $this->setAccept(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_ACCEPT]] + $ext)); - } else if (is_array($data[self::FIELD_ACCEPT])) { - $this->setAccept(new FHIRCode(array_merge($ext, $data[self::FIELD_ACCEPT]))); - } + if (isset($data[self::FIELD_ACCEPT]) || isset($data[self::FIELD_ACCEPT_EXT])) { + if (isset($data[self::FIELD_ACCEPT])) { + $value = $data[self::FIELD_ACCEPT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACCEPT_EXT]) && is_array($data[self::FIELD_ACCEPT_EXT])) { + $ext = $data[self::FIELD_ACCEPT_EXT]; } else { - $this->setAccept(new FHIRCode($data[self::FIELD_ACCEPT])); - } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setAccept($value); + } else if (is_array($value)) { + $this->setAccept(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setAccept(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAccept(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DESTINATION])) { - $ext = (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) - ? $data[self::FIELD_DESTINATION_EXT] - : null; - if ($data[self::FIELD_DESTINATION] instanceof FHIRInteger) { - $this->setDestination($data[self::FIELD_DESTINATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DESTINATION]] + $ext)); - } else if (is_array($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger(array_merge($ext, $data[self::FIELD_DESTINATION]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESTINATION]) || isset($data[self::FIELD_DESTINATION_EXT])) { + if (isset($data[self::FIELD_DESTINATION])) { + $value = $data[self::FIELD_DESTINATION]; } else { - $this->setDestination(new FHIRInteger($data[self::FIELD_DESTINATION])); - } - } - if (isset($data[self::FIELD_ENCODE_REQUEST_URL])) { - $ext = (isset($data[self::FIELD_ENCODE_REQUEST_URL_EXT]) && is_array($data[self::FIELD_ENCODE_REQUEST_URL_EXT])) - ? $data[self::FIELD_ENCODE_REQUEST_URL_EXT] - : null; - if ($data[self::FIELD_ENCODE_REQUEST_URL] instanceof FHIRBoolean) { - $this->setEncodeRequestUrl($data[self::FIELD_ENCODE_REQUEST_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENCODE_REQUEST_URL])) { - $this->setEncodeRequestUrl(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ENCODE_REQUEST_URL]] + $ext)); - } else if (is_array($data[self::FIELD_ENCODE_REQUEST_URL])) { - $this->setEncodeRequestUrl(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ENCODE_REQUEST_URL]))); + $value = null; + } + if (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) { + $ext = $data[self::FIELD_DESTINATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDestination($value); + } else if (is_array($value)) { + $this->setDestination(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDestination(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_ENCODE_REQUEST_URL]) || isset($data[self::FIELD_ENCODE_REQUEST_URL_EXT])) { + if (isset($data[self::FIELD_ENCODE_REQUEST_URL])) { + $value = $data[self::FIELD_ENCODE_REQUEST_URL]; } else { - $this->setEncodeRequestUrl(new FHIRBoolean($data[self::FIELD_ENCODE_REQUEST_URL])); - } - } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); + $value = null; + } + if (isset($data[self::FIELD_ENCODE_REQUEST_URL_EXT]) && is_array($data[self::FIELD_ENCODE_REQUEST_URL_EXT])) { + $ext = $data[self::FIELD_ENCODE_REQUEST_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setEncodeRequestUrl($value); + } else if (is_array($value)) { + $this->setEncodeRequestUrl(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setEncodeRequestUrl(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEncodeRequestUrl(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); - } - } - if (isset($data[self::FIELD_METHOD])) { - $ext = (isset($data[self::FIELD_METHOD_EXT]) && is_array($data[self::FIELD_METHOD_EXT])) - ? $data[self::FIELD_METHOD_EXT] - : null; - if ($data[self::FIELD_METHOD] instanceof FHIRTestScriptRequestMethodCode) { - $this->setMethod($data[self::FIELD_METHOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_METHOD])) { - $this->setMethod(new FHIRTestScriptRequestMethodCode([FHIRTestScriptRequestMethodCode::FIELD_VALUE => $data[self::FIELD_METHOD]] + $ext)); - } else if (is_array($data[self::FIELD_METHOD])) { - $this->setMethod(new FHIRTestScriptRequestMethodCode(array_merge($ext, $data[self::FIELD_METHOD]))); + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_METHOD]) || isset($data[self::FIELD_METHOD_EXT])) { + if (isset($data[self::FIELD_METHOD])) { + $value = $data[self::FIELD_METHOD]; } else { - $this->setMethod(new FHIRTestScriptRequestMethodCode($data[self::FIELD_METHOD])); - } - } - if (isset($data[self::FIELD_ORIGIN])) { - $ext = (isset($data[self::FIELD_ORIGIN_EXT]) && is_array($data[self::FIELD_ORIGIN_EXT])) - ? $data[self::FIELD_ORIGIN_EXT] - : null; - if ($data[self::FIELD_ORIGIN] instanceof FHIRInteger) { - $this->setOrigin($data[self::FIELD_ORIGIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORIGIN])) { - $this->setOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_ORIGIN]] + $ext)); - } else if (is_array($data[self::FIELD_ORIGIN])) { - $this->setOrigin(new FHIRInteger(array_merge($ext, $data[self::FIELD_ORIGIN]))); + $value = null; + } + if (isset($data[self::FIELD_METHOD_EXT]) && is_array($data[self::FIELD_METHOD_EXT])) { + $ext = $data[self::FIELD_METHOD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestScriptRequestMethodCode) { + $this->setMethod($value); + } else if (is_array($value)) { + $this->setMethod(new FHIRTestScriptRequestMethodCode(array_merge($ext, $value))); + } else { + $this->setMethod(new FHIRTestScriptRequestMethodCode([FHIRTestScriptRequestMethodCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMethod(new FHIRTestScriptRequestMethodCode($ext)); + } + } + if (isset($data[self::FIELD_ORIGIN]) || isset($data[self::FIELD_ORIGIN_EXT])) { + if (isset($data[self::FIELD_ORIGIN])) { + $value = $data[self::FIELD_ORIGIN]; } else { - $this->setOrigin(new FHIRInteger($data[self::FIELD_ORIGIN])); - } - } - if (isset($data[self::FIELD_PARAMS])) { - $ext = (isset($data[self::FIELD_PARAMS_EXT]) && is_array($data[self::FIELD_PARAMS_EXT])) - ? $data[self::FIELD_PARAMS_EXT] - : null; - if ($data[self::FIELD_PARAMS] instanceof FHIRString) { - $this->setParams($data[self::FIELD_PARAMS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARAMS])) { - $this->setParams(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARAMS]] + $ext)); - } else if (is_array($data[self::FIELD_PARAMS])) { - $this->setParams(new FHIRString(array_merge($ext, $data[self::FIELD_PARAMS]))); + $value = null; + } + if (isset($data[self::FIELD_ORIGIN_EXT]) && is_array($data[self::FIELD_ORIGIN_EXT])) { + $ext = $data[self::FIELD_ORIGIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setOrigin($value); + } else if (is_array($value)) { + $this->setOrigin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOrigin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_PARAMS]) || isset($data[self::FIELD_PARAMS_EXT])) { + if (isset($data[self::FIELD_PARAMS])) { + $value = $data[self::FIELD_PARAMS]; } else { - $this->setParams(new FHIRString($data[self::FIELD_PARAMS])); + $value = null; + } + if (isset($data[self::FIELD_PARAMS_EXT]) && is_array($data[self::FIELD_PARAMS_EXT])) { + $ext = $data[self::FIELD_PARAMS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setParams($value); + } else if (is_array($value)) { + $this->setParams(new FHIRString(array_merge($ext, $value))); + } else { + $this->setParams(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParams(new FHIRString($ext)); } } if (isset($data[self::FIELD_REQUEST_HEADER])) { @@ -510,84 +573,119 @@ public function __construct($data = null) $this->addRequestHeader(new FHIRTestScriptRequestHeader($data[self::FIELD_REQUEST_HEADER])); } } - if (isset($data[self::FIELD_REQUEST_ID])) { - $ext = (isset($data[self::FIELD_REQUEST_ID_EXT]) && is_array($data[self::FIELD_REQUEST_ID_EXT])) - ? $data[self::FIELD_REQUEST_ID_EXT] - : null; - if ($data[self::FIELD_REQUEST_ID] instanceof FHIRId) { - $this->setRequestId($data[self::FIELD_REQUEST_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUEST_ID])) { - $this->setRequestId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_REQUEST_ID]] + $ext)); - } else if (is_array($data[self::FIELD_REQUEST_ID])) { - $this->setRequestId(new FHIRId(array_merge($ext, $data[self::FIELD_REQUEST_ID]))); - } + if (isset($data[self::FIELD_REQUEST_ID]) || isset($data[self::FIELD_REQUEST_ID_EXT])) { + if (isset($data[self::FIELD_REQUEST_ID])) { + $value = $data[self::FIELD_REQUEST_ID]; } else { - $this->setRequestId(new FHIRId($data[self::FIELD_REQUEST_ID])); - } - } - if (isset($data[self::FIELD_RESOURCE])) { - $ext = (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) - ? $data[self::FIELD_RESOURCE_EXT] - : null; - if ($data[self::FIELD_RESOURCE] instanceof FHIRCode) { - $this->setResource($data[self::FIELD_RESOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_RESOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCode(array_merge($ext, $data[self::FIELD_RESOURCE]))); + $value = null; + } + if (isset($data[self::FIELD_REQUEST_ID_EXT]) && is_array($data[self::FIELD_REQUEST_ID_EXT])) { + $ext = $data[self::FIELD_REQUEST_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setRequestId($value); + } else if (is_array($value)) { + $this->setRequestId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setRequestId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequestId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_RESOURCE]) || isset($data[self::FIELD_RESOURCE_EXT])) { + if (isset($data[self::FIELD_RESOURCE])) { + $value = $data[self::FIELD_RESOURCE]; } else { - $this->setResource(new FHIRCode($data[self::FIELD_RESOURCE])); - } - } - if (isset($data[self::FIELD_RESPONSE_ID])) { - $ext = (isset($data[self::FIELD_RESPONSE_ID_EXT]) && is_array($data[self::FIELD_RESPONSE_ID_EXT])) - ? $data[self::FIELD_RESPONSE_ID_EXT] - : null; - if ($data[self::FIELD_RESPONSE_ID] instanceof FHIRId) { - $this->setResponseId($data[self::FIELD_RESPONSE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE_ID])) { - $this->setResponseId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_RESPONSE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE_ID])) { - $this->setResponseId(new FHIRId(array_merge($ext, $data[self::FIELD_RESPONSE_ID]))); + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setResource($value); + } else if (is_array($value)) { + $this->setResource(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setResource(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResource(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_RESPONSE_ID]) || isset($data[self::FIELD_RESPONSE_ID_EXT])) { + if (isset($data[self::FIELD_RESPONSE_ID])) { + $value = $data[self::FIELD_RESPONSE_ID]; } else { - $this->setResponseId(new FHIRId($data[self::FIELD_RESPONSE_ID])); - } - } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRId) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_ID_EXT]) && is_array($data[self::FIELD_RESPONSE_ID_EXT])) { + $ext = $data[self::FIELD_RESPONSE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setResponseId($value); + } else if (is_array($value)) { + $this->setResponseId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setResponseId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponseId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; } else { - $this->setSourceId(new FHIRId($data[self::FIELD_SOURCE_ID])); - } - } - if (isset($data[self::FIELD_TARGET_ID])) { - $ext = (isset($data[self::FIELD_TARGET_ID_EXT]) && is_array($data[self::FIELD_TARGET_ID_EXT])) - ? $data[self::FIELD_TARGET_ID_EXT] - : null; - if ($data[self::FIELD_TARGET_ID] instanceof FHIRId) { - $this->setTargetId($data[self::FIELD_TARGET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_ID])) { - $this->setTargetId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_TARGET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_ID])) { - $this->setTargetId(new FHIRId(array_merge($ext, $data[self::FIELD_TARGET_ID]))); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_TARGET_ID]) || isset($data[self::FIELD_TARGET_ID_EXT])) { + if (isset($data[self::FIELD_TARGET_ID])) { + $value = $data[self::FIELD_TARGET_ID]; } else { - $this->setTargetId(new FHIRId($data[self::FIELD_TARGET_ID])); + $value = null; + } + if (isset($data[self::FIELD_TARGET_ID_EXT]) && is_array($data[self::FIELD_TARGET_ID_EXT])) { + $ext = $data[self::FIELD_TARGET_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setTargetId($value); + } else if (is_array($value)) { + $this->setTargetId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setTargetId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTargetId(new FHIRId($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -597,20 +695,27 @@ public function __construct($data = null) $this->setType(new FHIRCoding($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRString) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRString(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRString($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRString($ext)); } } } @@ -1615,102 +1720,136 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAccept())) { $a[self::FIELD_ACCEPT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_ACCEPT_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDestination())) { $a[self::FIELD_DESTINATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DESTINATION_EXT] = $enc; } } if (null !== ($v = $this->getEncodeRequestUrl())) { $a[self::FIELD_ENCODE_REQUEST_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ENCODE_REQUEST_URL_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if (null !== ($v = $this->getMethod())) { $a[self::FIELD_METHOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestScriptRequestMethodCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestScriptRequestMethodCode::FIELD_VALUE]); $a[self::FIELD_METHOD_EXT] = $enc; } } if (null !== ($v = $this->getOrigin())) { $a[self::FIELD_ORIGIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_ORIGIN_EXT] = $enc; } } if (null !== ($v = $this->getParams())) { $a[self::FIELD_PARAMS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PARAMS_EXT] = $enc; } } if ([] !== ($vs = $this->getRequestHeader())) { - $a[self::FIELD_REQUEST_HEADER] = $vs; + $a[self::FIELD_REQUEST_HEADER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUEST_HEADER][] = $v; + } } if (null !== ($v = $this->getRequestId())) { $a[self::FIELD_REQUEST_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_REQUEST_ID_EXT] = $enc; } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_RESOURCE_EXT] = $enc; } } if (null !== ($v = $this->getResponseId())) { $a[self::FIELD_RESPONSE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_RESPONSE_ID_EXT] = $enc; } } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getTargetId())) { $a[self::FIELD_TARGET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_TARGET_ID_EXT] = $enc; } } @@ -1719,11 +1858,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php index e8ac76cd08..3c208db6c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptOrigin extends FHIRBackboneElement const FIELD_PROFILE = 'profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INDEX])) { - $ext = (isset($data[self::FIELD_INDEX_EXT]) && is_array($data[self::FIELD_INDEX_EXT])) - ? $data[self::FIELD_INDEX_EXT] - : null; - if ($data[self::FIELD_INDEX] instanceof FHIRInteger) { - $this->setIndex($data[self::FIELD_INDEX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INDEX])) { - $this->setIndex(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_INDEX]] + $ext)); - } else if (is_array($data[self::FIELD_INDEX])) { - $this->setIndex(new FHIRInteger(array_merge($ext, $data[self::FIELD_INDEX]))); - } + if (isset($data[self::FIELD_INDEX]) || isset($data[self::FIELD_INDEX_EXT])) { + if (isset($data[self::FIELD_INDEX])) { + $value = $data[self::FIELD_INDEX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INDEX_EXT]) && is_array($data[self::FIELD_INDEX_EXT])) { + $ext = $data[self::FIELD_INDEX_EXT]; } else { - $this->setIndex(new FHIRInteger($data[self::FIELD_INDEX])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setIndex($value); + } else if (is_array($value)) { + $this->setIndex(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setIndex(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIndex(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -340,14 +347,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIndex())) { $a[self::FIELD_INDEX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_INDEX_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php index 8ef5bb9abe..760bf123b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptRequestHeader extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,36 +130,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FIELD])) { - $ext = (isset($data[self::FIELD_FIELD_EXT]) && is_array($data[self::FIELD_FIELD_EXT])) - ? $data[self::FIELD_FIELD_EXT] - : null; - if ($data[self::FIELD_FIELD] instanceof FHIRString) { - $this->setField($data[self::FIELD_FIELD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIELD])) { - $this->setField(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FIELD]] + $ext)); - } else if (is_array($data[self::FIELD_FIELD])) { - $this->setField(new FHIRString(array_merge($ext, $data[self::FIELD_FIELD]))); - } + if (isset($data[self::FIELD_FIELD]) || isset($data[self::FIELD_FIELD_EXT])) { + if (isset($data[self::FIELD_FIELD])) { + $value = $data[self::FIELD_FIELD]; } else { - $this->setField(new FHIRString($data[self::FIELD_FIELD])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_FIELD_EXT]) && is_array($data[self::FIELD_FIELD_EXT])) { + $ext = $data[self::FIELD_FIELD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setField($value); + } else if (is_array($value)) { + $this->setField(new FHIRString(array_merge($ext, $value))); + } else { + $this->setField(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setField(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -363,18 +377,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getField())) { $a[self::FIELD_FIELD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FIELD_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php index cb2e20ffae..3390ff6c42 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestScriptSetup extends FHIRBackboneElement const FIELD_ACTION = 'action'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server or client implementation to @@ -297,7 +297,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php index 760765539b..51d32372df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestScriptTeardown extends FHIRBackboneElement const FIELD_ACTION = 'action'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server or client implementation to @@ -297,7 +297,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php index 035f6096bd..f58f10650c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRTestScriptTest extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server or client implementation to @@ -164,36 +164,50 @@ public function __construct($data = null) $this->addAction(new FHIRTestScriptAction1($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -463,22 +477,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php index e6fd1c8409..0c07294e9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRTestScriptVariable extends FHIRBackboneElement const FIELD_SOURCE_ID_EXT = '_sourceId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -217,132 +217,188 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFAULT_VALUE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE] instanceof FHIRString) { - $this->setDefaultValue($data[self::FIELD_DEFAULT_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE])) { - $this->setDefaultValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE])) { - $this->setDefaultValue(new FHIRString(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE]) || isset($data[self::FIELD_DEFAULT_VALUE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE])) { + $value = $data[self::FIELD_DEFAULT_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_EXT]; } else { - $this->setDefaultValue(new FHIRString($data[self::FIELD_DEFAULT_VALUE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefaultValue($value); + } else if (is_array($value)) { + $this->setDefaultValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefaultValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValue(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); - } - } - if (isset($data[self::FIELD_HEADER_FIELD])) { - $ext = (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) - ? $data[self::FIELD_HEADER_FIELD_EXT] - : null; - if ($data[self::FIELD_HEADER_FIELD] instanceof FHIRString) { - $this->setHeaderField($data[self::FIELD_HEADER_FIELD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER_FIELD]] + $ext)); - } else if (is_array($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString(array_merge($ext, $data[self::FIELD_HEADER_FIELD]))); + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_HEADER_FIELD]) || isset($data[self::FIELD_HEADER_FIELD_EXT])) { + if (isset($data[self::FIELD_HEADER_FIELD])) { + $value = $data[self::FIELD_HEADER_FIELD]; } else { - $this->setHeaderField(new FHIRString($data[self::FIELD_HEADER_FIELD])); - } - } - if (isset($data[self::FIELD_HINT])) { - $ext = (isset($data[self::FIELD_HINT_EXT]) && is_array($data[self::FIELD_HINT_EXT])) - ? $data[self::FIELD_HINT_EXT] - : null; - if ($data[self::FIELD_HINT] instanceof FHIRString) { - $this->setHint($data[self::FIELD_HINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HINT])) { - $this->setHint(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HINT]] + $ext)); - } else if (is_array($data[self::FIELD_HINT])) { - $this->setHint(new FHIRString(array_merge($ext, $data[self::FIELD_HINT]))); + $value = null; + } + if (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) { + $ext = $data[self::FIELD_HEADER_FIELD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHeaderField($value); + } else if (is_array($value)) { + $this->setHeaderField(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHeaderField(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_HINT]) || isset($data[self::FIELD_HINT_EXT])) { + if (isset($data[self::FIELD_HINT])) { + $value = $data[self::FIELD_HINT]; } else { - $this->setHint(new FHIRString($data[self::FIELD_HINT])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_HINT_EXT]) && is_array($data[self::FIELD_HINT_EXT])) { + $ext = $data[self::FIELD_HINT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHint($value); + } else if (is_array($value)) { + $this->setHint(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHint(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHint(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); - } - } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRId) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; } else { - $this->setSourceId(new FHIRId($data[self::FIELD_SOURCE_ID])); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRId($ext)); } } } @@ -873,60 +929,79 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefaultValue())) { $a[self::FIELD_DEFAULT_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getHeaderField())) { $a[self::FIELD_HEADER_FIELD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HEADER_FIELD_EXT] = $enc; } } if (null !== ($v = $this->getHint())) { $a[self::FIELD_HINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming.php index 4208aa1900..28f2c44b55 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRTiming extends FHIRBackboneElement const FIELD_REPEAT = 'repeat'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -168,33 +168,42 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_EVENT])) { - $ext = (isset($data[self::FIELD_EVENT_EXT]) && is_array($data[self::FIELD_EVENT_EXT])) - ? $data[self::FIELD_EVENT_EXT] - : null; - if (is_array($data[self::FIELD_EVENT])) { - foreach($data[self::FIELD_EVENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDateTime) { - $this->addEvent($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addEvent(new FHIRDateTime(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_EVENT]) || isset($data[self::FIELD_EVENT_EXT])) { + if (isset($data[self::FIELD_EVENT])) { + $value = $data[self::FIELD_EVENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EVENT_EXT]) && is_array($data[self::FIELD_EVENT_EXT])) { + $ext = $data[self::FIELD_EVENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->addEvent($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDateTime) { + $this->addEvent($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addEvent(new FHIRDateTime(array_merge($v, $iext))); + } else { + $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addEvent(new FHIRDateTime($v)); } + } elseif (is_array($value)) { + $this->addEvent(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addEvent(new FHIRDateTime($iext)); } - } elseif ($data[self::FIELD_EVENT] instanceof FHIRDateTime) { - $this->addEvent($data[self::FIELD_EVENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_EVENT])) { - $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EVENT]] + $ext)); - } else { - $this->addEvent(new FHIRDateTime($data[self::FIELD_EVENT])); } } if (isset($data[self::FIELD_REPEAT])) { @@ -481,22 +490,33 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getEvent())) { $a[self::FIELD_EVENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_EVENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_EVENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDateTime::FIELD_VALUE]) || array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_EVENT_EXT][] = null; + unset($enc[FHIRDateTime::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_EVENT_EXT] = $encs; + } } if (null !== ($v = $this->getRepeat())) { $a[self::FIELD_REPEAT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeat.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeat.php index be9143a395..1c3f3ba140 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRTimingRepeat extends FHIRBackboneElement const FIELD_WHEN_EXT = '_when'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A length of time. @@ -380,267 +380,371 @@ public function __construct($data = null) $this->setBoundsRange(new FHIRRange($data[self::FIELD_BOUNDS_RANGE])); } } - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRPositiveInt) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; } else { - $this->setCount(new FHIRPositiveInt($data[self::FIELD_COUNT])); - } - } - if (isset($data[self::FIELD_COUNT_MAX])) { - $ext = (isset($data[self::FIELD_COUNT_MAX_EXT]) && is_array($data[self::FIELD_COUNT_MAX_EXT])) - ? $data[self::FIELD_COUNT_MAX_EXT] - : null; - if ($data[self::FIELD_COUNT_MAX] instanceof FHIRPositiveInt) { - $this->setCountMax($data[self::FIELD_COUNT_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT_MAX])) { - $this->setCountMax(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_COUNT_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT_MAX])) { - $this->setCountMax(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_COUNT_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCount(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_COUNT_MAX]) || isset($data[self::FIELD_COUNT_MAX_EXT])) { + if (isset($data[self::FIELD_COUNT_MAX])) { + $value = $data[self::FIELD_COUNT_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_MAX_EXT]) && is_array($data[self::FIELD_COUNT_MAX_EXT])) { + $ext = $data[self::FIELD_COUNT_MAX_EXT]; } else { - $this->setCountMax(new FHIRPositiveInt($data[self::FIELD_COUNT_MAX])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setCountMax($value); + } else if (is_array($value)) { + $this->setCountMax(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setCountMax(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCountMax(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_DAY_OF_WEEK])) { - $ext = (isset($data[self::FIELD_DAY_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAY_OF_WEEK_EXT])) - ? $data[self::FIELD_DAY_OF_WEEK_EXT] - : null; - if (is_array($data[self::FIELD_DAY_OF_WEEK])) { - foreach($data[self::FIELD_DAY_OF_WEEK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addDayOfWeek($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDayOfWeek(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDayOfWeek(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DAY_OF_WEEK]) || isset($data[self::FIELD_DAY_OF_WEEK_EXT])) { + if (isset($data[self::FIELD_DAY_OF_WEEK])) { + $value = $data[self::FIELD_DAY_OF_WEEK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DAY_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAY_OF_WEEK_EXT])) { + $ext = $data[self::FIELD_DAY_OF_WEEK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addDayOfWeek($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addDayOfWeek($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDayOfWeek(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addDayOfWeek(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDayOfWeek(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addDayOfWeek(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addDayOfWeek(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DAY_OF_WEEK] instanceof FHIRCode) { - $this->addDayOfWeek($data[self::FIELD_DAY_OF_WEEK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DAY_OF_WEEK])) { - $this->addDayOfWeek(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_DAY_OF_WEEK]] + $ext)); - } else { - $this->addDayOfWeek(new FHIRCode($data[self::FIELD_DAY_OF_WEEK])); - } - } - if (isset($data[self::FIELD_DURATION])) { - $ext = (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) - ? $data[self::FIELD_DURATION_EXT] - : null; - if ($data[self::FIELD_DURATION] instanceof FHIRDecimal) { - $this->setDuration($data[self::FIELD_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DURATION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDayOfWeek(new FHIRCode($iext)); } + } + } + if (isset($data[self::FIELD_DURATION]) || isset($data[self::FIELD_DURATION_EXT])) { + if (isset($data[self::FIELD_DURATION])) { + $value = $data[self::FIELD_DURATION]; } else { - $this->setDuration(new FHIRDecimal($data[self::FIELD_DURATION])); - } - } - if (isset($data[self::FIELD_DURATION_MAX])) { - $ext = (isset($data[self::FIELD_DURATION_MAX_EXT]) && is_array($data[self::FIELD_DURATION_MAX_EXT])) - ? $data[self::FIELD_DURATION_MAX_EXT] - : null; - if ($data[self::FIELD_DURATION_MAX] instanceof FHIRDecimal) { - $this->setDurationMax($data[self::FIELD_DURATION_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION_MAX])) { - $this->setDurationMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DURATION_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION_MAX])) { - $this->setDurationMax(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DURATION_MAX]))); + $value = null; + } + if (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) { + $ext = $data[self::FIELD_DURATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDuration($value); + } else if (is_array($value)) { + $this->setDuration(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDuration(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_DURATION_MAX]) || isset($data[self::FIELD_DURATION_MAX_EXT])) { + if (isset($data[self::FIELD_DURATION_MAX])) { + $value = $data[self::FIELD_DURATION_MAX]; } else { - $this->setDurationMax(new FHIRDecimal($data[self::FIELD_DURATION_MAX])); - } - } - if (isset($data[self::FIELD_DURATION_UNIT])) { - $ext = (isset($data[self::FIELD_DURATION_UNIT_EXT]) && is_array($data[self::FIELD_DURATION_UNIT_EXT])) - ? $data[self::FIELD_DURATION_UNIT_EXT] - : null; - if ($data[self::FIELD_DURATION_UNIT] instanceof FHIRUnitsOfTime) { - $this->setDurationUnit($data[self::FIELD_DURATION_UNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION_UNIT])) { - $this->setDurationUnit(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $data[self::FIELD_DURATION_UNIT]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION_UNIT])) { - $this->setDurationUnit(new FHIRUnitsOfTime(array_merge($ext, $data[self::FIELD_DURATION_UNIT]))); + $value = null; + } + if (isset($data[self::FIELD_DURATION_MAX_EXT]) && is_array($data[self::FIELD_DURATION_MAX_EXT])) { + $ext = $data[self::FIELD_DURATION_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDurationMax($value); + } else if (is_array($value)) { + $this->setDurationMax(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDurationMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDurationMax(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_DURATION_UNIT]) || isset($data[self::FIELD_DURATION_UNIT_EXT])) { + if (isset($data[self::FIELD_DURATION_UNIT])) { + $value = $data[self::FIELD_DURATION_UNIT]; } else { - $this->setDurationUnit(new FHIRUnitsOfTime($data[self::FIELD_DURATION_UNIT])); - } - } - if (isset($data[self::FIELD_FREQUENCY])) { - $ext = (isset($data[self::FIELD_FREQUENCY_EXT]) && is_array($data[self::FIELD_FREQUENCY_EXT])) - ? $data[self::FIELD_FREQUENCY_EXT] - : null; - if ($data[self::FIELD_FREQUENCY] instanceof FHIRPositiveInt) { - $this->setFrequency($data[self::FIELD_FREQUENCY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FREQUENCY])) { - $this->setFrequency(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_FREQUENCY]] + $ext)); - } else if (is_array($data[self::FIELD_FREQUENCY])) { - $this->setFrequency(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_FREQUENCY]))); + $value = null; + } + if (isset($data[self::FIELD_DURATION_UNIT_EXT]) && is_array($data[self::FIELD_DURATION_UNIT_EXT])) { + $ext = $data[self::FIELD_DURATION_UNIT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnitsOfTime) { + $this->setDurationUnit($value); + } else if (is_array($value)) { + $this->setDurationUnit(new FHIRUnitsOfTime(array_merge($ext, $value))); + } else { + $this->setDurationUnit(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDurationUnit(new FHIRUnitsOfTime($ext)); + } + } + if (isset($data[self::FIELD_FREQUENCY]) || isset($data[self::FIELD_FREQUENCY_EXT])) { + if (isset($data[self::FIELD_FREQUENCY])) { + $value = $data[self::FIELD_FREQUENCY]; } else { - $this->setFrequency(new FHIRPositiveInt($data[self::FIELD_FREQUENCY])); - } - } - if (isset($data[self::FIELD_FREQUENCY_MAX])) { - $ext = (isset($data[self::FIELD_FREQUENCY_MAX_EXT]) && is_array($data[self::FIELD_FREQUENCY_MAX_EXT])) - ? $data[self::FIELD_FREQUENCY_MAX_EXT] - : null; - if ($data[self::FIELD_FREQUENCY_MAX] instanceof FHIRPositiveInt) { - $this->setFrequencyMax($data[self::FIELD_FREQUENCY_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FREQUENCY_MAX])) { - $this->setFrequencyMax(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_FREQUENCY_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_FREQUENCY_MAX])) { - $this->setFrequencyMax(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_FREQUENCY_MAX]))); + $value = null; + } + if (isset($data[self::FIELD_FREQUENCY_EXT]) && is_array($data[self::FIELD_FREQUENCY_EXT])) { + $ext = $data[self::FIELD_FREQUENCY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setFrequency($value); + } else if (is_array($value)) { + $this->setFrequency(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setFrequency(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFrequency(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_FREQUENCY_MAX]) || isset($data[self::FIELD_FREQUENCY_MAX_EXT])) { + if (isset($data[self::FIELD_FREQUENCY_MAX])) { + $value = $data[self::FIELD_FREQUENCY_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FREQUENCY_MAX_EXT]) && is_array($data[self::FIELD_FREQUENCY_MAX_EXT])) { + $ext = $data[self::FIELD_FREQUENCY_MAX_EXT]; } else { - $this->setFrequencyMax(new FHIRPositiveInt($data[self::FIELD_FREQUENCY_MAX])); - } - } - if (isset($data[self::FIELD_OFFSET])) { - $ext = (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) - ? $data[self::FIELD_OFFSET_EXT] - : null; - if ($data[self::FIELD_OFFSET] instanceof FHIRUnsignedInt) { - $this->setOffset($data[self::FIELD_OFFSET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_OFFSET]] + $ext)); - } else if (is_array($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_OFFSET]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setFrequencyMax($value); + } else if (is_array($value)) { + $this->setFrequencyMax(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setFrequencyMax(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFrequencyMax(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_OFFSET]) || isset($data[self::FIELD_OFFSET_EXT])) { + if (isset($data[self::FIELD_OFFSET])) { + $value = $data[self::FIELD_OFFSET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) { + $ext = $data[self::FIELD_OFFSET_EXT]; } else { - $this->setOffset(new FHIRUnsignedInt($data[self::FIELD_OFFSET])); - } - } - if (isset($data[self::FIELD_PERIOD])) { - $ext = (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) - ? $data[self::FIELD_PERIOD_EXT] - : null; - if ($data[self::FIELD_PERIOD] instanceof FHIRDecimal) { - $this->setPeriod($data[self::FIELD_PERIOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setOffset($value); + } else if (is_array($value)) { + $this->setOffset(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setOffset(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOffset(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_PERIOD]) || isset($data[self::FIELD_PERIOD_EXT])) { + if (isset($data[self::FIELD_PERIOD])) { + $value = $data[self::FIELD_PERIOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) { + $ext = $data[self::FIELD_PERIOD_EXT]; } else { - $this->setPeriod(new FHIRDecimal($data[self::FIELD_PERIOD])); - } - } - if (isset($data[self::FIELD_PERIOD_MAX])) { - $ext = (isset($data[self::FIELD_PERIOD_MAX_EXT]) && is_array($data[self::FIELD_PERIOD_MAX_EXT])) - ? $data[self::FIELD_PERIOD_MAX_EXT] - : null; - if ($data[self::FIELD_PERIOD_MAX] instanceof FHIRDecimal) { - $this->setPeriodMax($data[self::FIELD_PERIOD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD_MAX])) { - $this->setPeriodMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD_MAX])) { - $this->setPeriodMax(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriod($value); + } else if (is_array($value)) { + $this->setPeriod(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriod(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_PERIOD_MAX]) || isset($data[self::FIELD_PERIOD_MAX_EXT])) { + if (isset($data[self::FIELD_PERIOD_MAX])) { + $value = $data[self::FIELD_PERIOD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_MAX_EXT]) && is_array($data[self::FIELD_PERIOD_MAX_EXT])) { + $ext = $data[self::FIELD_PERIOD_MAX_EXT]; } else { - $this->setPeriodMax(new FHIRDecimal($data[self::FIELD_PERIOD_MAX])); - } - } - if (isset($data[self::FIELD_PERIOD_UNIT])) { - $ext = (isset($data[self::FIELD_PERIOD_UNIT_EXT]) && is_array($data[self::FIELD_PERIOD_UNIT_EXT])) - ? $data[self::FIELD_PERIOD_UNIT_EXT] - : null; - if ($data[self::FIELD_PERIOD_UNIT] instanceof FHIRUnitsOfTime) { - $this->setPeriodUnit($data[self::FIELD_PERIOD_UNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD_UNIT])) { - $this->setPeriodUnit(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $data[self::FIELD_PERIOD_UNIT]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD_UNIT])) { - $this->setPeriodUnit(new FHIRUnitsOfTime(array_merge($ext, $data[self::FIELD_PERIOD_UNIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriodMax($value); + } else if (is_array($value)) { + $this->setPeriodMax(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriodMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriodMax(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_PERIOD_UNIT]) || isset($data[self::FIELD_PERIOD_UNIT_EXT])) { + if (isset($data[self::FIELD_PERIOD_UNIT])) { + $value = $data[self::FIELD_PERIOD_UNIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_UNIT_EXT]) && is_array($data[self::FIELD_PERIOD_UNIT_EXT])) { + $ext = $data[self::FIELD_PERIOD_UNIT_EXT]; } else { - $this->setPeriodUnit(new FHIRUnitsOfTime($data[self::FIELD_PERIOD_UNIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnitsOfTime) { + $this->setPeriodUnit($value); + } else if (is_array($value)) { + $this->setPeriodUnit(new FHIRUnitsOfTime(array_merge($ext, $value))); + } else { + $this->setPeriodUnit(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPeriodUnit(new FHIRUnitsOfTime($ext)); } } - if (isset($data[self::FIELD_TIME_OF_DAY])) { - $ext = (isset($data[self::FIELD_TIME_OF_DAY_EXT]) && is_array($data[self::FIELD_TIME_OF_DAY_EXT])) - ? $data[self::FIELD_TIME_OF_DAY_EXT] - : null; - if (is_array($data[self::FIELD_TIME_OF_DAY])) { - foreach($data[self::FIELD_TIME_OF_DAY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRTime) { - $this->addTimeOfDay($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTimeOfDay(new FHIRTime([FHIRTime::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTimeOfDay(new FHIRTime(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TIME_OF_DAY]) || isset($data[self::FIELD_TIME_OF_DAY_EXT])) { + if (isset($data[self::FIELD_TIME_OF_DAY])) { + $value = $data[self::FIELD_TIME_OF_DAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_OF_DAY_EXT]) && is_array($data[self::FIELD_TIME_OF_DAY_EXT])) { + $ext = $data[self::FIELD_TIME_OF_DAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->addTimeOfDay($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRTime) { + $this->addTimeOfDay($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTimeOfDay(new FHIRTime(array_merge($v, $iext))); + } else { + $this->addTimeOfDay(new FHIRTime([FHIRTime::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTimeOfDay(new FHIRTime($v)); } + } elseif (is_array($value)) { + $this->addTimeOfDay(new FHIRTime(array_merge($ext, $value))); + } else { + $this->addTimeOfDay(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTimeOfDay(new FHIRTime($iext)); } - } elseif ($data[self::FIELD_TIME_OF_DAY] instanceof FHIRTime) { - $this->addTimeOfDay($data[self::FIELD_TIME_OF_DAY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TIME_OF_DAY])) { - $this->addTimeOfDay(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_TIME_OF_DAY]] + $ext)); - } else { - $this->addTimeOfDay(new FHIRTime($data[self::FIELD_TIME_OF_DAY])); } } - if (isset($data[self::FIELD_WHEN])) { - $ext = (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) - ? $data[self::FIELD_WHEN_EXT] - : null; - if (is_array($data[self::FIELD_WHEN])) { - foreach($data[self::FIELD_WHEN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIREventTiming) { - $this->addWhen($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addWhen(new FHIREventTiming(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_WHEN]) || isset($data[self::FIELD_WHEN_EXT])) { + if (isset($data[self::FIELD_WHEN])) { + $value = $data[self::FIELD_WHEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) { + $ext = $data[self::FIELD_WHEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventTiming) { + $this->addWhen($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIREventTiming) { + $this->addWhen($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addWhen(new FHIREventTiming(array_merge($v, $iext))); + } else { + $this->addWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addWhen(new FHIREventTiming($v)); } + } elseif (is_array($value)) { + $this->addWhen(new FHIREventTiming(array_merge($ext, $value))); + } else { + $this->addWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addWhen(new FHIREventTiming($iext)); } - } elseif ($data[self::FIELD_WHEN] instanceof FHIREventTiming) { - $this->addWhen($data[self::FIELD_WHEN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_WHEN])) { - $this->addWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $data[self::FIELD_WHEN]] + $ext)); - } else { - $this->addWhen(new FHIREventTiming($data[self::FIELD_WHEN])); } } } @@ -1666,125 +1770,174 @@ public function jsonSerialize() } if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } if (null !== ($v = $this->getCountMax())) { $a[self::FIELD_COUNT_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_COUNT_MAX_EXT] = $enc; } } if ([] !== ($vs = $this->getDayOfWeek())) { $a[self::FIELD_DAY_OF_WEEK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DAY_OF_WEEK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DAY_OF_WEEK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DAY_OF_WEEK_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DAY_OF_WEEK_EXT] = $encs; + } } if (null !== ($v = $this->getDuration())) { $a[self::FIELD_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DURATION_EXT] = $enc; } } if (null !== ($v = $this->getDurationMax())) { $a[self::FIELD_DURATION_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DURATION_MAX_EXT] = $enc; } } if (null !== ($v = $this->getDurationUnit())) { $a[self::FIELD_DURATION_UNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnitsOfTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnitsOfTime::FIELD_VALUE]); $a[self::FIELD_DURATION_UNIT_EXT] = $enc; } } if (null !== ($v = $this->getFrequency())) { $a[self::FIELD_FREQUENCY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_FREQUENCY_EXT] = $enc; } } if (null !== ($v = $this->getFrequencyMax())) { $a[self::FIELD_FREQUENCY_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_FREQUENCY_MAX_EXT] = $enc; } } if (null !== ($v = $this->getOffset())) { $a[self::FIELD_OFFSET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_OFFSET_EXT] = $enc; } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_EXT] = $enc; } } if (null !== ($v = $this->getPeriodMax())) { $a[self::FIELD_PERIOD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getPeriodUnit())) { $a[self::FIELD_PERIOD_UNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnitsOfTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnitsOfTime::FIELD_VALUE]); $a[self::FIELD_PERIOD_UNIT_EXT] = $enc; } } if ([] !== ($vs = $this->getTimeOfDay())) { $a[self::FIELD_TIME_OF_DAY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TIME_OF_DAY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TIME_OF_DAY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRTime::FIELD_VALUE]) || array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TIME_OF_DAY_EXT][] = null; + unset($enc[FHIRTime::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TIME_OF_DAY_EXT] = $encs; + } } if ([] !== ($vs = $this->getWhen())) { $a[self::FIELD_WHEN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_WHEN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_WHEN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIREventTiming::FIELD_VALUE]) || array_key_exists(FHIREventTiming::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_WHEN_EXT][] = null; + unset($enc[FHIREventTiming::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_WHEN_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php index 22c0155626..16a5b56ae9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRValueSetCompose extends FHIRBackboneElement const FIELD_LOCKED_DATE_EXT = '_lockedDate'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A ValueSet resource instance specifies a set of codes drawn from one or more @@ -189,20 +189,27 @@ public function __construct($data = null) $this->addExclude(new FHIRValueSetInclude($data[self::FIELD_EXCLUDE])); } } - if (isset($data[self::FIELD_INACTIVE])) { - $ext = (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) - ? $data[self::FIELD_INACTIVE_EXT] - : null; - if ($data[self::FIELD_INACTIVE] instanceof FHIRBoolean) { - $this->setInactive($data[self::FIELD_INACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INACTIVE]))); - } + if (isset($data[self::FIELD_INACTIVE]) || isset($data[self::FIELD_INACTIVE_EXT])) { + if (isset($data[self::FIELD_INACTIVE])) { + $value = $data[self::FIELD_INACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) { + $ext = $data[self::FIELD_INACTIVE_EXT]; } else { - $this->setInactive(new FHIRBoolean($data[self::FIELD_INACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInactive($value); + } else if (is_array($value)) { + $this->setInactive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInactive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_INCLUDE])) { @@ -223,20 +230,27 @@ public function __construct($data = null) $this->addInclude(new FHIRValueSetInclude($data[self::FIELD_INCLUDE])); } } - if (isset($data[self::FIELD_LOCKED_DATE])) { - $ext = (isset($data[self::FIELD_LOCKED_DATE_EXT]) && is_array($data[self::FIELD_LOCKED_DATE_EXT])) - ? $data[self::FIELD_LOCKED_DATE_EXT] - : null; - if ($data[self::FIELD_LOCKED_DATE] instanceof FHIRDate) { - $this->setLockedDate($data[self::FIELD_LOCKED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOCKED_DATE])) { - $this->setLockedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LOCKED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LOCKED_DATE])) { - $this->setLockedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LOCKED_DATE]))); - } + if (isset($data[self::FIELD_LOCKED_DATE]) || isset($data[self::FIELD_LOCKED_DATE_EXT])) { + if (isset($data[self::FIELD_LOCKED_DATE])) { + $value = $data[self::FIELD_LOCKED_DATE]; } else { - $this->setLockedDate(new FHIRDate($data[self::FIELD_LOCKED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_LOCKED_DATE_EXT]) && is_array($data[self::FIELD_LOCKED_DATE_EXT])) { + $ext = $data[self::FIELD_LOCKED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLockedDate($value); + } else if (is_array($value)) { + $this->setLockedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLockedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLockedDate(new FHIRDate($ext)); } } } @@ -599,25 +613,44 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getExclude())) { - $a[self::FIELD_EXCLUDE] = $vs; + $a[self::FIELD_EXCLUDE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCLUDE][] = $v; + } } if (null !== ($v = $this->getInactive())) { $a[self::FIELD_INACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getInclude())) { - $a[self::FIELD_INCLUDE] = $vs; + $a[self::FIELD_INCLUDE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INCLUDE][] = $v; + } } if (null !== ($v = $this->getLockedDate())) { $a[self::FIELD_LOCKED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LOCKED_DATE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php index 492bd92428..adcf147e9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRValueSetConcept extends FHIRBackboneElement const FIELD_DISPLAY_EXT = '_display'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -150,20 +150,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DESIGNATION])) { @@ -184,20 +191,27 @@ public function __construct($data = null) $this->addDesignation(new FHIRValueSetDesignation($data[self::FIELD_DESIGNATION])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } } @@ -481,21 +495,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php index 4f61d92b25..0cc97cc584 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRValueSetContains extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -225,36 +225,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ABSTRACT])) { - $ext = (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) - ? $data[self::FIELD_ABSTRACT_EXT] - : null; - if ($data[self::FIELD_ABSTRACT] instanceof FHIRBoolean) { - $this->setAbstract($data[self::FIELD_ABSTRACT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABSTRACT]] + $ext)); - } else if (is_array($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABSTRACT]))); - } + if (isset($data[self::FIELD_ABSTRACT]) || isset($data[self::FIELD_ABSTRACT_EXT])) { + if (isset($data[self::FIELD_ABSTRACT])) { + $value = $data[self::FIELD_ABSTRACT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) { + $ext = $data[self::FIELD_ABSTRACT_EXT]; } else { - $this->setAbstract(new FHIRBoolean($data[self::FIELD_ABSTRACT])); - } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbstract($value); + } else if (is_array($value)) { + $this->setAbstract(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbstract(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONTAINS])) { @@ -293,68 +307,96 @@ public function __construct($data = null) $this->addDesignation(new FHIRValueSetDesignation($data[self::FIELD_DESIGNATION])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); - } - } - if (isset($data[self::FIELD_INACTIVE])) { - $ext = (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) - ? $data[self::FIELD_INACTIVE_EXT] - : null; - if ($data[self::FIELD_INACTIVE] instanceof FHIRBoolean) { - $this->setInactive($data[self::FIELD_INACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INACTIVE]))); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_INACTIVE]) || isset($data[self::FIELD_INACTIVE_EXT])) { + if (isset($data[self::FIELD_INACTIVE])) { + $value = $data[self::FIELD_INACTIVE]; } else { - $this->setInactive(new FHIRBoolean($data[self::FIELD_INACTIVE])); - } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + $value = null; + } + if (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) { + $ext = $data[self::FIELD_INACTIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInactive($value); + } else if (is_array($value)) { + $this->setInactive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInactive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); - } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -935,52 +977,79 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAbstract())) { $a[self::FIELD_ABSTRACT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABSTRACT_EXT] = $enc; } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getContains())) { - $a[self::FIELD_CONTAINS] = $vs; + $a[self::FIELD_CONTAINS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINS][] = $v; + } } if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getInactive())) { $a[self::FIELD_INACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php index b9fff5db4d..7ac83d82da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRValueSetDesignation extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -147,20 +147,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); - } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_USE])) { @@ -170,20 +177,27 @@ public function __construct($data = null) $this->setUse(new FHIRCoding($data[self::FIELD_USE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -425,8 +439,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } @@ -435,11 +451,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php index 1ad3d60450..7fa645b3ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRValueSetExpansion extends FHIRBackboneElement const FIELD_TOTAL_EXT = '_total'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A ValueSet resource instance specifies a set of codes drawn from one or more @@ -217,36 +217,50 @@ public function __construct($data = null) $this->addContains(new FHIRValueSetContains($data[self::FIELD_CONTAINS])); } } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRUri) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; } else { - $this->setIdentifier(new FHIRUri($data[self::FIELD_IDENTIFIER])); - } - } - if (isset($data[self::FIELD_OFFSET])) { - $ext = (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) - ? $data[self::FIELD_OFFSET_EXT] - : null; - if ($data[self::FIELD_OFFSET] instanceof FHIRInteger) { - $this->setOffset($data[self::FIELD_OFFSET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_OFFSET]] + $ext)); - } else if (is_array($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRInteger(array_merge($ext, $data[self::FIELD_OFFSET]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_OFFSET]) || isset($data[self::FIELD_OFFSET_EXT])) { + if (isset($data[self::FIELD_OFFSET])) { + $value = $data[self::FIELD_OFFSET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) { + $ext = $data[self::FIELD_OFFSET_EXT]; } else { - $this->setOffset(new FHIRInteger($data[self::FIELD_OFFSET])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setOffset($value); + } else if (is_array($value)) { + $this->setOffset(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setOffset(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOffset(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -267,36 +281,50 @@ public function __construct($data = null) $this->addParameter(new FHIRValueSetParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_TIMESTAMP])) { - $ext = (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) - ? $data[self::FIELD_TIMESTAMP_EXT] - : null; - if ($data[self::FIELD_TIMESTAMP] instanceof FHIRDateTime) { - $this->setTimestamp($data[self::FIELD_TIMESTAMP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMESTAMP]] + $ext)); - } else if (is_array($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMESTAMP]))); - } + if (isset($data[self::FIELD_TIMESTAMP]) || isset($data[self::FIELD_TIMESTAMP_EXT])) { + if (isset($data[self::FIELD_TIMESTAMP])) { + $value = $data[self::FIELD_TIMESTAMP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) { + $ext = $data[self::FIELD_TIMESTAMP_EXT]; } else { - $this->setTimestamp(new FHIRDateTime($data[self::FIELD_TIMESTAMP])); - } - } - if (isset($data[self::FIELD_TOTAL])) { - $ext = (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) - ? $data[self::FIELD_TOTAL_EXT] - : null; - if ($data[self::FIELD_TOTAL] instanceof FHIRInteger) { - $this->setTotal($data[self::FIELD_TOTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_TOTAL]] + $ext)); - } else if (is_array($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRInteger(array_merge($ext, $data[self::FIELD_TOTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimestamp($value); + } else if (is_array($value)) { + $this->setTimestamp(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimestamp(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTimestamp(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_TOTAL]) || isset($data[self::FIELD_TOTAL_EXT])) { + if (isset($data[self::FIELD_TOTAL])) { + $value = $data[self::FIELD_TOTAL]; } else { - $this->setTotal(new FHIRInteger($data[self::FIELD_TOTAL])); + $value = null; + } + if (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) { + $ext = $data[self::FIELD_TOTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setTotal($value); + } else if (is_array($value)) { + $this->setTotal(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setTotal(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTotal(new FHIRInteger($ext)); } } } @@ -774,39 +802,62 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContains())) { - $a[self::FIELD_CONTAINS] = $vs; + $a[self::FIELD_CONTAINS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINS][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getOffset())) { $a[self::FIELD_OFFSET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_OFFSET_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getTimestamp())) { $a[self::FIELD_TIMESTAMP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMESTAMP_EXT] = $enc; } } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_TOTAL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php index 0c9add7fe1..eae93bea0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRValueSetFilter extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of operation to perform as a part of a property based filter. @@ -152,52 +152,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_OP])) { - $ext = (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) - ? $data[self::FIELD_OP_EXT] - : null; - if ($data[self::FIELD_OP] instanceof FHIRFilterOperator) { - $this->setOp($data[self::FIELD_OP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OP])) { - $this->setOp(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $data[self::FIELD_OP]] + $ext)); - } else if (is_array($data[self::FIELD_OP])) { - $this->setOp(new FHIRFilterOperator(array_merge($ext, $data[self::FIELD_OP]))); - } + if (isset($data[self::FIELD_OP]) || isset($data[self::FIELD_OP_EXT])) { + if (isset($data[self::FIELD_OP])) { + $value = $data[self::FIELD_OP]; } else { - $this->setOp(new FHIRFilterOperator($data[self::FIELD_OP])); + $value = null; } - } - if (isset($data[self::FIELD_PROPERTY])) { - $ext = (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) - ? $data[self::FIELD_PROPERTY_EXT] - : null; - if ($data[self::FIELD_PROPERTY] instanceof FHIRCode) { - $this->setProperty($data[self::FIELD_PROPERTY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PROPERTY]] + $ext)); - } else if (is_array($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRCode(array_merge($ext, $data[self::FIELD_PROPERTY]))); - } + if (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) { + $ext = $data[self::FIELD_OP_EXT]; } else { - $this->setProperty(new FHIRCode($data[self::FIELD_PROPERTY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFilterOperator) { + $this->setOp($value); + } else if (is_array($value)) { + $this->setOp(new FHIRFilterOperator(array_merge($ext, $value))); + } else { + $this->setOp(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOp(new FHIRFilterOperator($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_PROPERTY]) || isset($data[self::FIELD_PROPERTY_EXT])) { + if (isset($data[self::FIELD_PROPERTY])) { + $value = $data[self::FIELD_PROPERTY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) { + $ext = $data[self::FIELD_PROPERTY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setProperty($value); + } else if (is_array($value)) { + $this->setProperty(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProperty(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -447,25 +468,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getOp())) { $a[self::FIELD_OP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFilterOperator::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFilterOperator::FIELD_VALUE]); $a[self::FIELD_OP_EXT] = $enc; } } if (null !== ($v = $this->getProperty())) { $a[self::FIELD_PROPERTY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_PROPERTY_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php index f312b2c8c0..931ff402c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRValueSetInclude extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A ValueSet resource instance specifies a set of codes drawn from one or more @@ -217,65 +217,88 @@ public function __construct($data = null) $this->addFilter(new FHIRValueSetFilter($data[self::FIELD_FILTER])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VALUE_SET])) { - $ext = (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) - ? $data[self::FIELD_VALUE_SET_EXT] - : null; - if (is_array($data[self::FIELD_VALUE_SET])) { - foreach($data[self::FIELD_VALUE_SET] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addValueSet($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addValueSet(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_VALUE_SET]) || isset($data[self::FIELD_VALUE_SET_EXT])) { + if (isset($data[self::FIELD_VALUE_SET])) { + $value = $data[self::FIELD_VALUE_SET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addValueSet($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addValueSet($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addValueSet(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addValueSet(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addValueSet(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addValueSet(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_VALUE_SET] instanceof FHIRCanonical) { - $this->addValueSet($data[self::FIELD_VALUE_SET]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_VALUE_SET])) { - $this->addValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_SET]] + $ext)); - } else { - $this->addValueSet(new FHIRCanonical($data[self::FIELD_VALUE_SET])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -720,40 +743,67 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getFilter())) { - $a[self::FIELD_FILTER] = $vs; + $a[self::FIELD_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FILTER][] = $v; + } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if ([] !== ($vs = $this->getValueSet())) { $a[self::FIELD_VALUE_SET] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_VALUE_SET][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_VALUE_SET_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_VALUE_SET_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_VALUE_SET_EXT] = $encs; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php index 8c08f77d1b..3a8a78cc99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRValueSetParameter extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -222,132 +222,188 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); - } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -874,60 +930,79 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestation.php index db1e06d4c3..4286ed152a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRVerificationResultAttestation extends FHIRBackboneElement const FIELD_WHO = 'who'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -228,20 +228,27 @@ public function __construct($data = null) $this->setCommunicationMethod(new FHIRCodeableConcept($data[self::FIELD_COMMUNICATION_METHOD])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_ON_BEHALF_OF])) { @@ -251,20 +258,27 @@ public function __construct($data = null) $this->setOnBehalfOf(new FHIRReference($data[self::FIELD_ON_BEHALF_OF])); } } - if (isset($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE])) { - $ext = (isset($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE_EXT]) && is_array($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE_EXT])) - ? $data[self::FIELD_PROXY_IDENTITY_CERTIFICATE_EXT] - : null; - if ($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE] instanceof FHIRString) { - $this->setProxyIdentityCertificate($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE])) { - $this->setProxyIdentityCertificate(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PROXY_IDENTITY_CERTIFICATE]] + $ext)); - } else if (is_array($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE])) { - $this->setProxyIdentityCertificate(new FHIRString(array_merge($ext, $data[self::FIELD_PROXY_IDENTITY_CERTIFICATE]))); - } + if (isset($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE]) || isset($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE_EXT])) { + if (isset($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE])) { + $value = $data[self::FIELD_PROXY_IDENTITY_CERTIFICATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE_EXT]) && is_array($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE_EXT])) { + $ext = $data[self::FIELD_PROXY_IDENTITY_CERTIFICATE_EXT]; } else { - $this->setProxyIdentityCertificate(new FHIRString($data[self::FIELD_PROXY_IDENTITY_CERTIFICATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setProxyIdentityCertificate($value); + } else if (is_array($value)) { + $this->setProxyIdentityCertificate(new FHIRString(array_merge($ext, $value))); + } else { + $this->setProxyIdentityCertificate(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProxyIdentityCertificate(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROXY_SIGNATURE])) { @@ -274,20 +288,27 @@ public function __construct($data = null) $this->setProxySignature(new FHIRSignature($data[self::FIELD_PROXY_SIGNATURE])); } } - if (isset($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE])) { - $ext = (isset($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE_EXT]) && is_array($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE_EXT])) - ? $data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE_EXT] - : null; - if ($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE] instanceof FHIRString) { - $this->setSourceIdentityCertificate($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE])) { - $this->setSourceIdentityCertificate(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE])) { - $this->setSourceIdentityCertificate(new FHIRString(array_merge($ext, $data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE]))); - } + if (isset($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE]) || isset($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE_EXT])) { + if (isset($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE])) { + $value = $data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE_EXT]) && is_array($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE_EXT])) { + $ext = $data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE_EXT]; } else { - $this->setSourceIdentityCertificate(new FHIRString($data[self::FIELD_SOURCE_IDENTITY_CERTIFICATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSourceIdentityCertificate($value); + } else if (is_array($value)) { + $this->setSourceIdentityCertificate(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSourceIdentityCertificate(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSourceIdentityCertificate(new FHIRString($ext)); } } if (isset($data[self::FIELD_SOURCE_SIGNATURE])) { @@ -767,8 +788,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -777,8 +800,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getProxyIdentityCertificate())) { $a[self::FIELD_PROXY_IDENTITY_CERTIFICATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PROXY_IDENTITY_CERTIFICATE_EXT] = $enc; } } @@ -787,8 +812,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSourceIdentityCertificate())) { $a[self::FIELD_SOURCE_IDENTITY_CERTIFICATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOURCE_IDENTITY_CERTIFICATE_EXT] = $enc; } } @@ -798,6 +825,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWho())) { $a[self::FIELD_WHO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySource.php index d419cb581f..57700f336e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRVerificationResultPrimarySource extends FHIRBackboneElement const FIELD_WHO = 'who'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -264,20 +264,27 @@ public function __construct($data = null) $this->addType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_VALIDATION_DATE])) { - $ext = (isset($data[self::FIELD_VALIDATION_DATE_EXT]) && is_array($data[self::FIELD_VALIDATION_DATE_EXT])) - ? $data[self::FIELD_VALIDATION_DATE_EXT] - : null; - if ($data[self::FIELD_VALIDATION_DATE] instanceof FHIRDateTime) { - $this->setValidationDate($data[self::FIELD_VALIDATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALIDATION_DATE])) { - $this->setValidationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALIDATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALIDATION_DATE])) { - $this->setValidationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALIDATION_DATE]))); - } + if (isset($data[self::FIELD_VALIDATION_DATE]) || isset($data[self::FIELD_VALIDATION_DATE_EXT])) { + if (isset($data[self::FIELD_VALIDATION_DATE])) { + $value = $data[self::FIELD_VALIDATION_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALIDATION_DATE_EXT]) && is_array($data[self::FIELD_VALIDATION_DATE_EXT])) { + $ext = $data[self::FIELD_VALIDATION_DATE_EXT]; } else { - $this->setValidationDate(new FHIRDateTime($data[self::FIELD_VALIDATION_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValidationDate($value); + } else if (is_array($value)) { + $this->setValidationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValidationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValidationDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_VALIDATION_STATUS])) { @@ -789,18 +796,38 @@ public function jsonSerialize() $a[self::FIELD_CAN_PUSH_UPDATES] = $v; } if ([] !== ($vs = $this->getCommunicationMethod())) { - $a[self::FIELD_COMMUNICATION_METHOD] = $vs; + $a[self::FIELD_COMMUNICATION_METHOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION_METHOD][] = $v; + } } if ([] !== ($vs = $this->getPushTypeAvailable())) { - $a[self::FIELD_PUSH_TYPE_AVAILABLE] = $vs; + $a[self::FIELD_PUSH_TYPE_AVAILABLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PUSH_TYPE_AVAILABLE][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if (null !== ($v = $this->getValidationDate())) { $a[self::FIELD_VALIDATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALIDATION_DATE_EXT] = $enc; } } @@ -810,6 +837,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWho())) { $a[self::FIELD_WHO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidator.php index 5747a700c8..36e86fa332 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRVerificationResultValidator extends FHIRBackboneElement const FIELD_ORGANIZATION = 'organization'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A signature along with supporting context. The signature may be a digital @@ -154,20 +154,27 @@ public function __construct($data = null) $this->setAttestationSignature(new FHIRSignature($data[self::FIELD_ATTESTATION_SIGNATURE])); } } - if (isset($data[self::FIELD_IDENTITY_CERTIFICATE])) { - $ext = (isset($data[self::FIELD_IDENTITY_CERTIFICATE_EXT]) && is_array($data[self::FIELD_IDENTITY_CERTIFICATE_EXT])) - ? $data[self::FIELD_IDENTITY_CERTIFICATE_EXT] - : null; - if ($data[self::FIELD_IDENTITY_CERTIFICATE] instanceof FHIRString) { - $this->setIdentityCertificate($data[self::FIELD_IDENTITY_CERTIFICATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY_CERTIFICATE])) { - $this->setIdentityCertificate(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IDENTITY_CERTIFICATE]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY_CERTIFICATE])) { - $this->setIdentityCertificate(new FHIRString(array_merge($ext, $data[self::FIELD_IDENTITY_CERTIFICATE]))); - } + if (isset($data[self::FIELD_IDENTITY_CERTIFICATE]) || isset($data[self::FIELD_IDENTITY_CERTIFICATE_EXT])) { + if (isset($data[self::FIELD_IDENTITY_CERTIFICATE])) { + $value = $data[self::FIELD_IDENTITY_CERTIFICATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDENTITY_CERTIFICATE_EXT]) && is_array($data[self::FIELD_IDENTITY_CERTIFICATE_EXT])) { + $ext = $data[self::FIELD_IDENTITY_CERTIFICATE_EXT]; } else { - $this->setIdentityCertificate(new FHIRString($data[self::FIELD_IDENTITY_CERTIFICATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIdentityCertificate($value); + } else if (is_array($value)) { + $this->setIdentityCertificate(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIdentityCertificate(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentityCertificate(new FHIRString($ext)); } } if (isset($data[self::FIELD_ORGANIZATION])) { @@ -408,14 +415,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getIdentityCertificate())) { $a[self::FIELD_IDENTITY_CERTIFICATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IDENTITY_CERTIFICATE_EXT] = $enc; } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecification.php index 43a12982c2..ee4c07f3aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRVisionPrescriptionLensSpecification extends FHIRBackboneElement const FIELD_SPHERE_EXT = '_sphere'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -297,116 +297,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADD])) { - $ext = (isset($data[self::FIELD_ADD_EXT]) && is_array($data[self::FIELD_ADD_EXT])) - ? $data[self::FIELD_ADD_EXT] - : null; - if ($data[self::FIELD_ADD] instanceof FHIRDecimal) { - $this->setAdd($data[self::FIELD_ADD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADD])) { - $this->setAdd(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ADD]] + $ext)); - } else if (is_array($data[self::FIELD_ADD])) { - $this->setAdd(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ADD]))); - } + if (isset($data[self::FIELD_ADD]) || isset($data[self::FIELD_ADD_EXT])) { + if (isset($data[self::FIELD_ADD])) { + $value = $data[self::FIELD_ADD]; } else { - $this->setAdd(new FHIRDecimal($data[self::FIELD_ADD])); + $value = null; } - } - if (isset($data[self::FIELD_AXIS])) { - $ext = (isset($data[self::FIELD_AXIS_EXT]) && is_array($data[self::FIELD_AXIS_EXT])) - ? $data[self::FIELD_AXIS_EXT] - : null; - if ($data[self::FIELD_AXIS] instanceof FHIRInteger) { - $this->setAxis($data[self::FIELD_AXIS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AXIS])) { - $this->setAxis(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_AXIS]] + $ext)); - } else if (is_array($data[self::FIELD_AXIS])) { - $this->setAxis(new FHIRInteger(array_merge($ext, $data[self::FIELD_AXIS]))); - } + if (isset($data[self::FIELD_ADD_EXT]) && is_array($data[self::FIELD_ADD_EXT])) { + $ext = $data[self::FIELD_ADD_EXT]; } else { - $this->setAxis(new FHIRInteger($data[self::FIELD_AXIS])); + $ext = []; } - } - if (isset($data[self::FIELD_BACK_CURVE])) { - $ext = (isset($data[self::FIELD_BACK_CURVE_EXT]) && is_array($data[self::FIELD_BACK_CURVE_EXT])) - ? $data[self::FIELD_BACK_CURVE_EXT] - : null; - if ($data[self::FIELD_BACK_CURVE] instanceof FHIRDecimal) { - $this->setBackCurve($data[self::FIELD_BACK_CURVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BACK_CURVE])) { - $this->setBackCurve(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_BACK_CURVE]] + $ext)); - } else if (is_array($data[self::FIELD_BACK_CURVE])) { - $this->setBackCurve(new FHIRDecimal(array_merge($ext, $data[self::FIELD_BACK_CURVE]))); + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAdd($value); + } else if (is_array($value)) { + $this->setAdd(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAdd(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setBackCurve(new FHIRDecimal($data[self::FIELD_BACK_CURVE])); + } else if ([] !== $ext) { + $this->setAdd(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_BRAND])) { - $ext = (isset($data[self::FIELD_BRAND_EXT]) && is_array($data[self::FIELD_BRAND_EXT])) - ? $data[self::FIELD_BRAND_EXT] - : null; - if ($data[self::FIELD_BRAND] instanceof FHIRString) { - $this->setBrand($data[self::FIELD_BRAND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BRAND])) { - $this->setBrand(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BRAND]] + $ext)); - } else if (is_array($data[self::FIELD_BRAND])) { - $this->setBrand(new FHIRString(array_merge($ext, $data[self::FIELD_BRAND]))); - } + if (isset($data[self::FIELD_AXIS]) || isset($data[self::FIELD_AXIS_EXT])) { + if (isset($data[self::FIELD_AXIS])) { + $value = $data[self::FIELD_AXIS]; } else { - $this->setBrand(new FHIRString($data[self::FIELD_BRAND])); + $value = null; } - } - if (isset($data[self::FIELD_COLOR])) { - $ext = (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) - ? $data[self::FIELD_COLOR_EXT] - : null; - if ($data[self::FIELD_COLOR] instanceof FHIRString) { - $this->setColor($data[self::FIELD_COLOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COLOR]] + $ext)); - } else if (is_array($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRString(array_merge($ext, $data[self::FIELD_COLOR]))); + if (isset($data[self::FIELD_AXIS_EXT]) && is_array($data[self::FIELD_AXIS_EXT])) { + $ext = $data[self::FIELD_AXIS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setAxis($value); + } else if (is_array($value)) { + $this->setAxis(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setAxis(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAxis(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_BACK_CURVE]) || isset($data[self::FIELD_BACK_CURVE_EXT])) { + if (isset($data[self::FIELD_BACK_CURVE])) { + $value = $data[self::FIELD_BACK_CURVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BACK_CURVE_EXT]) && is_array($data[self::FIELD_BACK_CURVE_EXT])) { + $ext = $data[self::FIELD_BACK_CURVE_EXT]; } else { - $this->setColor(new FHIRString($data[self::FIELD_COLOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setBackCurve($value); + } else if (is_array($value)) { + $this->setBackCurve(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setBackCurve(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBackCurve(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_CYLINDER])) { - $ext = (isset($data[self::FIELD_CYLINDER_EXT]) && is_array($data[self::FIELD_CYLINDER_EXT])) - ? $data[self::FIELD_CYLINDER_EXT] - : null; - if ($data[self::FIELD_CYLINDER] instanceof FHIRDecimal) { - $this->setCylinder($data[self::FIELD_CYLINDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CYLINDER])) { - $this->setCylinder(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_CYLINDER]] + $ext)); - } else if (is_array($data[self::FIELD_CYLINDER])) { - $this->setCylinder(new FHIRDecimal(array_merge($ext, $data[self::FIELD_CYLINDER]))); + if (isset($data[self::FIELD_BRAND]) || isset($data[self::FIELD_BRAND_EXT])) { + if (isset($data[self::FIELD_BRAND])) { + $value = $data[self::FIELD_BRAND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BRAND_EXT]) && is_array($data[self::FIELD_BRAND_EXT])) { + $ext = $data[self::FIELD_BRAND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBrand($value); + } else if (is_array($value)) { + $this->setBrand(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBrand(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBrand(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COLOR]) || isset($data[self::FIELD_COLOR_EXT])) { + if (isset($data[self::FIELD_COLOR])) { + $value = $data[self::FIELD_COLOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) { + $ext = $data[self::FIELD_COLOR_EXT]; } else { - $this->setCylinder(new FHIRDecimal($data[self::FIELD_CYLINDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setColor($value); + } else if (is_array($value)) { + $this->setColor(new FHIRString(array_merge($ext, $value))); + } else { + $this->setColor(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setColor(new FHIRString($ext)); } } - if (isset($data[self::FIELD_DIAMETER])) { - $ext = (isset($data[self::FIELD_DIAMETER_EXT]) && is_array($data[self::FIELD_DIAMETER_EXT])) - ? $data[self::FIELD_DIAMETER_EXT] - : null; - if ($data[self::FIELD_DIAMETER] instanceof FHIRDecimal) { - $this->setDiameter($data[self::FIELD_DIAMETER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIAMETER])) { - $this->setDiameter(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DIAMETER]] + $ext)); - } else if (is_array($data[self::FIELD_DIAMETER])) { - $this->setDiameter(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DIAMETER]))); + if (isset($data[self::FIELD_CYLINDER]) || isset($data[self::FIELD_CYLINDER_EXT])) { + if (isset($data[self::FIELD_CYLINDER])) { + $value = $data[self::FIELD_CYLINDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CYLINDER_EXT]) && is_array($data[self::FIELD_CYLINDER_EXT])) { + $ext = $data[self::FIELD_CYLINDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setCylinder($value); + } else if (is_array($value)) { + $this->setCylinder(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setCylinder(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCylinder(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_DIAMETER]) || isset($data[self::FIELD_DIAMETER_EXT])) { + if (isset($data[self::FIELD_DIAMETER])) { + $value = $data[self::FIELD_DIAMETER]; } else { - $this->setDiameter(new FHIRDecimal($data[self::FIELD_DIAMETER])); + $value = null; + } + if (isset($data[self::FIELD_DIAMETER_EXT]) && is_array($data[self::FIELD_DIAMETER_EXT])) { + $ext = $data[self::FIELD_DIAMETER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDiameter($value); + } else if (is_array($value)) { + $this->setDiameter(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDiameter(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDiameter(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_DURATION])) { @@ -416,20 +465,27 @@ public function __construct($data = null) $this->setDuration(new FHIRQuantity($data[self::FIELD_DURATION])); } } - if (isset($data[self::FIELD_EYE])) { - $ext = (isset($data[self::FIELD_EYE_EXT]) && is_array($data[self::FIELD_EYE_EXT])) - ? $data[self::FIELD_EYE_EXT] - : null; - if ($data[self::FIELD_EYE] instanceof FHIRVisionEyes) { - $this->setEye($data[self::FIELD_EYE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EYE])) { - $this->setEye(new FHIRVisionEyes([FHIRVisionEyes::FIELD_VALUE => $data[self::FIELD_EYE]] + $ext)); - } else if (is_array($data[self::FIELD_EYE])) { - $this->setEye(new FHIRVisionEyes(array_merge($ext, $data[self::FIELD_EYE]))); - } + if (isset($data[self::FIELD_EYE]) || isset($data[self::FIELD_EYE_EXT])) { + if (isset($data[self::FIELD_EYE])) { + $value = $data[self::FIELD_EYE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EYE_EXT]) && is_array($data[self::FIELD_EYE_EXT])) { + $ext = $data[self::FIELD_EYE_EXT]; } else { - $this->setEye(new FHIRVisionEyes($data[self::FIELD_EYE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRVisionEyes) { + $this->setEye($value); + } else if (is_array($value)) { + $this->setEye(new FHIRVisionEyes(array_merge($ext, $value))); + } else { + $this->setEye(new FHIRVisionEyes([FHIRVisionEyes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEye(new FHIRVisionEyes($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -450,20 +506,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_POWER])) { - $ext = (isset($data[self::FIELD_POWER_EXT]) && is_array($data[self::FIELD_POWER_EXT])) - ? $data[self::FIELD_POWER_EXT] - : null; - if ($data[self::FIELD_POWER] instanceof FHIRDecimal) { - $this->setPower($data[self::FIELD_POWER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POWER])) { - $this->setPower(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POWER]] + $ext)); - } else if (is_array($data[self::FIELD_POWER])) { - $this->setPower(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POWER]))); - } + if (isset($data[self::FIELD_POWER]) || isset($data[self::FIELD_POWER_EXT])) { + if (isset($data[self::FIELD_POWER])) { + $value = $data[self::FIELD_POWER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POWER_EXT]) && is_array($data[self::FIELD_POWER_EXT])) { + $ext = $data[self::FIELD_POWER_EXT]; } else { - $this->setPower(new FHIRDecimal($data[self::FIELD_POWER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPower($value); + } else if (is_array($value)) { + $this->setPower(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPower(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPower(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PRISM])) { @@ -491,20 +554,27 @@ public function __construct($data = null) $this->setProduct(new FHIRCodeableConcept($data[self::FIELD_PRODUCT])); } } - if (isset($data[self::FIELD_SPHERE])) { - $ext = (isset($data[self::FIELD_SPHERE_EXT]) && is_array($data[self::FIELD_SPHERE_EXT])) - ? $data[self::FIELD_SPHERE_EXT] - : null; - if ($data[self::FIELD_SPHERE] instanceof FHIRDecimal) { - $this->setSphere($data[self::FIELD_SPHERE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SPHERE])) { - $this->setSphere(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_SPHERE]] + $ext)); - } else if (is_array($data[self::FIELD_SPHERE])) { - $this->setSphere(new FHIRDecimal(array_merge($ext, $data[self::FIELD_SPHERE]))); - } + if (isset($data[self::FIELD_SPHERE]) || isset($data[self::FIELD_SPHERE_EXT])) { + if (isset($data[self::FIELD_SPHERE])) { + $value = $data[self::FIELD_SPHERE]; } else { - $this->setSphere(new FHIRDecimal($data[self::FIELD_SPHERE])); + $value = null; + } + if (isset($data[self::FIELD_SPHERE_EXT]) && is_array($data[self::FIELD_SPHERE_EXT])) { + $ext = $data[self::FIELD_SPHERE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setSphere($value); + } else if (is_array($value)) { + $this->setSphere(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setSphere(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSphere(new FHIRDecimal($ext)); } } } @@ -1335,50 +1405,64 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAdd())) { $a[self::FIELD_ADD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ADD_EXT] = $enc; } } if (null !== ($v = $this->getAxis())) { $a[self::FIELD_AXIS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_AXIS_EXT] = $enc; } } if (null !== ($v = $this->getBackCurve())) { $a[self::FIELD_BACK_CURVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_BACK_CURVE_EXT] = $enc; } } if (null !== ($v = $this->getBrand())) { $a[self::FIELD_BRAND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BRAND_EXT] = $enc; } } if (null !== ($v = $this->getColor())) { $a[self::FIELD_COLOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COLOR_EXT] = $enc; } } if (null !== ($v = $this->getCylinder())) { $a[self::FIELD_CYLINDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_CYLINDER_EXT] = $enc; } } if (null !== ($v = $this->getDiameter())) { $a[self::FIELD_DIAMETER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DIAMETER_EXT] = $enc; } } @@ -1387,34 +1471,55 @@ public function jsonSerialize() } if (null !== ($v = $this->getEye())) { $a[self::FIELD_EYE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRVisionEyes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRVisionEyes::FIELD_VALUE]); $a[self::FIELD_EYE_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPower())) { $a[self::FIELD_POWER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POWER_EXT] = $enc; } } if ([] !== ($vs = $this->getPrism())) { - $a[self::FIELD_PRISM] = $vs; + $a[self::FIELD_PRISM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRISM][] = $v; + } } if (null !== ($v = $this->getProduct())) { $a[self::FIELD_PRODUCT] = $v; } if (null !== ($v = $this->getSphere())) { $a[self::FIELD_SPHERE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_SPHERE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrism.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrism.php index bb364335d2..ef7d49a608 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrism.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrism.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRVisionPrescriptionPrism extends FHIRBackboneElement const FIELD_BASE_EXT = '_base'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AMOUNT])) { - $ext = (isset($data[self::FIELD_AMOUNT_EXT]) && is_array($data[self::FIELD_AMOUNT_EXT])) - ? $data[self::FIELD_AMOUNT_EXT] - : null; - if ($data[self::FIELD_AMOUNT] instanceof FHIRDecimal) { - $this->setAmount($data[self::FIELD_AMOUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AMOUNT])) { - $this->setAmount(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_AMOUNT]] + $ext)); - } else if (is_array($data[self::FIELD_AMOUNT])) { - $this->setAmount(new FHIRDecimal(array_merge($ext, $data[self::FIELD_AMOUNT]))); - } + if (isset($data[self::FIELD_AMOUNT]) || isset($data[self::FIELD_AMOUNT_EXT])) { + if (isset($data[self::FIELD_AMOUNT])) { + $value = $data[self::FIELD_AMOUNT]; } else { - $this->setAmount(new FHIRDecimal($data[self::FIELD_AMOUNT])); + $value = null; } - } - if (isset($data[self::FIELD_BASE])) { - $ext = (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) - ? $data[self::FIELD_BASE_EXT] - : null; - if ($data[self::FIELD_BASE] instanceof FHIRVisionBase) { - $this->setBase($data[self::FIELD_BASE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE])) { - $this->setBase(new FHIRVisionBase([FHIRVisionBase::FIELD_VALUE => $data[self::FIELD_BASE]] + $ext)); - } else if (is_array($data[self::FIELD_BASE])) { - $this->setBase(new FHIRVisionBase(array_merge($ext, $data[self::FIELD_BASE]))); + if (isset($data[self::FIELD_AMOUNT_EXT]) && is_array($data[self::FIELD_AMOUNT_EXT])) { + $ext = $data[self::FIELD_AMOUNT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAmount($value); + } else if (is_array($value)) { + $this->setAmount(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAmount(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAmount(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_BASE]) || isset($data[self::FIELD_BASE_EXT])) { + if (isset($data[self::FIELD_BASE])) { + $value = $data[self::FIELD_BASE]; } else { - $this->setBase(new FHIRVisionBase($data[self::FIELD_BASE])); + $value = null; + } + if (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) { + $ext = $data[self::FIELD_BASE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRVisionBase) { + $this->setBase($value); + } else if (is_array($value)) { + $this->setBase(new FHIRVisionBase(array_merge($ext, $value))); + } else { + $this->setBase(new FHIRVisionBase([FHIRVisionBase::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBase(new FHIRVisionBase($ext)); } } } @@ -347,18 +361,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAmount())) { $a[self::FIELD_AMOUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_AMOUNT_EXT] = $enc; } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRVisionBase::FIELD_VALUE, $enc)))) { + unset($enc[FHIRVisionBase::FIELD_VALUE]); $a[self::FIELD_BASE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBase64Binary.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBase64Binary.php index 9f923effc0..4d55395741 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBase64Binary.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBase64Binary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRBase64Binary extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BASE_64BINARY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRBase64BinaryPrimitive @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBindingStrength.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBindingStrength.php index f4a114f747..6deb186fe3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBindingStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBindingStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBindingStrength extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINDING_STRENGTH; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRBindingStrengthList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductCategory.php index 0f50404ace..682af3fd29 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBiologicallyDerivedProductCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRBiologicallyDerivedProductCategoryList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStatus.php index b718a0a74c..8a8f601e99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBiologicallyDerivedProductStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRBiologicallyDerivedProductStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStorageScale.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStorageScale.php index 804575ca54..1ab582f853 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStorageScale.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBiologicallyDerivedProductStorageScale.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBiologicallyDerivedProductStorageScale extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BIOLOGICALLY_DERIVED_PRODUCT_STORAGE_SCALE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRBiologicallyDerivedProductStorageScaleList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBoolean.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBoolean.php index e43db2f13e..483ca4847e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBoolean.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBoolean.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBoolean extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BOOLEAN; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRBooleanPrimitive @@ -259,6 +258,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBundleType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBundleType.php index 28d8c54a6d..5a5836293b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBundleType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRBundleType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBundleType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BUNDLE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRBundleTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCanonical.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCanonical.php index a918235f3d..9687283548 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCanonical.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCanonical.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRCanonical extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CANONICAL; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCanonicalPrimitive @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCapabilityStatementKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCapabilityStatementKind.php index 936b67aecd..8084adea11 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCapabilityStatementKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCapabilityStatementKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCapabilityStatementKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCapabilityStatementKindList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityKind.php index c151f2de24..77e89a8936 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRCarePlanActivityKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCarePlanActivityKindList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityStatus.php index 72586bfd70..82c94126ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanActivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRCarePlanActivityStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCarePlanActivityStatusList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanIntent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanIntent.php index 4ac0ac5fac..986707d4d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCarePlanIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRCarePlanIntent extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_INTENT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCarePlanIntentList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCareTeamStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCareTeamStatus.php index 92fe1c0978..44da3b2ea1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCareTeamStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCareTeamStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCareTeamStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_TEAM_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCareTeamStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCatalogEntryRelationType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCatalogEntryRelationType.php index ef13d4248b..fa2fb581aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCatalogEntryRelationType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCatalogEntryRelationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCatalogEntryRelationType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CATALOG_ENTRY_RELATION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCatalogEntryRelationTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRChargeItemStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRChargeItemStatus.php index 5a7a5cfb4b..e42642edc2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRChargeItemStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRChargeItemStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRChargeItemStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRChargeItemStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClaimProcessingCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClaimProcessingCodes.php index 43825ef872..39dd6166ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClaimProcessingCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClaimProcessingCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRClaimProcessingCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLAIM_PROCESSING_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRClaimProcessingCodesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClinicalImpressionStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClinicalImpressionStatus.php index 1e9473ee61..64102e84cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClinicalImpressionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRClinicalImpressionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRClinicalImpressionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRClinicalImpressionStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCode.php index 8c340e3cbe..57de51ebbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSearchSupport.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSearchSupport.php index 152364180c..cf2c54ce79 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSearchSupport.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSearchSupport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRCodeSearchSupport extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SEARCH_SUPPORT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCodeSearchSupportList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemContentMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemContentMode.php index f19b9be857..500c4631ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemContentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemContentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRCodeSystemContentMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_CONTENT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCodeSystemContentModeList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemHierarchyMeaning.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemHierarchyMeaning.php index 3cb899de21..44f9c6695f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemHierarchyMeaning.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeSystemHierarchyMeaning.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCodeSystemHierarchyMeaning extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_HIERARCHY_MEANING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCodeSystemHierarchyMeaningList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeableConcept.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeableConcept.php index f6adc25ffa..46ca891735 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeableConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCodeableConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRCodeableConcept extends FHIRElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -150,20 +150,27 @@ public function __construct($data = null) $this->addCoding(new FHIRCoding($data[self::FIELD_CODING])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -386,15 +393,26 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCoding())) { - $a[self::FIELD_CODING] = $vs; + $a[self::FIELD_CODING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODING][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCoding.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCoding.php index bdeb2a4abe..3cceda6499 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCoding.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCoding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCoding extends FHIRElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -177,84 +177,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_USER_SELECTED])) { - $ext = (isset($data[self::FIELD_USER_SELECTED_EXT]) && is_array($data[self::FIELD_USER_SELECTED_EXT])) - ? $data[self::FIELD_USER_SELECTED_EXT] - : null; - if ($data[self::FIELD_USER_SELECTED] instanceof FHIRBoolean) { - $this->setUserSelected($data[self::FIELD_USER_SELECTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USER_SELECTED])) { - $this->setUserSelected(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_USER_SELECTED]] + $ext)); - } else if (is_array($data[self::FIELD_USER_SELECTED])) { - $this->setUserSelected(new FHIRBoolean(array_merge($ext, $data[self::FIELD_USER_SELECTED]))); + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setUserSelected(new FHIRBoolean($data[self::FIELD_USER_SELECTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_USER_SELECTED]) || isset($data[self::FIELD_USER_SELECTED_EXT])) { + if (isset($data[self::FIELD_USER_SELECTED])) { + $value = $data[self::FIELD_USER_SELECTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USER_SELECTED_EXT]) && is_array($data[self::FIELD_USER_SELECTED_EXT])) { + $ext = $data[self::FIELD_USER_SELECTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setUserSelected($value); + } else if (is_array($value)) { + $this->setUserSelected(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setUserSelected(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUserSelected(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -629,39 +664,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUserSelected())) { $a[self::FIELD_USER_SELECTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_USER_SELECTED_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompartmentType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompartmentType.php index 93db5d48d9..2642a07175 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompartmentType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompartmentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCompartmentType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPARTMENT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCompartmentTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionAttestationMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionAttestationMode.php index a67765aab1..5a0e79fa3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionAttestationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionAttestationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCompositionAttestationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCompositionAttestationModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionStatus.php index 0bb8481320..aacad107f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRCompositionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCompositionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRCompositionStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapEquivalence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapEquivalence.php index 77ada71d1d..fada7ea926 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapEquivalence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapEquivalence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRConceptMapEquivalence extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRConceptMapEquivalenceList @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapGroupUnmappedMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapGroupUnmappedMode.php index ea0507478a..724000adf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapGroupUnmappedMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConceptMapGroupUnmappedMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConceptMapGroupUnmappedMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_GROUP_UNMAPPED_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRConceptMapGroupUnmappedModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalDeleteStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalDeleteStatus.php index 708b4da3e8..6e0651873c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalDeleteStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalDeleteStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConditionalDeleteStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_DELETE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRConditionalDeleteStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalReadStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalReadStatus.php index 0f8b58fe05..6bbefa16f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalReadStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConditionalReadStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConditionalReadStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_READ_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRConditionalReadStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentDataMeaning.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentDataMeaning.php index b24ed1d7e9..7ef933cad0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentDataMeaning.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentDataMeaning.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConsentDataMeaning extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_DATA_MEANING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRConsentDataMeaningList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentProvisionType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentProvisionType.php index 74aa5d9273..0aeb07926b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentProvisionType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentProvisionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRConsentProvisionType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_PROVISION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRConsentProvisionTypeList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentState.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentState.php index a47f707688..f852c03ba2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentState.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConsentState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConsentState extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_STATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRConsentStateList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConstraintSeverity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConstraintSeverity.php index ec1f435bf5..7e03c9e271 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConstraintSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRConstraintSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConstraintSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRConstraintSeverityList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactDetail.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactDetail.php index bc35ded62e..295b62241a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContactDetail extends FHIRElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -388,13 +395,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPoint.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPoint.php index 304a7d13e2..60428c0b77 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPoint.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRContactPoint extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -177,68 +177,96 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_RANK])) { - $ext = (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) - ? $data[self::FIELD_RANK_EXT] - : null; - if ($data[self::FIELD_RANK] instanceof FHIRPositiveInt) { - $this->setRank($data[self::FIELD_RANK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_RANK]] + $ext)); - } else if (is_array($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_RANK]))); - } + if (isset($data[self::FIELD_RANK]) || isset($data[self::FIELD_RANK_EXT])) { + if (isset($data[self::FIELD_RANK])) { + $value = $data[self::FIELD_RANK]; } else { - $this->setRank(new FHIRPositiveInt($data[self::FIELD_RANK])); + $value = null; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRContactPointSystem) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRContactPointSystem([FHIRContactPointSystem::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRContactPointSystem(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) { + $ext = $data[self::FIELD_RANK_EXT]; } else { - $this->setSystem(new FHIRContactPointSystem($data[self::FIELD_SYSTEM])); + $ext = []; } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRContactPointUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRContactPointUse([FHIRContactPointUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRContactPointUse(array_merge($ext, $data[self::FIELD_USE]))); + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setRank($value); + } else if (is_array($value)) { + $this->setRank(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRank(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setUse(new FHIRContactPointUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContactPointSystem) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRContactPointSystem(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRContactPointSystem([FHIRContactPointSystem::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRContactPointSystem($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContactPointUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRContactPointUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRContactPointUse([FHIRContactPointUse::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUse(new FHIRContactPointUse($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -555,32 +583,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getRank())) { $a[self::FIELD_RANK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_RANK_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContactPointSystem::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContactPointSystem::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContactPointUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContactPointUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointSystem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointSystem.php index d3f90c8941..c6fbe0e097 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContactPointSystem extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_SYSTEM; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRContactPointSystemList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointUse.php index 750fba665e..6ca2a6ea90 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContactPointUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContactPointUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRContactPointUseList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourcePublicationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourcePublicationStatusCodes.php index 995981f0ec..ca089b4ce2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourcePublicationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourcePublicationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContractResourcePublicationStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRACT_RESOURCE_PUBLICATION_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRContractResourcePublicationStatusCodesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourceStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourceStatusCodes.php index db531bb23c..17dcd06977 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourceStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContractResourceStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContractResourceStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRACT_RESOURCE_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRContractResourceStatusCodesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributor.php index 0cba8c6c67..af32350ab1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRContributor extends FHIRElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -161,36 +161,50 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRContributorType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRContributorType([FHIRContributorType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRContributorType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRContributorType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContributorType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRContributorType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRContributorType([FHIRContributorType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRContributorType($ext)); } } } @@ -446,22 +460,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContributorType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContributorType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributorType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributorType.php index 326bd68dd3..1b0e0fba92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributorType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRContributorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContributorType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRContributorTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement.php index 39da32b271..d04b31e787 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRDataRequirement extends FHIRElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes a required data item for evaluation in terms of the type of data, and @@ -278,78 +278,103 @@ public function __construct($data = null) $this->addDateFilter(new FHIRDataRequirementDateFilter($data[self::FIELD_DATE_FILTER])); } } - if (isset($data[self::FIELD_LIMIT])) { - $ext = (isset($data[self::FIELD_LIMIT_EXT]) && is_array($data[self::FIELD_LIMIT_EXT])) - ? $data[self::FIELD_LIMIT_EXT] - : null; - if ($data[self::FIELD_LIMIT] instanceof FHIRPositiveInt) { - $this->setLimit($data[self::FIELD_LIMIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LIMIT])) { - $this->setLimit(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_LIMIT]] + $ext)); - } else if (is_array($data[self::FIELD_LIMIT])) { - $this->setLimit(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_LIMIT]))); - } + if (isset($data[self::FIELD_LIMIT]) || isset($data[self::FIELD_LIMIT_EXT])) { + if (isset($data[self::FIELD_LIMIT])) { + $value = $data[self::FIELD_LIMIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIMIT_EXT]) && is_array($data[self::FIELD_LIMIT_EXT])) { + $ext = $data[self::FIELD_LIMIT_EXT]; } else { - $this->setLimit(new FHIRPositiveInt($data[self::FIELD_LIMIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setLimit($value); + } else if (is_array($value)) { + $this->setLimit(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setLimit(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLimit(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_MUST_SUPPORT])) { - $ext = (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) - ? $data[self::FIELD_MUST_SUPPORT_EXT] - : null; - if (is_array($data[self::FIELD_MUST_SUPPORT])) { - foreach($data[self::FIELD_MUST_SUPPORT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addMustSupport($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addMustSupport(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addMustSupport(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MUST_SUPPORT]) || isset($data[self::FIELD_MUST_SUPPORT_EXT])) { + if (isset($data[self::FIELD_MUST_SUPPORT])) { + $value = $data[self::FIELD_MUST_SUPPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) { + $ext = $data[self::FIELD_MUST_SUPPORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addMustSupport($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addMustSupport($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addMustSupport(new FHIRString(array_merge($v, $iext))); + } else { + $this->addMustSupport(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addMustSupport(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addMustSupport(new FHIRString(array_merge($ext, $value))); + } else { + $this->addMustSupport(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addMustSupport(new FHIRString($iext)); } - } elseif ($data[self::FIELD_MUST_SUPPORT] instanceof FHIRString) { - $this->addMustSupport($data[self::FIELD_MUST_SUPPORT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MUST_SUPPORT])) { - $this->addMustSupport(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MUST_SUPPORT]] + $ext)); - } else { - $this->addMustSupport(new FHIRString($data[self::FIELD_MUST_SUPPORT])); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_PROFILE])) { - foreach($data[self::FIELD_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProfile(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProfile(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProfile(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProfile(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->addProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROFILE])) { - $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else { - $this->addProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); } } if (isset($data[self::FIELD_SORT])) { @@ -384,20 +409,27 @@ public function __construct($data = null) $this->setSubjectReference(new FHIRReference($data[self::FIELD_SUBJECT_REFERENCE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -1092,50 +1124,86 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCodeFilter())) { - $a[self::FIELD_CODE_FILTER] = $vs; + $a[self::FIELD_CODE_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE_FILTER][] = $v; + } } if ([] !== ($vs = $this->getDateFilter())) { - $a[self::FIELD_DATE_FILTER] = $vs; + $a[self::FIELD_DATE_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATE_FILTER][] = $v; + } } if (null !== ($v = $this->getLimit())) { $a[self::FIELD_LIMIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_LIMIT_EXT] = $enc; } } if ([] !== ($vs = $this->getMustSupport())) { $a[self::FIELD_MUST_SUPPORT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MUST_SUPPORT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MUST_SUPPORT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MUST_SUPPORT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MUST_SUPPORT_EXT] = $encs; + } } if ([] !== ($vs = $this->getProfile())) { $a[self::FIELD_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROFILE_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROFILE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSort())) { - $a[self::FIELD_SORT] = $vs; + $a[self::FIELD_SORT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SORT][] = $v; + } } if (null !== ($v = $this->getSubjectCodeableConcept())) { $a[self::FIELD_SUBJECT_CODEABLE_CONCEPT] = $v; @@ -1145,11 +1213,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php index f08c05a84f..857cc5351a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRDataRequirementCodeFilter extends FHIRElement const FIELD_VALUE_SET_EXT = '_valueSet'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -194,52 +194,73 @@ public function __construct($data = null) $this->addCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; } - } - if (isset($data[self::FIELD_SEARCH_PARAM])) { - $ext = (isset($data[self::FIELD_SEARCH_PARAM_EXT]) && is_array($data[self::FIELD_SEARCH_PARAM_EXT])) - ? $data[self::FIELD_SEARCH_PARAM_EXT] - : null; - if ($data[self::FIELD_SEARCH_PARAM] instanceof FHIRString) { - $this->setSearchParam($data[self::FIELD_SEARCH_PARAM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEARCH_PARAM])) { - $this->setSearchParam(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEARCH_PARAM]] + $ext)); - } else if (is_array($data[self::FIELD_SEARCH_PARAM])) { - $this->setSearchParam(new FHIRString(array_merge($ext, $data[self::FIELD_SEARCH_PARAM]))); - } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setSearchParam(new FHIRString($data[self::FIELD_SEARCH_PARAM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_SET])) { - $ext = (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) - ? $data[self::FIELD_VALUE_SET_EXT] - : null; - if ($data[self::FIELD_VALUE_SET] instanceof FHIRCanonical) { - $this->setValueSet($data[self::FIELD_VALUE_SET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_SET]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRCanonical(array_merge($ext, $data[self::FIELD_VALUE_SET]))); + if (isset($data[self::FIELD_SEARCH_PARAM]) || isset($data[self::FIELD_SEARCH_PARAM_EXT])) { + if (isset($data[self::FIELD_SEARCH_PARAM])) { + $value = $data[self::FIELD_SEARCH_PARAM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_PARAM_EXT]) && is_array($data[self::FIELD_SEARCH_PARAM_EXT])) { + $ext = $data[self::FIELD_SEARCH_PARAM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSearchParam($value); + } else if (is_array($value)) { + $this->setSearchParam(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSearchParam(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSearchParam(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_SET]) || isset($data[self::FIELD_VALUE_SET_EXT])) { + if (isset($data[self::FIELD_VALUE_SET])) { + $value = $data[self::FIELD_VALUE_SET]; } else { - $this->setValueSet(new FHIRCanonical($data[self::FIELD_VALUE_SET])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setValueSet($value); + } else if (is_array($value)) { + $this->setValueSet(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSet(new FHIRCanonical($ext)); } } } @@ -600,29 +621,44 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getSearchParam())) { $a[self::FIELD_SEARCH_PARAM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SEARCH_PARAM_EXT] = $enc; } } if (null !== ($v = $this->getValueSet())) { $a[self::FIELD_VALUE_SET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php index 646e68bbf6..102654f939 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRDataRequirementDateFilter extends FHIRElement const FIELD_VALUE_PERIOD = 'valuePeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -199,52 +199,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; } - } - if (isset($data[self::FIELD_SEARCH_PARAM])) { - $ext = (isset($data[self::FIELD_SEARCH_PARAM_EXT]) && is_array($data[self::FIELD_SEARCH_PARAM_EXT])) - ? $data[self::FIELD_SEARCH_PARAM_EXT] - : null; - if ($data[self::FIELD_SEARCH_PARAM] instanceof FHIRString) { - $this->setSearchParam($data[self::FIELD_SEARCH_PARAM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEARCH_PARAM])) { - $this->setSearchParam(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEARCH_PARAM]] + $ext)); - } else if (is_array($data[self::FIELD_SEARCH_PARAM])) { - $this->setSearchParam(new FHIRString(array_merge($ext, $data[self::FIELD_SEARCH_PARAM]))); - } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setSearchParam(new FHIRString($data[self::FIELD_SEARCH_PARAM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); + if (isset($data[self::FIELD_SEARCH_PARAM]) || isset($data[self::FIELD_SEARCH_PARAM_EXT])) { + if (isset($data[self::FIELD_SEARCH_PARAM])) { + $value = $data[self::FIELD_SEARCH_PARAM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_PARAM_EXT]) && is_array($data[self::FIELD_SEARCH_PARAM_EXT])) { + $ext = $data[self::FIELD_SEARCH_PARAM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSearchParam($value); + } else if (is_array($value)) { + $this->setSearchParam(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSearchParam(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSearchParam(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_VALUE_DURATION])) { @@ -639,22 +660,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getSearchParam())) { $a[self::FIELD_SEARCH_PARAM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SEARCH_PARAM_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } @@ -664,6 +691,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValuePeriod())) { $a[self::FIELD_VALUE_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSort.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSort.php index 1570081f92..ccc74a0b8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSort.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSort.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDataRequirementSort extends FHIRElement const FIELD_PATH_EXT = '_path'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The possible sort directions, ascending or descending. @@ -135,36 +135,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DIRECTION])) { - $ext = (isset($data[self::FIELD_DIRECTION_EXT]) && is_array($data[self::FIELD_DIRECTION_EXT])) - ? $data[self::FIELD_DIRECTION_EXT] - : null; - if ($data[self::FIELD_DIRECTION] instanceof FHIRSortDirection) { - $this->setDirection($data[self::FIELD_DIRECTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIRECTION])) { - $this->setDirection(new FHIRSortDirection([FHIRSortDirection::FIELD_VALUE => $data[self::FIELD_DIRECTION]] + $ext)); - } else if (is_array($data[self::FIELD_DIRECTION])) { - $this->setDirection(new FHIRSortDirection(array_merge($ext, $data[self::FIELD_DIRECTION]))); - } + if (isset($data[self::FIELD_DIRECTION]) || isset($data[self::FIELD_DIRECTION_EXT])) { + if (isset($data[self::FIELD_DIRECTION])) { + $value = $data[self::FIELD_DIRECTION]; } else { - $this->setDirection(new FHIRSortDirection($data[self::FIELD_DIRECTION])); + $value = null; } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_DIRECTION_EXT]) && is_array($data[self::FIELD_DIRECTION_EXT])) { + $ext = $data[self::FIELD_DIRECTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSortDirection) { + $this->setDirection($value); + } else if (is_array($value)) { + $this->setDirection(new FHIRSortDirection(array_merge($ext, $value))); + } else { + $this->setDirection(new FHIRSortDirection([FHIRSortDirection::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDirection(new FHIRSortDirection($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } } @@ -355,18 +369,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDirection())) { $a[self::FIELD_DIRECTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSortDirection::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSortDirection::FIELD_VALUE]); $a[self::FIELD_DIRECTION_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDate.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDate.php index 0f46d832ae..e6c5d2ae88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDate.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRDate extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRDatePrimitive @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDateTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDateTime.php index 99c77f396a..e33ec1d5bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDateTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDateTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,10 +83,9 @@ class FHIRDateTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRDateTimePrimitive @@ -263,6 +262,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDaysOfWeek.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDaysOfWeek.php index 092c1f7471..d36d0be650 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDaysOfWeek.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDaysOfWeek.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDaysOfWeek extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DAYS_OF_WEEK; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDaysOfWeekList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDecimal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDecimal.php index 7e41eb12bb..b2c77222a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDecimal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDecimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRDecimal extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DECIMAL; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRDecimalPrimitive @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDetectedIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDetectedIssueSeverity.php index 0763744771..8155e9ea73 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDetectedIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDetectedIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDetectedIssueSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDetectedIssueSeverityList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationState.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationState.php index e2c8f9797e..9d45e7096a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationState.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricCalibrationState extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_STATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDeviceMetricCalibrationStateList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationType.php index f66dcd42a9..84dfabdd1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCalibrationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricCalibrationType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDeviceMetricCalibrationTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCategory.php index 92595fb798..4cb7a78085 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDeviceMetricCategoryList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricColor.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricColor.php index f9338c8c79..6d3c06a47d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricColor.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricColor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricColor extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_COLOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDeviceMetricColorList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricOperationalStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricOperationalStatus.php index 03a20514bc..01c23d76dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricOperationalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceMetricOperationalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricOperationalStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_OPERATIONAL_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDeviceMetricOperationalStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceNameType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceNameType.php index 2a5d6507aa..a46ab2c2dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceNameType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceNameType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceNameType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_NAME_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDeviceNameTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceUseStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceUseStatementStatus.php index 762c96532a..747ebf7796 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceUseStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDeviceUseStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceUseStatementStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDeviceUseStatementStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiagnosticReportStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiagnosticReportStatus.php index feafcf28bf..0792e85809 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiagnosticReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiagnosticReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDiagnosticReportStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDiagnosticReportStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiscriminatorType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiscriminatorType.php index 74b10573f3..ba23b51a1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiscriminatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDiscriminatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDiscriminatorType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DISCRIMINATOR_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDiscriminatorTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentMode.php index 8107b00b33..8e71905366 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDocumentMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDocumentModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentReferenceStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentReferenceStatus.php index 13a584b0b8..7e919a9ce1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentReferenceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentReferenceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRDocumentReferenceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDocumentReferenceStatusList @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentRelationshipType.php index a81638379a..6ba23b4b6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRDocumentRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDocumentRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRDocumentRelationshipTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityRequestPurpose.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityRequestPurpose.php index a8b6d52172..a4a7a49488 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityRequestPurpose.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityRequestPurpose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREligibilityRequestPurpose extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_REQUEST_PURPOSE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREligibilityRequestPurposeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityResponsePurpose.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityResponsePurpose.php index 8cabcd4218..c863dbbefa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityResponsePurpose.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREligibilityResponsePurpose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREligibilityResponsePurpose extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ELIGIBILITY_RESPONSE_PURPOSE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREligibilityResponsePurposeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREnableWhenBehavior.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREnableWhenBehavior.php index c9ed8206be..db3b8710cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREnableWhenBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREnableWhenBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIREnableWhenBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENABLE_WHEN_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREnableWhenBehaviorList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterLocationStatus.php index 8a59eedd3e..cdfc8df992 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREncounterLocationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_LOCATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREncounterLocationStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterStatus.php index 4d7dc79602..b72a92897b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREncounterStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREncounterStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREncounterStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREndpointStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREndpointStatus.php index 96a548ee52..09d1cf0bb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREndpointStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREndpointStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREndpointStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENDPOINT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREndpointStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREpisodeOfCareStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREpisodeOfCareStatus.php index a1499a7c01..4c71eb1f5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREpisodeOfCareStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREpisodeOfCareStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREpisodeOfCareStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREpisodeOfCareStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventCapabilityMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventCapabilityMode.php index f853c0b94f..fe818d7400 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventCapabilityMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventCapabilityMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREventCapabilityMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_CAPABILITY_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREventCapabilityModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventStatus.php index c5f366f078..79783c0d60 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREventStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREventStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventTiming.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventTiming.php index f7a43f07e4..1ed78ae682 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREventTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREventTiming extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_TIMING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREventTimingList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREvidenceVariableType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREvidenceVariableType.php index b571de5ad6..dcbc8d8b78 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREvidenceVariableType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIREvidenceVariableType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIREvidenceVariableType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVIDENCE_VARIABLE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIREvidenceVariableTypeList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExampleScenarioActorType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExampleScenarioActorType.php index 819e0f6940..1fbbacc01a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExampleScenarioActorType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExampleScenarioActorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRExampleScenarioActorType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXAMPLE_SCENARIO_ACTOR_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRExampleScenarioActorTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExplanationOfBenefitStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExplanationOfBenefitStatus.php index e17841e268..c14d81ddb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExplanationOfBenefitStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExplanationOfBenefitStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRExplanationOfBenefitStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRExplanationOfBenefitStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExposureState.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExposureState.php index e7c0bedb70..4d17023290 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExposureState.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExposureState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRExposureState extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPOSURE_STATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRExposureStateList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpression.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpression.php index 4334f19c9d..0d6ab026d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpression.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpression.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRExpression extends FHIRElement const FIELD_REFERENCE_EXT = '_reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -175,84 +175,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $ext = []; } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRExpressionLanguage) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRExpressionLanguage([FHIRExpressionLanguage::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRExpressionLanguage(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setLanguage(new FHIRExpressionLanguage($data[self::FIELD_LANGUAGE])); + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRId) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRId(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setName(new FHIRId($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExpressionLanguage) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRExpressionLanguage(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRExpressionLanguage([FHIRExpressionLanguage::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRExpressionLanguage($ext)); } } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRUri) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri(array_merge($ext, $data[self::FIELD_REFERENCE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRId(array_merge($ext, $value))); + } else { + $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; } else { - $this->setReference(new FHIRUri($data[self::FIELD_REFERENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRUri($ext)); } } } @@ -603,39 +638,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExpressionLanguage::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExpressionLanguage::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpressionLanguage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpressionLanguage.php index eff3c96280..610dda7bb2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpressionLanguage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExpressionLanguage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRExpressionLanguage extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPRESSION_LANGUAGE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRExpressionLanguageList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtension.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtension.php index 0fc2819b51..39bc203f4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtension.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtension.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,6 @@ class FHIRExtension extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION; const FIELD_URL = 'url'; - const FIELD_URL_EXT = '_url'; const FIELD_VALUE_ADDRESS = 'valueAddress'; const FIELD_VALUE_AGE = 'valueAge'; const FIELD_VALUE_ANNOTATION = 'valueAnnotation'; @@ -158,7 +157,7 @@ class FHIRExtension extends FHIRElement const FIELD_VALUE_UUID_EXT = '_valueUuid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRUriPrimitive @@ -920,68 +919,96 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CANONICAL])) { - $ext = (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) - ? $data[self::FIELD_VALUE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_VALUE_CANONICAL] instanceof FHIRCanonical) { - $this->setValueCanonical($data[self::FIELD_VALUE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CANONICAL])) { - $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_VALUE_CANONICAL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CANONICAL]) || isset($data[self::FIELD_VALUE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_VALUE_CANONICAL])) { + $value = $data[self::FIELD_VALUE_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CANONICAL_EXT]) && is_array($data[self::FIELD_VALUE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_VALUE_CANONICAL_EXT]; } else { - $this->setValueCanonical(new FHIRCanonical($data[self::FIELD_VALUE_CANONICAL])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setValueCanonical($value); + } else if (is_array($value)) { + $this->setValueCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setValueCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -1033,52 +1060,73 @@ public function __construct($data = null) $this->setValueDataRequirement(new FHIRDataRequirement($data[self::FIELD_VALUE_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); - } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -1116,20 +1164,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -1139,52 +1194,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -1201,20 +1277,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PARAMETER_DEFINITION])) { @@ -1231,20 +1314,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1296,36 +1386,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1342,52 +1446,73 @@ public function __construct($data = null) $this->setValueTriggerDefinition(new FHIRTriggerDefinition($data[self::FIELD_VALUE_TRIGGER_DEFINITION])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); - } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); - } - } - if (isset($data[self::FIELD_VALUE_URL])) { - $ext = (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) - ? $data[self::FIELD_VALUE_URL_EXT] - : null; - if ($data[self::FIELD_VALUE_URL] instanceof FHIRUrl) { - $this->setValueUrl($data[self::FIELD_VALUE_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_VALUE_URL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URL])) { - $this->setValueUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_VALUE_URL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URL]) || isset($data[self::FIELD_VALUE_URL_EXT])) { + if (isset($data[self::FIELD_VALUE_URL])) { + $value = $data[self::FIELD_VALUE_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URL_EXT]) && is_array($data[self::FIELD_VALUE_URL_EXT])) { + $ext = $data[self::FIELD_VALUE_URL_EXT]; } else { - $this->setValueUrl(new FHIRUrl($data[self::FIELD_VALUE_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setValueUrl($value); + } else if (is_array($value)) { + $this->setValueUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setValueUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUrl(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_VALUE_USAGE_CONTEXT])) { @@ -1397,20 +1522,27 @@ public function __construct($data = null) $this->setValueUsageContext(new FHIRUsageContext($data[self::FIELD_VALUE_USAGE_CONTEXT])); } } - if (isset($data[self::FIELD_VALUE_UUID])) { - $ext = (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) - ? $data[self::FIELD_VALUE_UUID_EXT] - : null; - if ($data[self::FIELD_VALUE_UUID] instanceof FHIRUuid) { - $this->setValueUuid($data[self::FIELD_VALUE_UUID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $data[self::FIELD_VALUE_UUID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UUID])) { - $this->setValueUuid(new FHIRUuid(array_merge($ext, $data[self::FIELD_VALUE_UUID]))); - } + if (isset($data[self::FIELD_VALUE_UUID]) || isset($data[self::FIELD_VALUE_UUID_EXT])) { + if (isset($data[self::FIELD_VALUE_UUID])) { + $value = $data[self::FIELD_VALUE_UUID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_UUID_EXT]) && is_array($data[self::FIELD_VALUE_UUID_EXT])) { + $ext = $data[self::FIELD_VALUE_UUID_EXT]; } else { - $this->setValueUuid(new FHIRUuid($data[self::FIELD_VALUE_UUID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUuid) { + $this->setValueUuid($value); + } else if (is_array($value)) { + $this->setValueUuid(new FHIRUuid(array_merge($ext, $value))); + } else { + $this->setValueUuid(new FHIRUuid([FHIRUuid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUuid(new FHIRUuid($ext)); } } } @@ -3972,29 +4104,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCanonical())) { $a[self::FIELD_VALUE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_VALUE_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -4021,22 +4161,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -4057,8 +4203,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -4067,22 +4215,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -4094,8 +4248,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -4107,8 +4263,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -4135,15 +4293,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -4155,22 +4317,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getValueUrl())) { $a[self::FIELD_VALUE_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_VALUE_URL_EXT] = $enc; } } @@ -4179,11 +4347,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUuid())) { $a[self::FIELD_VALUE_UUID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUuid::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUuid::FIELD_VALUE]); $a[self::FIELD_VALUE_UUID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtensionContextType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtensionContextType.php index 76a37b6121..9e2c707d93 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtensionContextType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRExtensionContextType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRExtensionContextType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRExtensionContextTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRDeviceStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRDeviceStatus.php index 45c069fec5..62feb45a64 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRDeviceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRDeviceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFHIRDeviceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRDEVICE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRFHIRDeviceStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRSubstanceStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRSubstanceStatus.php index bf9c30159d..94aa3f5f70 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRSubstanceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRSubstanceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFHIRSubstanceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRSUBSTANCE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRFHIRSubstanceStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRVersion.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRVersion.php index ad669e2849..a6bc90b772 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFHIRVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRFHIRVersion extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRVERSION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRFHIRVersionList @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFamilyHistoryStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFamilyHistoryStatus.php index 14e72e4533..96e00a0a91 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFamilyHistoryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFamilyHistoryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFamilyHistoryStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRFamilyHistoryStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFilterOperator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFilterOperator.php index a60d817e39..9ef71044ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFilterOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFilterOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFilterOperator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRFilterOperatorList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFinancialResourceStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFinancialResourceStatusCodes.php index 0e4bcac5d5..d93c4eb655 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFinancialResourceStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFinancialResourceStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFinancialResourceStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FINANCIAL_RESOURCE_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRFinancialResourceStatusCodesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFlagStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFlagStatus.php index 83830431dc..00b69427ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFlagStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRFlagStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRFlagStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FLAG_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRFlagStatusList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGoalLifecycleStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGoalLifecycleStatus.php index bc849fc229..463eee372e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGoalLifecycleStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGoalLifecycleStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRGoalLifecycleStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GOAL_LIFECYCLE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRGoalLifecycleStatusList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentRule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentRule.php index 95e000e4af..49768a8748 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentRule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGraphCompartmentRule extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GRAPH_COMPARTMENT_RULE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRGraphCompartmentRuleList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentUse.php index 2891db7c1d..c71b2348ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGraphCompartmentUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGraphCompartmentUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GRAPH_COMPARTMENT_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRGraphCompartmentUseList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupMeasure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupMeasure.php index e1220b2c99..c4d766610a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupMeasure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupMeasure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGroupMeasure extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_MEASURE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRGroupMeasureList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupType.php index 7723f8f15b..2c714a9ed6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGroupType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGroupType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRGroupTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidanceResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidanceResponseStatus.php index ae4ce6a6ad..2c64670e16 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidanceResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidanceResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGuidanceResponseStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRGuidanceResponseStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidePageGeneration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidePageGeneration.php index c015640367..b11078ae2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidePageGeneration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuidePageGeneration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGuidePageGeneration extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_PAGE_GENERATION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRGuidePageGenerationList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuideParameterCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuideParameterCode.php index 0e2644a1dd..e7dfba56b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuideParameterCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRGuideParameterCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGuideParameterCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_PARAMETER_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRGuideParameterCodeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHTTPVerb.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHTTPVerb.php index 0e9709d16b..bc93255375 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHTTPVerb.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHTTPVerb.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRHTTPVerb extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_HTTPVERB; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRHTTPVerbList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHumanName.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHumanName.php index 31471c551a..f30207521c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHumanName.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRHumanName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRHumanName extends FHIRElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -197,49 +197,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FAMILY])) { - $ext = (isset($data[self::FIELD_FAMILY_EXT]) && is_array($data[self::FIELD_FAMILY_EXT])) - ? $data[self::FIELD_FAMILY_EXT] - : null; - if ($data[self::FIELD_FAMILY] instanceof FHIRString) { - $this->setFamily($data[self::FIELD_FAMILY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FAMILY])) { - $this->setFamily(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FAMILY]] + $ext)); - } else if (is_array($data[self::FIELD_FAMILY])) { - $this->setFamily(new FHIRString(array_merge($ext, $data[self::FIELD_FAMILY]))); - } + if (isset($data[self::FIELD_FAMILY]) || isset($data[self::FIELD_FAMILY_EXT])) { + if (isset($data[self::FIELD_FAMILY])) { + $value = $data[self::FIELD_FAMILY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FAMILY_EXT]) && is_array($data[self::FIELD_FAMILY_EXT])) { + $ext = $data[self::FIELD_FAMILY_EXT]; } else { - $this->setFamily(new FHIRString($data[self::FIELD_FAMILY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setFamily($value); + } else if (is_array($value)) { + $this->setFamily(new FHIRString(array_merge($ext, $value))); + } else { + $this->setFamily(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFamily(new FHIRString($ext)); } } - if (isset($data[self::FIELD_GIVEN])) { - $ext = (isset($data[self::FIELD_GIVEN_EXT]) && is_array($data[self::FIELD_GIVEN_EXT])) - ? $data[self::FIELD_GIVEN_EXT] - : null; - if (is_array($data[self::FIELD_GIVEN])) { - foreach($data[self::FIELD_GIVEN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addGiven($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addGiven(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_GIVEN]) || isset($data[self::FIELD_GIVEN_EXT])) { + if (isset($data[self::FIELD_GIVEN])) { + $value = $data[self::FIELD_GIVEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GIVEN_EXT]) && is_array($data[self::FIELD_GIVEN_EXT])) { + $ext = $data[self::FIELD_GIVEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addGiven($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addGiven($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addGiven(new FHIRString(array_merge($v, $iext))); + } else { + $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addGiven(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addGiven(new FHIRString(array_merge($ext, $value))); + } else { + $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addGiven(new FHIRString($iext)); } - } elseif ($data[self::FIELD_GIVEN] instanceof FHIRString) { - $this->addGiven($data[self::FIELD_GIVEN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_GIVEN])) { - $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GIVEN]] + $ext)); - } else { - $this->addGiven(new FHIRString($data[self::FIELD_GIVEN])); } } if (isset($data[self::FIELD_PERIOD])) { @@ -249,94 +265,126 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_PREFIX])) { - $ext = (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) - ? $data[self::FIELD_PREFIX_EXT] - : null; - if (is_array($data[self::FIELD_PREFIX])) { - foreach($data[self::FIELD_PREFIX] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPrefix($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPrefix(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PREFIX]) || isset($data[self::FIELD_PREFIX_EXT])) { + if (isset($data[self::FIELD_PREFIX])) { + $value = $data[self::FIELD_PREFIX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) { + $ext = $data[self::FIELD_PREFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPrefix($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPrefix($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPrefix(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPrefix(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPrefix(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPrefix(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PREFIX] instanceof FHIRString) { - $this->addPrefix($data[self::FIELD_PREFIX]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PREFIX])) { - $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREFIX]] + $ext)); - } else { - $this->addPrefix(new FHIRString($data[self::FIELD_PREFIX])); } } - if (isset($data[self::FIELD_SUFFIX])) { - $ext = (isset($data[self::FIELD_SUFFIX_EXT]) && is_array($data[self::FIELD_SUFFIX_EXT])) - ? $data[self::FIELD_SUFFIX_EXT] - : null; - if (is_array($data[self::FIELD_SUFFIX])) { - foreach($data[self::FIELD_SUFFIX] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSuffix($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSuffix(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUFFIX]) || isset($data[self::FIELD_SUFFIX_EXT])) { + if (isset($data[self::FIELD_SUFFIX])) { + $value = $data[self::FIELD_SUFFIX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUFFIX_EXT]) && is_array($data[self::FIELD_SUFFIX_EXT])) { + $ext = $data[self::FIELD_SUFFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSuffix($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSuffix($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSuffix(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSuffix(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSuffix(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_SUFFIX] instanceof FHIRString) { - $this->addSuffix($data[self::FIELD_SUFFIX]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUFFIX])) { - $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUFFIX]] + $ext)); - } else { - $this->addSuffix(new FHIRString($data[self::FIELD_SUFFIX])); - } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSuffix(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRNameUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRNameUse([FHIRNameUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRNameUse(array_merge($ext, $data[self::FIELD_USE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIRNameUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNameUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRNameUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRNameUse([FHIRNameUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRNameUse($ext)); } } } @@ -850,73 +898,106 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFamily())) { $a[self::FIELD_FAMILY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FAMILY_EXT] = $enc; } } if ([] !== ($vs = $this->getGiven())) { $a[self::FIELD_GIVEN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_GIVEN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_GIVEN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_GIVEN_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_GIVEN_EXT] = $encs; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPrefix())) { $a[self::FIELD_PREFIX] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PREFIX][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PREFIX_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PREFIX_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PREFIX_EXT] = $encs; + } } if ([] !== ($vs = $this->getSuffix())) { $a[self::FIELD_SUFFIX] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUFFIX][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUFFIX_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUFFIX_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUFFIX_EXT] = $encs; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNameUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNameUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRId.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRId.php index f8633643a3..c0ac1e8724 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRId.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,10 +83,9 @@ class FHIRId extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRIdPrimitive @@ -263,6 +262,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifier.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifier.php index c236776215..bb1f0a5510 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRIdentifier extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -197,20 +197,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -220,36 +227,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRIdentifierUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRIdentifierUse([FHIRIdentifierUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRIdentifierUse(array_merge($ext, $data[self::FIELD_USE]))); - } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRIdentifierUse($data[self::FIELD_USE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIdentifierUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRIdentifierUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRIdentifierUse([FHIRIdentifierUse::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUse(new FHIRIdentifierUse($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -609,8 +630,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } @@ -619,18 +642,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIdentifierUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIdentifierUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifierUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifierUse.php index cc6fb0512c..f02e67854a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifierUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentifierUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRIdentifierUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRIdentifierUseList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentityAssuranceLevel.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentityAssuranceLevel.php index 97cfd89ec4..bbacd6686d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentityAssuranceLevel.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIdentityAssuranceLevel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRIdentityAssuranceLevel extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTITY_ASSURANCE_LEVEL; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRIdentityAssuranceLevelList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImagingStudyStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImagingStudyStatus.php index c087539338..3e36e57495 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImagingStudyStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImagingStudyStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRImagingStudyStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMAGING_STUDY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRImagingStudyStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationEvaluationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationEvaluationStatusCodes.php index be6e62d694..aab1acd6c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationEvaluationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationEvaluationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRImmunizationEvaluationStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_EVALUATION_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRImmunizationEvaluationStatusCodesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationStatusCodes.php index 7adc0848fe..0f8d974185 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRImmunizationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRImmunizationStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRImmunizationStatusCodesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInstant.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInstant.php index 03cb36409e..271b374d2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInstant.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInstant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,10 +83,9 @@ class FHIRInstant extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRInstantPrimitive @@ -263,6 +262,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInteger.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInteger.php index 302dff397b..e8af006192 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInteger.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInteger.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRInteger extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INTEGER; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRIntegerPrimitive @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoicePriceComponentType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoicePriceComponentType.php index 0152c5a06c..fe4821e645 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoicePriceComponentType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoicePriceComponentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRInvoicePriceComponentType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INVOICE_PRICE_COMPONENT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRInvoicePriceComponentTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoiceStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoiceStatus.php index 32db32a63f..a4093076a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoiceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRInvoiceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRInvoiceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INVOICE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRInvoiceStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueSeverity.php index 496b5ec1ee..116ac8a35b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRIssueSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRIssueSeverityList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueType.php index 2833e754ea..90b889778c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRIssueType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRIssueType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRIssueTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkType.php index 66093a161e..3c382fa6df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRLinkType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINK_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRLinkTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkageType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkageType.php index 274cb7e2ed..636fbcbca0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkageType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLinkageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRLinkageType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINKAGE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRLinkageTypeList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListMode.php index 2479198897..3fbdf78464 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRListMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRListModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListStatus.php index 70353fcff5..b37f0d9b53 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRListStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRListStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRListStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationMode.php index 5d39af818c..0ac3acabdb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRLocationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRLocationModeList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationStatus.php index 051817b870..679b04ee82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRLocationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRLocationStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMarkdown.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMarkdown.php index 63b7cf6207..ce9c265062 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMarkdown.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMarkdown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,10 +84,9 @@ class FHIRMarkdown extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MARKDOWN; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRMarkdownPrimitive @@ -264,6 +263,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportStatus.php index 2cc1fcf635..4874e10bdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMeasureReportStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRMeasureReportStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportType.php index 4bc622d678..a202217513 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeasureReportType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMeasureReportType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRMeasureReportTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationRequestIntent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationRequestIntent.php index cb961b8741..d89c9efc93 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationRequestIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationRequestIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationRequestIntent extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_INTENT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRMedicationRequestIntentList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationStatusCodes.php index fce84fc3c1..d9ab07b3ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRMedicationStatusCodesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationrequestStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationrequestStatus.php index 596c6706aa..11f78c6a83 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationrequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMedicationrequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRMedicationrequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATIONREQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRMedicationrequestStatusList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageSignificanceCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageSignificanceCategory.php index 845eb08f3d..25f02999ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageSignificanceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageSignificanceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMessageSignificanceCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRMessageSignificanceCategoryList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageheaderResponseRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageheaderResponseRequest.php index 963fffa76d..90aa820622 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageheaderResponseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMessageheaderResponseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRMessageheaderResponseRequest extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGEHEADER_RESPONSE_REQUEST; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRMessageheaderResponseRequestList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeta.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeta.php index 04a86d7b84..baf5a7a6f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeta.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMeta.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMeta extends FHIRElement const FIELD_VERSION_ID_EXT = '_versionId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An instant in time - known at least to the second @@ -198,49 +198,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LAST_UPDATED])) { - $ext = (isset($data[self::FIELD_LAST_UPDATED_EXT]) && is_array($data[self::FIELD_LAST_UPDATED_EXT])) - ? $data[self::FIELD_LAST_UPDATED_EXT] - : null; - if ($data[self::FIELD_LAST_UPDATED] instanceof FHIRInstant) { - $this->setLastUpdated($data[self::FIELD_LAST_UPDATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_UPDATED])) { - $this->setLastUpdated(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_LAST_UPDATED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_UPDATED])) { - $this->setLastUpdated(new FHIRInstant(array_merge($ext, $data[self::FIELD_LAST_UPDATED]))); - } + if (isset($data[self::FIELD_LAST_UPDATED]) || isset($data[self::FIELD_LAST_UPDATED_EXT])) { + if (isset($data[self::FIELD_LAST_UPDATED])) { + $value = $data[self::FIELD_LAST_UPDATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_UPDATED_EXT]) && is_array($data[self::FIELD_LAST_UPDATED_EXT])) { + $ext = $data[self::FIELD_LAST_UPDATED_EXT]; } else { - $this->setLastUpdated(new FHIRInstant($data[self::FIELD_LAST_UPDATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setLastUpdated($value); + } else if (is_array($value)) { + $this->setLastUpdated(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setLastUpdated(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastUpdated(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_PROFILE])) { - foreach($data[self::FIELD_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProfile(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProfile(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProfile(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProfile(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->addProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROFILE])) { - $this->addProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else { - $this->addProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); } } if (isset($data[self::FIELD_SECURITY])) { @@ -261,20 +277,27 @@ public function __construct($data = null) $this->addSecurity(new FHIRCoding($data[self::FIELD_SECURITY])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); } } if (isset($data[self::FIELD_TAG])) { @@ -295,20 +318,27 @@ public function __construct($data = null) $this->addTag(new FHIRCoding($data[self::FIELD_TAG])); } } - if (isset($data[self::FIELD_VERSION_ID])) { - $ext = (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) - ? $data[self::FIELD_VERSION_ID_EXT] - : null; - if ($data[self::FIELD_VERSION_ID] instanceof FHIRId) { - $this->setVersionId($data[self::FIELD_VERSION_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VERSION_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRId(array_merge($ext, $data[self::FIELD_VERSION_ID]))); - } + if (isset($data[self::FIELD_VERSION_ID]) || isset($data[self::FIELD_VERSION_ID_EXT])) { + if (isset($data[self::FIELD_VERSION_ID])) { + $value = $data[self::FIELD_VERSION_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) { + $ext = $data[self::FIELD_VERSION_ID_EXT]; } else { - $this->setVersionId(new FHIRId($data[self::FIELD_VERSION_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setVersionId($value); + } else if (is_array($value)) { + $this->setVersionId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setVersionId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersionId(new FHIRId($ext)); } } } @@ -816,46 +846,75 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLastUpdated())) { $a[self::FIELD_LAST_UPDATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_LAST_UPDATED_EXT] = $enc; } } if ([] !== ($vs = $this->getProfile())) { $a[self::FIELD_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROFILE_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROFILE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSecurity())) { - $a[self::FIELD_SECURITY] = $vs; + $a[self::FIELD_SECURITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if ([] !== ($vs = $this->getTag())) { - $a[self::FIELD_TAG] = $vs; + $a[self::FIELD_TAG] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TAG][] = $v; + } } if (null !== ($v = $this->getVersionId())) { $a[self::FIELD_VERSION_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VERSION_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMoney.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMoney.php index b4b4520192..0387589cb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMoney.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRMoney.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRMoney extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CURRENCY])) { - $ext = (isset($data[self::FIELD_CURRENCY_EXT]) && is_array($data[self::FIELD_CURRENCY_EXT])) - ? $data[self::FIELD_CURRENCY_EXT] - : null; - if ($data[self::FIELD_CURRENCY] instanceof FHIRCode) { - $this->setCurrency($data[self::FIELD_CURRENCY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CURRENCY])) { - $this->setCurrency(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CURRENCY]] + $ext)); - } else if (is_array($data[self::FIELD_CURRENCY])) { - $this->setCurrency(new FHIRCode(array_merge($ext, $data[self::FIELD_CURRENCY]))); - } + if (isset($data[self::FIELD_CURRENCY]) || isset($data[self::FIELD_CURRENCY_EXT])) { + if (isset($data[self::FIELD_CURRENCY])) { + $value = $data[self::FIELD_CURRENCY]; } else { - $this->setCurrency(new FHIRCode($data[self::FIELD_CURRENCY])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_CURRENCY_EXT]) && is_array($data[self::FIELD_CURRENCY_EXT])) { + $ext = $data[self::FIELD_CURRENCY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCurrency($value); + } else if (is_array($value)) { + $this->setCurrency(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCurrency(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCurrency(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -369,18 +383,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCurrency())) { $a[self::FIELD_CURRENCY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CURRENCY_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNameUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNameUse.php index d56165f7a6..fd22f0199b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNameUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNameUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNameUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAME_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRNameUseList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemIdentifierType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemIdentifierType.php index 3050217c7c..fb5c1cdd5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemIdentifierType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemIdentifierType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNamingSystemIdentifierType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_IDENTIFIER_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRNamingSystemIdentifierTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemType.php index e9b1bbb9bf..435cf31c1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNamingSystemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNamingSystemType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRNamingSystemTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrative.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrative.php index be519fa801..30675606e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrative.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,12 +81,11 @@ class FHIRNarrative extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE; const FIELD_DIV = 'div'; - const FIELD_DIV_EXT = '_div'; const FIELD_STATUS = 'status'; const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The actual narrative content, a stripped down version of XHTML. @@ -132,20 +131,27 @@ public function __construct($data = null) if (isset($data[self::FIELD_DIV])) { $this->setDiv($data[self::FIELD_DIV]); } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRNarrativeStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNarrativeStatus([FHIRNarrativeStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNarrativeStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRNarrativeStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNarrativeStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRNarrativeStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRNarrativeStatus([FHIRNarrativeStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRNarrativeStatus($ext)); } } } @@ -329,11 +335,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNarrativeStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNarrativeStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrativeStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrativeStatus.php index 9a7ec8159d..b7feea342b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrativeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNarrativeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNarrativeStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRNarrativeStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNoteType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNoteType.php index a852d4c077..78a4e94332 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNoteType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRNoteType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRNoteType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NOTE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRNoteTypeList @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationDataType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationDataType.php index dd17a81bcf..5b22c28cdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRObservationDataType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_DATA_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRObservationDataTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationRangeCategory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationRangeCategory.php index dbae91faa1..ed6c78344e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationRangeCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationRangeCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRObservationRangeCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RANGE_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRObservationRangeCategoryList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationStatus.php index e2bfefcf68..ab9ef52ff9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRObservationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRObservationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRObservationStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROid.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROid.php index 6c5898dd97..b23eb00e0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROid.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIROid extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIROidPrimitive @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationKind.php index 0d77f7d9eb..e34cbd6a90 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIROperationKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIROperationKindList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationParameterUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationParameterUse.php index 3bf7b8a013..4ec11c8c3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationParameterUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROperationParameterUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIROperationParameterUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_PARAMETER_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIROperationParameterUseList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROrientationType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROrientationType.php index 1e4e79bac0..db0acb18cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROrientationType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIROrientationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIROrientationType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ORIENTATION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIROrientationTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParameterDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParameterDefinition.php index ab6ac714b1..7e7ef3a08e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParameterDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParameterDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRParameterDefinition extends FHIRElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -206,116 +206,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); - } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); - } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRCode) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRCode($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_PROFILE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; } else { - $this->setProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProfile(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRCode) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRCode(array_merge($ext, $data[self::FIELD_USE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRCode($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRCode($ext)); } } } @@ -796,53 +845,70 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipantRequired.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipantRequired.php index d08d4bee07..32b5d1f553 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipantRequired.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipantRequired.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRParticipantRequired extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPANT_REQUIRED; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRParticipantRequiredList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipationStatus.php index 900a97de61..fb66b46112 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRParticipationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRParticipationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRParticipationStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPeriod.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPeriod.php index 9568931648..af397a7124 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPeriod extends FHIRElement const FIELD_START_EXT = '_start'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -139,36 +139,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRDateTime) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRDateTime($data[self::FIELD_END])); + $value = null; } - } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRDateTime) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRDateTime(array_merge($ext, $data[self::FIELD_START]))); + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRDateTime($data[self::FIELD_START])); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRDateTime($ext)); } } } @@ -389,18 +403,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPositiveInt.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPositiveInt.php index 3c617668b4..a9b4c636ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPositiveInt.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPositiveInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRPositiveInt extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_POSITIVE_INT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRPositiveIntPrimitive @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyRepresentation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyRepresentation.php index b9cdcbb921..ebc3ef5172 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRPropertyRepresentation extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRPropertyRepresentationList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyType.php index b3c1b4b8cb..1078f8df2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPropertyType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRPropertyType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRPropertyTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRProvenanceEntityRole.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRProvenanceEntityRole.php index f2f54c6503..99284e6bba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRProvenanceEntityRole.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRProvenanceEntityRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRProvenanceEntityRole extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRProvenanceEntityRoleList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPublicationStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPublicationStatus.php index edaf34711c..4ddac0cd76 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPublicationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRPublicationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRPublicationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PUBLICATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRPublicationStatusList @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQualityType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQualityType.php index 3096cde9a1..661def51c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQualityType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQualityType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQualityType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUALITY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRQualityTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity.php index 0316578961..f825159909 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuantity extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -175,84 +175,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_COMPARATOR])) { - $ext = (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) - ? $data[self::FIELD_COMPARATOR_EXT] - : null; - if ($data[self::FIELD_COMPARATOR] instanceof FHIRQuantityComparator) { - $this->setComparator($data[self::FIELD_COMPARATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARATOR])) { - $this->setComparator(new FHIRQuantityComparator([FHIRQuantityComparator::FIELD_VALUE => $data[self::FIELD_COMPARATOR]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARATOR])) { - $this->setComparator(new FHIRQuantityComparator(array_merge($ext, $data[self::FIELD_COMPARATOR]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setComparator(new FHIRQuantityComparator($data[self::FIELD_COMPARATOR])); + $ext = []; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_UNIT])) { - $ext = (isset($data[self::FIELD_UNIT_EXT]) && is_array($data[self::FIELD_UNIT_EXT])) - ? $data[self::FIELD_UNIT_EXT] - : null; - if ($data[self::FIELD_UNIT] instanceof FHIRString) { - $this->setUnit($data[self::FIELD_UNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UNIT])) { - $this->setUnit(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_UNIT]] + $ext)); - } else if (is_array($data[self::FIELD_UNIT])) { - $this->setUnit(new FHIRString(array_merge($ext, $data[self::FIELD_UNIT]))); + if (isset($data[self::FIELD_COMPARATOR]) || isset($data[self::FIELD_COMPARATOR_EXT])) { + if (isset($data[self::FIELD_COMPARATOR])) { + $value = $data[self::FIELD_COMPARATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) { + $ext = $data[self::FIELD_COMPARATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuantityComparator) { + $this->setComparator($value); + } else if (is_array($value)) { + $this->setComparator(new FHIRQuantityComparator(array_merge($ext, $value))); + } else { + $this->setComparator(new FHIRQuantityComparator([FHIRQuantityComparator::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComparator(new FHIRQuantityComparator($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setUnit(new FHIRString($data[self::FIELD_UNIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_UNIT]) || isset($data[self::FIELD_UNIT_EXT])) { + if (isset($data[self::FIELD_UNIT])) { + $value = $data[self::FIELD_UNIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UNIT_EXT]) && is_array($data[self::FIELD_UNIT_EXT])) { + $ext = $data[self::FIELD_UNIT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUnit($value); + } else if (is_array($value)) { + $this->setUnit(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUnit(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUnit(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -604,39 +639,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getComparator())) { $a[self::FIELD_COMPARATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuantityComparator::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuantityComparator::FIELD_VALUE]); $a[self::FIELD_COMPARATOR_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_UNIT_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRAge.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRAge.php index 607b99324f..3e5b1ebcad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRAge.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRAge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRAge extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Age diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRCount.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRCount.php index a75b7f6177..a7883daa4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRCount.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRCount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCount extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COUNT; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Count diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDistance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDistance.php index 95c346d991..60105b2b45 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDistance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDistance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRDistance extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DISTANCE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Distance diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDuration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDuration.php index d4c044d288..bbb0f4a20d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDuration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantity/FHIRDuration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRDuration extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DURATION; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Duration diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantityComparator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantityComparator.php index 40927b9549..cd793283fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantityComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuantityComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQuantityComparator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRQuantityComparatorList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemOperator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemOperator.php index b2edd5e9ca..083b8b6da1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQuestionnaireItemOperator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_ITEM_OPERATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRQuestionnaireItemOperatorList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemType.php index f15c24fa85..898ae4035f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireItemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRQuestionnaireItemType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_ITEM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRQuestionnaireItemTypeList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireResponseStatus.php index 64cb18f527..6d698bce26 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRQuestionnaireResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQuestionnaireResponseStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRQuestionnaireResponseStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRange.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRange.php index 7eab6006ec..cacc1fc646 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRange.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRange extends FHIRElement const FIELD_LOW = 'low'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -326,6 +326,9 @@ public function jsonSerialize() if (null !== ($v = $this->getLow())) { $a[self::FIELD_LOW] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRatio.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRatio.php index 73e24cbd77..572582e871 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRatio.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRatio.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRRatio extends FHIRElement const FIELD_NUMERATOR = 'numerator'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -327,6 +327,9 @@ public function jsonSerialize() if (null !== ($v = $this->getNumerator())) { $a[self::FIELD_NUMERATOR] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReference.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReference.php index bd23c6b95f..8690fc38c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReference.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRReference extends FHIRElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -176,20 +176,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -199,36 +206,50 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRString) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE]))); - } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRString($data[self::FIELD_REFERENCE])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRUri) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRUri(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReference(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRUri($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setType(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRUri($ext)); } } } @@ -561,8 +582,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } @@ -571,18 +594,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceHandlingPolicy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceHandlingPolicy.php index cf6770de11..7adf0f95ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceHandlingPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceHandlingPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRReferenceHandlingPolicy extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERENCE_HANDLING_POLICY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRReferenceHandlingPolicyList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceVersionRules.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceVersionRules.php index c058efded1..e70527cc60 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceVersionRules.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRReferenceVersionRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRReferenceVersionRules extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERENCE_VERSION_RULES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRReferenceVersionRulesList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifact.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifact.php index 8d3d7ad7d0..2206630ab4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifact.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRRelatedArtifact extends FHIRElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string that may contain Github Flavored Markdown syntax for optional @@ -204,36 +204,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CITATION])) { - $ext = (isset($data[self::FIELD_CITATION_EXT]) && is_array($data[self::FIELD_CITATION_EXT])) - ? $data[self::FIELD_CITATION_EXT] - : null; - if ($data[self::FIELD_CITATION] instanceof FHIRMarkdown) { - $this->setCitation($data[self::FIELD_CITATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CITATION])) { - $this->setCitation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_CITATION]] + $ext)); - } else if (is_array($data[self::FIELD_CITATION])) { - $this->setCitation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_CITATION]))); - } + if (isset($data[self::FIELD_CITATION]) || isset($data[self::FIELD_CITATION_EXT])) { + if (isset($data[self::FIELD_CITATION])) { + $value = $data[self::FIELD_CITATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CITATION_EXT]) && is_array($data[self::FIELD_CITATION_EXT])) { + $ext = $data[self::FIELD_CITATION_EXT]; } else { - $this->setCitation(new FHIRMarkdown($data[self::FIELD_CITATION])); - } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCitation($value); + } else if (is_array($value)) { + $this->setCitation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCitation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCitation(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOCUMENT])) { @@ -243,68 +257,96 @@ public function __construct($data = null) $this->setDocument(new FHIRAttachment($data[self::FIELD_DOCUMENT])); } } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); - } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); - } - } - if (isset($data[self::FIELD_RESOURCE])) { - $ext = (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) - ? $data[self::FIELD_RESOURCE_EXT] - : null; - if ($data[self::FIELD_RESOURCE] instanceof FHIRCanonical) { - $this->setResource($data[self::FIELD_RESOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_RESOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRCanonical(array_merge($ext, $data[self::FIELD_RESOURCE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RESOURCE]) || isset($data[self::FIELD_RESOURCE_EXT])) { + if (isset($data[self::FIELD_RESOURCE])) { + $value = $data[self::FIELD_RESOURCE]; } else { - $this->setResource(new FHIRCanonical($data[self::FIELD_RESOURCE])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRRelatedArtifactType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRRelatedArtifactType([FHIRRelatedArtifactType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRRelatedArtifactType(array_merge($ext, $data[self::FIELD_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setResource($value); + } else if (is_array($value)) { + $this->setResource(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setResource(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResource(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRRelatedArtifactType($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUrl) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUrl(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRelatedArtifactType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRRelatedArtifactType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRRelatedArtifactType([FHIRRelatedArtifactType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRRelatedArtifactType($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUrl($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUrl($ext)); } } } @@ -753,15 +795,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCitation())) { $a[self::FIELD_CITATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_CITATION_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } @@ -770,32 +816,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_RESOURCE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRelatedArtifactType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRelatedArtifactType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifactType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifactType.php index 80f2e291e2..850ee5a065 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifactType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRelatedArtifactType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRelatedArtifactType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRRelatedArtifactTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRemittanceOutcome.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRemittanceOutcome.php index 3678cbfc9b..d5c8fa58c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRemittanceOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRemittanceOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRRemittanceOutcome extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REMITTANCE_OUTCOME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRRemittanceOutcomeList @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRepositoryType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRepositoryType.php index 1157eaec16..9c4854a835 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRepositoryType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRepositoryType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRepositoryType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REPOSITORY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRRepositoryTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestIntent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestIntent.php index 2ff7774cdd..fac2d94c8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRRequestIntent extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_INTENT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRRequestIntentList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestPriority.php index 252451f615..f62ed12b88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRequestPriority extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_PRIORITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRRequestPriorityList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestResourceType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestResourceType.php index 6b6c668f24..8fd6b565df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestResourceType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestResourceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRequestResourceType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_RESOURCE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRRequestResourceTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestStatus.php index 668113623a..91b40df31d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRRequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRRequestStatusList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchElementType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchElementType.php index cba8fd5f6c..3f7b67f556 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchElementType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchElementType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResearchElementType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_ELEMENT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRResearchElementTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchStudyStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchStudyStatus.php index 239e24582d..0218463992 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchStudyStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchStudyStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResearchStudyStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRResearchStudyStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchSubjectStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchSubjectStatus.php index d30ec89076..0202114f0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchSubjectStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResearchSubjectStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResearchSubjectStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRResearchSubjectStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceType.php index 6a5041877e..a770cadf48 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResourceType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRResourceTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceVersionPolicy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceVersionPolicy.php index 15a17431f3..f65c260277 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceVersionPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResourceVersionPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResourceVersionPolicy extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_VERSION_POLICY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRResourceVersionPolicyList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResponseType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResponseType.php index 6fb356882b..8368273eab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResponseType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRResponseType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResponseType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRResponseTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRestfulCapabilityMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRestfulCapabilityMode.php index 337c473d6d..949bbd836f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRestfulCapabilityMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRRestfulCapabilityMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRestfulCapabilityMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_CAPABILITY_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRRestfulCapabilityModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSPDXLicense.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSPDXLicense.php index e9dc0198bf..c6969b0528 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSPDXLicense.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSPDXLicense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRSPDXLicense extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPDXLICENSE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSPDXLicenseList @@ -257,6 +256,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledData.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledData.php index 976f98fd6a..36fad3754c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledData.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRSampledData extends FHIRElement const FIELD_UPPER_LIMIT_EXT = '_upperLimit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A series of data points which are decimal values separated by a single space @@ -205,68 +205,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRSampledDataDataType) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRSampledDataDataType([FHIRSampledDataDataType::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRSampledDataDataType(array_merge($ext, $data[self::FIELD_DATA]))); - } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; } else { - $this->setData(new FHIRSampledDataDataType($data[self::FIELD_DATA])); - } - } - if (isset($data[self::FIELD_DIMENSIONS])) { - $ext = (isset($data[self::FIELD_DIMENSIONS_EXT]) && is_array($data[self::FIELD_DIMENSIONS_EXT])) - ? $data[self::FIELD_DIMENSIONS_EXT] - : null; - if ($data[self::FIELD_DIMENSIONS] instanceof FHIRPositiveInt) { - $this->setDimensions($data[self::FIELD_DIMENSIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIMENSIONS])) { - $this->setDimensions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DIMENSIONS]] + $ext)); - } else if (is_array($data[self::FIELD_DIMENSIONS])) { - $this->setDimensions(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DIMENSIONS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSampledDataDataType) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRSampledDataDataType(array_merge($ext, $value))); + } else { + $this->setData(new FHIRSampledDataDataType([FHIRSampledDataDataType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setData(new FHIRSampledDataDataType($ext)); + } + } + if (isset($data[self::FIELD_DIMENSIONS]) || isset($data[self::FIELD_DIMENSIONS_EXT])) { + if (isset($data[self::FIELD_DIMENSIONS])) { + $value = $data[self::FIELD_DIMENSIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIMENSIONS_EXT]) && is_array($data[self::FIELD_DIMENSIONS_EXT])) { + $ext = $data[self::FIELD_DIMENSIONS_EXT]; } else { - $this->setDimensions(new FHIRPositiveInt($data[self::FIELD_DIMENSIONS])); - } - } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDimensions($value); + } else if (is_array($value)) { + $this->setDimensions(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDimensions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDimensions(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); - } - } - if (isset($data[self::FIELD_LOWER_LIMIT])) { - $ext = (isset($data[self::FIELD_LOWER_LIMIT_EXT]) && is_array($data[self::FIELD_LOWER_LIMIT_EXT])) - ? $data[self::FIELD_LOWER_LIMIT_EXT] - : null; - if ($data[self::FIELD_LOWER_LIMIT] instanceof FHIRDecimal) { - $this->setLowerLimit($data[self::FIELD_LOWER_LIMIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOWER_LIMIT])) { - $this->setLowerLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LOWER_LIMIT]] + $ext)); - } else if (is_array($data[self::FIELD_LOWER_LIMIT])) { - $this->setLowerLimit(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LOWER_LIMIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_LOWER_LIMIT]) || isset($data[self::FIELD_LOWER_LIMIT_EXT])) { + if (isset($data[self::FIELD_LOWER_LIMIT])) { + $value = $data[self::FIELD_LOWER_LIMIT]; } else { - $this->setLowerLimit(new FHIRDecimal($data[self::FIELD_LOWER_LIMIT])); + $value = null; + } + if (isset($data[self::FIELD_LOWER_LIMIT_EXT]) && is_array($data[self::FIELD_LOWER_LIMIT_EXT])) { + $ext = $data[self::FIELD_LOWER_LIMIT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLowerLimit($value); + } else if (is_array($value)) { + $this->setLowerLimit(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLowerLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLowerLimit(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_ORIGIN])) { @@ -276,36 +304,50 @@ public function __construct($data = null) $this->setOrigin(new FHIRQuantity($data[self::FIELD_ORIGIN])); } } - if (isset($data[self::FIELD_PERIOD])) { - $ext = (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) - ? $data[self::FIELD_PERIOD_EXT] - : null; - if ($data[self::FIELD_PERIOD] instanceof FHIRDecimal) { - $this->setPeriod($data[self::FIELD_PERIOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD]))); - } + if (isset($data[self::FIELD_PERIOD]) || isset($data[self::FIELD_PERIOD_EXT])) { + if (isset($data[self::FIELD_PERIOD])) { + $value = $data[self::FIELD_PERIOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) { + $ext = $data[self::FIELD_PERIOD_EXT]; } else { - $this->setPeriod(new FHIRDecimal($data[self::FIELD_PERIOD])); - } - } - if (isset($data[self::FIELD_UPPER_LIMIT])) { - $ext = (isset($data[self::FIELD_UPPER_LIMIT_EXT]) && is_array($data[self::FIELD_UPPER_LIMIT_EXT])) - ? $data[self::FIELD_UPPER_LIMIT_EXT] - : null; - if ($data[self::FIELD_UPPER_LIMIT] instanceof FHIRDecimal) { - $this->setUpperLimit($data[self::FIELD_UPPER_LIMIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UPPER_LIMIT])) { - $this->setUpperLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_UPPER_LIMIT]] + $ext)); - } else if (is_array($data[self::FIELD_UPPER_LIMIT])) { - $this->setUpperLimit(new FHIRDecimal(array_merge($ext, $data[self::FIELD_UPPER_LIMIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriod($value); + } else if (is_array($value)) { + $this->setPeriod(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriod(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_UPPER_LIMIT]) || isset($data[self::FIELD_UPPER_LIMIT_EXT])) { + if (isset($data[self::FIELD_UPPER_LIMIT])) { + $value = $data[self::FIELD_UPPER_LIMIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UPPER_LIMIT_EXT]) && is_array($data[self::FIELD_UPPER_LIMIT_EXT])) { + $ext = $data[self::FIELD_UPPER_LIMIT_EXT]; } else { - $this->setUpperLimit(new FHIRDecimal($data[self::FIELD_UPPER_LIMIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setUpperLimit($value); + } else if (is_array($value)) { + $this->setUpperLimit(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setUpperLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUpperLimit(new FHIRDecimal($ext)); } } } @@ -772,29 +814,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSampledDataDataType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSampledDataDataType::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } if (null !== ($v = $this->getDimensions())) { $a[self::FIELD_DIMENSIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DIMENSIONS_EXT] = $enc; } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if (null !== ($v = $this->getLowerLimit())) { $a[self::FIELD_LOWER_LIMIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LOWER_LIMIT_EXT] = $enc; } } @@ -803,18 +853,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_EXT] = $enc; } } if (null !== ($v = $this->getUpperLimit())) { $a[self::FIELD_UPPER_LIMIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_UPPER_LIMIT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledDataDataType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledDataDataType.php index 1a166dd9dc..ecc40059ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledDataDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSampledDataDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,10 +76,9 @@ class FHIRSampledDataDataType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRSampledDataDataTypePrimitive @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchComparator.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchComparator.php index 05c7567da2..5a76e2a3db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSearchComparator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_COMPARATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSearchComparatorList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchEntryMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchEntryMode.php index b5f29c9d48..584677defe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchEntryMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchEntryMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRSearchEntryMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_ENTRY_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSearchEntryModeList @@ -257,6 +256,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchModifierCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchModifierCode.php index d8b610c639..19561727a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchModifierCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchModifierCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSearchModifierCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_MODIFIER_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSearchModifierCodeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchParamType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchParamType.php index 38d6c3371e..053273ce7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchParamType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSearchParamType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRSearchParamType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSearchParamTypeList @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSequenceType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSequenceType.php index 46c65de22b..ff0960ea4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSequenceType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSequenceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSequenceType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEQUENCE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSequenceTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSignature.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSignature.php index 61749e227b..6492f3b40c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSignature.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSignature.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRSignature extends FHIRElement const FIELD_WHO = 'who'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -213,20 +213,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRBase64Binary) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DATA]))); - } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; } else { - $this->setData(new FHIRBase64Binary($data[self::FIELD_DATA])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setData(new FHIRBase64Binary($ext)); } } if (isset($data[self::FIELD_ON_BEHALF_OF])) { @@ -236,36 +243,50 @@ public function __construct($data = null) $this->setOnBehalfOf(new FHIRReference($data[self::FIELD_ON_BEHALF_OF])); } } - if (isset($data[self::FIELD_SIG_FORMAT])) { - $ext = (isset($data[self::FIELD_SIG_FORMAT_EXT]) && is_array($data[self::FIELD_SIG_FORMAT_EXT])) - ? $data[self::FIELD_SIG_FORMAT_EXT] - : null; - if ($data[self::FIELD_SIG_FORMAT] instanceof FHIRCode) { - $this->setSigFormat($data[self::FIELD_SIG_FORMAT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SIG_FORMAT])) { - $this->setSigFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_SIG_FORMAT]] + $ext)); - } else if (is_array($data[self::FIELD_SIG_FORMAT])) { - $this->setSigFormat(new FHIRCode(array_merge($ext, $data[self::FIELD_SIG_FORMAT]))); - } + if (isset($data[self::FIELD_SIG_FORMAT]) || isset($data[self::FIELD_SIG_FORMAT_EXT])) { + if (isset($data[self::FIELD_SIG_FORMAT])) { + $value = $data[self::FIELD_SIG_FORMAT]; } else { - $this->setSigFormat(new FHIRCode($data[self::FIELD_SIG_FORMAT])); + $value = null; } - } - if (isset($data[self::FIELD_TARGET_FORMAT])) { - $ext = (isset($data[self::FIELD_TARGET_FORMAT_EXT]) && is_array($data[self::FIELD_TARGET_FORMAT_EXT])) - ? $data[self::FIELD_TARGET_FORMAT_EXT] - : null; - if ($data[self::FIELD_TARGET_FORMAT] instanceof FHIRCode) { - $this->setTargetFormat($data[self::FIELD_TARGET_FORMAT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_FORMAT])) { - $this->setTargetFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TARGET_FORMAT]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_FORMAT])) { - $this->setTargetFormat(new FHIRCode(array_merge($ext, $data[self::FIELD_TARGET_FORMAT]))); + if (isset($data[self::FIELD_SIG_FORMAT_EXT]) && is_array($data[self::FIELD_SIG_FORMAT_EXT])) { + $ext = $data[self::FIELD_SIG_FORMAT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setSigFormat($value); + } else if (is_array($value)) { + $this->setSigFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setSigFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSigFormat(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_TARGET_FORMAT]) || isset($data[self::FIELD_TARGET_FORMAT_EXT])) { + if (isset($data[self::FIELD_TARGET_FORMAT])) { + $value = $data[self::FIELD_TARGET_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_FORMAT_EXT]) && is_array($data[self::FIELD_TARGET_FORMAT_EXT])) { + $ext = $data[self::FIELD_TARGET_FORMAT_EXT]; } else { - $this->setTargetFormat(new FHIRCode($data[self::FIELD_TARGET_FORMAT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setTargetFormat($value); + } else if (is_array($value)) { + $this->setTargetFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setTargetFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTargetFormat(new FHIRCode($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -286,20 +307,27 @@ public function __construct($data = null) $this->addType(new FHIRCoding($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_WHEN])) { - $ext = (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) - ? $data[self::FIELD_WHEN_EXT] - : null; - if ($data[self::FIELD_WHEN] instanceof FHIRInstant) { - $this->setWhen($data[self::FIELD_WHEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_WHEN]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIRInstant(array_merge($ext, $data[self::FIELD_WHEN]))); - } + if (isset($data[self::FIELD_WHEN]) || isset($data[self::FIELD_WHEN_EXT])) { + if (isset($data[self::FIELD_WHEN])) { + $value = $data[self::FIELD_WHEN]; } else { - $this->setWhen(new FHIRInstant($data[self::FIELD_WHEN])); + $value = null; + } + if (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) { + $ext = $data[self::FIELD_WHEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setWhen($value); + } else if (is_array($value)) { + $this->setWhen(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setWhen(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhen(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_WHO])) { @@ -782,8 +810,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } @@ -792,31 +822,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getSigFormat())) { $a[self::FIELD_SIG_FORMAT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_SIG_FORMAT_EXT] = $enc; } } if (null !== ($v = $this->getTargetFormat())) { $a[self::FIELD_TARGET_FORMAT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TARGET_FORMAT_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if (null !== ($v = $this->getWhen())) { $a[self::FIELD_WHEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_WHEN_EXT] = $enc; } } if (null !== ($v = $this->getWho())) { $a[self::FIELD_WHO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlicingRules.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlicingRules.php index aafe5ea2ef..0cfe125cb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlicingRules.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlicingRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSlicingRules extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLICING_RULES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSlicingRulesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlotStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlotStatus.php index efb17189f4..c4f5d7fcae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlotStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSlotStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSlotStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLOT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSlotStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSortDirection.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSortDirection.php index 1480e9741c..db168ec0f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSortDirection.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSortDirection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSortDirection extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SORT_DIRECTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSortDirectionList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenContainedPreference.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenContainedPreference.php index 70064fa7ce..5f2bb832f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenContainedPreference.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenContainedPreference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSpecimenContainedPreference extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPECIMEN_CONTAINED_PREFERENCE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSpecimenContainedPreferenceList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenStatus.php index e1f0a47953..9e7cd785af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSpecimenStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSpecimenStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPECIMEN_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSpecimenStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStatus.php index bc32d8ac3d..08fd5f5eba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStrandType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStrandType.php index 51542c67dc..035378da96 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStrandType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStrandType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStrandType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRAND_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStrandTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRString.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRString.php index fe47d1d67b..eda0c84607 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRString.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRString.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRString extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRStringPrimitive @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureDefinitionKind.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureDefinitionKind.php index 19ec8564b6..5e7204de9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureDefinitionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureDefinitionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureDefinitionKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStructureDefinitionKindList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapContextType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapContextType.php index 85c1560dbe..bc6c02a5f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapContextType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapContextType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapContextType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_CONTEXT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStructureMapContextTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapGroupTypeMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapGroupTypeMode.php index ddb2b335e2..7592db23bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapGroupTypeMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapGroupTypeMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRStructureMapGroupTypeMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_GROUP_TYPE_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStructureMapGroupTypeModeList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapInputMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapInputMode.php index 7475f1eb06..f969b311cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapInputMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapInputMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapInputMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_INPUT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStructureMapInputModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapModelMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapModelMode.php index 1429b27fe0..c7046c83d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapModelMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapModelMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapModelMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_MODEL_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStructureMapModelModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapSourceListMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapSourceListMode.php index e0dc55fb97..7f05562579 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapSourceListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapSourceListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapSourceListMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_SOURCE_LIST_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStructureMapSourceListModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTargetListMode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTargetListMode.php index 5fe9420df8..064161e835 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTargetListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTargetListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapTargetListMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TARGET_LIST_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStructureMapTargetListModeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTransform.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTransform.php index 03df549948..9f4a0b65ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTransform.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRStructureMapTransform.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapTransform extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TRANSFORM; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRStructureMapTransformList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionChannelType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionChannelType.php index 579de6444e..87c5575af4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionChannelType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionChannelType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSubscriptionChannelType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_CHANNEL_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSubscriptionChannelTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionStatus.php index 1014432e8c..f05035a17f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSubscriptionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSubscriptionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSubscriptionStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyDeliveryStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyDeliveryStatus.php index c9f675cfde..d7b7ca29fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyDeliveryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyDeliveryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSupplyDeliveryStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSupplyDeliveryStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyRequestStatus.php index 910a518cf0..552ade7fb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSupplyRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSupplyRequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSupplyRequestStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSystemRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSystemRestfulInteraction.php index 1959cd5fcb..9087e23064 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSystemRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRSystemRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSystemRestfulInteraction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SYSTEM_RESTFUL_INTERACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRSystemRestfulInteractionList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskIntent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskIntent.php index 292a3bc89a..7aa3cf9fb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTaskIntent extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TASK_INTENT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTaskIntentList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskStatus.php index 9c7273fbbc..2b3aafbbee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTaskStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTaskStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TASK_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTaskStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportActionResult.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportActionResult.php index 0f87a73a3e..706da0d6ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportActionResult.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportActionResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestReportActionResult extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_ACTION_RESULT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTestReportActionResultList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportParticipantType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportParticipantType.php index 229ba3eb64..41abb058bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportParticipantType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportParticipantType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestReportParticipantType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_PARTICIPANT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTestReportParticipantTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportResult.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportResult.php index 9d18b82488..db4127794f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportResult.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestReportResult extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_RESULT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTestReportResultList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportStatus.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportStatus.php index cbd3998de6..5d347dcf8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestReportStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTestReportStatusList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestScriptRequestMethodCode.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestScriptRequestMethodCode.php index 7aa01fde79..f5294ed33c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestScriptRequestMethodCode.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTestScriptRequestMethodCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestScriptRequestMethodCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_REQUEST_METHOD_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTestScriptRequestMethodCodeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTime.php index b9e820963b..8c425918ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRTimePrimitive @@ -259,6 +258,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerDefinition.php index 49f96e7a92..e1e4f54b4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRTriggerDefinition extends FHIRElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A expression that is evaluated in a specified context and returns a value. The @@ -249,52 +249,73 @@ public function __construct($data = null) $this->addData(new FHIRDataRequirement($data[self::FIELD_DATA])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_TIMING_DATE])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) - ? $data[self::FIELD_TIMING_DATE_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE] instanceof FHIRDate) { - $this->setTimingDate($data[self::FIELD_TIMING_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_TIMING_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate(array_merge($ext, $data[self::FIELD_TIMING_DATE]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setTimingDate(new FHIRDate($data[self::FIELD_TIMING_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); + if (isset($data[self::FIELD_TIMING_DATE]) || isset($data[self::FIELD_TIMING_DATE_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE])) { + $value = $data[self::FIELD_TIMING_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setTimingDate($value); + } else if (is_array($value)) { + $this->setTimingDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTimingDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_REFERENCE])) { @@ -311,20 +332,27 @@ public function __construct($data = null) $this->setTimingTiming(new FHIRTiming($data[self::FIELD_TIMING_TIMING])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRTriggerType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRTriggerType([FHIRTriggerType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRTriggerType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRTriggerType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTriggerType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRTriggerType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRTriggerType([FHIRTriggerType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRTriggerType($ext)); } } } @@ -832,26 +860,38 @@ public function jsonSerialize() $a[self::FIELD_CONDITION] = $v; } if ([] !== ($vs = $this->getData())) { - $a[self::FIELD_DATA] = $vs; + $a[self::FIELD_DATA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getTimingDate())) { $a[self::FIELD_TIMING_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_EXT] = $enc; } } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -863,11 +903,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTriggerType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTriggerType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerType.php index 6d37c4ba38..892e2631b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTriggerType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTriggerType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TRIGGER_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTriggerTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeDerivationRule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeDerivationRule.php index c55fd9d220..2ce819ebd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeDerivationRule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeDerivationRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTypeDerivationRule extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_DERIVATION_RULE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTypeDerivationRuleList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeRestfulInteraction.php index 00be54938c..195dfd5b23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRTypeRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTypeRestfulInteraction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_RESTFUL_INTERACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRTypeRestfulInteractionList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUDIEntryType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUDIEntryType.php index 44330d6283..dd43a81bec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUDIEntryType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUDIEntryType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRUDIEntryType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UDIENTRY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRUDIEntryTypeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnitsOfTime.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnitsOfTime.php index db52aa61a3..65fb24d310 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnitsOfTime.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnitsOfTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRUnitsOfTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRUnitsOfTimeList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnsignedInt.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnsignedInt.php index d90aec5fa5..e514a4211b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnsignedInt.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUnsignedInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRUnsignedInt extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRUnsignedIntPrimitive @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUri.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUri.php index a38f2ede61..fa4de3aad5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUri.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUri.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRUri extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URI; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRUriPrimitive @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUrl.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUrl.php index 6328914d28..87a28721bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUrl.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUrl.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRUrl extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URL; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRUrlPrimitive @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUsageContext.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUsageContext.php index 0a97b4469a..649021fa63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUsageContext.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUsageContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRUsageContext extends FHIRElement const FIELD_VALUE_REFERENCE = 'valueReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -527,6 +527,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValueReference())) { $a[self::FIELD_VALUE_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUse.php index 53e6df2d9a..133126aa06 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRUseList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUuid.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUuid.php index 2c64ae13ec..23edaa6f63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUuid.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRUuid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRUuid extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UUID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRUuidPrimitive @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVConfidentialityClassification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVConfidentialityClassification.php index 6223fc0ad9..9a656b2d9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVConfidentialityClassification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVConfidentialityClassification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRVConfidentialityClassification extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_V_CONFIDENTIALITY_CLASSIFICATION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRVConfidentialityClassificationList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVariableType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVariableType.php index a1ad3e0dbf..99525c5920 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVariableType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVariableType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRVariableType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VARIABLE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRVariableTypeList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionBase.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionBase.php index e3a6e1cdf3..da73db74e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRVisionBase extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_BASE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRVisionBaseList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionEyes.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionEyes.php index 30b6855556..c5dbaaff19 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionEyes.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRVisionEyes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRVisionEyes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_EYES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRVisionEyesList @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRXPathUsageType.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRXPathUsageType.php index a0bb86c193..c2cd678edf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRXPathUsageType.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRElement/FHIRXPathUsageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRXPathUsageType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_XPATH_USAGE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\R4\FHIRCodePrimitive\FHIRXPathUsageTypeList @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRIdPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRIdPrimitive.php index 7504f04c56..8605768b69 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRIdPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRIdPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRIdPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRInstantPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRInstantPrimitive.php index b4c02d496e..b1659690ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRInstantPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRInstantPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRInstantPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRIntegerPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRIntegerPrimitive.php index a94b8403c9..f1797801a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRIntegerPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRIntegerPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|integer diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRMarkdownPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRMarkdownPrimitive.php index c95a0aa561..50cf43fec6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRMarkdownPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRMarkdownPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRMarkdownPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIROidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIROidPrimitive.php index aca2375020..cb56fa1b56 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIROidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIROidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIROidPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRPositiveIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRPositiveIntPrimitive.php index 8d9f828beb..387271e7a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRPositiveIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRPositiveIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRPositiveIntPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|integer diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource.php index 8212572745..5593f6d82f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRResource implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInter const FIELD_META = 'meta'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -175,52 +175,73 @@ public function __construct($data = null) $this->_addFHIRComment($data[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS]); } } - if (isset($data[self::FIELD_ID])) { - $ext = (isset($data[self::FIELD_ID_EXT]) && is_array($data[self::FIELD_ID_EXT])) - ? $data[self::FIELD_ID_EXT] - : null; - if ($data[self::FIELD_ID] instanceof FHIRId) { - $this->setId($data[self::FIELD_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ID])) { - $this->setId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ID])) { - $this->setId(new FHIRId(array_merge($ext, $data[self::FIELD_ID]))); - } + if (isset($data[self::FIELD_ID]) || isset($data[self::FIELD_ID_EXT])) { + if (isset($data[self::FIELD_ID])) { + $value = $data[self::FIELD_ID]; } else { - $this->setId(new FHIRId($data[self::FIELD_ID])); + $value = null; } - } - if (isset($data[self::FIELD_IMPLICIT_RULES])) { - $ext = (isset($data[self::FIELD_IMPLICIT_RULES_EXT]) && is_array($data[self::FIELD_IMPLICIT_RULES_EXT])) - ? $data[self::FIELD_IMPLICIT_RULES_EXT] - : null; - if ($data[self::FIELD_IMPLICIT_RULES] instanceof FHIRUri) { - $this->setImplicitRules($data[self::FIELD_IMPLICIT_RULES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IMPLICIT_RULES])) { - $this->setImplicitRules(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IMPLICIT_RULES]] + $ext)); - } else if (is_array($data[self::FIELD_IMPLICIT_RULES])) { - $this->setImplicitRules(new FHIRUri(array_merge($ext, $data[self::FIELD_IMPLICIT_RULES]))); - } + if (isset($data[self::FIELD_ID_EXT]) && is_array($data[self::FIELD_ID_EXT])) { + $ext = $data[self::FIELD_ID_EXT]; } else { - $this->setImplicitRules(new FHIRUri($data[self::FIELD_IMPLICIT_RULES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setId($value); + } else if (is_array($value)) { + $this->setId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setId(new FHIRId($ext)); } } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (isset($data[self::FIELD_IMPLICIT_RULES]) || isset($data[self::FIELD_IMPLICIT_RULES_EXT])) { + if (isset($data[self::FIELD_IMPLICIT_RULES])) { + $value = $data[self::FIELD_IMPLICIT_RULES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPLICIT_RULES_EXT]) && is_array($data[self::FIELD_IMPLICIT_RULES_EXT])) { + $ext = $data[self::FIELD_IMPLICIT_RULES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setImplicitRules($value); + } else if (is_array($value)) { + $this->setImplicitRules(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setImplicitRules(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setImplicitRules(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_META])) { @@ -567,28 +588,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getId())) { $a[self::FIELD_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_ID_EXT] = $enc; } } if (null !== ($v = $this->getImplicitRules())) { $a[self::FIELD_IMPLICIT_RULES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_IMPLICIT_RULES_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getMeta())) { $a[self::FIELD_META] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBinary.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBinary.php index dbe810548a..e9856d1ff9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRBinary extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_SECURITY_CONTEXT = 'securityContext'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -156,36 +156,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); - } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRBase64Binary) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DATA]))); + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; } else { - $this->setData(new FHIRBase64Binary($data[self::FIELD_DATA])); + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setData(new FHIRBase64Binary($ext)); } } if (isset($data[self::FIELD_SECURITY_CONTEXT])) { @@ -457,21 +471,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } if (null !== ($v = $this->getSecurityContext())) { $a[self::FIELD_SECURITY_CONTEXT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBundle.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBundle.php index 324a337430..36abcf7353 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBundle.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRBundle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRBundle extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A container for a collection of resources. @@ -257,52 +257,73 @@ public function __construct($data = null) $this->setSignature(new FHIRSignature($data[self::FIELD_SIGNATURE])); } } - if (isset($data[self::FIELD_TIMESTAMP])) { - $ext = (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) - ? $data[self::FIELD_TIMESTAMP_EXT] - : null; - if ($data[self::FIELD_TIMESTAMP] instanceof FHIRInstant) { - $this->setTimestamp($data[self::FIELD_TIMESTAMP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_TIMESTAMP]] + $ext)); - } else if (is_array($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant(array_merge($ext, $data[self::FIELD_TIMESTAMP]))); - } + if (isset($data[self::FIELD_TIMESTAMP]) || isset($data[self::FIELD_TIMESTAMP_EXT])) { + if (isset($data[self::FIELD_TIMESTAMP])) { + $value = $data[self::FIELD_TIMESTAMP]; } else { - $this->setTimestamp(new FHIRInstant($data[self::FIELD_TIMESTAMP])); + $value = null; } - } - if (isset($data[self::FIELD_TOTAL])) { - $ext = (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) - ? $data[self::FIELD_TOTAL_EXT] - : null; - if ($data[self::FIELD_TOTAL] instanceof FHIRUnsignedInt) { - $this->setTotal($data[self::FIELD_TOTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_TOTAL]] + $ext)); - } else if (is_array($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_TOTAL]))); - } + if (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) { + $ext = $data[self::FIELD_TIMESTAMP_EXT]; } else { - $this->setTotal(new FHIRUnsignedInt($data[self::FIELD_TOTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setTimestamp($value); + } else if (is_array($value)) { + $this->setTimestamp(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimestamp(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRBundleType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBundleType([FHIRBundleType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBundleType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TOTAL]) || isset($data[self::FIELD_TOTAL_EXT])) { + if (isset($data[self::FIELD_TOTAL])) { + $value = $data[self::FIELD_TOTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) { + $ext = $data[self::FIELD_TOTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setTotal($value); + } else if (is_array($value)) { + $this->setTotal(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setTotal(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTotal(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRBundleType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBundleType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRBundleType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRBundleType([FHIRBundleType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRBundleType($ext)); } } } @@ -773,38 +794,59 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getSignature())) { $a[self::FIELD_SIGNATURE] = $v; } if (null !== ($v = $this->getTimestamp())) { $a[self::FIELD_TIMESTAMP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_TIMESTAMP_EXT] = $enc; } } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_TOTAL_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBundleType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBundleType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource.php index cd31de14d1..c915c34dbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDomainResource extends FHIRResource const FIELD_TEXT = 'text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * (choose any one of the elements, but only one) @@ -656,17 +656,38 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContained())) { - $a[self::FIELD_CONTAINED] = $vs; + $a[self::FIELD_CONTAINED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINED][] = $v; + } } if ([] !== ($vs = $this->getExtension())) { - $a[self::FIELD_EXTENSION] = $vs; + $a[self::FIELD_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXTENSION][] = $v; + } } if ([] !== ($vs = $this->getModifierExtension())) { - $a[self::FIELD_MODIFIER_EXTENSION] = $vs; + $a[self::FIELD_MODIFIER_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER_EXTENSION][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAccount.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAccount.php index 0d6a6eda5e..1dad072d1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAccount.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAccount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRAccount extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A financial tool for tracking value accrued for a particular purpose. In the @@ -272,20 +272,27 @@ public function __construct($data = null) $this->addCoverage(new FHIRAccountCoverage($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_GUARANTOR])) { @@ -324,20 +331,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OWNER])) { @@ -361,20 +375,27 @@ public function __construct($data = null) $this->setServicePeriod(new FHIRPeriod($data[self::FIELD_SERVICE_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRAccountStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAccountStatus([FHIRAccountStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAccountStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRAccountStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAccountStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRAccountStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRAccountStatus([FHIRAccountStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRAccountStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1081,25 +1102,47 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCoverage())) { - $a[self::FIELD_COVERAGE] = $vs; + $a[self::FIELD_COVERAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getGuarantor())) { - $a[self::FIELD_GUARANTOR] = $vs; + $a[self::FIELD_GUARANTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GUARANTOR][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1114,17 +1157,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAccountStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAccountStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php index 65ba3756bf..b164925114 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -183,7 +183,7 @@ class FHIRActivityDefinition extends FHIRDomainResource implements PHPFHIRContai const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -901,20 +901,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -978,68 +985,96 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DO_NOT_PERFORM])) { - $ext = (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) - ? $data[self::FIELD_DO_NOT_PERFORM_EXT] - : null; - if ($data[self::FIELD_DO_NOT_PERFORM] instanceof FHIRBoolean) { - $this->setDoNotPerform($data[self::FIELD_DO_NOT_PERFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DO_NOT_PERFORM]] + $ext)); - } else if (is_array($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DO_NOT_PERFORM]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DO_NOT_PERFORM]) || isset($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + if (isset($data[self::FIELD_DO_NOT_PERFORM])) { + $value = $data[self::FIELD_DO_NOT_PERFORM]; } else { - $this->setDoNotPerform(new FHIRBoolean($data[self::FIELD_DO_NOT_PERFORM])); + $value = null; + } + if (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + $ext = $data[self::FIELD_DO_NOT_PERFORM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDoNotPerform($value); + } else if (is_array($value)) { + $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoNotPerform(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_DOSAGE])) { @@ -1121,20 +1156,27 @@ public function __construct($data = null) $this->addEndorser(new FHIRContactDetail($data[self::FIELD_ENDORSER])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -1155,20 +1197,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; } else { - $this->setIntent(new FHIRRequestIntent($data[self::FIELD_INTENT])); + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRRequestIntent($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -1189,65 +1238,88 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRRequestResourceType) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRRequestResourceType([FHIRRequestResourceType::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRRequestResourceType(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRRequestResourceType($data[self::FIELD_KIND])); - } - } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestResourceType) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRRequestResourceType(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRRequestResourceType([FHIRRequestResourceType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKind(new FHIRRequestResourceType($ext)); + } + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_LIBRARY])) { - $ext = (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) - ? $data[self::FIELD_LIBRARY_EXT] - : null; - if (is_array($data[self::FIELD_LIBRARY])) { - foreach($data[self::FIELD_LIBRARY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addLibrary($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLibrary(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LIBRARY]) || isset($data[self::FIELD_LIBRARY_EXT])) { + if (isset($data[self::FIELD_LIBRARY])) { + $value = $data[self::FIELD_LIBRARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) { + $ext = $data[self::FIELD_LIBRARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addLibrary($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addLibrary($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLibrary(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLibrary(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addLibrary(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLibrary(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_LIBRARY] instanceof FHIRCanonical) { - $this->addLibrary($data[self::FIELD_LIBRARY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LIBRARY])) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_LIBRARY]] + $ext)); - } else { - $this->addLibrary(new FHIRCanonical($data[self::FIELD_LIBRARY])); } } if (isset($data[self::FIELD_LOCATION])) { @@ -1257,20 +1329,27 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OBSERVATION_REQUIREMENT])) { @@ -1327,20 +1406,27 @@ public function __construct($data = null) $this->addParticipant(new FHIRActivityDefinitionParticipant($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_PRODUCT_CODEABLE_CONCEPT])) { @@ -1357,52 +1443,73 @@ public function __construct($data = null) $this->setProductReference(new FHIRReference($data[self::FIELD_PRODUCT_REFERENCE])); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_PROFILE]))); - } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; } else { - $this->setProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProfile(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -1466,20 +1573,27 @@ public function __construct($data = null) $this->addSpecimenRequirement(new FHIRReference($data[self::FIELD_SPECIMEN_REQUIREMENT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { @@ -1496,20 +1610,27 @@ public function __construct($data = null) $this->setSubjectReference(new FHIRReference($data[self::FIELD_SUBJECT_REFERENCE])); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $value = null; + } + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TIMING_AGE])) { @@ -1519,20 +1640,27 @@ public function __construct($data = null) $this->setTimingAge(new FHIRAge($data[self::FIELD_TIMING_AGE])); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_DURATION])) { @@ -1563,20 +1691,27 @@ public function __construct($data = null) $this->setTimingTiming(new FHIRTiming($data[self::FIELD_TIMING_TIMING])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1597,52 +1732,73 @@ public function __construct($data = null) $this->addTopic(new FHIRCodeableConcept($data[self::FIELD_TOPIC])); } } - if (isset($data[self::FIELD_TRANSFORM])) { - $ext = (isset($data[self::FIELD_TRANSFORM_EXT]) && is_array($data[self::FIELD_TRANSFORM_EXT])) - ? $data[self::FIELD_TRANSFORM_EXT] - : null; - if ($data[self::FIELD_TRANSFORM] instanceof FHIRCanonical) { - $this->setTransform($data[self::FIELD_TRANSFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRANSFORM])) { - $this->setTransform(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_TRANSFORM]] + $ext)); - } else if (is_array($data[self::FIELD_TRANSFORM])) { - $this->setTransform(new FHIRCanonical(array_merge($ext, $data[self::FIELD_TRANSFORM]))); - } + if (isset($data[self::FIELD_TRANSFORM]) || isset($data[self::FIELD_TRANSFORM_EXT])) { + if (isset($data[self::FIELD_TRANSFORM])) { + $value = $data[self::FIELD_TRANSFORM]; } else { - $this->setTransform(new FHIRCanonical($data[self::FIELD_TRANSFORM])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TRANSFORM_EXT]) && is_array($data[self::FIELD_TRANSFORM_EXT])) { + $ext = $data[self::FIELD_TRANSFORM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setTransform($value); + } else if (is_array($value)) { + $this->setTransform(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setTransform(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTransform(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1663,20 +1819,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -4834,138 +4997,240 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoNotPerform())) { $a[self::FIELD_DO_NOT_PERFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DO_NOT_PERFORM_EXT] = $enc; } } if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if ([] !== ($vs = $this->getDynamicValue())) { - $a[self::FIELD_DYNAMIC_VALUE] = $vs; + $a[self::FIELD_DYNAMIC_VALUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DYNAMIC_VALUE][] = $v; + } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestResourceType::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getLibrary())) { $a[self::FIELD_LIBRARY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LIBRARY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LIBRARY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LIBRARY_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LIBRARY_EXT] = $encs; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getObservationRequirement())) { - $a[self::FIELD_OBSERVATION_REQUIREMENT] = $vs; + $a[self::FIELD_OBSERVATION_REQUIREMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OBSERVATION_REQUIREMENT][] = $v; + } } if ([] !== ($vs = $this->getObservationResultRequirement())) { - $a[self::FIELD_OBSERVATION_RESULT_REQUIREMENT] = $vs; + $a[self::FIELD_OBSERVATION_RESULT_REQUIREMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OBSERVATION_RESULT_REQUIREMENT][] = $v; + } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } @@ -4977,22 +5242,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } @@ -5000,18 +5271,38 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if ([] !== ($vs = $this->getSpecimenRequirement())) { - $a[self::FIELD_SPECIMEN_REQUIREMENT] = $vs; + $a[self::FIELD_SPECIMEN_REQUIREMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN_REQUIREMENT][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -5023,8 +5314,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } @@ -5033,8 +5326,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -5052,45 +5347,70 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getTransform())) { $a[self::FIELD_TRANSFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_TRANSFORM_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php index 1deb4e5c86..b6fc883769 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRAdverseEvent extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_SUSPECT_ENTITY = 'suspectEntity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Overall nature of the adverse event, e.g. real or potential. @@ -386,20 +386,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTUALITY])) { - $ext = (isset($data[self::FIELD_ACTUALITY_EXT]) && is_array($data[self::FIELD_ACTUALITY_EXT])) - ? $data[self::FIELD_ACTUALITY_EXT] - : null; - if ($data[self::FIELD_ACTUALITY] instanceof FHIRAdverseEventActuality) { - $this->setActuality($data[self::FIELD_ACTUALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTUALITY])) { - $this->setActuality(new FHIRAdverseEventActuality([FHIRAdverseEventActuality::FIELD_VALUE => $data[self::FIELD_ACTUALITY]] + $ext)); - } else if (is_array($data[self::FIELD_ACTUALITY])) { - $this->setActuality(new FHIRAdverseEventActuality(array_merge($ext, $data[self::FIELD_ACTUALITY]))); - } + if (isset($data[self::FIELD_ACTUALITY]) || isset($data[self::FIELD_ACTUALITY_EXT])) { + if (isset($data[self::FIELD_ACTUALITY])) { + $value = $data[self::FIELD_ACTUALITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTUALITY_EXT]) && is_array($data[self::FIELD_ACTUALITY_EXT])) { + $ext = $data[self::FIELD_ACTUALITY_EXT]; } else { - $this->setActuality(new FHIRAdverseEventActuality($data[self::FIELD_ACTUALITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdverseEventActuality) { + $this->setActuality($value); + } else if (is_array($value)) { + $this->setActuality(new FHIRAdverseEventActuality(array_merge($ext, $value))); + } else { + $this->setActuality(new FHIRAdverseEventActuality([FHIRAdverseEventActuality::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActuality(new FHIRAdverseEventActuality($ext)); } } if (isset($data[self::FIELD_CATEGORY])) { @@ -438,36 +445,50 @@ public function __construct($data = null) $this->addContributor(new FHIRReference($data[self::FIELD_CONTRIBUTOR])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DETECTED])) { - $ext = (isset($data[self::FIELD_DETECTED_EXT]) && is_array($data[self::FIELD_DETECTED_EXT])) - ? $data[self::FIELD_DETECTED_EXT] - : null; - if ($data[self::FIELD_DETECTED] instanceof FHIRDateTime) { - $this->setDetected($data[self::FIELD_DETECTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETECTED])) { - $this->setDetected(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DETECTED]] + $ext)); - } else if (is_array($data[self::FIELD_DETECTED])) { - $this->setDetected(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DETECTED]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DETECTED]) || isset($data[self::FIELD_DETECTED_EXT])) { + if (isset($data[self::FIELD_DETECTED])) { + $value = $data[self::FIELD_DETECTED]; } else { - $this->setDetected(new FHIRDateTime($data[self::FIELD_DETECTED])); + $value = null; + } + if (isset($data[self::FIELD_DETECTED_EXT]) && is_array($data[self::FIELD_DETECTED_EXT])) { + $ext = $data[self::FIELD_DETECTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDetected($value); + } else if (is_array($value)) { + $this->setDetected(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDetected(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetected(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -505,20 +526,27 @@ public function __construct($data = null) $this->setOutcome(new FHIRCodeableConcept($data[self::FIELD_OUTCOME])); } } - if (isset($data[self::FIELD_RECORDED_DATE])) { - $ext = (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) - ? $data[self::FIELD_RECORDED_DATE_EXT] - : null; - if ($data[self::FIELD_RECORDED_DATE] instanceof FHIRDateTime) { - $this->setRecordedDate($data[self::FIELD_RECORDED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED_DATE]))); - } + if (isset($data[self::FIELD_RECORDED_DATE]) || isset($data[self::FIELD_RECORDED_DATE_EXT])) { + if (isset($data[self::FIELD_RECORDED_DATE])) { + $value = $data[self::FIELD_RECORDED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) { + $ext = $data[self::FIELD_RECORDED_DATE_EXT]; } else { - $this->setRecordedDate(new FHIRDateTime($data[self::FIELD_RECORDED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecordedDate($value); + } else if (is_array($value)) { + $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecordedDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_RECORDER])) { @@ -1808,28 +1836,46 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActuality())) { $a[self::FIELD_ACTUALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdverseEventActuality::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdverseEventActuality::FIELD_VALUE]); $a[self::FIELD_ACTUALITY_EXT] = $enc; } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getContributor())) { - $a[self::FIELD_CONTRIBUTOR] = $vs; + $a[self::FIELD_CONTRIBUTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRIBUTOR][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDetected())) { $a[self::FIELD_DETECTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DETECTED_EXT] = $enc; } } @@ -1850,8 +1896,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getRecordedDate())) { $a[self::FIELD_RECORDED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_DATE_EXT] = $enc; } } @@ -1859,10 +1907,22 @@ public function jsonSerialize() $a[self::FIELD_RECORDER] = $v; } if ([] !== ($vs = $this->getReferenceDocument())) { - $a[self::FIELD_REFERENCE_DOCUMENT] = $vs; + $a[self::FIELD_REFERENCE_DOCUMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_DOCUMENT][] = $v; + } } if ([] !== ($vs = $this->getResultingCondition())) { - $a[self::FIELD_RESULTING_CONDITION] = $vs; + $a[self::FIELD_RESULTING_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESULTING_CONDITION][] = $v; + } } if (null !== ($v = $this->getSeriousness())) { $a[self::FIELD_SERIOUSNESS] = $v; @@ -1871,16 +1931,37 @@ public function jsonSerialize() $a[self::FIELD_SEVERITY] = $v; } if ([] !== ($vs = $this->getStudy())) { - $a[self::FIELD_STUDY] = $vs; + $a[self::FIELD_STUDY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STUDY][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSubjectMedicalHistory())) { - $a[self::FIELD_SUBJECT_MEDICAL_HISTORY] = $vs; + $a[self::FIELD_SUBJECT_MEDICAL_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT_MEDICAL_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getSuspectEntity())) { - $a[self::FIELD_SUSPECT_ENTITY] = $vs; + $a[self::FIELD_SUSPECT_ENTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUSPECT_ENTITY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php index d0e4fac99d..f457272c8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRAllergyIntolerance extends FHIRDomainResource implements PHPFHIRContai const FIELD_VERIFICATION_STATUS = 'verificationStatus'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -410,33 +410,42 @@ public function __construct($data = null) $this->setAsserter(new FHIRReference($data[self::FIELD_ASSERTER])); } } - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if (is_array($data[self::FIELD_CATEGORY])) { - foreach($data[self::FIELD_CATEGORY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRAllergyIntoleranceCategory) { - $this->addCategory($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCategory(new FHIRAllergyIntoleranceCategory(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceCategory) { + $this->addCategory($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRAllergyIntoleranceCategory) { + $this->addCategory($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCategory(new FHIRAllergyIntoleranceCategory(array_merge($v, $iext))); + } else { + $this->addCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCategory(new FHIRAllergyIntoleranceCategory($v)); } + } elseif (is_array($value)) { + $this->addCategory(new FHIRAllergyIntoleranceCategory(array_merge($ext, $value))); + } else { + $this->addCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCategory(new FHIRAllergyIntoleranceCategory($iext)); } - } elseif ($data[self::FIELD_CATEGORY] instanceof FHIRAllergyIntoleranceCategory) { - $this->addCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CATEGORY])) { - $this->addCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else { - $this->addCategory(new FHIRAllergyIntoleranceCategory($data[self::FIELD_CATEGORY])); } } if (isset($data[self::FIELD_CLINICAL_STATUS])) { @@ -453,20 +462,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CRITICALITY])) { - $ext = (isset($data[self::FIELD_CRITICALITY_EXT]) && is_array($data[self::FIELD_CRITICALITY_EXT])) - ? $data[self::FIELD_CRITICALITY_EXT] - : null; - if ($data[self::FIELD_CRITICALITY] instanceof FHIRAllergyIntoleranceCriticality) { - $this->setCriticality($data[self::FIELD_CRITICALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITICALITY])) { - $this->setCriticality(new FHIRAllergyIntoleranceCriticality([FHIRAllergyIntoleranceCriticality::FIELD_VALUE => $data[self::FIELD_CRITICALITY]] + $ext)); - } else if (is_array($data[self::FIELD_CRITICALITY])) { - $this->setCriticality(new FHIRAllergyIntoleranceCriticality(array_merge($ext, $data[self::FIELD_CRITICALITY]))); - } + if (isset($data[self::FIELD_CRITICALITY]) || isset($data[self::FIELD_CRITICALITY_EXT])) { + if (isset($data[self::FIELD_CRITICALITY])) { + $value = $data[self::FIELD_CRITICALITY]; } else { - $this->setCriticality(new FHIRAllergyIntoleranceCriticality($data[self::FIELD_CRITICALITY])); + $value = null; + } + if (isset($data[self::FIELD_CRITICALITY_EXT]) && is_array($data[self::FIELD_CRITICALITY_EXT])) { + $ext = $data[self::FIELD_CRITICALITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceCriticality) { + $this->setCriticality($value); + } else if (is_array($value)) { + $this->setCriticality(new FHIRAllergyIntoleranceCriticality(array_merge($ext, $value))); + } else { + $this->setCriticality(new FHIRAllergyIntoleranceCriticality([FHIRAllergyIntoleranceCriticality::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCriticality(new FHIRAllergyIntoleranceCriticality($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -494,20 +510,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_LAST_OCCURRENCE])) { - $ext = (isset($data[self::FIELD_LAST_OCCURRENCE_EXT]) && is_array($data[self::FIELD_LAST_OCCURRENCE_EXT])) - ? $data[self::FIELD_LAST_OCCURRENCE_EXT] - : null; - if ($data[self::FIELD_LAST_OCCURRENCE] instanceof FHIRDateTime) { - $this->setLastOccurrence($data[self::FIELD_LAST_OCCURRENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_OCCURRENCE])) { - $this->setLastOccurrence(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_LAST_OCCURRENCE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_OCCURRENCE])) { - $this->setLastOccurrence(new FHIRDateTime(array_merge($ext, $data[self::FIELD_LAST_OCCURRENCE]))); - } + if (isset($data[self::FIELD_LAST_OCCURRENCE]) || isset($data[self::FIELD_LAST_OCCURRENCE_EXT])) { + if (isset($data[self::FIELD_LAST_OCCURRENCE])) { + $value = $data[self::FIELD_LAST_OCCURRENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_OCCURRENCE_EXT]) && is_array($data[self::FIELD_LAST_OCCURRENCE_EXT])) { + $ext = $data[self::FIELD_LAST_OCCURRENCE_EXT]; } else { - $this->setLastOccurrence(new FHIRDateTime($data[self::FIELD_LAST_OCCURRENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setLastOccurrence($value); + } else if (is_array($value)) { + $this->setLastOccurrence(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setLastOccurrence(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastOccurrence(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -535,20 +558,27 @@ public function __construct($data = null) $this->setOnsetAge(new FHIRAge($data[self::FIELD_ONSET_AGE])); } } - if (isset($data[self::FIELD_ONSET_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) - ? $data[self::FIELD_ONSET_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ONSET_DATE_TIME] instanceof FHIRDateTime) { - $this->setOnsetDateTime($data[self::FIELD_ONSET_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ONSET_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ONSET_DATE_TIME]))); - } + if (isset($data[self::FIELD_ONSET_DATE_TIME]) || isset($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ONSET_DATE_TIME])) { + $value = $data[self::FIELD_ONSET_DATE_TIME]; } else { - $this->setOnsetDateTime(new FHIRDateTime($data[self::FIELD_ONSET_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ONSET_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOnsetDateTime($value); + } else if (is_array($value)) { + $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ONSET_PERIOD])) { @@ -565,20 +595,27 @@ public function __construct($data = null) $this->setOnsetRange(new FHIRRange($data[self::FIELD_ONSET_RANGE])); } } - if (isset($data[self::FIELD_ONSET_STRING])) { - $ext = (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) - ? $data[self::FIELD_ONSET_STRING_EXT] - : null; - if ($data[self::FIELD_ONSET_STRING] instanceof FHIRString) { - $this->setOnsetString($data[self::FIELD_ONSET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ONSET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString(array_merge($ext, $data[self::FIELD_ONSET_STRING]))); - } + if (isset($data[self::FIELD_ONSET_STRING]) || isset($data[self::FIELD_ONSET_STRING_EXT])) { + if (isset($data[self::FIELD_ONSET_STRING])) { + $value = $data[self::FIELD_ONSET_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) { + $ext = $data[self::FIELD_ONSET_STRING_EXT]; } else { - $this->setOnsetString(new FHIRString($data[self::FIELD_ONSET_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOnsetString($value); + } else if (is_array($value)) { + $this->setOnsetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetString(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -606,20 +643,27 @@ public function __construct($data = null) $this->addReaction(new FHIRAllergyIntoleranceReaction($data[self::FIELD_REACTION])); } } - if (isset($data[self::FIELD_RECORDED_DATE])) { - $ext = (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) - ? $data[self::FIELD_RECORDED_DATE_EXT] - : null; - if ($data[self::FIELD_RECORDED_DATE] instanceof FHIRDateTime) { - $this->setRecordedDate($data[self::FIELD_RECORDED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED_DATE]))); - } + if (isset($data[self::FIELD_RECORDED_DATE]) || isset($data[self::FIELD_RECORDED_DATE_EXT])) { + if (isset($data[self::FIELD_RECORDED_DATE])) { + $value = $data[self::FIELD_RECORDED_DATE]; } else { - $this->setRecordedDate(new FHIRDateTime($data[self::FIELD_RECORDED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) { + $ext = $data[self::FIELD_RECORDED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecordedDate($value); + } else if (is_array($value)) { + $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecordedDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_RECORDER])) { @@ -629,20 +673,27 @@ public function __construct($data = null) $this->setRecorder(new FHIRReference($data[self::FIELD_RECORDER])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAllergyIntoleranceType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAllergyIntoleranceType([FHIRAllergyIntoleranceType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAllergyIntoleranceType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRAllergyIntoleranceType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAllergyIntoleranceType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAllergyIntoleranceType([FHIRAllergyIntoleranceType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRAllergyIntoleranceType($ext)); } } if (isset($data[self::FIELD_VERIFICATION_STATUS])) { @@ -1755,18 +1806,26 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getCategory())) { $a[self::FIELD_CATEGORY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CATEGORY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CATEGORY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRAllergyIntoleranceCategory::FIELD_VALUE]) || array_key_exists(FHIRAllergyIntoleranceCategory::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CATEGORY_EXT][] = null; + unset($enc[FHIRAllergyIntoleranceCategory::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CATEGORY_EXT] = $encs; + } } if (null !== ($v = $this->getClinicalStatus())) { $a[self::FIELD_CLINICAL_STATUS] = $v; @@ -1776,8 +1835,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getCriticality())) { $a[self::FIELD_CRITICALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceCriticality::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceCriticality::FIELD_VALUE]); $a[self::FIELD_CRITICALITY_EXT] = $enc; } } @@ -1785,25 +1846,41 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLastOccurrence())) { $a[self::FIELD_LAST_OCCURRENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_LAST_OCCURRENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOnsetAge())) { $a[self::FIELD_ONSET_AGE] = $v; } if (null !== ($v = $this->getOnsetDateTime())) { $a[self::FIELD_ONSET_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ONSET_DATE_TIME_EXT] = $enc; } } @@ -1815,8 +1892,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetString())) { $a[self::FIELD_ONSET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ONSET_STRING_EXT] = $enc; } } @@ -1824,12 +1903,20 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getReaction())) { - $a[self::FIELD_REACTION] = $vs; + $a[self::FIELD_REACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REACTION][] = $v; + } } if (null !== ($v = $this->getRecordedDate())) { $a[self::FIELD_RECORDED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_DATE_EXT] = $enc; } } @@ -1838,14 +1925,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getVerificationStatus())) { $a[self::FIELD_VERIFICATION_STATUS] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointment.php index 15778c7ffc..d4d9d11e14 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRAppointment extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_SUPPORTING_INFORMATION = 'supportingInformation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -478,68 +478,96 @@ public function __construct($data = null) $this->setCancelationReason(new FHIRCodeableConcept($data[self::FIELD_CANCELATION_REASON])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); - } - } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -560,20 +588,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MINUTES_DURATION])) { - $ext = (isset($data[self::FIELD_MINUTES_DURATION_EXT]) && is_array($data[self::FIELD_MINUTES_DURATION_EXT])) - ? $data[self::FIELD_MINUTES_DURATION_EXT] - : null; - if ($data[self::FIELD_MINUTES_DURATION] instanceof FHIRPositiveInt) { - $this->setMinutesDuration($data[self::FIELD_MINUTES_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MINUTES_DURATION])) { - $this->setMinutesDuration(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_MINUTES_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_MINUTES_DURATION])) { - $this->setMinutesDuration(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_MINUTES_DURATION]))); - } + if (isset($data[self::FIELD_MINUTES_DURATION]) || isset($data[self::FIELD_MINUTES_DURATION_EXT])) { + if (isset($data[self::FIELD_MINUTES_DURATION])) { + $value = $data[self::FIELD_MINUTES_DURATION]; } else { - $this->setMinutesDuration(new FHIRPositiveInt($data[self::FIELD_MINUTES_DURATION])); + $value = null; + } + if (isset($data[self::FIELD_MINUTES_DURATION_EXT]) && is_array($data[self::FIELD_MINUTES_DURATION_EXT])) { + $ext = $data[self::FIELD_MINUTES_DURATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setMinutesDuration($value); + } else if (is_array($value)) { + $this->setMinutesDuration(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setMinutesDuration(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinutesDuration(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PARTICIPANT])) { @@ -594,36 +629,50 @@ public function __construct($data = null) $this->addParticipant(new FHIRAppointmentParticipant($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_PATIENT_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) - ? $data[self::FIELD_PATIENT_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_PATIENT_INSTRUCTION] instanceof FHIRString) { - $this->setPatientInstruction($data[self::FIELD_PATIENT_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATIENT_INSTRUCTION])) { - $this->setPatientInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATIENT_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_PATIENT_INSTRUCTION])) { - $this->setPatientInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_PATIENT_INSTRUCTION]))); - } + if (isset($data[self::FIELD_PATIENT_INSTRUCTION]) || isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_PATIENT_INSTRUCTION])) { + $value = $data[self::FIELD_PATIENT_INSTRUCTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_PATIENT_INSTRUCTION_EXT]; } else { - $this->setPatientInstruction(new FHIRString($data[self::FIELD_PATIENT_INSTRUCTION])); - } - } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRUnsignedInt) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_PRIORITY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPatientInstruction($value); + } else if (is_array($value)) { + $this->setPatientInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPatientInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatientInstruction(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRUnsignedInt($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -752,36 +801,50 @@ public function __construct($data = null) $this->addSpecialty(new FHIRCodeableConcept($data[self::FIELD_SPECIALTY])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInstant) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInstant($data[self::FIELD_START])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRAppointmentStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAppointmentStatus([FHIRAppointmentStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAppointmentStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStart(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRAppointmentStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAppointmentStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRAppointmentStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRAppointmentStatus([FHIRAppointmentStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRAppointmentStatus($ext)); } } if (isset($data[self::FIELD_SUPPORTING_INFORMATION])) { @@ -2317,103 +2380,190 @@ public function jsonSerialize() $a[self::FIELD_APPOINTMENT_TYPE] = $v; } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getCancelationReason())) { $a[self::FIELD_CANCELATION_REASON] = $v; } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMinutesDuration())) { $a[self::FIELD_MINUTES_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_MINUTES_DURATION_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPatientInstruction())) { $a[self::FIELD_PATIENT_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATIENT_INSTRUCTION_EXT] = $enc; } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getRequestedPeriod())) { - $a[self::FIELD_REQUESTED_PERIOD] = $vs; + $a[self::FIELD_REQUESTED_PERIOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUESTED_PERIOD][] = $v; + } } if ([] !== ($vs = $this->getServiceCategory())) { - $a[self::FIELD_SERVICE_CATEGORY] = $vs; + $a[self::FIELD_SERVICE_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getServiceType())) { - $a[self::FIELD_SERVICE_TYPE] = $vs; + $a[self::FIELD_SERVICE_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_TYPE][] = $v; + } } if ([] !== ($vs = $this->getSlot())) { - $a[self::FIELD_SLOT] = $vs; + $a[self::FIELD_SLOT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SLOT][] = $v; + } } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAppointmentStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAppointmentStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php index 56e11901ce..6dd7db01c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRAppointmentResponse extends FHIRDomainResource implements PHPFHIRConta const FIELD_START_EXT = '_start'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -241,36 +241,50 @@ public function __construct($data = null) $this->setAppointment(new FHIRReference($data[self::FIELD_APPOINTMENT])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); - } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -291,20 +305,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_PARTICIPANT_STATUS])) { - $ext = (isset($data[self::FIELD_PARTICIPANT_STATUS_EXT]) && is_array($data[self::FIELD_PARTICIPANT_STATUS_EXT])) - ? $data[self::FIELD_PARTICIPANT_STATUS_EXT] - : null; - if ($data[self::FIELD_PARTICIPANT_STATUS] instanceof FHIRParticipationStatus) { - $this->setParticipantStatus($data[self::FIELD_PARTICIPANT_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARTICIPANT_STATUS])) { - $this->setParticipantStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $data[self::FIELD_PARTICIPANT_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_PARTICIPANT_STATUS])) { - $this->setParticipantStatus(new FHIRParticipationStatus(array_merge($ext, $data[self::FIELD_PARTICIPANT_STATUS]))); - } + if (isset($data[self::FIELD_PARTICIPANT_STATUS]) || isset($data[self::FIELD_PARTICIPANT_STATUS_EXT])) { + if (isset($data[self::FIELD_PARTICIPANT_STATUS])) { + $value = $data[self::FIELD_PARTICIPANT_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARTICIPANT_STATUS_EXT]) && is_array($data[self::FIELD_PARTICIPANT_STATUS_EXT])) { + $ext = $data[self::FIELD_PARTICIPANT_STATUS_EXT]; } else { - $this->setParticipantStatus(new FHIRParticipationStatus($data[self::FIELD_PARTICIPANT_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRParticipationStatus) { + $this->setParticipantStatus($value); + } else if (is_array($value)) { + $this->setParticipantStatus(new FHIRParticipationStatus(array_merge($ext, $value))); + } else { + $this->setParticipantStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParticipantStatus(new FHIRParticipationStatus($ext)); } } if (isset($data[self::FIELD_PARTICIPANT_TYPE])) { @@ -325,20 +346,27 @@ public function __construct($data = null) $this->addParticipantType(new FHIRCodeableConcept($data[self::FIELD_PARTICIPANT_TYPE])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInstant) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInstant($data[self::FIELD_START])); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRInstant($ext)); } } } @@ -889,38 +917,61 @@ public function jsonSerialize() } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getParticipantStatus())) { $a[self::FIELD_PARTICIPANT_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRParticipationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRParticipationStatus::FIELD_VALUE]); $a[self::FIELD_PARTICIPANT_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipantType())) { - $a[self::FIELD_PARTICIPANT_TYPE] = $vs; + $a[self::FIELD_PARTICIPANT_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT_TYPE][] = $v; + } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php index 74af000027..e441d2ba98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRAuditEvent extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Indicator for type of action performed during the event that generated the @@ -262,20 +262,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION])) { - $ext = (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) - ? $data[self::FIELD_ACTION_EXT] - : null; - if ($data[self::FIELD_ACTION] instanceof FHIRAuditEventAction) { - $this->setAction($data[self::FIELD_ACTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRAuditEventAction([FHIRAuditEventAction::FIELD_VALUE => $data[self::FIELD_ACTION]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRAuditEventAction(array_merge($ext, $data[self::FIELD_ACTION]))); - } + if (isset($data[self::FIELD_ACTION]) || isset($data[self::FIELD_ACTION_EXT])) { + if (isset($data[self::FIELD_ACTION])) { + $value = $data[self::FIELD_ACTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) { + $ext = $data[self::FIELD_ACTION_EXT]; } else { - $this->setAction(new FHIRAuditEventAction($data[self::FIELD_ACTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAuditEventAction) { + $this->setAction($value); + } else if (is_array($value)) { + $this->setAction(new FHIRAuditEventAction(array_merge($ext, $value))); + } else { + $this->setAction(new FHIRAuditEventAction([FHIRAuditEventAction::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAction(new FHIRAuditEventAction($ext)); } } if (isset($data[self::FIELD_AGENT])) { @@ -314,36 +321,50 @@ public function __construct($data = null) $this->addEntity(new FHIRAuditEventEntity($data[self::FIELD_ENTITY])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRAuditEventOutcome) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRAuditEventOutcome([FHIRAuditEventOutcome::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRAuditEventOutcome(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; } else { - $this->setOutcome(new FHIRAuditEventOutcome($data[self::FIELD_OUTCOME])); + $value = null; } - } - if (isset($data[self::FIELD_OUTCOME_DESC])) { - $ext = (isset($data[self::FIELD_OUTCOME_DESC_EXT]) && is_array($data[self::FIELD_OUTCOME_DESC_EXT])) - ? $data[self::FIELD_OUTCOME_DESC_EXT] - : null; - if ($data[self::FIELD_OUTCOME_DESC] instanceof FHIRString) { - $this->setOutcomeDesc($data[self::FIELD_OUTCOME_DESC]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME_DESC])) { - $this->setOutcomeDesc(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OUTCOME_DESC]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME_DESC])) { - $this->setOutcomeDesc(new FHIRString(array_merge($ext, $data[self::FIELD_OUTCOME_DESC]))); + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAuditEventOutcome) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRAuditEventOutcome(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRAuditEventOutcome([FHIRAuditEventOutcome::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRAuditEventOutcome($ext)); + } + } + if (isset($data[self::FIELD_OUTCOME_DESC]) || isset($data[self::FIELD_OUTCOME_DESC_EXT])) { + if (isset($data[self::FIELD_OUTCOME_DESC])) { + $value = $data[self::FIELD_OUTCOME_DESC]; } else { - $this->setOutcomeDesc(new FHIRString($data[self::FIELD_OUTCOME_DESC])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_DESC_EXT]) && is_array($data[self::FIELD_OUTCOME_DESC_EXT])) { + $ext = $data[self::FIELD_OUTCOME_DESC_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOutcomeDesc($value); + } else if (is_array($value)) { + $this->setOutcomeDesc(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOutcomeDesc(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcomeDesc(new FHIRString($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -371,20 +392,27 @@ public function __construct($data = null) $this->addPurposeOfEvent(new FHIRCodeableConcept($data[self::FIELD_PURPOSE_OF_EVENT])); } } - if (isset($data[self::FIELD_RECORDED])) { - $ext = (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) - ? $data[self::FIELD_RECORDED_EXT] - : null; - if ($data[self::FIELD_RECORDED] instanceof FHIRInstant) { - $this->setRecorded($data[self::FIELD_RECORDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_RECORDED]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant(array_merge($ext, $data[self::FIELD_RECORDED]))); - } + if (isset($data[self::FIELD_RECORDED]) || isset($data[self::FIELD_RECORDED_EXT])) { + if (isset($data[self::FIELD_RECORDED])) { + $value = $data[self::FIELD_RECORDED]; } else { - $this->setRecorded(new FHIRInstant($data[self::FIELD_RECORDED])); + $value = null; + } + if (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) { + $ext = $data[self::FIELD_RECORDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setRecorded($value); + } else if (is_array($value)) { + $this->setRecorded(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecorded(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -1096,28 +1124,46 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAction())) { $a[self::FIELD_ACTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAuditEventAction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAuditEventAction::FIELD_VALUE]); $a[self::FIELD_ACTION_EXT] = $enc; } } if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if ([] !== ($vs = $this->getEntity())) { - $a[self::FIELD_ENTITY] = $vs; + $a[self::FIELD_ENTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTITY][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAuditEventOutcome::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAuditEventOutcome::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } if (null !== ($v = $this->getOutcomeDesc())) { $a[self::FIELD_OUTCOME_DESC] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OUTCOME_DESC_EXT] = $enc; } } @@ -1125,12 +1171,20 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPurposeOfEvent())) { - $a[self::FIELD_PURPOSE_OF_EVENT] = $vs; + $a[self::FIELD_PURPOSE_OF_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PURPOSE_OF_EVENT][] = $v; + } } if (null !== ($v = $this->getRecorded())) { $a[self::FIELD_RECORDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_RECORDED_EXT] = $enc; } } @@ -1138,11 +1192,20 @@ public function jsonSerialize() $a[self::FIELD_SOURCE] = $v; } if ([] !== ($vs = $this->getSubtype())) { - $a[self::FIELD_SUBTYPE] = $vs; + $a[self::FIELD_SUBTYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBTYPE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBasic.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBasic.php index aebacb1381..4cebddfa4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBasic.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBasic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBasic extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -191,20 +191,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDate) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDate(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDate($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -585,17 +592,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProduct.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProduct.php index f3c3594689..b464ae41c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProduct.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProduct.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRBiologicallyDerivedProduct extends FHIRDomainResource implements PHPFH const FIELD_STORAGE = 'storage'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A material substance originating from a biological entity intended to be @@ -322,20 +322,27 @@ public function __construct($data = null) $this->addProcessing(new FHIRBiologicallyDerivedProductProcessing($data[self::FIELD_PROCESSING])); } } - if (isset($data[self::FIELD_PRODUCT_CATEGORY])) { - $ext = (isset($data[self::FIELD_PRODUCT_CATEGORY_EXT]) && is_array($data[self::FIELD_PRODUCT_CATEGORY_EXT])) - ? $data[self::FIELD_PRODUCT_CATEGORY_EXT] - : null; - if ($data[self::FIELD_PRODUCT_CATEGORY] instanceof FHIRBiologicallyDerivedProductCategory) { - $this->setProductCategory($data[self::FIELD_PRODUCT_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRODUCT_CATEGORY])) { - $this->setProductCategory(new FHIRBiologicallyDerivedProductCategory([FHIRBiologicallyDerivedProductCategory::FIELD_VALUE => $data[self::FIELD_PRODUCT_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_PRODUCT_CATEGORY])) { - $this->setProductCategory(new FHIRBiologicallyDerivedProductCategory(array_merge($ext, $data[self::FIELD_PRODUCT_CATEGORY]))); - } + if (isset($data[self::FIELD_PRODUCT_CATEGORY]) || isset($data[self::FIELD_PRODUCT_CATEGORY_EXT])) { + if (isset($data[self::FIELD_PRODUCT_CATEGORY])) { + $value = $data[self::FIELD_PRODUCT_CATEGORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRODUCT_CATEGORY_EXT]) && is_array($data[self::FIELD_PRODUCT_CATEGORY_EXT])) { + $ext = $data[self::FIELD_PRODUCT_CATEGORY_EXT]; } else { - $this->setProductCategory(new FHIRBiologicallyDerivedProductCategory($data[self::FIELD_PRODUCT_CATEGORY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBiologicallyDerivedProductCategory) { + $this->setProductCategory($value); + } else if (is_array($value)) { + $this->setProductCategory(new FHIRBiologicallyDerivedProductCategory(array_merge($ext, $value))); + } else { + $this->setProductCategory(new FHIRBiologicallyDerivedProductCategory([FHIRBiologicallyDerivedProductCategory::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProductCategory(new FHIRBiologicallyDerivedProductCategory($ext)); } } if (isset($data[self::FIELD_PRODUCT_CODE])) { @@ -345,20 +352,27 @@ public function __construct($data = null) $this->setProductCode(new FHIRCodeableConcept($data[self::FIELD_PRODUCT_CODE])); } } - if (isset($data[self::FIELD_QUANTITY])) { - $ext = (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) - ? $data[self::FIELD_QUANTITY_EXT] - : null; - if ($data[self::FIELD_QUANTITY] instanceof FHIRInteger) { - $this->setQuantity($data[self::FIELD_QUANTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_QUANTITY]] + $ext)); - } else if (is_array($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRInteger(array_merge($ext, $data[self::FIELD_QUANTITY]))); - } + if (isset($data[self::FIELD_QUANTITY]) || isset($data[self::FIELD_QUANTITY_EXT])) { + if (isset($data[self::FIELD_QUANTITY])) { + $value = $data[self::FIELD_QUANTITY]; } else { - $this->setQuantity(new FHIRInteger($data[self::FIELD_QUANTITY])); + $value = null; + } + if (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) { + $ext = $data[self::FIELD_QUANTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setQuantity($value); + } else if (is_array($value)) { + $this->setQuantity(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setQuantity(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQuantity(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -379,20 +393,27 @@ public function __construct($data = null) $this->addRequest(new FHIRReference($data[self::FIELD_REQUEST])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRBiologicallyDerivedProductStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRBiologicallyDerivedProductStatus([FHIRBiologicallyDerivedProductStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRBiologicallyDerivedProductStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRBiologicallyDerivedProductStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBiologicallyDerivedProductStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRBiologicallyDerivedProductStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRBiologicallyDerivedProductStatus([FHIRBiologicallyDerivedProductStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRBiologicallyDerivedProductStatus($ext)); } } if (isset($data[self::FIELD_STORAGE])) { @@ -1108,21 +1129,41 @@ public function jsonSerialize() $a[self::FIELD_COLLECTION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManipulation())) { $a[self::FIELD_MANIPULATION] = $v; } if ([] !== ($vs = $this->getParent())) { - $a[self::FIELD_PARENT] = $vs; + $a[self::FIELD_PARENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARENT][] = $v; + } } if ([] !== ($vs = $this->getProcessing())) { - $a[self::FIELD_PROCESSING] = $vs; + $a[self::FIELD_PROCESSING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESSING][] = $v; + } } if (null !== ($v = $this->getProductCategory())) { $a[self::FIELD_PRODUCT_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBiologicallyDerivedProductCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBiologicallyDerivedProductCategory::FIELD_VALUE]); $a[self::FIELD_PRODUCT_CATEGORY_EXT] = $enc; } } @@ -1131,23 +1172,42 @@ public function jsonSerialize() } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_QUANTITY_EXT] = $enc; } } if ([] !== ($vs = $this->getRequest())) { - $a[self::FIELD_REQUEST] = $vs; + $a[self::FIELD_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUEST][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBiologicallyDerivedProductStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBiologicallyDerivedProductStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStorage())) { - $a[self::FIELD_STORAGE] = $vs; + $a[self::FIELD_STORAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STORAGE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBodyStructure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBodyStructure.php index b678eb0bbe..c3f7c973b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBodyStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRBodyStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRBodyStructure extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_PATIENT = 'patient'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -214,36 +214,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -857,29 +871,51 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getImage())) { - $a[self::FIELD_IMAGE] = $vs; + $a[self::FIELD_IMAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGE][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if ([] !== ($vs = $this->getLocationQualifier())) { - $a[self::FIELD_LOCATION_QUALIFIER] = $vs; + $a[self::FIELD_LOCATION_QUALIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION_QUALIFIER][] = $v; + } } if (null !== ($v = $this->getMorphology())) { $a[self::FIELD_MORPHOLOGY] = $v; @@ -887,6 +923,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php index 5edadeacd1..c118232c8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRCapabilityStatement extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -550,52 +550,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DOCUMENT])) { @@ -616,65 +637,88 @@ public function __construct($data = null) $this->addDocument(new FHIRCapabilityStatementDocument($data[self::FIELD_DOCUMENT])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; } - } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRFHIRVersion) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRFHIRVersion(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; } else { - $this->setFhirVersion(new FHIRFHIRVersion($data[self::FIELD_FHIR_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRVersion) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRFHIRVersion(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRFHIRVersion($ext)); } } - if (isset($data[self::FIELD_FORMAT])) { - $ext = (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) - ? $data[self::FIELD_FORMAT_EXT] - : null; - if (is_array($data[self::FIELD_FORMAT])) { - foreach($data[self::FIELD_FORMAT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addFormat($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFormat(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FORMAT]) || isset($data[self::FIELD_FORMAT_EXT])) { + if (isset($data[self::FIELD_FORMAT])) { + $value = $data[self::FIELD_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) { + $ext = $data[self::FIELD_FORMAT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addFormat($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addFormat($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFormat(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFormat(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFormat(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_FORMAT] instanceof FHIRCode) { - $this->addFormat($data[self::FIELD_FORMAT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FORMAT])) { - $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FORMAT]] + $ext)); - } else { - $this->addFormat(new FHIRCode($data[self::FIELD_FORMAT])); } } if (isset($data[self::FIELD_IMPLEMENTATION])) { @@ -684,91 +728,118 @@ public function __construct($data = null) $this->setImplementation(new FHIRCapabilityStatementImplementation($data[self::FIELD_IMPLEMENTATION])); } } - if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE])) { - $ext = (isset($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT]) && is_array($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT])) - ? $data[self::FIELD_IMPLEMENTATION_GUIDE_EXT] - : null; - if (is_array($data[self::FIELD_IMPLEMENTATION_GUIDE])) { - foreach($data[self::FIELD_IMPLEMENTATION_GUIDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addImplementationGuide($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addImplementationGuide(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addImplementationGuide(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE]) || isset($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT])) { + if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE])) { + $value = $data[self::FIELD_IMPLEMENTATION_GUIDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT]) && is_array($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT])) { + $ext = $data[self::FIELD_IMPLEMENTATION_GUIDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addImplementationGuide($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addImplementationGuide($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addImplementationGuide(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addImplementationGuide(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addImplementationGuide(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addImplementationGuide(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addImplementationGuide(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addImplementationGuide(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_IMPLEMENTATION_GUIDE] instanceof FHIRCanonical) { - $this->addImplementationGuide($data[self::FIELD_IMPLEMENTATION_GUIDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_IMPLEMENTATION_GUIDE])) { - $this->addImplementationGuide(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_IMPLEMENTATION_GUIDE]] + $ext)); - } else { - $this->addImplementationGuide(new FHIRCanonical($data[self::FIELD_IMPLEMENTATION_GUIDE])); } } - if (isset($data[self::FIELD_IMPORTS])) { - $ext = (isset($data[self::FIELD_IMPORTS_EXT]) && is_array($data[self::FIELD_IMPORTS_EXT])) - ? $data[self::FIELD_IMPORTS_EXT] - : null; - if (is_array($data[self::FIELD_IMPORTS])) { - foreach($data[self::FIELD_IMPORTS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addImports($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addImports(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addImports(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_IMPORTS]) || isset($data[self::FIELD_IMPORTS_EXT])) { + if (isset($data[self::FIELD_IMPORTS])) { + $value = $data[self::FIELD_IMPORTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPORTS_EXT]) && is_array($data[self::FIELD_IMPORTS_EXT])) { + $ext = $data[self::FIELD_IMPORTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addImports($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addImports($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addImports(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addImports(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addImports(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addImports(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addImports(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addImports(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_IMPORTS] instanceof FHIRCanonical) { - $this->addImports($data[self::FIELD_IMPORTS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_IMPORTS])) { - $this->addImports(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_IMPORTS]] + $ext)); - } else { - $this->addImports(new FHIRCanonical($data[self::FIELD_IMPORTS])); } } - if (isset($data[self::FIELD_INSTANTIATES])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_EXT]) && is_array($data[self::FIELD_INSTANTIATES_EXT])) - ? $data[self::FIELD_INSTANTIATES_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES])) { - foreach($data[self::FIELD_INSTANTIATES] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiates($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiates(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiates(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES]) || isset($data[self::FIELD_INSTANTIATES_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES])) { + $value = $data[self::FIELD_INSTANTIATES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_EXT]) && is_array($data[self::FIELD_INSTANTIATES_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiates($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiates($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiates(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiates(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiates(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiates(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiates(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiates(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES] instanceof FHIRCanonical) { - $this->addInstantiates($data[self::FIELD_INSTANTIATES]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES])) { - $this->addInstantiates(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES]] + $ext)); - } else { - $this->addInstantiates(new FHIRCanonical($data[self::FIELD_INSTANTIATES])); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -789,20 +860,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRCapabilityStatementKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRCapabilityStatementKind([FHIRCapabilityStatementKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRCapabilityStatementKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setKind(new FHIRCapabilityStatementKind($data[self::FIELD_KIND])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCapabilityStatementKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRCapabilityStatementKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRCapabilityStatementKind([FHIRCapabilityStatementKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRCapabilityStatementKind($ext)); } } if (isset($data[self::FIELD_MESSAGING])) { @@ -823,81 +901,111 @@ public function __construct($data = null) $this->addMessaging(new FHIRCapabilityStatementMessaging($data[self::FIELD_MESSAGING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PATCH_FORMAT])) { - $ext = (isset($data[self::FIELD_PATCH_FORMAT_EXT]) && is_array($data[self::FIELD_PATCH_FORMAT_EXT])) - ? $data[self::FIELD_PATCH_FORMAT_EXT] - : null; - if (is_array($data[self::FIELD_PATCH_FORMAT])) { - foreach($data[self::FIELD_PATCH_FORMAT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addPatchFormat($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPatchFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPatchFormat(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PATCH_FORMAT]) || isset($data[self::FIELD_PATCH_FORMAT_EXT])) { + if (isset($data[self::FIELD_PATCH_FORMAT])) { + $value = $data[self::FIELD_PATCH_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATCH_FORMAT_EXT]) && is_array($data[self::FIELD_PATCH_FORMAT_EXT])) { + $ext = $data[self::FIELD_PATCH_FORMAT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addPatchFormat($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addPatchFormat($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPatchFormat(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addPatchFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPatchFormat(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addPatchFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addPatchFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_PATCH_FORMAT] instanceof FHIRCode) { - $this->addPatchFormat($data[self::FIELD_PATCH_FORMAT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PATCH_FORMAT])) { - $this->addPatchFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PATCH_FORMAT]] + $ext)); - } else { - $this->addPatchFormat(new FHIRCode($data[self::FIELD_PATCH_FORMAT])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPatchFormat(new FHIRCode($iext)); } - } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_REST])) { @@ -925,52 +1033,73 @@ public function __construct($data = null) $this->setSoftware(new FHIRCapabilityStatementSoftware($data[self::FIELD_SOFTWARE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -991,20 +1120,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2783,195 +2919,300 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDocument())) { - $a[self::FIELD_DOCUMENT] = $vs; + $a[self::FIELD_DOCUMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENT][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFHIRVersion::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFHIRVersion::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getFormat())) { $a[self::FIELD_FORMAT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FORMAT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FORMAT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FORMAT_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FORMAT_EXT] = $encs; + } } if (null !== ($v = $this->getImplementation())) { $a[self::FIELD_IMPLEMENTATION] = $v; } if ([] !== ($vs = $this->getImplementationGuide())) { $a[self::FIELD_IMPLEMENTATION_GUIDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_IMPLEMENTATION_GUIDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_IMPLEMENTATION_GUIDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_IMPLEMENTATION_GUIDE_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_IMPLEMENTATION_GUIDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getImports())) { $a[self::FIELD_IMPORTS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_IMPORTS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_IMPORTS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_IMPORTS_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_IMPORTS_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiates())) { $a[self::FIELD_INSTANTIATES] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_EXT] = $encs; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCapabilityStatementKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCapabilityStatementKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if ([] !== ($vs = $this->getMessaging())) { - $a[self::FIELD_MESSAGING] = $vs; + $a[self::FIELD_MESSAGING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MESSAGING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPatchFormat())) { $a[self::FIELD_PATCH_FORMAT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PATCH_FORMAT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PATCH_FORMAT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PATCH_FORMAT_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PATCH_FORMAT_EXT] = $encs; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRest())) { - $a[self::FIELD_REST] = $vs; + $a[self::FIELD_REST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REST][] = $v; + } } if (null !== ($v = $this->getSoftware())) { $a[self::FIELD_SOFTWARE] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCarePlan.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCarePlan.php index 97e65933ec..1eab211ccb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCarePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCarePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRCarePlan extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the intention of how one or more practitioners intend to deliver care @@ -540,36 +540,50 @@ public function __construct($data = null) $this->addContributor(new FHIRReference($data[self::FIELD_CONTRIBUTOR])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -615,78 +629,103 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); - } - } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRCarePlanIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRCarePlanIntent([FHIRCarePlanIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRCarePlanIntent(array_merge($ext, $data[self::FIELD_INTENT]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; } else { - $this->setIntent(new FHIRCarePlanIntent($data[self::FIELD_INTENT])); + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRCarePlanIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRCarePlanIntent([FHIRCarePlanIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRCarePlanIntent($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -750,20 +789,27 @@ public function __construct($data = null) $this->addReplaces(new FHIRReference($data[self::FIELD_REPLACES])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -791,20 +837,27 @@ public function __construct($data = null) $this->addSupportingInfo(new FHIRReference($data[self::FIELD_SUPPORTING_INFO])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -2328,37 +2381,77 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getActivity())) { - $a[self::FIELD_ACTIVITY] = $vs; + $a[self::FIELD_ACTIVITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTIVITY][] = $v; + } } if ([] !== ($vs = $this->getAddresses())) { - $a[self::FIELD_ADDRESSES] = $vs; + $a[self::FIELD_ADDRESSES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESSES][] = $v; + } } if (null !== ($v = $this->getAuthor())) { $a[self::FIELD_AUTHOR] = $v; } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getCareTeam())) { - $a[self::FIELD_CARE_TEAM] = $vs; + $a[self::FIELD_CARE_TEAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CARE_TEAM][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getContributor())) { - $a[self::FIELD_CONTRIBUTOR] = $vs; + $a[self::FIELD_CONTRIBUTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRIBUTOR][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2366,64 +2459,114 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getGoal())) { - $a[self::FIELD_GOAL] = $vs; + $a[self::FIELD_GOAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GOAL][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2431,15 +2574,26 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCareTeam.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCareTeam.php index 7cd968922a..da2b8b5c05 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRCareTeam extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -343,20 +343,27 @@ public function __construct($data = null) $this->addManagingOrganization(new FHIRReference($data[self::FIELD_MANAGING_ORGANIZATION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -438,20 +445,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCareTeamStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCareTeamStatus([FHIRCareTeamStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCareTeamStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCareTeamStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCareTeamStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCareTeamStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCareTeamStatus([FHIRCareTeamStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCareTeamStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1359,43 +1373,89 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getManagingOrganization())) { - $a[self::FIELD_MANAGING_ORGANIZATION] = $vs; + $a[self::FIELD_MANAGING_ORGANIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANAGING_ORGANIZATION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCareTeamStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCareTeamStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1403,7 +1463,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCatalogEntry.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCatalogEntry.php index 15808aef9c..18e0d6708d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCatalogEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCatalogEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRCatalogEntry extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_VALIDITY_PERIOD = 'validityPeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -373,36 +373,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_LAST_UPDATED])) { - $ext = (isset($data[self::FIELD_LAST_UPDATED_EXT]) && is_array($data[self::FIELD_LAST_UPDATED_EXT])) - ? $data[self::FIELD_LAST_UPDATED_EXT] - : null; - if ($data[self::FIELD_LAST_UPDATED] instanceof FHIRDateTime) { - $this->setLastUpdated($data[self::FIELD_LAST_UPDATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_UPDATED])) { - $this->setLastUpdated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_LAST_UPDATED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_UPDATED])) { - $this->setLastUpdated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_LAST_UPDATED]))); - } + if (isset($data[self::FIELD_LAST_UPDATED]) || isset($data[self::FIELD_LAST_UPDATED_EXT])) { + if (isset($data[self::FIELD_LAST_UPDATED])) { + $value = $data[self::FIELD_LAST_UPDATED]; } else { - $this->setLastUpdated(new FHIRDateTime($data[self::FIELD_LAST_UPDATED])); + $value = null; } - } - if (isset($data[self::FIELD_ORDERABLE])) { - $ext = (isset($data[self::FIELD_ORDERABLE_EXT]) && is_array($data[self::FIELD_ORDERABLE_EXT])) - ? $data[self::FIELD_ORDERABLE_EXT] - : null; - if ($data[self::FIELD_ORDERABLE] instanceof FHIRBoolean) { - $this->setOrderable($data[self::FIELD_ORDERABLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDERABLE])) { - $this->setOrderable(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ORDERABLE]] + $ext)); - } else if (is_array($data[self::FIELD_ORDERABLE])) { - $this->setOrderable(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ORDERABLE]))); + if (isset($data[self::FIELD_LAST_UPDATED_EXT]) && is_array($data[self::FIELD_LAST_UPDATED_EXT])) { + $ext = $data[self::FIELD_LAST_UPDATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setLastUpdated($value); + } else if (is_array($value)) { + $this->setLastUpdated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setLastUpdated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastUpdated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_ORDERABLE]) || isset($data[self::FIELD_ORDERABLE_EXT])) { + if (isset($data[self::FIELD_ORDERABLE])) { + $value = $data[self::FIELD_ORDERABLE]; } else { - $this->setOrderable(new FHIRBoolean($data[self::FIELD_ORDERABLE])); + $value = null; + } + if (isset($data[self::FIELD_ORDERABLE_EXT]) && is_array($data[self::FIELD_ORDERABLE_EXT])) { + $ext = $data[self::FIELD_ORDERABLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOrderable($value); + } else if (is_array($value)) { + $this->setOrderable(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOrderable(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOrderable(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_REFERENCED_ITEM])) { @@ -430,20 +444,27 @@ public function __construct($data = null) $this->addRelatedEntry(new FHIRCatalogEntryRelatedEntry($data[self::FIELD_RELATED_ENTRY])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -453,20 +474,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_VALID_TO])) { - $ext = (isset($data[self::FIELD_VALID_TO_EXT]) && is_array($data[self::FIELD_VALID_TO_EXT])) - ? $data[self::FIELD_VALID_TO_EXT] - : null; - if ($data[self::FIELD_VALID_TO] instanceof FHIRDateTime) { - $this->setValidTo($data[self::FIELD_VALID_TO]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALID_TO])) { - $this->setValidTo(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALID_TO]] + $ext)); - } else if (is_array($data[self::FIELD_VALID_TO])) { - $this->setValidTo(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALID_TO]))); - } + if (isset($data[self::FIELD_VALID_TO]) || isset($data[self::FIELD_VALID_TO_EXT])) { + if (isset($data[self::FIELD_VALID_TO])) { + $value = $data[self::FIELD_VALID_TO]; } else { - $this->setValidTo(new FHIRDateTime($data[self::FIELD_VALID_TO])); + $value = null; + } + if (isset($data[self::FIELD_VALID_TO_EXT]) && is_array($data[self::FIELD_VALID_TO_EXT])) { + $ext = $data[self::FIELD_VALID_TO_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValidTo($value); + } else if (is_array($value)) { + $this->setValidTo(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValidTo(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValidTo(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_VALIDITY_PERIOD])) { @@ -1320,31 +1348,65 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdditionalCharacteristic())) { - $a[self::FIELD_ADDITIONAL_CHARACTERISTIC] = $vs; + $a[self::FIELD_ADDITIONAL_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIONAL_CHARACTERISTIC][] = $v; + } } if ([] !== ($vs = $this->getAdditionalClassification())) { - $a[self::FIELD_ADDITIONAL_CLASSIFICATION] = $vs; + $a[self::FIELD_ADDITIONAL_CLASSIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIONAL_CLASSIFICATION][] = $v; + } } if ([] !== ($vs = $this->getAdditionalIdentifier())) { - $a[self::FIELD_ADDITIONAL_IDENTIFIER] = $vs; + $a[self::FIELD_ADDITIONAL_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIONAL_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getClassification())) { - $a[self::FIELD_CLASSIFICATION] = $vs; + $a[self::FIELD_CLASSIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CLASSIFICATION][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLastUpdated())) { $a[self::FIELD_LAST_UPDATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_LAST_UPDATED_EXT] = $enc; } } if (null !== ($v = $this->getOrderable())) { $a[self::FIELD_ORDERABLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ORDERABLE_EXT] = $enc; } } @@ -1352,12 +1414,20 @@ public function jsonSerialize() $a[self::FIELD_REFERENCED_ITEM] = $v; } if ([] !== ($vs = $this->getRelatedEntry())) { - $a[self::FIELD_RELATED_ENTRY] = $vs; + $a[self::FIELD_RELATED_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ENTRY][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1366,14 +1436,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValidTo())) { $a[self::FIELD_VALID_TO] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALID_TO_EXT] = $enc; } } if (null !== ($v = $this->getValidityPeriod())) { $a[self::FIELD_VALIDITY_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItem.php index 59941ef74c..dc1cbda80e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRChargeItem extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_SUPPORTING_INFORMATION = 'supportingInformation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -565,78 +565,103 @@ public function __construct($data = null) $this->setCostCenter(new FHIRReference($data[self::FIELD_COST_CENTER])); } } - if (isset($data[self::FIELD_DEFINITION_CANONICAL])) { - $ext = (isset($data[self::FIELD_DEFINITION_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFINITION_CANONICAL_EXT])) - ? $data[self::FIELD_DEFINITION_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_DEFINITION_CANONICAL])) { - foreach($data[self::FIELD_DEFINITION_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addDefinitionCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDefinitionCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DEFINITION_CANONICAL]) || isset($data[self::FIELD_DEFINITION_CANONICAL_EXT])) { + if (isset($data[self::FIELD_DEFINITION_CANONICAL])) { + $value = $data[self::FIELD_DEFINITION_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_CANONICAL_EXT]) && is_array($data[self::FIELD_DEFINITION_CANONICAL_EXT])) { + $ext = $data[self::FIELD_DEFINITION_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addDefinitionCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addDefinitionCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDefinitionCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDefinitionCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addDefinitionCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDefinitionCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_DEFINITION_CANONICAL] instanceof FHIRCanonical) { - $this->addDefinitionCanonical($data[self::FIELD_DEFINITION_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DEFINITION_CANONICAL])) { - $this->addDefinitionCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFINITION_CANONICAL]] + $ext)); - } else { - $this->addDefinitionCanonical(new FHIRCanonical($data[self::FIELD_DEFINITION_CANONICAL])); } } - if (isset($data[self::FIELD_DEFINITION_URI])) { - $ext = (isset($data[self::FIELD_DEFINITION_URI_EXT]) && is_array($data[self::FIELD_DEFINITION_URI_EXT])) - ? $data[self::FIELD_DEFINITION_URI_EXT] - : null; - if (is_array($data[self::FIELD_DEFINITION_URI])) { - foreach($data[self::FIELD_DEFINITION_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addDefinitionUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDefinitionUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDefinitionUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DEFINITION_URI]) || isset($data[self::FIELD_DEFINITION_URI_EXT])) { + if (isset($data[self::FIELD_DEFINITION_URI])) { + $value = $data[self::FIELD_DEFINITION_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_URI_EXT]) && is_array($data[self::FIELD_DEFINITION_URI_EXT])) { + $ext = $data[self::FIELD_DEFINITION_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addDefinitionUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addDefinitionUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDefinitionUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addDefinitionUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDefinitionUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addDefinitionUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addDefinitionUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DEFINITION_URI] instanceof FHIRUri) { - $this->addDefinitionUri($data[self::FIELD_DEFINITION_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DEFINITION_URI])) { - $this->addDefinitionUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION_URI]] + $ext)); - } else { - $this->addDefinitionUri(new FHIRUri($data[self::FIELD_DEFINITION_URI])); - } - } - if (isset($data[self::FIELD_ENTERED_DATE])) { - $ext = (isset($data[self::FIELD_ENTERED_DATE_EXT]) && is_array($data[self::FIELD_ENTERED_DATE_EXT])) - ? $data[self::FIELD_ENTERED_DATE_EXT] - : null; - if ($data[self::FIELD_ENTERED_DATE] instanceof FHIRDateTime) { - $this->setEnteredDate($data[self::FIELD_ENTERED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENTERED_DATE])) { - $this->setEnteredDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ENTERED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_ENTERED_DATE])) { - $this->setEnteredDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ENTERED_DATE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDefinitionUri(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_ENTERED_DATE]) || isset($data[self::FIELD_ENTERED_DATE_EXT])) { + if (isset($data[self::FIELD_ENTERED_DATE])) { + $value = $data[self::FIELD_ENTERED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ENTERED_DATE_EXT]) && is_array($data[self::FIELD_ENTERED_DATE_EXT])) { + $ext = $data[self::FIELD_ENTERED_DATE_EXT]; } else { - $this->setEnteredDate(new FHIRDateTime($data[self::FIELD_ENTERED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEnteredDate($value); + } else if (is_array($value)) { + $this->setEnteredDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEnteredDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnteredDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENTERER])) { @@ -646,20 +671,27 @@ public function __construct($data = null) $this->setEnterer(new FHIRReference($data[self::FIELD_ENTERER])); } } - if (isset($data[self::FIELD_FACTOR_OVERRIDE])) { - $ext = (isset($data[self::FIELD_FACTOR_OVERRIDE_EXT]) && is_array($data[self::FIELD_FACTOR_OVERRIDE_EXT])) - ? $data[self::FIELD_FACTOR_OVERRIDE_EXT] - : null; - if ($data[self::FIELD_FACTOR_OVERRIDE] instanceof FHIRDecimal) { - $this->setFactorOverride($data[self::FIELD_FACTOR_OVERRIDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR_OVERRIDE])) { - $this->setFactorOverride(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR_OVERRIDE]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR_OVERRIDE])) { - $this->setFactorOverride(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR_OVERRIDE]))); - } + if (isset($data[self::FIELD_FACTOR_OVERRIDE]) || isset($data[self::FIELD_FACTOR_OVERRIDE_EXT])) { + if (isset($data[self::FIELD_FACTOR_OVERRIDE])) { + $value = $data[self::FIELD_FACTOR_OVERRIDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_OVERRIDE_EXT]) && is_array($data[self::FIELD_FACTOR_OVERRIDE_EXT])) { + $ext = $data[self::FIELD_FACTOR_OVERRIDE_EXT]; } else { - $this->setFactorOverride(new FHIRDecimal($data[self::FIELD_FACTOR_OVERRIDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactorOverride($value); + } else if (is_array($value)) { + $this->setFactorOverride(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactorOverride(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactorOverride(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -698,20 +730,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -728,20 +767,27 @@ public function __construct($data = null) $this->setOccurrenceTiming(new FHIRTiming($data[self::FIELD_OCCURRENCE_TIMING])); } } - if (isset($data[self::FIELD_OVERRIDE_REASON])) { - $ext = (isset($data[self::FIELD_OVERRIDE_REASON_EXT]) && is_array($data[self::FIELD_OVERRIDE_REASON_EXT])) - ? $data[self::FIELD_OVERRIDE_REASON_EXT] - : null; - if ($data[self::FIELD_OVERRIDE_REASON] instanceof FHIRString) { - $this->setOverrideReason($data[self::FIELD_OVERRIDE_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OVERRIDE_REASON])) { - $this->setOverrideReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OVERRIDE_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_OVERRIDE_REASON])) { - $this->setOverrideReason(new FHIRString(array_merge($ext, $data[self::FIELD_OVERRIDE_REASON]))); - } + if (isset($data[self::FIELD_OVERRIDE_REASON]) || isset($data[self::FIELD_OVERRIDE_REASON_EXT])) { + if (isset($data[self::FIELD_OVERRIDE_REASON])) { + $value = $data[self::FIELD_OVERRIDE_REASON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OVERRIDE_REASON_EXT]) && is_array($data[self::FIELD_OVERRIDE_REASON_EXT])) { + $ext = $data[self::FIELD_OVERRIDE_REASON_EXT]; } else { - $this->setOverrideReason(new FHIRString($data[self::FIELD_OVERRIDE_REASON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOverrideReason($value); + } else if (is_array($value)) { + $this->setOverrideReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOverrideReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOverrideReason(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART_OF])) { @@ -858,20 +904,27 @@ public function __construct($data = null) $this->addService(new FHIRReference($data[self::FIELD_SERVICE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRChargeItemStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRChargeItemStatus([FHIRChargeItemStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRChargeItemStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRChargeItemStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRChargeItemStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRChargeItemStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRChargeItemStatus([FHIRChargeItemStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRChargeItemStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -2558,10 +2611,22 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAccount())) { - $a[self::FIELD_ACCOUNT] = $vs; + $a[self::FIELD_ACCOUNT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACCOUNT][] = $v; + } } if ([] !== ($vs = $this->getBodysite())) { - $a[self::FIELD_BODYSITE] = $vs; + $a[self::FIELD_BODYSITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODYSITE][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -2574,38 +2639,56 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getDefinitionCanonical())) { $a[self::FIELD_DEFINITION_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DEFINITION_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DEFINITION_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DEFINITION_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DEFINITION_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getDefinitionUri())) { $a[self::FIELD_DEFINITION_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DEFINITION_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DEFINITION_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DEFINITION_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DEFINITION_URI_EXT] = $encs; + } } if (null !== ($v = $this->getEnteredDate())) { $a[self::FIELD_ENTERED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ENTERED_DATE_EXT] = $enc; } } @@ -2614,21 +2697,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactorOverride())) { $a[self::FIELD_FACTOR_OVERRIDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_OVERRIDE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -2640,16 +2739,30 @@ public function jsonSerialize() } if (null !== ($v = $this->getOverrideReason())) { $a[self::FIELD_OVERRIDE_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OVERRIDE_REASON_EXT] = $enc; } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getPerformingOrganization())) { $a[self::FIELD_PERFORMING_ORGANIZATION] = $v; @@ -2667,18 +2780,32 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if (null !== ($v = $this->getRequestingOrganization())) { $a[self::FIELD_REQUESTING_ORGANIZATION] = $v; } if ([] !== ($vs = $this->getService())) { - $a[self::FIELD_SERVICE] = $vs; + $a[self::FIELD_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRChargeItemStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRChargeItemStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2686,7 +2813,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinition.php index 82637aaab8..09fa1dc0c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIRChargeItemDefinition extends FHIRDomainResource implements PHPFHIRCont const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The ChargeItemDefinition resource provides the properties that apply to the @@ -491,20 +491,27 @@ public function __construct($data = null) $this->addApplicability(new FHIRChargeItemDefinitionApplicability($data[self::FIELD_APPLICABILITY])); } } - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -532,81 +539,111 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_DERIVED_FROM_URI])) { - $ext = (isset($data[self::FIELD_DERIVED_FROM_URI_EXT]) && is_array($data[self::FIELD_DERIVED_FROM_URI_EXT])) - ? $data[self::FIELD_DERIVED_FROM_URI_EXT] - : null; - if (is_array($data[self::FIELD_DERIVED_FROM_URI])) { - foreach($data[self::FIELD_DERIVED_FROM_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addDerivedFromUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDerivedFromUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDerivedFromUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DERIVED_FROM_URI]) || isset($data[self::FIELD_DERIVED_FROM_URI_EXT])) { + if (isset($data[self::FIELD_DERIVED_FROM_URI])) { + $value = $data[self::FIELD_DERIVED_FROM_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DERIVED_FROM_URI_EXT]) && is_array($data[self::FIELD_DERIVED_FROM_URI_EXT])) { + $ext = $data[self::FIELD_DERIVED_FROM_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addDerivedFromUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addDerivedFromUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDerivedFromUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addDerivedFromUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDerivedFromUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addDerivedFromUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addDerivedFromUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DERIVED_FROM_URI] instanceof FHIRUri) { - $this->addDerivedFromUri($data[self::FIELD_DERIVED_FROM_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DERIVED_FROM_URI])) { - $this->addDerivedFromUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DERIVED_FROM_URI]] + $ext)); - } else { - $this->addDerivedFromUri(new FHIRUri($data[self::FIELD_DERIVED_FROM_URI])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDerivedFromUri(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -616,20 +653,27 @@ public function __construct($data = null) $this->setEffectivePeriod(new FHIRPeriod($data[self::FIELD_EFFECTIVE_PERIOD])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -686,49 +730,65 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_PART_OF])) { - $ext = (isset($data[self::FIELD_PART_OF_EXT]) && is_array($data[self::FIELD_PART_OF_EXT])) - ? $data[self::FIELD_PART_OF_EXT] - : null; - if (is_array($data[self::FIELD_PART_OF])) { - foreach($data[self::FIELD_PART_OF] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addPartOf($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPartOf(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPartOf(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PART_OF]) || isset($data[self::FIELD_PART_OF_EXT])) { + if (isset($data[self::FIELD_PART_OF])) { + $value = $data[self::FIELD_PART_OF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PART_OF_EXT]) && is_array($data[self::FIELD_PART_OF_EXT])) { + $ext = $data[self::FIELD_PART_OF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addPartOf($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addPartOf($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPartOf(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addPartOf(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPartOf(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addPartOf(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addPartOf(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPartOf(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_PART_OF] instanceof FHIRCanonical) { - $this->addPartOf($data[self::FIELD_PART_OF]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PART_OF])) { - $this->addPartOf(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PART_OF]] + $ext)); - } else { - $this->addPartOf(new FHIRCanonical($data[self::FIELD_PART_OF])); } } if (isset($data[self::FIELD_PROPERTY_GROUP])) { @@ -749,97 +809,134 @@ public function __construct($data = null) $this->addPropertyGroup(new FHIRChargeItemDefinitionPropertyGroup($data[self::FIELD_PROPERTY_GROUP])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } - if (isset($data[self::FIELD_REPLACES])) { - $ext = (isset($data[self::FIELD_REPLACES_EXT]) && is_array($data[self::FIELD_REPLACES_EXT])) - ? $data[self::FIELD_REPLACES_EXT] - : null; - if (is_array($data[self::FIELD_REPLACES])) { - foreach($data[self::FIELD_REPLACES] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addReplaces($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addReplaces(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addReplaces(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_REPLACES]) || isset($data[self::FIELD_REPLACES_EXT])) { + if (isset($data[self::FIELD_REPLACES])) { + $value = $data[self::FIELD_REPLACES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPLACES_EXT]) && is_array($data[self::FIELD_REPLACES_EXT])) { + $ext = $data[self::FIELD_REPLACES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addReplaces($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addReplaces($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addReplaces(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addReplaces(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addReplaces(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addReplaces(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addReplaces(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_REPLACES] instanceof FHIRCanonical) { - $this->addReplaces($data[self::FIELD_REPLACES]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REPLACES])) { - $this->addReplaces(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_REPLACES]] + $ext)); - } else { - $this->addReplaces(new FHIRCanonical($data[self::FIELD_REPLACES])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addReplaces(new FHIRCanonical($iext)); } + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -860,20 +957,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2463,12 +2567,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getApplicability())) { - $a[self::FIELD_APPLICABILITY] = $vs; + $a[self::FIELD_APPLICABILITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_APPLICABILITY][] = $v; + } } if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } @@ -2476,41 +2588,61 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDerivedFromUri())) { $a[self::FIELD_DERIVED_FROM_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DERIVED_FROM_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DERIVED_FROM_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DERIVED_FROM_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DERIVED_FROM_URI_EXT] = $encs; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2519,98 +2651,161 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getPartOf())) { $a[self::FIELD_PART_OF] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PART_OF][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PART_OF_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PART_OF_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PART_OF_EXT] = $encs; + } } if ([] !== ($vs = $this->getPropertyGroup())) { - $a[self::FIELD_PROPERTY_GROUP] = $vs; + $a[self::FIELD_PROPERTY_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROPERTY_GROUP][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if ([] !== ($vs = $this->getReplaces())) { $a[self::FIELD_REPLACES] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REPLACES][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REPLACES_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REPLACES_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REPLACES_EXT] = $encs; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaim.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaim.php index a9ae10c3d2..ffd2c77be7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaim.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaim.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRClaim extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A provider issued list of professional services and products which have been @@ -509,20 +509,27 @@ public function __construct($data = null) $this->addCareTeam(new FHIRClaimCareTeam($data[self::FIELD_CARE_TEAM])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DIAGNOSIS])) { @@ -710,20 +717,27 @@ public function __construct($data = null) $this->addRelated(new FHIRClaimRelated($data[self::FIELD_RELATED])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_SUB_TYPE])) { @@ -765,20 +779,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse(array_merge($ext, $data[self::FIELD_USE]))); - } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRUse($ext)); } } } @@ -2194,17 +2215,31 @@ public function jsonSerialize() $a[self::FIELD_BILLABLE_PERIOD] = $v; } if ([] !== ($vs = $this->getCareTeam())) { - $a[self::FIELD_CARE_TEAM] = $vs; + $a[self::FIELD_CARE_TEAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CARE_TEAM][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getEnterer())) { $a[self::FIELD_ENTERER] = $v; @@ -2216,16 +2251,34 @@ public function jsonSerialize() $a[self::FIELD_FUNDS_RESERVE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getOriginalPrescription())) { $a[self::FIELD_ORIGINAL_PRESCRIPTION] = $v; @@ -2243,7 +2296,13 @@ public function jsonSerialize() $a[self::FIELD_PRIORITY] = $v; } if ([] !== ($vs = $this->getProcedure())) { - $a[self::FIELD_PROCEDURE] = $vs; + $a[self::FIELD_PROCEDURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCEDURE][] = $v; + } } if (null !== ($v = $this->getProvider())) { $a[self::FIELD_PROVIDER] = $v; @@ -2252,12 +2311,20 @@ public function jsonSerialize() $a[self::FIELD_REFERRAL] = $v; } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2265,7 +2332,13 @@ public function jsonSerialize() $a[self::FIELD_SUB_TYPE] = $v; } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v; @@ -2275,11 +2348,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php index 8e10463e59..0e86d6a0af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRClaimResponse extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -518,36 +518,50 @@ public function __construct($data = null) $this->addCommunicationRequest(new FHIRReference($data[self::FIELD_COMMUNICATION_REQUEST])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); - } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_ERROR])) { @@ -650,20 +664,27 @@ public function __construct($data = null) $this->addItem(new FHIRClaimResponseItem($data[self::FIELD_ITEM])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRClaimProcessingCodes) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRClaimProcessingCodes([FHIRClaimProcessingCodes::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRClaimProcessingCodes(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; } else { - $this->setOutcome(new FHIRClaimProcessingCodes($data[self::FIELD_OUTCOME])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRClaimProcessingCodes) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRClaimProcessingCodes(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRClaimProcessingCodes([FHIRClaimProcessingCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRClaimProcessingCodes($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -694,20 +715,27 @@ public function __construct($data = null) $this->setPreAuthPeriod(new FHIRPeriod($data[self::FIELD_PRE_AUTH_PERIOD])); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->setPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->setPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - $this->setPreAuthRef(new FHIRString(array_merge($ext, $data[self::FIELD_PRE_AUTH_REF]))); - } + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; } else { - $this->setPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPreAuthRef($value); + } else if (is_array($value)) { + $this->setPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreAuthRef(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROCESS_NOTE])) { @@ -742,20 +770,27 @@ public function __construct($data = null) $this->setRequestor(new FHIRReference($data[self::FIELD_REQUESTOR])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_SUB_TYPE])) { @@ -790,20 +825,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse(array_merge($ext, $data[self::FIELD_USE]))); - } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRUse($ext)); } } } @@ -2245,30 +2287,58 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAddItem())) { - $a[self::FIELD_ADD_ITEM] = $vs; + $a[self::FIELD_ADD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if ([] !== ($vs = $this->getCommunicationRequest())) { - $a[self::FIELD_COMMUNICATION_REQUEST] = $vs; + $a[self::FIELD_COMMUNICATION_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION_REQUEST][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getError())) { - $a[self::FIELD_ERROR] = $vs; + $a[self::FIELD_ERROR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ERROR][] = $v; + } } if (null !== ($v = $this->getForm())) { $a[self::FIELD_FORM] = $v; @@ -2280,21 +2350,41 @@ public function jsonSerialize() $a[self::FIELD_FUNDS_RESERVE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRClaimProcessingCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRClaimProcessingCodes::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -2312,13 +2402,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PRE_AUTH_REF_EXT] = $enc; } } if ([] !== ($vs = $this->getProcessNote())) { - $a[self::FIELD_PROCESS_NOTE] = $vs; + $a[self::FIELD_PROCESS_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESS_NOTE][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -2328,8 +2426,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2337,18 +2437,29 @@ public function jsonSerialize() $a[self::FIELD_SUB_TYPE] = $v; } if ([] !== ($vs = $this->getTotal())) { - $a[self::FIELD_TOTAL] = $vs; + $a[self::FIELD_TOTAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOTAL][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php index e2863b2de6..92517aa687 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRClinicalImpression extends FHIRDomainResource implements PHPFHIRContai const FIELD_SUPPORTING_INFO = 'supportingInfo'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -427,52 +427,73 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -622,49 +643,65 @@ public function __construct($data = null) $this->addPrognosisReference(new FHIRReference($data[self::FIELD_PROGNOSIS_REFERENCE])); } } - if (isset($data[self::FIELD_PROTOCOL])) { - $ext = (isset($data[self::FIELD_PROTOCOL_EXT]) && is_array($data[self::FIELD_PROTOCOL_EXT])) - ? $data[self::FIELD_PROTOCOL_EXT] - : null; - if (is_array($data[self::FIELD_PROTOCOL])) { - foreach($data[self::FIELD_PROTOCOL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addProtocol($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProtocol(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROTOCOL]) || isset($data[self::FIELD_PROTOCOL_EXT])) { + if (isset($data[self::FIELD_PROTOCOL])) { + $value = $data[self::FIELD_PROTOCOL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROTOCOL_EXT]) && is_array($data[self::FIELD_PROTOCOL_EXT])) { + $ext = $data[self::FIELD_PROTOCOL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addProtocol($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addProtocol($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProtocol(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProtocol(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addProtocol(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_PROTOCOL] instanceof FHIRUri) { - $this->addProtocol($data[self::FIELD_PROTOCOL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROTOCOL])) { - $this->addProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROTOCOL]] + $ext)); - } else { - $this->addProtocol(new FHIRUri($data[self::FIELD_PROTOCOL])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRClinicalImpressionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRClinicalImpressionStatus([FHIRClinicalImpressionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRClinicalImpressionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProtocol(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRClinicalImpressionStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRClinicalImpressionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRClinicalImpressionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRClinicalImpressionStatus([FHIRClinicalImpressionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRClinicalImpressionStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -681,20 +718,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_SUMMARY])) { - $ext = (isset($data[self::FIELD_SUMMARY_EXT]) && is_array($data[self::FIELD_SUMMARY_EXT])) - ? $data[self::FIELD_SUMMARY_EXT] - : null; - if ($data[self::FIELD_SUMMARY] instanceof FHIRString) { - $this->setSummary($data[self::FIELD_SUMMARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUMMARY])) { - $this->setSummary(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUMMARY]] + $ext)); - } else if (is_array($data[self::FIELD_SUMMARY])) { - $this->setSummary(new FHIRString(array_merge($ext, $data[self::FIELD_SUMMARY]))); - } + if (isset($data[self::FIELD_SUMMARY]) || isset($data[self::FIELD_SUMMARY_EXT])) { + if (isset($data[self::FIELD_SUMMARY])) { + $value = $data[self::FIELD_SUMMARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUMMARY_EXT]) && is_array($data[self::FIELD_SUMMARY_EXT])) { + $ext = $data[self::FIELD_SUMMARY_EXT]; } else { - $this->setSummary(new FHIRString($data[self::FIELD_SUMMARY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSummary($value); + } else if (is_array($value)) { + $this->setSummary(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSummary(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSummary(new FHIRString($ext)); } } if (isset($data[self::FIELD_SUPPORTING_INFO])) { @@ -2038,22 +2082,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -2064,48 +2114,100 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getFinding())) { - $a[self::FIELD_FINDING] = $vs; + $a[self::FIELD_FINDING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FINDING][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInvestigation())) { - $a[self::FIELD_INVESTIGATION] = $vs; + $a[self::FIELD_INVESTIGATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INVESTIGATION][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPrevious())) { $a[self::FIELD_PREVIOUS] = $v; } if ([] !== ($vs = $this->getProblem())) { - $a[self::FIELD_PROBLEM] = $vs; + $a[self::FIELD_PROBLEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROBLEM][] = $v; + } } if ([] !== ($vs = $this->getPrognosisCodeableConcept())) { - $a[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] = $vs; + $a[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getPrognosisReference())) { - $a[self::FIELD_PROGNOSIS_REFERENCE] = $vs; + $a[self::FIELD_PROGNOSIS_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGNOSIS_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getProtocol())) { $a[self::FIELD_PROTOCOL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROTOCOL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROTOCOL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROTOCOL_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROTOCOL_EXT] = $encs; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRClinicalImpressionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRClinicalImpressionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2117,13 +2219,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getSummary())) { $a[self::FIELD_SUMMARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUMMARY_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php index 15bc8d88f0..166eebccb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIRCodeSystem extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_VERSION_NEEDED_EXT = '_versionNeeded'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -511,36 +511,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CASE_SENSITIVE])) { - $ext = (isset($data[self::FIELD_CASE_SENSITIVE_EXT]) && is_array($data[self::FIELD_CASE_SENSITIVE_EXT])) - ? $data[self::FIELD_CASE_SENSITIVE_EXT] - : null; - if ($data[self::FIELD_CASE_SENSITIVE] instanceof FHIRBoolean) { - $this->setCaseSensitive($data[self::FIELD_CASE_SENSITIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CASE_SENSITIVE])) { - $this->setCaseSensitive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CASE_SENSITIVE]] + $ext)); - } else if (is_array($data[self::FIELD_CASE_SENSITIVE])) { - $this->setCaseSensitive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CASE_SENSITIVE]))); - } + if (isset($data[self::FIELD_CASE_SENSITIVE]) || isset($data[self::FIELD_CASE_SENSITIVE_EXT])) { + if (isset($data[self::FIELD_CASE_SENSITIVE])) { + $value = $data[self::FIELD_CASE_SENSITIVE]; } else { - $this->setCaseSensitive(new FHIRBoolean($data[self::FIELD_CASE_SENSITIVE])); + $value = null; } - } - if (isset($data[self::FIELD_COMPOSITIONAL])) { - $ext = (isset($data[self::FIELD_COMPOSITIONAL_EXT]) && is_array($data[self::FIELD_COMPOSITIONAL_EXT])) - ? $data[self::FIELD_COMPOSITIONAL_EXT] - : null; - if ($data[self::FIELD_COMPOSITIONAL] instanceof FHIRBoolean) { - $this->setCompositional($data[self::FIELD_COMPOSITIONAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPOSITIONAL])) { - $this->setCompositional(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_COMPOSITIONAL]] + $ext)); - } else if (is_array($data[self::FIELD_COMPOSITIONAL])) { - $this->setCompositional(new FHIRBoolean(array_merge($ext, $data[self::FIELD_COMPOSITIONAL]))); + if (isset($data[self::FIELD_CASE_SENSITIVE_EXT]) && is_array($data[self::FIELD_CASE_SENSITIVE_EXT])) { + $ext = $data[self::FIELD_CASE_SENSITIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCaseSensitive($value); + } else if (is_array($value)) { + $this->setCaseSensitive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCaseSensitive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCaseSensitive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_COMPOSITIONAL]) || isset($data[self::FIELD_COMPOSITIONAL_EXT])) { + if (isset($data[self::FIELD_COMPOSITIONAL])) { + $value = $data[self::FIELD_COMPOSITIONAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPOSITIONAL_EXT]) && is_array($data[self::FIELD_COMPOSITIONAL_EXT])) { + $ext = $data[self::FIELD_COMPOSITIONAL_EXT]; } else { - $this->setCompositional(new FHIRBoolean($data[self::FIELD_COMPOSITIONAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCompositional($value); + } else if (is_array($value)) { + $this->setCompositional(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCompositional(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCompositional(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CONCEPT])) { @@ -579,100 +593,142 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_CONTENT])) { - $ext = (isset($data[self::FIELD_CONTENT_EXT]) && is_array($data[self::FIELD_CONTENT_EXT])) - ? $data[self::FIELD_CONTENT_EXT] - : null; - if ($data[self::FIELD_CONTENT] instanceof FHIRCodeSystemContentMode) { - $this->setContent($data[self::FIELD_CONTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT])) { - $this->setContent(new FHIRCodeSystemContentMode([FHIRCodeSystemContentMode::FIELD_VALUE => $data[self::FIELD_CONTENT]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT])) { - $this->setContent(new FHIRCodeSystemContentMode(array_merge($ext, $data[self::FIELD_CONTENT]))); - } + if (isset($data[self::FIELD_CONTENT]) || isset($data[self::FIELD_CONTENT_EXT])) { + if (isset($data[self::FIELD_CONTENT])) { + $value = $data[self::FIELD_CONTENT]; } else { - $this->setContent(new FHIRCodeSystemContentMode($data[self::FIELD_CONTENT])); + $value = null; } - } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_CONTENT_EXT]) && is_array($data[self::FIELD_CONTENT_EXT])) { + $ext = $data[self::FIELD_CONTENT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCodeSystemContentMode) { + $this->setContent($value); + } else if (is_array($value)) { + $this->setContent(new FHIRCodeSystemContentMode(array_merge($ext, $value))); + } else { + $this->setContent(new FHIRCodeSystemContentMode([FHIRCodeSystemContentMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContent(new FHIRCodeSystemContentMode($ext)); } } - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRUnsignedInt) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCount(new FHIRUnsignedInt($data[self::FIELD_COUNT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCount(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FILTER])) { @@ -693,20 +749,27 @@ public function __construct($data = null) $this->addFilter(new FHIRCodeSystemFilter($data[self::FIELD_FILTER])); } } - if (isset($data[self::FIELD_HIERARCHY_MEANING])) { - $ext = (isset($data[self::FIELD_HIERARCHY_MEANING_EXT]) && is_array($data[self::FIELD_HIERARCHY_MEANING_EXT])) - ? $data[self::FIELD_HIERARCHY_MEANING_EXT] - : null; - if ($data[self::FIELD_HIERARCHY_MEANING] instanceof FHIRCodeSystemHierarchyMeaning) { - $this->setHierarchyMeaning($data[self::FIELD_HIERARCHY_MEANING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HIERARCHY_MEANING])) { - $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning([FHIRCodeSystemHierarchyMeaning::FIELD_VALUE => $data[self::FIELD_HIERARCHY_MEANING]] + $ext)); - } else if (is_array($data[self::FIELD_HIERARCHY_MEANING])) { - $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning(array_merge($ext, $data[self::FIELD_HIERARCHY_MEANING]))); - } + if (isset($data[self::FIELD_HIERARCHY_MEANING]) || isset($data[self::FIELD_HIERARCHY_MEANING_EXT])) { + if (isset($data[self::FIELD_HIERARCHY_MEANING])) { + $value = $data[self::FIELD_HIERARCHY_MEANING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HIERARCHY_MEANING_EXT]) && is_array($data[self::FIELD_HIERARCHY_MEANING_EXT])) { + $ext = $data[self::FIELD_HIERARCHY_MEANING_EXT]; } else { - $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning($data[self::FIELD_HIERARCHY_MEANING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCodeSystemHierarchyMeaning) { + $this->setHierarchyMeaning($value); + } else if (is_array($value)) { + $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning(array_merge($ext, $value))); + } else { + $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning([FHIRCodeSystemHierarchyMeaning::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -745,20 +808,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROPERTY])) { @@ -779,100 +849,142 @@ public function __construct($data = null) $this->addProperty(new FHIRCodeSystemProperty($data[self::FIELD_PROPERTY])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); - } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_SUPPLEMENTS])) { - $ext = (isset($data[self::FIELD_SUPPLEMENTS_EXT]) && is_array($data[self::FIELD_SUPPLEMENTS_EXT])) - ? $data[self::FIELD_SUPPLEMENTS_EXT] - : null; - if ($data[self::FIELD_SUPPLEMENTS] instanceof FHIRCanonical) { - $this->setSupplements($data[self::FIELD_SUPPLEMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUPPLEMENTS])) { - $this->setSupplements(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_SUPPLEMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_SUPPLEMENTS])) { - $this->setSupplements(new FHIRCanonical(array_merge($ext, $data[self::FIELD_SUPPLEMENTS]))); - } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setSupplements(new FHIRCanonical($data[self::FIELD_SUPPLEMENTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_SUPPLEMENTS]) || isset($data[self::FIELD_SUPPLEMENTS_EXT])) { + if (isset($data[self::FIELD_SUPPLEMENTS])) { + $value = $data[self::FIELD_SUPPLEMENTS]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_SUPPLEMENTS_EXT]) && is_array($data[self::FIELD_SUPPLEMENTS_EXT])) { + $ext = $data[self::FIELD_SUPPLEMENTS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setSupplements($value); + } else if (is_array($value)) { + $this->setSupplements(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setSupplements(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSupplements(new FHIRCanonical($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -893,52 +1005,73 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VALUE_SET])) { - $ext = (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) - ? $data[self::FIELD_VALUE_SET_EXT] - : null; - if ($data[self::FIELD_VALUE_SET] instanceof FHIRCanonical) { - $this->setValueSet($data[self::FIELD_VALUE_SET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_VALUE_SET]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRCanonical(array_merge($ext, $data[self::FIELD_VALUE_SET]))); - } + if (isset($data[self::FIELD_VALUE_SET]) || isset($data[self::FIELD_VALUE_SET_EXT])) { + if (isset($data[self::FIELD_VALUE_SET])) { + $value = $data[self::FIELD_VALUE_SET]; } else { - $this->setValueSet(new FHIRCanonical($data[self::FIELD_VALUE_SET])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setValueSet($value); + } else if (is_array($value)) { + $this->setValueSet(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setValueSet(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSet(new FHIRCanonical($ext)); } } - if (isset($data[self::FIELD_VERSION_NEEDED])) { - $ext = (isset($data[self::FIELD_VERSION_NEEDED_EXT]) && is_array($data[self::FIELD_VERSION_NEEDED_EXT])) - ? $data[self::FIELD_VERSION_NEEDED_EXT] - : null; - if ($data[self::FIELD_VERSION_NEEDED] instanceof FHIRBoolean) { - $this->setVersionNeeded($data[self::FIELD_VERSION_NEEDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION_NEEDED])) { - $this->setVersionNeeded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VERSION_NEEDED]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION_NEEDED])) { - $this->setVersionNeeded(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VERSION_NEEDED]))); + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VERSION_NEEDED]) || isset($data[self::FIELD_VERSION_NEEDED_EXT])) { + if (isset($data[self::FIELD_VERSION_NEEDED])) { + $value = $data[self::FIELD_VERSION_NEEDED]; } else { - $this->setVersionNeeded(new FHIRBoolean($data[self::FIELD_VERSION_NEEDED])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_NEEDED_EXT]) && is_array($data[self::FIELD_VERSION_NEEDED_EXT])) { + $ext = $data[self::FIELD_VERSION_NEEDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setVersionNeeded($value); + } else if (is_array($value)) { + $this->setVersionNeeded(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setVersionNeeded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersionNeeded(new FHIRBoolean($ext)); } } } @@ -2598,158 +2731,241 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCaseSensitive())) { $a[self::FIELD_CASE_SENSITIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CASE_SENSITIVE_EXT] = $enc; } } if (null !== ($v = $this->getCompositional())) { $a[self::FIELD_COMPOSITIONAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_COMPOSITIONAL_EXT] = $enc; } } if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getContent())) { $a[self::FIELD_CONTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCodeSystemContentMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCodeSystemContentMode::FIELD_VALUE]); $a[self::FIELD_CONTENT_EXT] = $enc; } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFilter())) { - $a[self::FIELD_FILTER] = $vs; + $a[self::FIELD_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FILTER][] = $v; + } } if (null !== ($v = $this->getHierarchyMeaning())) { $a[self::FIELD_HIERARCHY_MEANING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCodeSystemHierarchyMeaning::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCodeSystemHierarchyMeaning::FIELD_VALUE]); $a[self::FIELD_HIERARCHY_MEANING_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getProperty())) { - $a[self::FIELD_PROPERTY] = $vs; + $a[self::FIELD_PROPERTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROPERTY][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSupplements())) { $a[self::FIELD_SUPPLEMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_SUPPLEMENTS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getValueSet())) { $a[self::FIELD_VALUE_SET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } if (null !== ($v = $this->getVersionNeeded())) { $a[self::FIELD_VERSION_NEEDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VERSION_NEEDED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunication.php index 6afcd5f80f..c12302a858 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRCommunication extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TOPIC = 'topic'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -522,62 +522,80 @@ public function __construct($data = null) $this->addInResponseTo(new FHIRReference($data[self::FIELD_IN_RESPONSE_TO])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); } } if (isset($data[self::FIELD_MEDIUM])) { @@ -652,20 +670,27 @@ public function __construct($data = null) $this->addPayload(new FHIRCommunicationPayload($data[self::FIELD_PAYLOAD])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -704,20 +729,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_RECEIVED])) { - $ext = (isset($data[self::FIELD_RECEIVED_EXT]) && is_array($data[self::FIELD_RECEIVED_EXT])) - ? $data[self::FIELD_RECEIVED_EXT] - : null; - if ($data[self::FIELD_RECEIVED] instanceof FHIRDateTime) { - $this->setReceived($data[self::FIELD_RECEIVED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECEIVED])) { - $this->setReceived(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECEIVED]] + $ext)); - } else if (is_array($data[self::FIELD_RECEIVED])) { - $this->setReceived(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECEIVED]))); - } + if (isset($data[self::FIELD_RECEIVED]) || isset($data[self::FIELD_RECEIVED_EXT])) { + if (isset($data[self::FIELD_RECEIVED])) { + $value = $data[self::FIELD_RECEIVED]; } else { - $this->setReceived(new FHIRDateTime($data[self::FIELD_RECEIVED])); + $value = null; + } + if (isset($data[self::FIELD_RECEIVED_EXT]) && is_array($data[self::FIELD_RECEIVED_EXT])) { + $ext = $data[self::FIELD_RECEIVED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReceived($value); + } else if (is_array($value)) { + $this->setReceived(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReceived(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReceived(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_RECIPIENT])) { @@ -745,36 +777,50 @@ public function __construct($data = null) $this->setSender(new FHIRReference($data[self::FIELD_SENDER])); } } - if (isset($data[self::FIELD_SENT])) { - $ext = (isset($data[self::FIELD_SENT_EXT]) && is_array($data[self::FIELD_SENT_EXT])) - ? $data[self::FIELD_SENT_EXT] - : null; - if ($data[self::FIELD_SENT] instanceof FHIRDateTime) { - $this->setSent($data[self::FIELD_SENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SENT])) { - $this->setSent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_SENT]] + $ext)); - } else if (is_array($data[self::FIELD_SENT])) { - $this->setSent(new FHIRDateTime(array_merge($ext, $data[self::FIELD_SENT]))); - } + if (isset($data[self::FIELD_SENT]) || isset($data[self::FIELD_SENT_EXT])) { + if (isset($data[self::FIELD_SENT])) { + $value = $data[self::FIELD_SENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SENT_EXT]) && is_array($data[self::FIELD_SENT_EXT])) { + $ext = $data[self::FIELD_SENT_EXT]; } else { - $this->setSent(new FHIRDateTime($data[self::FIELD_SENT])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREventStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setSent($value); + } else if (is_array($value)) { + $this->setSent(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setSent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSent(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREventStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREventStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREventStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -2311,102 +2357,198 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAbout())) { - $a[self::FIELD_ABOUT] = $vs; + $a[self::FIELD_ABOUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ABOUT][] = $v; + } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInResponseTo())) { - $a[self::FIELD_IN_RESPONSE_TO] = $vs; + $a[self::FIELD_IN_RESPONSE_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IN_RESPONSE_TO][] = $v; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if ([] !== ($vs = $this->getMedium())) { - $a[self::FIELD_MEDIUM] = $vs; + $a[self::FIELD_MEDIUM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEDIUM][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPayload())) { - $a[self::FIELD_PAYLOAD] = $vs; + $a[self::FIELD_PAYLOAD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYLOAD][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getReceived())) { $a[self::FIELD_RECEIVED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECEIVED_EXT] = $enc; } } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if (null !== ($v = $this->getSender())) { $a[self::FIELD_SENDER] = $v; } if (null !== ($v = $this->getSent())) { $a[self::FIELD_SENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_SENT_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2419,6 +2561,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTopic())) { $a[self::FIELD_TOPIC] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php index a38329f5cd..5023eedca2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRCommunicationRequest extends FHIRDomainResource implements PHPFHIRCont const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -442,20 +442,27 @@ public function __construct($data = null) $this->addAbout(new FHIRReference($data[self::FIELD_ABOUT])); } } - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -494,20 +501,27 @@ public function __construct($data = null) $this->addCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_DO_NOT_PERFORM])) { - $ext = (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) - ? $data[self::FIELD_DO_NOT_PERFORM_EXT] - : null; - if ($data[self::FIELD_DO_NOT_PERFORM] instanceof FHIRBoolean) { - $this->setDoNotPerform($data[self::FIELD_DO_NOT_PERFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DO_NOT_PERFORM]] + $ext)); - } else if (is_array($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DO_NOT_PERFORM]))); - } + if (isset($data[self::FIELD_DO_NOT_PERFORM]) || isset($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + if (isset($data[self::FIELD_DO_NOT_PERFORM])) { + $value = $data[self::FIELD_DO_NOT_PERFORM]; } else { - $this->setDoNotPerform(new FHIRBoolean($data[self::FIELD_DO_NOT_PERFORM])); + $value = null; + } + if (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + $ext = $data[self::FIELD_DO_NOT_PERFORM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDoNotPerform($value); + } else if (is_array($value)) { + $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoNotPerform(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -578,20 +592,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -619,20 +640,27 @@ public function __construct($data = null) $this->addPayload(new FHIRCommunicationRequestPayload($data[self::FIELD_PAYLOAD])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -721,20 +749,27 @@ public function __construct($data = null) $this->setSender(new FHIRReference($data[self::FIELD_SENDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -2158,25 +2193,47 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAbout())) { - $a[self::FIELD_ABOUT] = $vs; + $a[self::FIELD_ABOUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ABOUT][] = $v; + } } if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getDoNotPerform())) { $a[self::FIELD_DO_NOT_PERFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DO_NOT_PERFORM_EXT] = $enc; } } @@ -2187,18 +2244,38 @@ public function jsonSerialize() $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getMedium())) { - $a[self::FIELD_MEDIUM] = $vs; + $a[self::FIELD_MEDIUM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEDIUM][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -2206,26 +2283,58 @@ public function jsonSerialize() $a[self::FIELD_OCCURRENCE_PERIOD] = $v; } if ([] !== ($vs = $this->getPayload())) { - $a[self::FIELD_PAYLOAD] = $vs; + $a[self::FIELD_PAYLOAD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYLOAD][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; @@ -2235,8 +2344,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2246,6 +2357,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php index 811bd7005a..afb8bf45b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRCompartmentDefinition extends FHIRDomainResource implements PHPFHIRCon const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Which type a compartment definition describes. @@ -327,20 +327,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCompartmentType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCompartmentType([FHIRCompartmentType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCompartmentType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCompartmentType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompartmentType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCompartmentType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCompartmentType([FHIRCompartmentType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCompartmentType($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -361,100 +368,142 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -475,52 +524,73 @@ public function __construct($data = null) $this->addResource(new FHIRCompartmentDefinitionResource($data[self::FIELD_RESOURCE])); } } - if (isset($data[self::FIELD_SEARCH])) { - $ext = (isset($data[self::FIELD_SEARCH_EXT]) && is_array($data[self::FIELD_SEARCH_EXT])) - ? $data[self::FIELD_SEARCH_EXT] - : null; - if ($data[self::FIELD_SEARCH] instanceof FHIRBoolean) { - $this->setSearch($data[self::FIELD_SEARCH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEARCH])) { - $this->setSearch(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_SEARCH]] + $ext)); - } else if (is_array($data[self::FIELD_SEARCH])) { - $this->setSearch(new FHIRBoolean(array_merge($ext, $data[self::FIELD_SEARCH]))); - } + if (isset($data[self::FIELD_SEARCH]) || isset($data[self::FIELD_SEARCH_EXT])) { + if (isset($data[self::FIELD_SEARCH])) { + $value = $data[self::FIELD_SEARCH]; } else { - $this->setSearch(new FHIRBoolean($data[self::FIELD_SEARCH])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_SEARCH_EXT]) && is_array($data[self::FIELD_SEARCH_EXT])) { + $ext = $data[self::FIELD_SEARCH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setSearch($value); + } else if (is_array($value)) { + $this->setSearch(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setSearch(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSearch(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -541,20 +611,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1482,90 +1559,133 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompartmentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompartmentType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } } if (null !== ($v = $this->getSearch())) { $a[self::FIELD_SEARCH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_SEARCH_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRComposition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRComposition.php index 92c3cdf3a0..ed1974d9f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRComposition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRComposition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRComposition extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of healthcare-related information that is assembled together into a single @@ -408,20 +408,27 @@ public function __construct($data = null) $this->addCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_CONFIDENTIALITY])) { - $ext = (isset($data[self::FIELD_CONFIDENTIALITY_EXT]) && is_array($data[self::FIELD_CONFIDENTIALITY_EXT])) - ? $data[self::FIELD_CONFIDENTIALITY_EXT] - : null; - if ($data[self::FIELD_CONFIDENTIALITY] instanceof FHIRVConfidentialityClassification) { - $this->setConfidentiality($data[self::FIELD_CONFIDENTIALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONFIDENTIALITY])) { - $this->setConfidentiality(new FHIRVConfidentialityClassification([FHIRVConfidentialityClassification::FIELD_VALUE => $data[self::FIELD_CONFIDENTIALITY]] + $ext)); - } else if (is_array($data[self::FIELD_CONFIDENTIALITY])) { - $this->setConfidentiality(new FHIRVConfidentialityClassification(array_merge($ext, $data[self::FIELD_CONFIDENTIALITY]))); - } + if (isset($data[self::FIELD_CONFIDENTIALITY]) || isset($data[self::FIELD_CONFIDENTIALITY_EXT])) { + if (isset($data[self::FIELD_CONFIDENTIALITY])) { + $value = $data[self::FIELD_CONFIDENTIALITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONFIDENTIALITY_EXT]) && is_array($data[self::FIELD_CONFIDENTIALITY_EXT])) { + $ext = $data[self::FIELD_CONFIDENTIALITY_EXT]; } else { - $this->setConfidentiality(new FHIRVConfidentialityClassification($data[self::FIELD_CONFIDENTIALITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRVConfidentialityClassification) { + $this->setConfidentiality($value); + } else if (is_array($value)) { + $this->setConfidentiality(new FHIRVConfidentialityClassification(array_merge($ext, $value))); + } else { + $this->setConfidentiality(new FHIRVConfidentialityClassification([FHIRVConfidentialityClassification::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConfidentiality(new FHIRVConfidentialityClassification($ext)); } } if (isset($data[self::FIELD_CUSTODIAN])) { @@ -431,20 +438,27 @@ public function __construct($data = null) $this->setCustodian(new FHIRReference($data[self::FIELD_CUSTODIAN])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -515,20 +529,27 @@ public function __construct($data = null) $this->addSection(new FHIRCompositionSection($data[self::FIELD_SECTION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCompositionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCompositionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCompositionStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCompositionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCompositionStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -538,20 +559,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1550,18 +1578,38 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAttester())) { - $a[self::FIELD_ATTESTER] = $vs; + $a[self::FIELD_ATTESTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ATTESTER][] = $v; + } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getConfidentiality())) { $a[self::FIELD_CONFIDENTIALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRVConfidentialityClassification::FIELD_VALUE, $enc)))) { + unset($enc[FHIRVConfidentialityClassification::FIELD_VALUE]); $a[self::FIELD_CONFIDENTIALITY_EXT] = $enc; } } @@ -1570,8 +1618,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1579,21 +1629,41 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getRelatesTo())) { - $a[self::FIELD_RELATES_TO] = $vs; + $a[self::FIELD_RELATES_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATES_TO][] = $v; + } } if ([] !== ($vs = $this->getSection())) { - $a[self::FIELD_SECTION] = $vs; + $a[self::FIELD_SECTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECTION][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompositionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompositionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1602,14 +1672,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConceptMap.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConceptMap.php index d228957dd6..d7486aac38 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConceptMap.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConceptMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRConceptMap extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -448,68 +448,96 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_GROUP])) { @@ -555,164 +583,234 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_SOURCE_CANONICAL])) { - $ext = (isset($data[self::FIELD_SOURCE_CANONICAL_EXT]) && is_array($data[self::FIELD_SOURCE_CANONICAL_EXT])) - ? $data[self::FIELD_SOURCE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_SOURCE_CANONICAL] instanceof FHIRCanonical) { - $this->setSourceCanonical($data[self::FIELD_SOURCE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_CANONICAL])) { - $this->setSourceCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_SOURCE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_CANONICAL])) { - $this->setSourceCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_SOURCE_CANONICAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_CANONICAL]) || isset($data[self::FIELD_SOURCE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_SOURCE_CANONICAL])) { + $value = $data[self::FIELD_SOURCE_CANONICAL]; } else { - $this->setSourceCanonical(new FHIRCanonical($data[self::FIELD_SOURCE_CANONICAL])); - } - } - if (isset($data[self::FIELD_SOURCE_URI])) { - $ext = (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) - ? $data[self::FIELD_SOURCE_URI_EXT] - : null; - if ($data[self::FIELD_SOURCE_URI] instanceof FHIRUri) { - $this->setSourceUri($data[self::FIELD_SOURCE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE_URI]))); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_CANONICAL_EXT]) && is_array($data[self::FIELD_SOURCE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_SOURCE_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setSourceCanonical($value); + } else if (is_array($value)) { + $this->setSourceCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setSourceCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_URI]) || isset($data[self::FIELD_SOURCE_URI_EXT])) { + if (isset($data[self::FIELD_SOURCE_URI])) { + $value = $data[self::FIELD_SOURCE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) { + $ext = $data[self::FIELD_SOURCE_URI_EXT]; } else { - $this->setSourceUri(new FHIRUri($data[self::FIELD_SOURCE_URI])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSourceUri($value); + } else if (is_array($value)) { + $this->setSourceUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TARGET_CANONICAL])) { - $ext = (isset($data[self::FIELD_TARGET_CANONICAL_EXT]) && is_array($data[self::FIELD_TARGET_CANONICAL_EXT])) - ? $data[self::FIELD_TARGET_CANONICAL_EXT] - : null; - if ($data[self::FIELD_TARGET_CANONICAL] instanceof FHIRCanonical) { - $this->setTargetCanonical($data[self::FIELD_TARGET_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_CANONICAL])) { - $this->setTargetCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_TARGET_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_CANONICAL])) { - $this->setTargetCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_TARGET_CANONICAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TARGET_CANONICAL]) || isset($data[self::FIELD_TARGET_CANONICAL_EXT])) { + if (isset($data[self::FIELD_TARGET_CANONICAL])) { + $value = $data[self::FIELD_TARGET_CANONICAL]; } else { - $this->setTargetCanonical(new FHIRCanonical($data[self::FIELD_TARGET_CANONICAL])); - } - } - if (isset($data[self::FIELD_TARGET_URI])) { - $ext = (isset($data[self::FIELD_TARGET_URI_EXT]) && is_array($data[self::FIELD_TARGET_URI_EXT])) - ? $data[self::FIELD_TARGET_URI_EXT] - : null; - if ($data[self::FIELD_TARGET_URI] instanceof FHIRUri) { - $this->setTargetUri($data[self::FIELD_TARGET_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_URI])) { - $this->setTargetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_TARGET_URI]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_URI])) { - $this->setTargetUri(new FHIRUri(array_merge($ext, $data[self::FIELD_TARGET_URI]))); + $value = null; + } + if (isset($data[self::FIELD_TARGET_CANONICAL_EXT]) && is_array($data[self::FIELD_TARGET_CANONICAL_EXT])) { + $ext = $data[self::FIELD_TARGET_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setTargetCanonical($value); + } else if (is_array($value)) { + $this->setTargetCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setTargetCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTargetCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_TARGET_URI]) || isset($data[self::FIELD_TARGET_URI_EXT])) { + if (isset($data[self::FIELD_TARGET_URI])) { + $value = $data[self::FIELD_TARGET_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_URI_EXT]) && is_array($data[self::FIELD_TARGET_URI_EXT])) { + $ext = $data[self::FIELD_TARGET_URI_EXT]; } else { - $this->setTargetUri(new FHIRUri($data[self::FIELD_TARGET_URI])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setTargetUri($value); + } else if (is_array($value)) { + $this->setTargetUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setTargetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTargetUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -733,20 +831,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2051,125 +2156,182 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getSourceCanonical())) { $a[self::FIELD_SOURCE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_SOURCE_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getSourceUri())) { $a[self::FIELD_SOURCE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_URI_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTargetCanonical())) { $a[self::FIELD_TARGET_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_TARGET_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getTargetUri())) { $a[self::FIELD_TARGET_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_TARGET_URI_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCondition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCondition.php index a153e31dae..694a30edf2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRCondition extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_VERIFICATION_STATUS = 'verificationStatus'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A duration of time during which an organism (or a process) has existed. @@ -470,20 +470,27 @@ public function __construct($data = null) $this->setAbatementAge(new FHIRAge($data[self::FIELD_ABATEMENT_AGE])); } } - if (isset($data[self::FIELD_ABATEMENT_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ABATEMENT_DATE_TIME_EXT]) && is_array($data[self::FIELD_ABATEMENT_DATE_TIME_EXT])) - ? $data[self::FIELD_ABATEMENT_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_DATE_TIME] instanceof FHIRDateTime) { - $this->setAbatementDateTime($data[self::FIELD_ABATEMENT_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_DATE_TIME])) { - $this->setAbatementDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ABATEMENT_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_DATE_TIME])) { - $this->setAbatementDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ABATEMENT_DATE_TIME]))); - } + if (isset($data[self::FIELD_ABATEMENT_DATE_TIME]) || isset($data[self::FIELD_ABATEMENT_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_DATE_TIME])) { + $value = $data[self::FIELD_ABATEMENT_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABATEMENT_DATE_TIME_EXT]) && is_array($data[self::FIELD_ABATEMENT_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_DATE_TIME_EXT]; } else { - $this->setAbatementDateTime(new FHIRDateTime($data[self::FIELD_ABATEMENT_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAbatementDateTime($value); + } else if (is_array($value)) { + $this->setAbatementDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAbatementDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAbatementDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ABATEMENT_PERIOD])) { @@ -500,20 +507,27 @@ public function __construct($data = null) $this->setAbatementRange(new FHIRRange($data[self::FIELD_ABATEMENT_RANGE])); } } - if (isset($data[self::FIELD_ABATEMENT_STRING])) { - $ext = (isset($data[self::FIELD_ABATEMENT_STRING_EXT]) && is_array($data[self::FIELD_ABATEMENT_STRING_EXT])) - ? $data[self::FIELD_ABATEMENT_STRING_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_STRING] instanceof FHIRString) { - $this->setAbatementString($data[self::FIELD_ABATEMENT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_STRING])) { - $this->setAbatementString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ABATEMENT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_STRING])) { - $this->setAbatementString(new FHIRString(array_merge($ext, $data[self::FIELD_ABATEMENT_STRING]))); - } + if (isset($data[self::FIELD_ABATEMENT_STRING]) || isset($data[self::FIELD_ABATEMENT_STRING_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_STRING])) { + $value = $data[self::FIELD_ABATEMENT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABATEMENT_STRING_EXT]) && is_array($data[self::FIELD_ABATEMENT_STRING_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_STRING_EXT]; } else { - $this->setAbatementString(new FHIRString($data[self::FIELD_ABATEMENT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAbatementString($value); + } else if (is_array($value)) { + $this->setAbatementString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAbatementString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAbatementString(new FHIRString($ext)); } } if (isset($data[self::FIELD_ASSERTER])) { @@ -641,20 +655,27 @@ public function __construct($data = null) $this->setOnsetAge(new FHIRAge($data[self::FIELD_ONSET_AGE])); } } - if (isset($data[self::FIELD_ONSET_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) - ? $data[self::FIELD_ONSET_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ONSET_DATE_TIME] instanceof FHIRDateTime) { - $this->setOnsetDateTime($data[self::FIELD_ONSET_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ONSET_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ONSET_DATE_TIME]))); - } + if (isset($data[self::FIELD_ONSET_DATE_TIME]) || isset($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ONSET_DATE_TIME])) { + $value = $data[self::FIELD_ONSET_DATE_TIME]; } else { - $this->setOnsetDateTime(new FHIRDateTime($data[self::FIELD_ONSET_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ONSET_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOnsetDateTime($value); + } else if (is_array($value)) { + $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ONSET_PERIOD])) { @@ -671,36 +692,50 @@ public function __construct($data = null) $this->setOnsetRange(new FHIRRange($data[self::FIELD_ONSET_RANGE])); } } - if (isset($data[self::FIELD_ONSET_STRING])) { - $ext = (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) - ? $data[self::FIELD_ONSET_STRING_EXT] - : null; - if ($data[self::FIELD_ONSET_STRING] instanceof FHIRString) { - $this->setOnsetString($data[self::FIELD_ONSET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ONSET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString(array_merge($ext, $data[self::FIELD_ONSET_STRING]))); - } + if (isset($data[self::FIELD_ONSET_STRING]) || isset($data[self::FIELD_ONSET_STRING_EXT])) { + if (isset($data[self::FIELD_ONSET_STRING])) { + $value = $data[self::FIELD_ONSET_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) { + $ext = $data[self::FIELD_ONSET_STRING_EXT]; } else { - $this->setOnsetString(new FHIRString($data[self::FIELD_ONSET_STRING])); - } - } - if (isset($data[self::FIELD_RECORDED_DATE])) { - $ext = (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) - ? $data[self::FIELD_RECORDED_DATE_EXT] - : null; - if ($data[self::FIELD_RECORDED_DATE] instanceof FHIRDateTime) { - $this->setRecordedDate($data[self::FIELD_RECORDED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED_DATE])) { - $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOnsetString($value); + } else if (is_array($value)) { + $this->setOnsetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOnsetString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RECORDED_DATE]) || isset($data[self::FIELD_RECORDED_DATE_EXT])) { + if (isset($data[self::FIELD_RECORDED_DATE])) { + $value = $data[self::FIELD_RECORDED_DATE]; } else { - $this->setRecordedDate(new FHIRDateTime($data[self::FIELD_RECORDED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_RECORDED_DATE_EXT]) && is_array($data[self::FIELD_RECORDED_DATE_EXT])) { + $ext = $data[self::FIELD_RECORDED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecordedDate($value); + } else if (is_array($value)) { + $this->setRecordedDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecordedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecordedDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_RECORDER])) { @@ -2124,8 +2159,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAbatementDateTime())) { $a[self::FIELD_ABATEMENT_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_DATE_TIME_EXT] = $enc; } } @@ -2137,8 +2174,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAbatementString())) { $a[self::FIELD_ABATEMENT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_STRING_EXT] = $enc; } } @@ -2146,10 +2185,22 @@ public function jsonSerialize() $a[self::FIELD_ASSERTER] = $v; } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getClinicalStatus())) { $a[self::FIELD_CLINICAL_STATUS] = $v; @@ -2161,21 +2212,41 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvidence())) { - $a[self::FIELD_EVIDENCE] = $vs; + $a[self::FIELD_EVIDENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVIDENCE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOnsetAge())) { $a[self::FIELD_ONSET_AGE] = $v; } if (null !== ($v = $this->getOnsetDateTime())) { $a[self::FIELD_ONSET_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ONSET_DATE_TIME_EXT] = $enc; } } @@ -2187,15 +2258,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetString())) { $a[self::FIELD_ONSET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ONSET_STRING_EXT] = $enc; } } if (null !== ($v = $this->getRecordedDate())) { $a[self::FIELD_RECORDED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_DATE_EXT] = $enc; } } @@ -2206,7 +2281,13 @@ public function jsonSerialize() $a[self::FIELD_SEVERITY] = $v; } if ([] !== ($vs = $this->getStage())) { - $a[self::FIELD_STAGE] = $vs; + $a[self::FIELD_STAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STAGE][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; @@ -2214,6 +2295,9 @@ public function jsonSerialize() if (null !== ($v = $this->getVerificationStatus())) { $a[self::FIELD_VERIFICATION_STATUS] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConsent.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConsent.php index 27872273a5..bd4554c4e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConsent.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRConsent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRConsent extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_VERIFICATION = 'verification'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -328,20 +328,27 @@ public function __construct($data = null) $this->addCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -458,20 +465,27 @@ public function __construct($data = null) $this->setSourceReference(new FHIRReference($data[self::FIELD_SOURCE_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRConsentState) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRConsentState([FHIRConsentState::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRConsentState(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRConsentState($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConsentState) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRConsentState(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRConsentState([FHIRConsentState::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRConsentState($ext)); } } if (isset($data[self::FIELD_VERIFICATION])) { @@ -1364,29 +1378,61 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getOrganization())) { - $a[self::FIELD_ORGANIZATION] = $vs; + $a[self::FIELD_ORGANIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ORGANIZATION][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getPolicy())) { - $a[self::FIELD_POLICY] = $vs; + $a[self::FIELD_POLICY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POLICY][] = $v; + } } if (null !== ($v = $this->getPolicyRule())) { $a[self::FIELD_POLICY_RULE] = $v; @@ -1405,13 +1451,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConsentState::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConsentState::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getVerification())) { - $a[self::FIELD_VERIFICATION] = $vs; + $a[self::FIELD_VERIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VERIFICATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRContract.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRContract.php index 7a247be413..e0a8c57d96 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRContract.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRContract.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRContract extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -608,33 +608,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if (is_array($data[self::FIELD_ALIAS])) { - foreach($data[self::FIELD_ALIAS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAlias($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAlias(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAlias($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAlias($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAlias(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAlias(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAlias(new FHIRString($iext)); } - } elseif ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->addAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ALIAS])) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else { - $this->addAlias(new FHIRString($data[self::FIELD_ALIAS])); } } if (isset($data[self::FIELD_APPLIES])) { @@ -751,36 +760,50 @@ public function __construct($data = null) $this->setInstantiatesCanonical(new FHIRReference($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->setInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->setInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - $this->setInstantiatesUri(new FHIRUri(array_merge($ext, $data[self::FIELD_INSTANTIATES_URI]))); - } + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; } else { - $this->setInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); + $value = null; } - } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRDateTime) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ISSUED]))); + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setInstantiatesUri($value); + } else if (is_array($value)) { + $this->setInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInstantiatesUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRDateTime($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_LEGAL])) { @@ -822,20 +845,27 @@ public function __construct($data = null) $this->setLegallyBindingReference(new FHIRReference($data[self::FIELD_LEGALLY_BINDING_REFERENCE])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_RELEVANT_HISTORY])) { @@ -917,20 +947,27 @@ public function __construct($data = null) $this->addSite(new FHIRReference($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRContractResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRContractResourceStatusCodes([FHIRContractResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRContractResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRContractResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContractResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRContractResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRContractResourceStatusCodes([FHIRContractResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRContractResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_SUB_TYPE])) { @@ -969,20 +1006,27 @@ public function __construct($data = null) $this->addSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_SUPPORTING_INFO])) { @@ -1021,20 +1065,27 @@ public function __construct($data = null) $this->addTerm(new FHIRContractTerm($data[self::FIELD_TERM])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC_CODEABLE_CONCEPT])) { @@ -1058,36 +1109,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -3175,18 +3240,26 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAlias())) { $a[self::FIELD_ALIAS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ALIAS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ALIAS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ALIAS_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ALIAS_EXT] = $encs; + } } if (null !== ($v = $this->getApplies())) { $a[self::FIELD_APPLIES] = $v; @@ -3195,7 +3268,13 @@ public function jsonSerialize() $a[self::FIELD_AUTHOR] = $v; } if ([] !== ($vs = $this->getAuthority())) { - $a[self::FIELD_AUTHORITY] = $vs; + $a[self::FIELD_AUTHORITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHORITY][] = $v; + } } if (null !== ($v = $this->getContentDefinition())) { $a[self::FIELD_CONTENT_DEFINITION] = $v; @@ -3204,36 +3283,64 @@ public function jsonSerialize() $a[self::FIELD_CONTENT_DERIVATIVE] = $v; } if ([] !== ($vs = $this->getDomain())) { - $a[self::FIELD_DOMAIN] = $vs; + $a[self::FIELD_DOMAIN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOMAIN][] = $v; + } } if (null !== ($v = $this->getExpirationType())) { $a[self::FIELD_EXPIRATION_TYPE] = $v; } if ([] !== ($vs = $this->getFriendly())) { - $a[self::FIELD_FRIENDLY] = $vs; + $a[self::FIELD_FRIENDLY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FRIENDLY][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = $v; } if (null !== ($v = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_INSTANTIATES_URI_EXT] = $enc; } } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } if ([] !== ($vs = $this->getLegal())) { - $a[self::FIELD_LEGAL] = $vs; + $a[self::FIELD_LEGAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LEGAL][] = $v; + } } if (null !== ($v = $this->getLegalState())) { $a[self::FIELD_LEGAL_STATE] = $v; @@ -3246,56 +3353,112 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getRelevantHistory())) { - $a[self::FIELD_RELEVANT_HISTORY] = $vs; + $a[self::FIELD_RELEVANT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELEVANT_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } } if (null !== ($v = $this->getScope())) { $a[self::FIELD_SCOPE] = $v; } if ([] !== ($vs = $this->getSigner())) { - $a[self::FIELD_SIGNER] = $vs; + $a[self::FIELD_SIGNER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SIGNER][] = $v; + } } if ([] !== ($vs = $this->getSite())) { - $a[self::FIELD_SITE] = $vs; + $a[self::FIELD_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SITE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContractResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContractResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSubType())) { - $a[self::FIELD_SUB_TYPE] = $vs; + $a[self::FIELD_SUB_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_TYPE][] = $v; + } } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } } if ([] !== ($vs = $this->getTerm())) { - $a[self::FIELD_TERM] = $vs; + $a[self::FIELD_TERM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TERM][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } @@ -3310,18 +3473,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverage.php index b2058326a8..f157791efa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRCoverage extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -403,20 +403,27 @@ public function __construct($data = null) $this->addCostToBeneficiary(new FHIRCoverageCostToBeneficiary($data[self::FIELD_COST_TO_BENEFICIARY])); } } - if (isset($data[self::FIELD_DEPENDENT])) { - $ext = (isset($data[self::FIELD_DEPENDENT_EXT]) && is_array($data[self::FIELD_DEPENDENT_EXT])) - ? $data[self::FIELD_DEPENDENT_EXT] - : null; - if ($data[self::FIELD_DEPENDENT] instanceof FHIRString) { - $this->setDependent($data[self::FIELD_DEPENDENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEPENDENT])) { - $this->setDependent(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEPENDENT]] + $ext)); - } else if (is_array($data[self::FIELD_DEPENDENT])) { - $this->setDependent(new FHIRString(array_merge($ext, $data[self::FIELD_DEPENDENT]))); - } + if (isset($data[self::FIELD_DEPENDENT]) || isset($data[self::FIELD_DEPENDENT_EXT])) { + if (isset($data[self::FIELD_DEPENDENT])) { + $value = $data[self::FIELD_DEPENDENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEPENDENT_EXT]) && is_array($data[self::FIELD_DEPENDENT_EXT])) { + $ext = $data[self::FIELD_DEPENDENT_EXT]; } else { - $this->setDependent(new FHIRString($data[self::FIELD_DEPENDENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDependent($value); + } else if (is_array($value)) { + $this->setDependent(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDependent(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDependent(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -437,36 +444,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NETWORK])) { - $ext = (isset($data[self::FIELD_NETWORK_EXT]) && is_array($data[self::FIELD_NETWORK_EXT])) - ? $data[self::FIELD_NETWORK_EXT] - : null; - if ($data[self::FIELD_NETWORK] instanceof FHIRString) { - $this->setNetwork($data[self::FIELD_NETWORK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NETWORK])) { - $this->setNetwork(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NETWORK]] + $ext)); - } else if (is_array($data[self::FIELD_NETWORK])) { - $this->setNetwork(new FHIRString(array_merge($ext, $data[self::FIELD_NETWORK]))); - } + if (isset($data[self::FIELD_NETWORK]) || isset($data[self::FIELD_NETWORK_EXT])) { + if (isset($data[self::FIELD_NETWORK])) { + $value = $data[self::FIELD_NETWORK]; } else { - $this->setNetwork(new FHIRString($data[self::FIELD_NETWORK])); + $value = null; } - } - if (isset($data[self::FIELD_ORDER])) { - $ext = (isset($data[self::FIELD_ORDER_EXT]) && is_array($data[self::FIELD_ORDER_EXT])) - ? $data[self::FIELD_ORDER_EXT] - : null; - if ($data[self::FIELD_ORDER] instanceof FHIRPositiveInt) { - $this->setOrder($data[self::FIELD_ORDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDER])) { - $this->setOrder(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_ORDER]] + $ext)); - } else if (is_array($data[self::FIELD_ORDER])) { - $this->setOrder(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_ORDER]))); + if (isset($data[self::FIELD_NETWORK_EXT]) && is_array($data[self::FIELD_NETWORK_EXT])) { + $ext = $data[self::FIELD_NETWORK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNetwork($value); + } else if (is_array($value)) { + $this->setNetwork(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNetwork(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNetwork(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ORDER]) || isset($data[self::FIELD_ORDER_EXT])) { + if (isset($data[self::FIELD_ORDER])) { + $value = $data[self::FIELD_ORDER]; } else { - $this->setOrder(new FHIRPositiveInt($data[self::FIELD_ORDER])); + $value = null; + } + if (isset($data[self::FIELD_ORDER_EXT]) && is_array($data[self::FIELD_ORDER_EXT])) { + $ext = $data[self::FIELD_ORDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setOrder($value); + } else if (is_array($value)) { + $this->setOrder(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setOrder(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOrder(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PAYOR])) { @@ -508,36 +529,50 @@ public function __construct($data = null) $this->setRelationship(new FHIRCodeableConcept($data[self::FIELD_RELATIONSHIP])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_SUBROGATION])) { - $ext = (isset($data[self::FIELD_SUBROGATION_EXT]) && is_array($data[self::FIELD_SUBROGATION_EXT])) - ? $data[self::FIELD_SUBROGATION_EXT] - : null; - if ($data[self::FIELD_SUBROGATION] instanceof FHIRBoolean) { - $this->setSubrogation($data[self::FIELD_SUBROGATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBROGATION])) { - $this->setSubrogation(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_SUBROGATION]] + $ext)); - } else if (is_array($data[self::FIELD_SUBROGATION])) { - $this->setSubrogation(new FHIRBoolean(array_merge($ext, $data[self::FIELD_SUBROGATION]))); + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); + } + } + if (isset($data[self::FIELD_SUBROGATION]) || isset($data[self::FIELD_SUBROGATION_EXT])) { + if (isset($data[self::FIELD_SUBROGATION])) { + $value = $data[self::FIELD_SUBROGATION]; } else { - $this->setSubrogation(new FHIRBoolean($data[self::FIELD_SUBROGATION])); + $value = null; + } + if (isset($data[self::FIELD_SUBROGATION_EXT]) && is_array($data[self::FIELD_SUBROGATION_EXT])) { + $ext = $data[self::FIELD_SUBROGATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setSubrogation($value); + } else if (is_array($value)) { + $this->setSubrogation(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setSubrogation(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubrogation(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_SUBSCRIBER])) { @@ -547,20 +582,27 @@ public function __construct($data = null) $this->setSubscriber(new FHIRReference($data[self::FIELD_SUBSCRIBER])); } } - if (isset($data[self::FIELD_SUBSCRIBER_ID])) { - $ext = (isset($data[self::FIELD_SUBSCRIBER_ID_EXT]) && is_array($data[self::FIELD_SUBSCRIBER_ID_EXT])) - ? $data[self::FIELD_SUBSCRIBER_ID_EXT] - : null; - if ($data[self::FIELD_SUBSCRIBER_ID] instanceof FHIRString) { - $this->setSubscriberId($data[self::FIELD_SUBSCRIBER_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBSCRIBER_ID])) { - $this->setSubscriberId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBSCRIBER_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SUBSCRIBER_ID])) { - $this->setSubscriberId(new FHIRString(array_merge($ext, $data[self::FIELD_SUBSCRIBER_ID]))); - } + if (isset($data[self::FIELD_SUBSCRIBER_ID]) || isset($data[self::FIELD_SUBSCRIBER_ID_EXT])) { + if (isset($data[self::FIELD_SUBSCRIBER_ID])) { + $value = $data[self::FIELD_SUBSCRIBER_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBSCRIBER_ID_EXT]) && is_array($data[self::FIELD_SUBSCRIBER_ID_EXT])) { + $ext = $data[self::FIELD_SUBSCRIBER_ID_EXT]; } else { - $this->setSubscriberId(new FHIRString($data[self::FIELD_SUBSCRIBER_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubscriberId($value); + } else if (is_array($value)) { + $this->setSubscriberId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubscriberId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubscriberId(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1560,40 +1602,76 @@ public function jsonSerialize() $a[self::FIELD_BENEFICIARY] = $v; } if ([] !== ($vs = $this->getClass())) { - $a[self::FIELD_CLASS] = $vs; + $a[self::FIELD_CLASS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CLASS][] = $v; + } } if ([] !== ($vs = $this->getContract())) { - $a[self::FIELD_CONTRACT] = $vs; + $a[self::FIELD_CONTRACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRACT][] = $v; + } } if ([] !== ($vs = $this->getCostToBeneficiary())) { - $a[self::FIELD_COST_TO_BENEFICIARY] = $vs; + $a[self::FIELD_COST_TO_BENEFICIARY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COST_TO_BENEFICIARY][] = $v; + } } if (null !== ($v = $this->getDependent())) { $a[self::FIELD_DEPENDENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEPENDENT_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getNetwork())) { $a[self::FIELD_NETWORK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NETWORK_EXT] = $enc; } } if (null !== ($v = $this->getOrder())) { $a[self::FIELD_ORDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_ORDER_EXT] = $enc; } } if ([] !== ($vs = $this->getPayor())) { - $a[self::FIELD_PAYOR] = $vs; + $a[self::FIELD_PAYOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYOR][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; @@ -1606,15 +1684,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubrogation())) { $a[self::FIELD_SUBROGATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_SUBROGATION_EXT] = $enc; } } @@ -1623,14 +1705,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubscriberId())) { $a[self::FIELD_SUBSCRIBER_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBSCRIBER_ID_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequest.php index bbf4d75c79..35b01ce889 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRCoverageEligibilityRequest extends FHIRDomainResource implements PHPFH const FIELD_SUPPORTING_INFO = 'supportingInfo'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -328,20 +328,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENTERER])) { @@ -440,49 +447,65 @@ public function __construct($data = null) $this->setProvider(new FHIRReference($data[self::FIELD_PROVIDER])); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if (is_array($data[self::FIELD_PURPOSE])) { - foreach($data[self::FIELD_PURPOSE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIREligibilityRequestPurpose) { - $this->addPurpose($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPurpose(new FHIREligibilityRequestPurpose([FHIREligibilityRequestPurpose::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPurpose(new FHIREligibilityRequestPurpose(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREligibilityRequestPurpose) { + $this->addPurpose($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIREligibilityRequestPurpose) { + $this->addPurpose($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPurpose(new FHIREligibilityRequestPurpose(array_merge($v, $iext))); + } else { + $this->addPurpose(new FHIREligibilityRequestPurpose([FHIREligibilityRequestPurpose::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPurpose(new FHIREligibilityRequestPurpose($v)); } + } elseif (is_array($value)) { + $this->addPurpose(new FHIREligibilityRequestPurpose(array_merge($ext, $value))); + } else { + $this->addPurpose(new FHIREligibilityRequestPurpose([FHIREligibilityRequestPurpose::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPurpose(new FHIREligibilityRequestPurpose($iext)); } - } elseif ($data[self::FIELD_PURPOSE] instanceof FHIREligibilityRequestPurpose) { - $this->addPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PURPOSE])) { - $this->addPurpose(new FHIREligibilityRequestPurpose([FHIREligibilityRequestPurpose::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else { - $this->addPurpose(new FHIREligibilityRequestPurpose($data[self::FIELD_PURPOSE])); } } - if (isset($data[self::FIELD_SERVICED_DATE])) { - $ext = (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) - ? $data[self::FIELD_SERVICED_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICED_DATE] instanceof FHIRDate) { - $this->setServicedDate($data[self::FIELD_SERVICED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICED_DATE]))); - } + if (isset($data[self::FIELD_SERVICED_DATE]) || isset($data[self::FIELD_SERVICED_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICED_DATE])) { + $value = $data[self::FIELD_SERVICED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICED_DATE_EXT]; } else { - $this->setServicedDate(new FHIRDate($data[self::FIELD_SERVICED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServicedDate($value); + } else if (is_array($value)) { + $this->setServicedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServicedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SERVICED_PERIOD])) { @@ -492,20 +515,27 @@ public function __construct($data = null) $this->setServicedPeriod(new FHIRPeriod($data[self::FIELD_SERVICED_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_SUPPORTING_INFO])) { @@ -1422,8 +1452,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } @@ -1434,16 +1466,34 @@ public function jsonSerialize() $a[self::FIELD_FACILITY] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -1456,23 +1506,33 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PURPOSE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PURPOSE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIREligibilityRequestPurpose::FIELD_VALUE]) || array_key_exists(FHIREligibilityRequestPurpose::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PURPOSE_EXT][] = null; + unset($enc[FHIREligibilityRequestPurpose::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PURPOSE_EXT] = $encs; + } } if (null !== ($v = $this->getServicedDate())) { $a[self::FIELD_SERVICED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICED_DATE_EXT] = $enc; } } @@ -1481,13 +1541,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponse.php index a313786bfb..fe6fc0693e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRCoverageEligibilityResponse extends FHIRDomainResource implements PHPF const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -330,36 +330,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_ERROR])) { @@ -430,20 +444,27 @@ public function __construct($data = null) $this->setInsurer(new FHIRReference($data[self::FIELD_INSURER])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRRemittanceOutcome) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRRemittanceOutcome([FHIRRemittanceOutcome::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRRemittanceOutcome(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; } else { - $this->setOutcome(new FHIRRemittanceOutcome($data[self::FIELD_OUTCOME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRemittanceOutcome) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRRemittanceOutcome(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRRemittanceOutcome([FHIRRemittanceOutcome::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRRemittanceOutcome($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -453,49 +474,65 @@ public function __construct($data = null) $this->setPatient(new FHIRReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->setPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->setPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - $this->setPreAuthRef(new FHIRString(array_merge($ext, $data[self::FIELD_PRE_AUTH_REF]))); - } + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; } else { - $this->setPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPreAuthRef($value); + } else if (is_array($value)) { + $this->setPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreAuthRef(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if (is_array($data[self::FIELD_PURPOSE])) { - foreach($data[self::FIELD_PURPOSE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIREligibilityResponsePurpose) { - $this->addPurpose($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPurpose(new FHIREligibilityResponsePurpose([FHIREligibilityResponsePurpose::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPurpose(new FHIREligibilityResponsePurpose(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREligibilityResponsePurpose) { + $this->addPurpose($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIREligibilityResponsePurpose) { + $this->addPurpose($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPurpose(new FHIREligibilityResponsePurpose(array_merge($v, $iext))); + } else { + $this->addPurpose(new FHIREligibilityResponsePurpose([FHIREligibilityResponsePurpose::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPurpose(new FHIREligibilityResponsePurpose($v)); } + } elseif (is_array($value)) { + $this->addPurpose(new FHIREligibilityResponsePurpose(array_merge($ext, $value))); + } else { + $this->addPurpose(new FHIREligibilityResponsePurpose([FHIREligibilityResponsePurpose::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPurpose(new FHIREligibilityResponsePurpose($iext)); } - } elseif ($data[self::FIELD_PURPOSE] instanceof FHIREligibilityResponsePurpose) { - $this->addPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PURPOSE])) { - $this->addPurpose(new FHIREligibilityResponsePurpose([FHIREligibilityResponsePurpose::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else { - $this->addPurpose(new FHIREligibilityResponsePurpose($data[self::FIELD_PURPOSE])); } } if (isset($data[self::FIELD_REQUEST])) { @@ -512,20 +549,27 @@ public function __construct($data = null) $this->setRequestor(new FHIRReference($data[self::FIELD_REQUESTOR])); } } - if (isset($data[self::FIELD_SERVICED_DATE])) { - $ext = (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) - ? $data[self::FIELD_SERVICED_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICED_DATE] instanceof FHIRDate) { - $this->setServicedDate($data[self::FIELD_SERVICED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICED_DATE]))); - } + if (isset($data[self::FIELD_SERVICED_DATE]) || isset($data[self::FIELD_SERVICED_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICED_DATE])) { + $value = $data[self::FIELD_SERVICED_DATE]; } else { - $this->setServicedDate(new FHIRDate($data[self::FIELD_SERVICED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServicedDate($value); + } else if (is_array($value)) { + $this->setServicedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServicedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SERVICED_PERIOD])) { @@ -535,20 +579,27 @@ public function __construct($data = null) $this->setServicedPeriod(new FHIRPeriod($data[self::FIELD_SERVICED_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -1450,37 +1501,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getError())) { - $a[self::FIELD_ERROR] = $vs; + $a[self::FIELD_ERROR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ERROR][] = $v; + } } if (null !== ($v = $this->getForm())) { $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRemittanceOutcome::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRemittanceOutcome::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -1489,25 +1564,35 @@ public function jsonSerialize() } if (null !== ($v = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PRE_AUTH_REF_EXT] = $enc; } } if ([] !== ($vs = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PURPOSE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PURPOSE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIREligibilityResponsePurpose::FIELD_VALUE]) || array_key_exists(FHIREligibilityResponsePurpose::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PURPOSE_EXT][] = null; + unset($enc[FHIREligibilityResponsePurpose::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PURPOSE_EXT] = $encs; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -1517,8 +1602,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getServicedDate())) { $a[self::FIELD_SERVICED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICED_DATE_EXT] = $enc; } } @@ -1527,11 +1614,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php index a9182c3076..daa0129c66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRDetectedIssue extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -305,20 +305,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DETAIL])) { - $ext = (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) - ? $data[self::FIELD_DETAIL_EXT] - : null; - if ($data[self::FIELD_DETAIL] instanceof FHIRString) { - $this->setDetail($data[self::FIELD_DETAIL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DETAIL]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString(array_merge($ext, $data[self::FIELD_DETAIL]))); - } + if (isset($data[self::FIELD_DETAIL]) || isset($data[self::FIELD_DETAIL_EXT])) { + if (isset($data[self::FIELD_DETAIL])) { + $value = $data[self::FIELD_DETAIL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) { + $ext = $data[self::FIELD_DETAIL_EXT]; } else { - $this->setDetail(new FHIRString($data[self::FIELD_DETAIL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDetail($value); + } else if (is_array($value)) { + $this->setDetail(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetail(new FHIRString($ext)); } } if (isset($data[self::FIELD_EVIDENCE])) { @@ -339,20 +346,27 @@ public function __construct($data = null) $this->addEvidence(new FHIRDetectedIssueEvidence($data[self::FIELD_EVIDENCE])); } } - if (isset($data[self::FIELD_IDENTIFIED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_IDENTIFIED_DATE_TIME_EXT]) && is_array($data[self::FIELD_IDENTIFIED_DATE_TIME_EXT])) - ? $data[self::FIELD_IDENTIFIED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_IDENTIFIED_DATE_TIME] instanceof FHIRDateTime) { - $this->setIdentifiedDateTime($data[self::FIELD_IDENTIFIED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIED_DATE_TIME])) { - $this->setIdentifiedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_IDENTIFIED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIED_DATE_TIME])) { - $this->setIdentifiedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_IDENTIFIED_DATE_TIME]))); - } + if (isset($data[self::FIELD_IDENTIFIED_DATE_TIME]) || isset($data[self::FIELD_IDENTIFIED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_IDENTIFIED_DATE_TIME])) { + $value = $data[self::FIELD_IDENTIFIED_DATE_TIME]; } else { - $this->setIdentifiedDateTime(new FHIRDateTime($data[self::FIELD_IDENTIFIED_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIED_DATE_TIME_EXT]) && is_array($data[self::FIELD_IDENTIFIED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_IDENTIFIED_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIdentifiedDateTime($value); + } else if (is_array($value)) { + $this->setIdentifiedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIdentifiedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifiedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIED_PERIOD])) { @@ -423,52 +437,73 @@ public function __construct($data = null) $this->setPatient(new FHIRReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRUri) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri(array_merge($ext, $data[self::FIELD_REFERENCE]))); - } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRUri($data[self::FIELD_REFERENCE])); + $value = null; } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRDetectedIssueSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRDetectedIssueSeverity([FHIRDetectedIssueSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRDetectedIssueSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); - } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; } else { - $this->setSeverity(new FHIRDetectedIssueSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRObservationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDetectedIssueSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRDetectedIssueSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRDetectedIssueSeverity([FHIRDetectedIssueSeverity::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRDetectedIssueSeverity($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRObservationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRObservationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRObservationStatus($ext)); } } } @@ -1261,18 +1296,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DETAIL_EXT] = $enc; } } if ([] !== ($vs = $this->getEvidence())) { - $a[self::FIELD_EVIDENCE] = $vs; + $a[self::FIELD_EVIDENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVIDENCE][] = $v; + } } if (null !== ($v = $this->getIdentifiedDateTime())) { $a[self::FIELD_IDENTIFIED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_IDENTIFIED_DATE_TIME_EXT] = $enc; } } @@ -1280,38 +1325,65 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIED_PERIOD] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getImplicated())) { - $a[self::FIELD_IMPLICATED] = $vs; + $a[self::FIELD_IMPLICATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMPLICATED][] = $v; + } } if ([] !== ($vs = $this->getMitigation())) { - $a[self::FIELD_MITIGATION] = $vs; + $a[self::FIELD_MITIGATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MITIGATION][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDetectedIssueSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDetectedIssueSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDevice.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDevice.php index 8479c4c10a..893752aee6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRDevice extends FHIRDomainResource implements PHPFHIRContainedTypeInter const FIELD_VERSION = 'version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details for all kinds of technology mediated contact points for a person or @@ -511,36 +511,50 @@ public function __construct($data = null) $this->addDeviceName(new FHIRDeviceDeviceName($data[self::FIELD_DEVICE_NAME])); } } - if (isset($data[self::FIELD_DISTINCT_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_DISTINCT_IDENTIFIER_EXT]) && is_array($data[self::FIELD_DISTINCT_IDENTIFIER_EXT])) - ? $data[self::FIELD_DISTINCT_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_DISTINCT_IDENTIFIER] instanceof FHIRString) { - $this->setDistinctIdentifier($data[self::FIELD_DISTINCT_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISTINCT_IDENTIFIER])) { - $this->setDistinctIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISTINCT_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_DISTINCT_IDENTIFIER])) { - $this->setDistinctIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_DISTINCT_IDENTIFIER]))); - } + if (isset($data[self::FIELD_DISTINCT_IDENTIFIER]) || isset($data[self::FIELD_DISTINCT_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_DISTINCT_IDENTIFIER])) { + $value = $data[self::FIELD_DISTINCT_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISTINCT_IDENTIFIER_EXT]) && is_array($data[self::FIELD_DISTINCT_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_DISTINCT_IDENTIFIER_EXT]; } else { - $this->setDistinctIdentifier(new FHIRString($data[self::FIELD_DISTINCT_IDENTIFIER])); - } - } - if (isset($data[self::FIELD_EXPIRATION_DATE])) { - $ext = (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) - ? $data[self::FIELD_EXPIRATION_DATE_EXT] - : null; - if ($data[self::FIELD_EXPIRATION_DATE] instanceof FHIRDateTime) { - $this->setExpirationDate($data[self::FIELD_EXPIRATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRATION_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDistinctIdentifier($value); + } else if (is_array($value)) { + $this->setDistinctIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDistinctIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDistinctIdentifier(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPIRATION_DATE]) || isset($data[self::FIELD_EXPIRATION_DATE_EXT])) { + if (isset($data[self::FIELD_EXPIRATION_DATE])) { + $value = $data[self::FIELD_EXPIRATION_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) { + $ext = $data[self::FIELD_EXPIRATION_DATE_EXT]; } else { - $this->setExpirationDate(new FHIRDateTime($data[self::FIELD_EXPIRATION_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpirationDate($value); + } else if (is_array($value)) { + $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpirationDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -568,68 +582,96 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); - } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); - } - } - if (isset($data[self::FIELD_MANUFACTURE_DATE])) { - $ext = (isset($data[self::FIELD_MANUFACTURE_DATE_EXT]) && is_array($data[self::FIELD_MANUFACTURE_DATE_EXT])) - ? $data[self::FIELD_MANUFACTURE_DATE_EXT] - : null; - if ($data[self::FIELD_MANUFACTURE_DATE] instanceof FHIRDateTime) { - $this->setManufactureDate($data[self::FIELD_MANUFACTURE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MANUFACTURE_DATE])) { - $this->setManufactureDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MANUFACTURE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_MANUFACTURE_DATE])) { - $this->setManufactureDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MANUFACTURE_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MANUFACTURE_DATE]) || isset($data[self::FIELD_MANUFACTURE_DATE_EXT])) { + if (isset($data[self::FIELD_MANUFACTURE_DATE])) { + $value = $data[self::FIELD_MANUFACTURE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MANUFACTURE_DATE_EXT]) && is_array($data[self::FIELD_MANUFACTURE_DATE_EXT])) { + $ext = $data[self::FIELD_MANUFACTURE_DATE_EXT]; } else { - $this->setManufactureDate(new FHIRDateTime($data[self::FIELD_MANUFACTURE_DATE])); - } - } - if (isset($data[self::FIELD_MANUFACTURER])) { - $ext = (isset($data[self::FIELD_MANUFACTURER_EXT]) && is_array($data[self::FIELD_MANUFACTURER_EXT])) - ? $data[self::FIELD_MANUFACTURER_EXT] - : null; - if ($data[self::FIELD_MANUFACTURER] instanceof FHIRString) { - $this->setManufacturer($data[self::FIELD_MANUFACTURER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MANUFACTURER])) { - $this->setManufacturer(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MANUFACTURER]] + $ext)); - } else if (is_array($data[self::FIELD_MANUFACTURER])) { - $this->setManufacturer(new FHIRString(array_merge($ext, $data[self::FIELD_MANUFACTURER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setManufactureDate($value); + } else if (is_array($value)) { + $this->setManufactureDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setManufactureDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setManufactureDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_MANUFACTURER]) || isset($data[self::FIELD_MANUFACTURER_EXT])) { + if (isset($data[self::FIELD_MANUFACTURER])) { + $value = $data[self::FIELD_MANUFACTURER]; } else { - $this->setManufacturer(new FHIRString($data[self::FIELD_MANUFACTURER])); - } - } - if (isset($data[self::FIELD_MODEL_NUMBER])) { - $ext = (isset($data[self::FIELD_MODEL_NUMBER_EXT]) && is_array($data[self::FIELD_MODEL_NUMBER_EXT])) - ? $data[self::FIELD_MODEL_NUMBER_EXT] - : null; - if ($data[self::FIELD_MODEL_NUMBER] instanceof FHIRString) { - $this->setModelNumber($data[self::FIELD_MODEL_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODEL_NUMBER])) { - $this->setModelNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MODEL_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_MODEL_NUMBER])) { - $this->setModelNumber(new FHIRString(array_merge($ext, $data[self::FIELD_MODEL_NUMBER]))); + $value = null; + } + if (isset($data[self::FIELD_MANUFACTURER_EXT]) && is_array($data[self::FIELD_MANUFACTURER_EXT])) { + $ext = $data[self::FIELD_MANUFACTURER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setManufacturer($value); + } else if (is_array($value)) { + $this->setManufacturer(new FHIRString(array_merge($ext, $value))); + } else { + $this->setManufacturer(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setManufacturer(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODEL_NUMBER]) || isset($data[self::FIELD_MODEL_NUMBER_EXT])) { + if (isset($data[self::FIELD_MODEL_NUMBER])) { + $value = $data[self::FIELD_MODEL_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODEL_NUMBER_EXT]) && is_array($data[self::FIELD_MODEL_NUMBER_EXT])) { + $ext = $data[self::FIELD_MODEL_NUMBER_EXT]; } else { - $this->setModelNumber(new FHIRString($data[self::FIELD_MODEL_NUMBER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setModelNumber($value); + } else if (is_array($value)) { + $this->setModelNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setModelNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setModelNumber(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -664,20 +706,27 @@ public function __construct($data = null) $this->setParent(new FHIRReference($data[self::FIELD_PARENT])); } } - if (isset($data[self::FIELD_PART_NUMBER])) { - $ext = (isset($data[self::FIELD_PART_NUMBER_EXT]) && is_array($data[self::FIELD_PART_NUMBER_EXT])) - ? $data[self::FIELD_PART_NUMBER_EXT] - : null; - if ($data[self::FIELD_PART_NUMBER] instanceof FHIRString) { - $this->setPartNumber($data[self::FIELD_PART_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PART_NUMBER])) { - $this->setPartNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PART_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_PART_NUMBER])) { - $this->setPartNumber(new FHIRString(array_merge($ext, $data[self::FIELD_PART_NUMBER]))); - } + if (isset($data[self::FIELD_PART_NUMBER]) || isset($data[self::FIELD_PART_NUMBER_EXT])) { + if (isset($data[self::FIELD_PART_NUMBER])) { + $value = $data[self::FIELD_PART_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PART_NUMBER_EXT]) && is_array($data[self::FIELD_PART_NUMBER_EXT])) { + $ext = $data[self::FIELD_PART_NUMBER_EXT]; } else { - $this->setPartNumber(new FHIRString($data[self::FIELD_PART_NUMBER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPartNumber($value); + } else if (is_array($value)) { + $this->setPartNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPartNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPartNumber(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -723,20 +772,27 @@ public function __construct($data = null) $this->addSafety(new FHIRCodeableConcept($data[self::FIELD_SAFETY])); } } - if (isset($data[self::FIELD_SERIAL_NUMBER])) { - $ext = (isset($data[self::FIELD_SERIAL_NUMBER_EXT]) && is_array($data[self::FIELD_SERIAL_NUMBER_EXT])) - ? $data[self::FIELD_SERIAL_NUMBER_EXT] - : null; - if ($data[self::FIELD_SERIAL_NUMBER] instanceof FHIRString) { - $this->setSerialNumber($data[self::FIELD_SERIAL_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIAL_NUMBER])) { - $this->setSerialNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIAL_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_SERIAL_NUMBER])) { - $this->setSerialNumber(new FHIRString(array_merge($ext, $data[self::FIELD_SERIAL_NUMBER]))); - } + if (isset($data[self::FIELD_SERIAL_NUMBER]) || isset($data[self::FIELD_SERIAL_NUMBER_EXT])) { + if (isset($data[self::FIELD_SERIAL_NUMBER])) { + $value = $data[self::FIELD_SERIAL_NUMBER]; } else { - $this->setSerialNumber(new FHIRString($data[self::FIELD_SERIAL_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_SERIAL_NUMBER_EXT]) && is_array($data[self::FIELD_SERIAL_NUMBER_EXT])) { + $ext = $data[self::FIELD_SERIAL_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSerialNumber($value); + } else if (is_array($value)) { + $this->setSerialNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSerialNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSerialNumber(new FHIRString($ext)); } } if (isset($data[self::FIELD_SPECIALIZATION])) { @@ -757,20 +813,27 @@ public function __construct($data = null) $this->addSpecialization(new FHIRDeviceSpecialization($data[self::FIELD_SPECIALIZATION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFHIRDeviceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFHIRDeviceStatus([FHIRFHIRDeviceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFHIRDeviceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFHIRDeviceStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRDeviceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFHIRDeviceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFHIRDeviceStatus([FHIRFHIRDeviceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFHIRDeviceStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -816,20 +879,27 @@ public function __construct($data = null) $this->addUdiCarrier(new FHIRDeviceUdiCarrier($data[self::FIELD_UDI_CARRIER])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_VERSION])) { @@ -2432,64 +2502,100 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v; } if ([] !== ($vs = $this->getDeviceName())) { - $a[self::FIELD_DEVICE_NAME] = $vs; + $a[self::FIELD_DEVICE_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEVICE_NAME][] = $v; + } } if (null !== ($v = $this->getDistinctIdentifier())) { $a[self::FIELD_DISTINCT_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISTINCT_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getExpirationDate())) { $a[self::FIELD_EXPIRATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRATION_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getManufactureDate())) { $a[self::FIELD_MANUFACTURE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MANUFACTURE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getManufacturer())) { $a[self::FIELD_MANUFACTURER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MANUFACTURER_EXT] = $enc; } } if (null !== ($v = $this->getModelNumber())) { $a[self::FIELD_MODEL_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MODEL_NUMBER_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOwner())) { $a[self::FIELD_OWNER] = $v; @@ -2499,8 +2605,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPartNumber())) { $a[self::FIELD_PART_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PART_NUMBER_EXT] = $enc; } } @@ -2508,46 +2616,91 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getProperty())) { - $a[self::FIELD_PROPERTY] = $vs; + $a[self::FIELD_PROPERTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROPERTY][] = $v; + } } if ([] !== ($vs = $this->getSafety())) { - $a[self::FIELD_SAFETY] = $vs; + $a[self::FIELD_SAFETY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SAFETY][] = $v; + } } if (null !== ($v = $this->getSerialNumber())) { $a[self::FIELD_SERIAL_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIAL_NUMBER_EXT] = $enc; } } if ([] !== ($vs = $this->getSpecialization())) { - $a[self::FIELD_SPECIALIZATION] = $vs; + $a[self::FIELD_SPECIALIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALIZATION][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFHIRDeviceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFHIRDeviceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStatusReason())) { - $a[self::FIELD_STATUS_REASON] = $vs; + $a[self::FIELD_STATUS_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STATUS_REASON][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getUdiCarrier())) { - $a[self::FIELD_UDI_CARRIER] = $vs; + $a[self::FIELD_UDI_CARRIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI_CARRIER][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getVersion())) { - $a[self::FIELD_VERSION] = $vs; + $a[self::FIELD_VERSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VERSION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceDefinition.php index cf2a77c8b9..473694cba6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRDeviceDefinition extends FHIRDomainResource implements PHPFHIRContaine const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The characteristics, operational status and capabilities of a medical-related @@ -515,20 +515,27 @@ public function __construct($data = null) $this->setManufacturerReference(new FHIRReference($data[self::FIELD_MANUFACTURER_REFERENCE])); } } - if (isset($data[self::FIELD_MANUFACTURER_STRING])) { - $ext = (isset($data[self::FIELD_MANUFACTURER_STRING_EXT]) && is_array($data[self::FIELD_MANUFACTURER_STRING_EXT])) - ? $data[self::FIELD_MANUFACTURER_STRING_EXT] - : null; - if ($data[self::FIELD_MANUFACTURER_STRING] instanceof FHIRString) { - $this->setManufacturerString($data[self::FIELD_MANUFACTURER_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MANUFACTURER_STRING])) { - $this->setManufacturerString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MANUFACTURER_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_MANUFACTURER_STRING])) { - $this->setManufacturerString(new FHIRString(array_merge($ext, $data[self::FIELD_MANUFACTURER_STRING]))); - } + if (isset($data[self::FIELD_MANUFACTURER_STRING]) || isset($data[self::FIELD_MANUFACTURER_STRING_EXT])) { + if (isset($data[self::FIELD_MANUFACTURER_STRING])) { + $value = $data[self::FIELD_MANUFACTURER_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MANUFACTURER_STRING_EXT]) && is_array($data[self::FIELD_MANUFACTURER_STRING_EXT])) { + $ext = $data[self::FIELD_MANUFACTURER_STRING_EXT]; } else { - $this->setManufacturerString(new FHIRString($data[self::FIELD_MANUFACTURER_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setManufacturerString($value); + } else if (is_array($value)) { + $this->setManufacturerString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setManufacturerString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setManufacturerString(new FHIRString($ext)); } } if (isset($data[self::FIELD_MATERIAL])) { @@ -549,20 +556,27 @@ public function __construct($data = null) $this->addMaterial(new FHIRDeviceDefinitionMaterial($data[self::FIELD_MATERIAL])); } } - if (isset($data[self::FIELD_MODEL_NUMBER])) { - $ext = (isset($data[self::FIELD_MODEL_NUMBER_EXT]) && is_array($data[self::FIELD_MODEL_NUMBER_EXT])) - ? $data[self::FIELD_MODEL_NUMBER_EXT] - : null; - if ($data[self::FIELD_MODEL_NUMBER] instanceof FHIRString) { - $this->setModelNumber($data[self::FIELD_MODEL_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODEL_NUMBER])) { - $this->setModelNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MODEL_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_MODEL_NUMBER])) { - $this->setModelNumber(new FHIRString(array_merge($ext, $data[self::FIELD_MODEL_NUMBER]))); - } + if (isset($data[self::FIELD_MODEL_NUMBER]) || isset($data[self::FIELD_MODEL_NUMBER_EXT])) { + if (isset($data[self::FIELD_MODEL_NUMBER])) { + $value = $data[self::FIELD_MODEL_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODEL_NUMBER_EXT]) && is_array($data[self::FIELD_MODEL_NUMBER_EXT])) { + $ext = $data[self::FIELD_MODEL_NUMBER_EXT]; } else { - $this->setModelNumber(new FHIRString($data[self::FIELD_MODEL_NUMBER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setModelNumber($value); + } else if (is_array($value)) { + $this->setModelNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setModelNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setModelNumber(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -583,20 +597,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_ONLINE_INFORMATION])) { - $ext = (isset($data[self::FIELD_ONLINE_INFORMATION_EXT]) && is_array($data[self::FIELD_ONLINE_INFORMATION_EXT])) - ? $data[self::FIELD_ONLINE_INFORMATION_EXT] - : null; - if ($data[self::FIELD_ONLINE_INFORMATION] instanceof FHIRUri) { - $this->setOnlineInformation($data[self::FIELD_ONLINE_INFORMATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONLINE_INFORMATION])) { - $this->setOnlineInformation(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ONLINE_INFORMATION]] + $ext)); - } else if (is_array($data[self::FIELD_ONLINE_INFORMATION])) { - $this->setOnlineInformation(new FHIRUri(array_merge($ext, $data[self::FIELD_ONLINE_INFORMATION]))); - } + if (isset($data[self::FIELD_ONLINE_INFORMATION]) || isset($data[self::FIELD_ONLINE_INFORMATION_EXT])) { + if (isset($data[self::FIELD_ONLINE_INFORMATION])) { + $value = $data[self::FIELD_ONLINE_INFORMATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONLINE_INFORMATION_EXT]) && is_array($data[self::FIELD_ONLINE_INFORMATION_EXT])) { + $ext = $data[self::FIELD_ONLINE_INFORMATION_EXT]; } else { - $this->setOnlineInformation(new FHIRUri($data[self::FIELD_ONLINE_INFORMATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setOnlineInformation($value); + } else if (is_array($value)) { + $this->setOnlineInformation(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setOnlineInformation(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnlineInformation(new FHIRUri($ext)); } } if (isset($data[self::FIELD_OWNER])) { @@ -724,49 +745,65 @@ public function __construct($data = null) $this->addUdiDeviceIdentifier(new FHIRDeviceDefinitionUdiDeviceIdentifier($data[self::FIELD_UDI_DEVICE_IDENTIFIER])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if (is_array($data[self::FIELD_VERSION])) { - foreach($data[self::FIELD_VERSION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addVersion($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addVersion(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addVersion(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addVersion($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addVersion($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addVersion(new FHIRString(array_merge($v, $iext))); + } else { + $this->addVersion(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addVersion(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->addVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addVersion(new FHIRString($iext)); } - } elseif ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->addVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_VERSION])) { - $this->addVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else { - $this->addVersion(new FHIRString($data[self::FIELD_VERSION])); } } } @@ -2242,47 +2279,95 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCapability())) { - $a[self::FIELD_CAPABILITY] = $vs; + $a[self::FIELD_CAPABILITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CAPABILITY][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getDeviceName())) { - $a[self::FIELD_DEVICE_NAME] = $vs; + $a[self::FIELD_DEVICE_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEVICE_NAME][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLanguageCode())) { - $a[self::FIELD_LANGUAGE_CODE] = $vs; + $a[self::FIELD_LANGUAGE_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LANGUAGE_CODE][] = $v; + } } if (null !== ($v = $this->getManufacturerReference())) { $a[self::FIELD_MANUFACTURER_REFERENCE] = $v; } if (null !== ($v = $this->getManufacturerString())) { $a[self::FIELD_MANUFACTURER_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MANUFACTURER_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getMaterial())) { - $a[self::FIELD_MATERIAL] = $vs; + $a[self::FIELD_MATERIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MATERIAL][] = $v; + } } if (null !== ($v = $this->getModelNumber())) { $a[self::FIELD_MODEL_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MODEL_NUMBER_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOnlineInformation())) { $a[self::FIELD_ONLINE_INFORMATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ONLINE_INFORMATION_EXT] = $enc; } } @@ -2296,47 +2381,90 @@ public function jsonSerialize() $a[self::FIELD_PHYSICAL_CHARACTERISTICS] = $v; } if ([] !== ($vs = $this->getProperty())) { - $a[self::FIELD_PROPERTY] = $vs; + $a[self::FIELD_PROPERTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROPERTY][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getSafety())) { - $a[self::FIELD_SAFETY] = $vs; + $a[self::FIELD_SAFETY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SAFETY][] = $v; + } } if ([] !== ($vs = $this->getShelfLifeStorage())) { - $a[self::FIELD_SHELF_LIFE_STORAGE] = $vs; + $a[self::FIELD_SHELF_LIFE_STORAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SHELF_LIFE_STORAGE][] = $v; + } } if ([] !== ($vs = $this->getSpecialization())) { - $a[self::FIELD_SPECIALIZATION] = $vs; + $a[self::FIELD_SPECIALIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALIZATION][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getUdiDeviceIdentifier())) { - $a[self::FIELD_UDI_DEVICE_IDENTIFIER] = $vs; + $a[self::FIELD_UDI_DEVICE_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI_DEVICE_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getVersion())) { $a[self::FIELD_VERSION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_VERSION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_VERSION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_VERSION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_VERSION_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php index 083d514610..fd1cb87937 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRDeviceMetric extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_UNIT = 'unit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes a measurement, calculation or setting capability of a medical device. @@ -278,36 +278,50 @@ public function __construct($data = null) $this->addCalibration(new FHIRDeviceMetricCalibration($data[self::FIELD_CALIBRATION])); } } - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRDeviceMetricCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRDeviceMetricCategory([FHIRDeviceMetricCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRDeviceMetricCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; } else { - $this->setCategory(new FHIRDeviceMetricCategory($data[self::FIELD_CATEGORY])); + $value = null; } - } - if (isset($data[self::FIELD_COLOR])) { - $ext = (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) - ? $data[self::FIELD_COLOR_EXT] - : null; - if ($data[self::FIELD_COLOR] instanceof FHIRDeviceMetricColor) { - $this->setColor($data[self::FIELD_COLOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRDeviceMetricColor([FHIRDeviceMetricColor::FIELD_VALUE => $data[self::FIELD_COLOR]] + $ext)); - } else if (is_array($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRDeviceMetricColor(array_merge($ext, $data[self::FIELD_COLOR]))); + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRDeviceMetricCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRDeviceMetricCategory([FHIRDeviceMetricCategory::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCategory(new FHIRDeviceMetricCategory($ext)); + } + } + if (isset($data[self::FIELD_COLOR]) || isset($data[self::FIELD_COLOR_EXT])) { + if (isset($data[self::FIELD_COLOR])) { + $value = $data[self::FIELD_COLOR]; } else { - $this->setColor(new FHIRDeviceMetricColor($data[self::FIELD_COLOR])); + $value = null; + } + if (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) { + $ext = $data[self::FIELD_COLOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricColor) { + $this->setColor($value); + } else if (is_array($value)) { + $this->setColor(new FHIRDeviceMetricColor(array_merge($ext, $value))); + } else { + $this->setColor(new FHIRDeviceMetricColor([FHIRDeviceMetricColor::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setColor(new FHIRDeviceMetricColor($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -335,20 +349,27 @@ public function __construct($data = null) $this->setMeasurementPeriod(new FHIRTiming($data[self::FIELD_MEASUREMENT_PERIOD])); } } - if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { - $ext = (isset($data[self::FIELD_OPERATIONAL_STATUS_EXT]) && is_array($data[self::FIELD_OPERATIONAL_STATUS_EXT])) - ? $data[self::FIELD_OPERATIONAL_STATUS_EXT] - : null; - if ($data[self::FIELD_OPERATIONAL_STATUS] instanceof FHIRDeviceMetricOperationalStatus) { - $this->setOperationalStatus($data[self::FIELD_OPERATIONAL_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OPERATIONAL_STATUS])) { - $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus([FHIRDeviceMetricOperationalStatus::FIELD_VALUE => $data[self::FIELD_OPERATIONAL_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_OPERATIONAL_STATUS])) { - $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus(array_merge($ext, $data[self::FIELD_OPERATIONAL_STATUS]))); - } + if (isset($data[self::FIELD_OPERATIONAL_STATUS]) || isset($data[self::FIELD_OPERATIONAL_STATUS_EXT])) { + if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { + $value = $data[self::FIELD_OPERATIONAL_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OPERATIONAL_STATUS_EXT]) && is_array($data[self::FIELD_OPERATIONAL_STATUS_EXT])) { + $ext = $data[self::FIELD_OPERATIONAL_STATUS_EXT]; } else { - $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus($data[self::FIELD_OPERATIONAL_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricOperationalStatus) { + $this->setOperationalStatus($value); + } else if (is_array($value)) { + $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus(array_merge($ext, $value))); + } else { + $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus([FHIRDeviceMetricOperationalStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus($ext)); } } if (isset($data[self::FIELD_PARENT])) { @@ -959,32 +980,50 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCalibration())) { - $a[self::FIELD_CALIBRATION] = $vs; + $a[self::FIELD_CALIBRATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CALIBRATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } if (null !== ($v = $this->getColor())) { $a[self::FIELD_COLOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricColor::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricColor::FIELD_VALUE]); $a[self::FIELD_COLOR_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMeasurementPeriod())) { $a[self::FIELD_MEASUREMENT_PERIOD] = $v; } if (null !== ($v = $this->getOperationalStatus())) { $a[self::FIELD_OPERATIONAL_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricOperationalStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricOperationalStatus::FIELD_VALUE]); $a[self::FIELD_OPERATIONAL_STATUS_EXT] = $enc; } } @@ -1000,6 +1039,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php index 72f04c2f58..7c94523c0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRDeviceRequest extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_SUPPORTING_INFO = 'supportingInfo'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -484,20 +484,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -564,62 +571,80 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); } } if (isset($data[self::FIELD_INSURANCE])) { @@ -640,20 +665,27 @@ public function __construct($data = null) $this->addInsurance(new FHIRReference($data[self::FIELD_INSURANCE])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; } else { - $this->setIntent(new FHIRRequestIntent($data[self::FIELD_INTENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRRequestIntent($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -674,20 +706,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -754,20 +793,27 @@ public function __construct($data = null) $this->addPriorRequest(new FHIRReference($data[self::FIELD_PRIOR_REQUEST])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -831,20 +877,27 @@ public function __construct($data = null) $this->setRequester(new FHIRReference($data[self::FIELD_REQUESTER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -2474,13 +2527,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getCodeCodeableConcept())) { $a[self::FIELD_CODE_CODEABLE_CONCEPT] = $v; @@ -2495,55 +2556,93 @@ public function jsonSerialize() $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -2554,7 +2653,13 @@ public function jsonSerialize() $a[self::FIELD_OCCURRENCE_TIMING] = $v; } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getPerformer())) { $a[self::FIELD_PERFORMER] = $v; @@ -2563,31 +2668,59 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER_TYPE] = $v; } if ([] !== ($vs = $this->getPriorRequest())) { - $a[self::FIELD_PRIOR_REQUEST] = $vs; + $a[self::FIELD_PRIOR_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRIOR_REQUEST][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getRelevantHistory())) { - $a[self::FIELD_RELEVANT_HISTORY] = $vs; + $a[self::FIELD_RELEVANT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELEVANT_HISTORY][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2595,7 +2728,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php index c2c8d8c66e..47361172fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRDeviceUseStatement extends FHIRDomainResource implements PHPFHIRContai const FIELD_TIMING_TIMING = 'timingTiming'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -438,20 +438,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_RECORDED_ON])) { - $ext = (isset($data[self::FIELD_RECORDED_ON_EXT]) && is_array($data[self::FIELD_RECORDED_ON_EXT])) - ? $data[self::FIELD_RECORDED_ON_EXT] - : null; - if ($data[self::FIELD_RECORDED_ON] instanceof FHIRDateTime) { - $this->setRecordedOn($data[self::FIELD_RECORDED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED_ON])) { - $this->setRecordedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED_ON])) { - $this->setRecordedOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED_ON]))); - } + if (isset($data[self::FIELD_RECORDED_ON]) || isset($data[self::FIELD_RECORDED_ON_EXT])) { + if (isset($data[self::FIELD_RECORDED_ON])) { + $value = $data[self::FIELD_RECORDED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_ON_EXT]) && is_array($data[self::FIELD_RECORDED_ON_EXT])) { + $ext = $data[self::FIELD_RECORDED_ON_EXT]; } else { - $this->setRecordedOn(new FHIRDateTime($data[self::FIELD_RECORDED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecordedOn($value); + } else if (is_array($value)) { + $this->setRecordedOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecordedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecordedOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -461,20 +468,27 @@ public function __construct($data = null) $this->setSource(new FHIRReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDeviceUseStatementStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDeviceUseStatementStatus([FHIRDeviceUseStatementStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDeviceUseStatementStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRDeviceUseStatementStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceUseStatementStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDeviceUseStatementStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDeviceUseStatementStatus([FHIRDeviceUseStatementStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDeviceUseStatementStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -484,20 +498,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -1434,33 +1455,71 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getBodySite())) { $a[self::FIELD_BODY_SITE] = $v; } if ([] !== ($vs = $this->getDerivedFrom())) { - $a[self::FIELD_DERIVED_FROM] = $vs; + $a[self::FIELD_DERIVED_FROM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DERIVED_FROM][] = $v; + } } if (null !== ($v = $this->getDevice())) { $a[self::FIELD_DEVICE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRecordedOn())) { $a[self::FIELD_RECORDED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_ON_EXT] = $enc; } } @@ -1469,8 +1528,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceUseStatementStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceUseStatementStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1479,8 +1540,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -1490,6 +1553,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTimingTiming())) { $a[self::FIELD_TIMING_TIMING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php index 711e230ec1..fd54e40e07 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRDiagnosticReport extends FHIRDomainResource implements PHPFHIRContaine const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -425,20 +425,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CONCLUSION])) { - $ext = (isset($data[self::FIELD_CONCLUSION_EXT]) && is_array($data[self::FIELD_CONCLUSION_EXT])) - ? $data[self::FIELD_CONCLUSION_EXT] - : null; - if ($data[self::FIELD_CONCLUSION] instanceof FHIRString) { - $this->setConclusion($data[self::FIELD_CONCLUSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONCLUSION])) { - $this->setConclusion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONCLUSION]] + $ext)); - } else if (is_array($data[self::FIELD_CONCLUSION])) { - $this->setConclusion(new FHIRString(array_merge($ext, $data[self::FIELD_CONCLUSION]))); - } + if (isset($data[self::FIELD_CONCLUSION]) || isset($data[self::FIELD_CONCLUSION_EXT])) { + if (isset($data[self::FIELD_CONCLUSION])) { + $value = $data[self::FIELD_CONCLUSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONCLUSION_EXT]) && is_array($data[self::FIELD_CONCLUSION_EXT])) { + $ext = $data[self::FIELD_CONCLUSION_EXT]; } else { - $this->setConclusion(new FHIRString($data[self::FIELD_CONCLUSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setConclusion($value); + } else if (is_array($value)) { + $this->setConclusion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setConclusion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConclusion(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONCLUSION_CODE])) { @@ -459,20 +466,27 @@ public function __construct($data = null) $this->addConclusionCode(new FHIRCodeableConcept($data[self::FIELD_CONCLUSION_CODE])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -525,20 +539,27 @@ public function __construct($data = null) $this->addImagingStudy(new FHIRReference($data[self::FIELD_IMAGING_STUDY])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRInstant) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRInstant($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_MEDIA])) { @@ -649,20 +670,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticReportStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticReportStatus([FHIRDiagnosticReportStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticReportStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDiagnosticReportStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticReportStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticReportStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticReportStatus([FHIRDiagnosticReportStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticReportStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1949,28 +1977,50 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if (null !== ($v = $this->getConclusion())) { $a[self::FIELD_CONCLUSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONCLUSION_EXT] = $enc; } } if ([] !== ($vs = $this->getConclusionCode())) { - $a[self::FIELD_CONCLUSION_CODE] = $vs; + $a[self::FIELD_CONCLUSION_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCLUSION_CODE][] = $v; + } } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -1981,46 +2031,101 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getImagingStudy())) { - $a[self::FIELD_IMAGING_STUDY] = $vs; + $a[self::FIELD_IMAGING_STUDY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGING_STUDY][] = $v; + } } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } if ([] !== ($vs = $this->getMedia())) { - $a[self::FIELD_MEDIA] = $vs; + $a[self::FIELD_MEDIA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEDIA][] = $v; + } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getPresentedForm())) { - $a[self::FIELD_PRESENTED_FORM] = $vs; + $a[self::FIELD_PRESENTED_FORM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRESENTED_FORM][] = $v; + } } if ([] !== ($vs = $this->getResult())) { - $a[self::FIELD_RESULT] = $vs; + $a[self::FIELD_RESULT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESULT][] = $v; + } } if ([] !== ($vs = $this->getResultsInterpreter())) { - $a[self::FIELD_RESULTS_INTERPRETER] = $vs; + $a[self::FIELD_RESULTS_INTERPRETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESULTS_INTERPRETER][] = $v; + } } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticReportStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticReportStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php index 745f08e761..10f5e30f95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRDocumentManifest extends FHIRDomainResource implements PHPFHIRContaine const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -317,36 +317,50 @@ public function __construct($data = null) $this->addContent(new FHIRReference($data[self::FIELD_CONTENT])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -410,36 +424,50 @@ public function __construct($data = null) $this->addRelated(new FHIRDocumentManifestRelated($data[self::FIELD_RELATED])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDocumentReferenceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDocumentReferenceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentReferenceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDocumentReferenceStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1239,48 +1267,86 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMasterIdentifier())) { $a[self::FIELD_MASTER_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentReferenceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentReferenceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1290,6 +1356,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php index 32693abb87..57047ecf0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRDocumentReference extends FHIRDomainResource implements PHPFHIRContain const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -421,52 +421,73 @@ public function __construct($data = null) $this->setCustodian(new FHIRReference($data[self::FIELD_CUSTODIAN])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRInstant) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRInstant(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRInstant($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_DOC_STATUS])) { - $ext = (isset($data[self::FIELD_DOC_STATUS_EXT]) && is_array($data[self::FIELD_DOC_STATUS_EXT])) - ? $data[self::FIELD_DOC_STATUS_EXT] - : null; - if ($data[self::FIELD_DOC_STATUS] instanceof FHIRCompositionStatus) { - $this->setDocStatus($data[self::FIELD_DOC_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOC_STATUS])) { - $this->setDocStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $data[self::FIELD_DOC_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_DOC_STATUS])) { - $this->setDocStatus(new FHIRCompositionStatus(array_merge($ext, $data[self::FIELD_DOC_STATUS]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DOC_STATUS]) || isset($data[self::FIELD_DOC_STATUS_EXT])) { + if (isset($data[self::FIELD_DOC_STATUS])) { + $value = $data[self::FIELD_DOC_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOC_STATUS_EXT]) && is_array($data[self::FIELD_DOC_STATUS_EXT])) { + $ext = $data[self::FIELD_DOC_STATUS_EXT]; } else { - $this->setDocStatus(new FHIRCompositionStatus($data[self::FIELD_DOC_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionStatus) { + $this->setDocStatus($value); + } else if (is_array($value)) { + $this->setDocStatus(new FHIRCompositionStatus(array_merge($ext, $value))); + } else { + $this->setDocStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocStatus(new FHIRCompositionStatus($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -530,20 +551,27 @@ public function __construct($data = null) $this->addSecurityLabel(new FHIRCodeableConcept($data[self::FIELD_SECURITY_LABEL])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDocumentReferenceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRDocumentReferenceStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentReferenceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDocumentReferenceStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1544,13 +1572,31 @@ public function jsonSerialize() $a[self::FIELD_AUTHENTICATOR] = $v; } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; @@ -1560,41 +1606,67 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDocStatus())) { $a[self::FIELD_DOC_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompositionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompositionStatus::FIELD_VALUE]); $a[self::FIELD_DOC_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMasterIdentifier())) { $a[self::FIELD_MASTER_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getRelatesTo())) { - $a[self::FIELD_RELATES_TO] = $vs; + $a[self::FIELD_RELATES_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATES_TO][] = $v; + } } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentReferenceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentReferenceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1604,6 +1676,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesis.php index bf944dfa15..e6d7ffcdcf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -144,7 +144,7 @@ class FHIREffectEvidenceSynthesis extends FHIRDomainResource implements PHPFHIRC const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -596,20 +596,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -666,52 +673,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -825,36 +853,50 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -889,20 +931,27 @@ public function __construct($data = null) $this->setPopulation(new FHIRReference($data[self::FIELD_POPULATION])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -966,20 +1015,27 @@ public function __construct($data = null) $this->setSampleSize(new FHIREffectEvidenceSynthesisSampleSize($data[self::FIELD_SAMPLE_SIZE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_STUDY_TYPE])) { @@ -996,20 +1052,27 @@ public function __construct($data = null) $this->setSynthesisType(new FHIRCodeableConcept($data[self::FIELD_SYNTHESIS_TYPE])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1030,20 +1093,27 @@ public function __construct($data = null) $this->addTopic(new FHIRCodeableConcept($data[self::FIELD_TOPIC])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1064,20 +1134,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -3148,52 +3225,96 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getCertainty())) { - $a[self::FIELD_CERTAINTY] = $vs; + $a[self::FIELD_CERTAINTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CERTAINTY][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if ([] !== ($vs = $this->getEffectEstimate())) { - $a[self::FIELD_EFFECT_ESTIMATE] = $vs; + $a[self::FIELD_EFFECT_ESTIMATE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EFFECT_ESTIMATE][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExposure())) { $a[self::FIELD_EXPOSURE] = $v; @@ -3202,27 +3323,49 @@ public function jsonSerialize() $a[self::FIELD_EXPOSURE_ALTERNATIVE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v; @@ -3232,27 +3375,49 @@ public function jsonSerialize() } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getResultsByExposure())) { - $a[self::FIELD_RESULTS_BY_EXPOSURE] = $vs; + $a[self::FIELD_RESULTS_BY_EXPOSURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESULTS_BY_EXPOSURE][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getSampleSize())) { $a[self::FIELD_SAMPLE_SIZE] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3264,31 +3429,52 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREncounter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREncounter.php index 9664e15500..212eba1937 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREncounter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREncounter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIREncounter extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -674,20 +674,27 @@ public function __construct($data = null) $this->setServiceType(new FHIRCodeableConcept($data[self::FIELD_SERVICE_TYPE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterStatus([FHIREncounterStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIREncounterStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterStatus([FHIREncounterStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterStatus($ext)); } } if (isset($data[self::FIELD_STATUS_HISTORY])) { @@ -2159,43 +2166,97 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAccount())) { - $a[self::FIELD_ACCOUNT] = $vs; + $a[self::FIELD_ACCOUNT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACCOUNT][] = $v; + } } if ([] !== ($vs = $this->getAppointment())) { - $a[self::FIELD_APPOINTMENT] = $vs; + $a[self::FIELD_APPOINTMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_APPOINTMENT][] = $v; + } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v; } if ([] !== ($vs = $this->getClassHistory())) { - $a[self::FIELD_CLASS_HISTORY] = $vs; + $a[self::FIELD_CLASS_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CLASS_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if ([] !== ($vs = $this->getEpisodeOfCare())) { - $a[self::FIELD_EPISODE_OF_CARE] = $vs; + $a[self::FIELD_EPISODE_OF_CARE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EPISODE_OF_CARE][] = $v; + } } if (null !== ($v = $this->getHospitalization())) { $a[self::FIELD_HOSPITALIZATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLength())) { $a[self::FIELD_LENGTH] = $v; } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getPartOf())) { $a[self::FIELD_PART_OF] = $v; } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; @@ -2204,10 +2265,22 @@ public function jsonSerialize() $a[self::FIELD_PRIORITY] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getServiceProvider())) { $a[self::FIELD_SERVICE_PROVIDER] = $v; @@ -2217,19 +2290,36 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStatusHistory())) { - $a[self::FIELD_STATUS_HISTORY] = $vs; + $a[self::FIELD_STATUS_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STATUS_HISTORY][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREndpoint.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREndpoint.php index aee1768a89..4337a4f823 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIREndpoint extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A URI that is a literal reference @@ -269,20 +269,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDRESS])) { - $ext = (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) - ? $data[self::FIELD_ADDRESS_EXT] - : null; - if ($data[self::FIELD_ADDRESS] instanceof FHIRUrl) { - $this->setAddress($data[self::FIELD_ADDRESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUrl([FHIRUrl::FIELD_VALUE => $data[self::FIELD_ADDRESS]] + $ext)); - } else if (is_array($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUrl(array_merge($ext, $data[self::FIELD_ADDRESS]))); - } + if (isset($data[self::FIELD_ADDRESS]) || isset($data[self::FIELD_ADDRESS_EXT])) { + if (isset($data[self::FIELD_ADDRESS])) { + $value = $data[self::FIELD_ADDRESS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) { + $ext = $data[self::FIELD_ADDRESS_EXT]; } else { - $this->setAddress(new FHIRUrl($data[self::FIELD_ADDRESS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUrl) { + $this->setAddress($value); + } else if (is_array($value)) { + $this->setAddress(new FHIRUrl(array_merge($ext, $value))); + } else { + $this->setAddress(new FHIRUrl([FHIRUrl::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAddress(new FHIRUrl($ext)); } } if (isset($data[self::FIELD_CONNECTION_TYPE])) { @@ -310,33 +317,42 @@ public function __construct($data = null) $this->addContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_HEADER])) { - $ext = (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) - ? $data[self::FIELD_HEADER_EXT] - : null; - if (is_array($data[self::FIELD_HEADER])) { - foreach($data[self::FIELD_HEADER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addHeader($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addHeader(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_HEADER]) || isset($data[self::FIELD_HEADER_EXT])) { + if (isset($data[self::FIELD_HEADER])) { + $value = $data[self::FIELD_HEADER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) { + $ext = $data[self::FIELD_HEADER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addHeader($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addHeader($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addHeader(new FHIRString(array_merge($v, $iext))); + } else { + $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addHeader(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addHeader(new FHIRString(array_merge($ext, $value))); + } else { + $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addHeader(new FHIRString($iext)); } - } elseif ($data[self::FIELD_HEADER] instanceof FHIRString) { - $this->addHeader($data[self::FIELD_HEADER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_HEADER])) { - $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER]] + $ext)); - } else { - $this->addHeader(new FHIRString($data[self::FIELD_HEADER])); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -364,49 +380,65 @@ public function __construct($data = null) $this->setManagingOrganization(new FHIRReference($data[self::FIELD_MANAGING_ORGANIZATION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PAYLOAD_MIME_TYPE])) { - $ext = (isset($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT]) && is_array($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT])) - ? $data[self::FIELD_PAYLOAD_MIME_TYPE_EXT] - : null; - if (is_array($data[self::FIELD_PAYLOAD_MIME_TYPE])) { - foreach($data[self::FIELD_PAYLOAD_MIME_TYPE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addPayloadMimeType($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPayloadMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPayloadMimeType(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PAYLOAD_MIME_TYPE]) || isset($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT])) { + if (isset($data[self::FIELD_PAYLOAD_MIME_TYPE])) { + $value = $data[self::FIELD_PAYLOAD_MIME_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT]) && is_array($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT])) { + $ext = $data[self::FIELD_PAYLOAD_MIME_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addPayloadMimeType($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addPayloadMimeType($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPayloadMimeType(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addPayloadMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPayloadMimeType(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addPayloadMimeType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addPayloadMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPayloadMimeType(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_PAYLOAD_MIME_TYPE] instanceof FHIRCode) { - $this->addPayloadMimeType($data[self::FIELD_PAYLOAD_MIME_TYPE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PAYLOAD_MIME_TYPE])) { - $this->addPayloadMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PAYLOAD_MIME_TYPE]] + $ext)); - } else { - $this->addPayloadMimeType(new FHIRCode($data[self::FIELD_PAYLOAD_MIME_TYPE])); } } if (isset($data[self::FIELD_PAYLOAD_TYPE])) { @@ -434,20 +466,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREndpointStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREndpointStatus([FHIREndpointStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREndpointStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREndpointStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREndpointStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREndpointStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREndpointStatus([FHIREndpointStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREndpointStatus($ext)); } } } @@ -1196,8 +1235,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAddress())) { $a[self::FIELD_ADDRESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUrl::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUrl::FIELD_VALUE]); $a[self::FIELD_ADDRESS_EXT] = $enc; } } @@ -1205,64 +1246,105 @@ public function jsonSerialize() $a[self::FIELD_CONNECTION_TYPE] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getHeader())) { $a[self::FIELD_HEADER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_HEADER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_HEADER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_HEADER_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_HEADER_EXT] = $encs; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPayloadMimeType())) { $a[self::FIELD_PAYLOAD_MIME_TYPE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PAYLOAD_MIME_TYPE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PAYLOAD_MIME_TYPE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PAYLOAD_MIME_TYPE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PAYLOAD_MIME_TYPE_EXT] = $encs; + } } if ([] !== ($vs = $this->getPayloadType())) { - $a[self::FIELD_PAYLOAD_TYPE] = $vs; + $a[self::FIELD_PAYLOAD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYLOAD_TYPE][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREndpointStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREndpointStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php index e8a3d4066d..76f62c4e02 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIREnrollmentRequest extends FHIRDomainResource implements PHPFHIRContain const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -212,20 +212,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -260,20 +267,27 @@ public function __construct($data = null) $this->setProvider(new FHIRReference($data[self::FIELD_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -694,13 +708,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; @@ -710,11 +732,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php index 328ca60859..3f4dbcba10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIREnrollmentResponse extends FHIRDomainResource implements PHPFHIRContai const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -212,36 +212,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -269,20 +283,27 @@ public function __construct($data = null) $this->setOrganization(new FHIRReference($data[self::FIELD_ORGANIZATION])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRRemittanceOutcome) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRRemittanceOutcome([FHIRRemittanceOutcome::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRRemittanceOutcome(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; } else { - $this->setOutcome(new FHIRRemittanceOutcome($data[self::FIELD_OUTCOME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRemittanceOutcome) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRRemittanceOutcome(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRRemittanceOutcome([FHIRRemittanceOutcome::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRRemittanceOutcome($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -299,20 +320,27 @@ public function __construct($data = null) $this->setRequestProvider(new FHIRReference($data[self::FIELD_REQUEST_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -775,28 +803,40 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRemittanceOutcome::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRemittanceOutcome::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -808,11 +848,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php index 2653383254..4002858b9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIREpisodeOfCare extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -367,20 +367,27 @@ public function __construct($data = null) $this->addReferralRequest(new FHIRReference($data[self::FIELD_REFERRAL_REQUEST])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREpisodeOfCareStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREpisodeOfCareStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREpisodeOfCareStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREpisodeOfCareStatus($ext)); } } if (isset($data[self::FIELD_STATUS_HISTORY])) { @@ -1229,16 +1236,34 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAccount())) { - $a[self::FIELD_ACCOUNT] = $vs; + $a[self::FIELD_ACCOUNT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACCOUNT][] = $v; + } } if (null !== ($v = $this->getCareManager())) { $a[self::FIELD_CARE_MANAGER] = $v; } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; @@ -1250,23 +1275,52 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getReferralRequest())) { - $a[self::FIELD_REFERRAL_REQUEST] = $vs; + $a[self::FIELD_REFERRAL_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERRAL_REQUEST][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREpisodeOfCareStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREpisodeOfCareStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStatusHistory())) { - $a[self::FIELD_STATUS_HISTORY] = $vs; + $a[self::FIELD_STATUS_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STATUS_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getTeam())) { - $a[self::FIELD_TEAM] = $vs; + $a[self::FIELD_TEAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEAM][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREventDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREventDefinition.php index e19c20e7ad..354b0cb99d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREventDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREventDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIREventDefinition extends FHIRDomainResource implements PHPFHIRContained const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -555,20 +555,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -607,52 +614,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -698,20 +726,27 @@ public function __construct($data = null) $this->addEndorser(new FHIRContactDetail($data[self::FIELD_ENDORSER])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -750,68 +785,96 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -850,20 +913,27 @@ public function __construct($data = null) $this->addReviewer(new FHIRContactDetail($data[self::FIELD_REVIEWER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { @@ -880,36 +950,50 @@ public function __construct($data = null) $this->setSubjectReference(new FHIRReference($data[self::FIELD_SUBJECT_REFERENCE])); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -948,36 +1032,50 @@ public function __construct($data = null) $this->addTrigger(new FHIRTriggerDefinition($data[self::FIELD_TRIGGER])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -998,20 +1096,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2909,98 +3014,166 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3012,48 +3185,79 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if ([] !== ($vs = $this->getTrigger())) { - $a[self::FIELD_TRIGGER] = $vs; + $a[self::FIELD_TRIGGER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TRIGGER][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidence.php index a043699f9a..70af2a92ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIREvidence extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -532,20 +532,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -584,52 +591,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -736,36 +764,50 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -804,20 +846,27 @@ public function __construct($data = null) $this->addOutcome(new FHIRReference($data[self::FIELD_OUTCOME])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -856,68 +905,96 @@ public function __construct($data = null) $this->addReviewer(new FHIRContactDetail($data[self::FIELD_REVIEWER])); } } - if (isset($data[self::FIELD_SHORT_TITLE])) { - $ext = (isset($data[self::FIELD_SHORT_TITLE_EXT]) && is_array($data[self::FIELD_SHORT_TITLE_EXT])) - ? $data[self::FIELD_SHORT_TITLE_EXT] - : null; - if ($data[self::FIELD_SHORT_TITLE] instanceof FHIRString) { - $this->setShortTitle($data[self::FIELD_SHORT_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SHORT_TITLE])) { - $this->setShortTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SHORT_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SHORT_TITLE])) { - $this->setShortTitle(new FHIRString(array_merge($ext, $data[self::FIELD_SHORT_TITLE]))); - } + if (isset($data[self::FIELD_SHORT_TITLE]) || isset($data[self::FIELD_SHORT_TITLE_EXT])) { + if (isset($data[self::FIELD_SHORT_TITLE])) { + $value = $data[self::FIELD_SHORT_TITLE]; } else { - $this->setShortTitle(new FHIRString($data[self::FIELD_SHORT_TITLE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_SHORT_TITLE_EXT]) && is_array($data[self::FIELD_SHORT_TITLE_EXT])) { + $ext = $data[self::FIELD_SHORT_TITLE_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setShortTitle($value); + } else if (is_array($value)) { + $this->setShortTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setShortTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setShortTitle(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -938,20 +1015,27 @@ public function __construct($data = null) $this->addTopic(new FHIRCodeableConcept($data[self::FIELD_TOPIC])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -972,20 +1056,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2871,140 +2962,247 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExposureBackground())) { $a[self::FIELD_EXPOSURE_BACKGROUND] = $v; } if ([] !== ($vs = $this->getExposureVariant())) { - $a[self::FIELD_EXPOSURE_VARIANT] = $vs; + $a[self::FIELD_EXPOSURE_VARIANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXPOSURE_VARIANT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getOutcome())) { - $a[self::FIELD_OUTCOME] = $vs; + $a[self::FIELD_OUTCOME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getShortTitle())) { $a[self::FIELD_SHORT_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SHORT_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidenceVariable.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidenceVariable.php index 5f196bd474..5341f9ee9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidenceVariable.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIREvidenceVariable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -137,7 +137,7 @@ class FHIREvidenceVariable extends FHIRDomainResource implements PHPFHIRContaine const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -524,20 +524,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -594,52 +601,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -721,36 +749,50 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -771,20 +813,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -823,68 +872,96 @@ public function __construct($data = null) $this->addReviewer(new FHIRContactDetail($data[self::FIELD_REVIEWER])); } } - if (isset($data[self::FIELD_SHORT_TITLE])) { - $ext = (isset($data[self::FIELD_SHORT_TITLE_EXT]) && is_array($data[self::FIELD_SHORT_TITLE_EXT])) - ? $data[self::FIELD_SHORT_TITLE_EXT] - : null; - if ($data[self::FIELD_SHORT_TITLE] instanceof FHIRString) { - $this->setShortTitle($data[self::FIELD_SHORT_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SHORT_TITLE])) { - $this->setShortTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SHORT_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SHORT_TITLE])) { - $this->setShortTitle(new FHIRString(array_merge($ext, $data[self::FIELD_SHORT_TITLE]))); - } + if (isset($data[self::FIELD_SHORT_TITLE]) || isset($data[self::FIELD_SHORT_TITLE_EXT])) { + if (isset($data[self::FIELD_SHORT_TITLE])) { + $value = $data[self::FIELD_SHORT_TITLE]; } else { - $this->setShortTitle(new FHIRString($data[self::FIELD_SHORT_TITLE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_SHORT_TITLE_EXT]) && is_array($data[self::FIELD_SHORT_TITLE_EXT])) { + $ext = $data[self::FIELD_SHORT_TITLE_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setShortTitle($value); + } else if (is_array($value)) { + $this->setShortTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setShortTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setShortTitle(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -905,36 +982,50 @@ public function __construct($data = null) $this->addTopic(new FHIRCodeableConcept($data[self::FIELD_TOPIC])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIREvidenceVariableType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIREvidenceVariableType([FHIREvidenceVariableType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIREvidenceVariableType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIREvidenceVariableType($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREvidenceVariableType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIREvidenceVariableType(array_merge($ext, $value))); + } else { + $this->setType(new FHIREvidenceVariableType([FHIREvidenceVariableType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIREvidenceVariableType($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -955,20 +1046,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2782,141 +2880,244 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getCharacteristic())) { - $a[self::FIELD_CHARACTERISTIC] = $vs; + $a[self::FIELD_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTIC][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getShortTitle())) { $a[self::FIELD_SHORT_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SHORT_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREvidenceVariableType::FIELD_VALUE, $enc)))) { + unset($enc[FHIREvidenceVariableType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExampleScenario.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExampleScenario.php index d85427bc37..b45faae4e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExampleScenario.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExampleScenario.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRExampleScenario extends FHIRDomainResource implements PHPFHIRContained const FIELD_WORKFLOW_EXT = '_workflow'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Example of workflow instance. @@ -406,52 +406,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -508,20 +529,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROCESS])) { @@ -542,68 +570,96 @@ public function __construct($data = null) $this->addProcess(new FHIRExampleScenarioProcess($data[self::FIELD_PROCESS])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -624,49 +680,65 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } - if (isset($data[self::FIELD_WORKFLOW])) { - $ext = (isset($data[self::FIELD_WORKFLOW_EXT]) && is_array($data[self::FIELD_WORKFLOW_EXT])) - ? $data[self::FIELD_WORKFLOW_EXT] - : null; - if (is_array($data[self::FIELD_WORKFLOW])) { - foreach($data[self::FIELD_WORKFLOW] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addWorkflow($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addWorkflow(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addWorkflow(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_WORKFLOW]) || isset($data[self::FIELD_WORKFLOW_EXT])) { + if (isset($data[self::FIELD_WORKFLOW])) { + $value = $data[self::FIELD_WORKFLOW]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WORKFLOW_EXT]) && is_array($data[self::FIELD_WORKFLOW_EXT])) { + $ext = $data[self::FIELD_WORKFLOW_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addWorkflow($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addWorkflow($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addWorkflow(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addWorkflow(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addWorkflow(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addWorkflow(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addWorkflow(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addWorkflow(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_WORKFLOW] instanceof FHIRCanonical) { - $this->addWorkflow($data[self::FIELD_WORKFLOW]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_WORKFLOW])) { - $this->addWorkflow(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_WORKFLOW]] + $ext)); - } else { - $this->addWorkflow(new FHIRCanonical($data[self::FIELD_WORKFLOW])); } } } @@ -1868,103 +1940,174 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getActor())) { - $a[self::FIELD_ACTOR] = $vs; + $a[self::FIELD_ACTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTOR][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getProcess())) { - $a[self::FIELD_PROCESS] = $vs; + $a[self::FIELD_PROCESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESS][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getWorkflow())) { $a[self::FIELD_WORKFLOW] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_WORKFLOW][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_WORKFLOW_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_WORKFLOW_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_WORKFLOW_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php index f310c5042b..7f4ca17155 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -158,7 +158,7 @@ class FHIRExplanationOfBenefit extends FHIRDomainResource implements PHPFHIRCont const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -798,20 +798,27 @@ public function __construct($data = null) $this->setClaimResponse(new FHIRReference($data[self::FIELD_CLAIM_RESPONSE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DIAGNOSIS])) { @@ -832,20 +839,27 @@ public function __construct($data = null) $this->addDiagnosis(new FHIRExplanationOfBenefitDiagnosis($data[self::FIELD_DIAGNOSIS])); } } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); - } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENTERER])) { @@ -958,20 +972,27 @@ public function __construct($data = null) $this->setOriginalPrescription(new FHIRReference($data[self::FIELD_ORIGINAL_PRESCRIPTION])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRClaimProcessingCodes) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRClaimProcessingCodes([FHIRClaimProcessingCodes::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRClaimProcessingCodes(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; } else { - $this->setOutcome(new FHIRClaimProcessingCodes($data[self::FIELD_OUTCOME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRClaimProcessingCodes) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRClaimProcessingCodes(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRClaimProcessingCodes([FHIRClaimProcessingCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRClaimProcessingCodes($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -995,33 +1016,42 @@ public function __construct($data = null) $this->setPayment(new FHIRExplanationOfBenefitPayment($data[self::FIELD_PAYMENT])); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - foreach($data[self::FIELD_PRE_AUTH_REF] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPreAuthRef($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPreAuthRef(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPreAuthRef($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPreAuthRef($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPreAuthRef(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPreAuthRef(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPreAuthRef(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->addPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else { - $this->addPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); } } if (isset($data[self::FIELD_PRE_AUTH_REF_PERIOD])) { @@ -1042,20 +1072,27 @@ public function __construct($data = null) $this->addPreAuthRefPeriod(new FHIRPeriod($data[self::FIELD_PRE_AUTH_REF_PERIOD])); } } - if (isset($data[self::FIELD_PRECEDENCE])) { - $ext = (isset($data[self::FIELD_PRECEDENCE_EXT]) && is_array($data[self::FIELD_PRECEDENCE_EXT])) - ? $data[self::FIELD_PRECEDENCE_EXT] - : null; - if ($data[self::FIELD_PRECEDENCE] instanceof FHIRPositiveInt) { - $this->setPrecedence($data[self::FIELD_PRECEDENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRECEDENCE])) { - $this->setPrecedence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PRECEDENCE]] + $ext)); - } else if (is_array($data[self::FIELD_PRECEDENCE])) { - $this->setPrecedence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_PRECEDENCE]))); - } + if (isset($data[self::FIELD_PRECEDENCE]) || isset($data[self::FIELD_PRECEDENCE_EXT])) { + if (isset($data[self::FIELD_PRECEDENCE])) { + $value = $data[self::FIELD_PRECEDENCE]; } else { - $this->setPrecedence(new FHIRPositiveInt($data[self::FIELD_PRECEDENCE])); + $value = null; + } + if (isset($data[self::FIELD_PRECEDENCE_EXT]) && is_array($data[self::FIELD_PRECEDENCE_EXT])) { + $ext = $data[self::FIELD_PRECEDENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setPrecedence($value); + } else if (is_array($value)) { + $this->setPrecedence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setPrecedence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrecedence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PRESCRIPTION])) { @@ -1140,20 +1177,27 @@ public function __construct($data = null) $this->addRelated(new FHIRExplanationOfBenefitRelated($data[self::FIELD_RELATED])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRExplanationOfBenefitStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRExplanationOfBenefitStatus([FHIRExplanationOfBenefitStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRExplanationOfBenefitStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRExplanationOfBenefitStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExplanationOfBenefitStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRExplanationOfBenefitStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRExplanationOfBenefitStatus([FHIRExplanationOfBenefitStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRExplanationOfBenefitStatus($ext)); } } if (isset($data[self::FIELD_SUB_TYPE])) { @@ -1206,20 +1250,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse(array_merge($ext, $data[self::FIELD_USE]))); - } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRUse($ext)); } } } @@ -3500,13 +3551,31 @@ public function jsonSerialize() $a[self::FIELD_ACCIDENT] = $v; } if ([] !== ($vs = $this->getAddItem())) { - $a[self::FIELD_ADD_ITEM] = $vs; + $a[self::FIELD_ADD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if ([] !== ($vs = $this->getBenefitBalance())) { - $a[self::FIELD_BENEFIT_BALANCE] = $vs; + $a[self::FIELD_BENEFIT_BALANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BENEFIT_BALANCE][] = $v; + } } if (null !== ($v = $this->getBenefitPeriod())) { $a[self::FIELD_BENEFIT_PERIOD] = $v; @@ -3515,7 +3584,13 @@ public function jsonSerialize() $a[self::FIELD_BILLABLE_PERIOD] = $v; } if ([] !== ($vs = $this->getCareTeam())) { - $a[self::FIELD_CARE_TEAM] = $vs; + $a[self::FIELD_CARE_TEAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CARE_TEAM][] = $v; + } } if (null !== ($v = $this->getClaim())) { $a[self::FIELD_CLAIM] = $v; @@ -3525,18 +3600,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } @@ -3559,24 +3644,44 @@ public function jsonSerialize() $a[self::FIELD_FUNDS_RESERVE_REQUESTED] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getOriginalPrescription())) { $a[self::FIELD_ORIGINAL_PRESCRIPTION] = $v; } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRClaimProcessingCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRClaimProcessingCodes::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -3591,26 +3696,42 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PRE_AUTH_REF][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PRE_AUTH_REF_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PRE_AUTH_REF_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PRE_AUTH_REF_EXT] = $encs; + } } if ([] !== ($vs = $this->getPreAuthRefPeriod())) { - $a[self::FIELD_PRE_AUTH_REF_PERIOD] = $vs; + $a[self::FIELD_PRE_AUTH_REF_PERIOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRE_AUTH_REF_PERIOD][] = $v; + } } if (null !== ($v = $this->getPrecedence())) { $a[self::FIELD_PRECEDENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_PRECEDENCE_EXT] = $enc; } } @@ -3621,10 +3742,22 @@ public function jsonSerialize() $a[self::FIELD_PRIORITY] = $v; } if ([] !== ($vs = $this->getProcedure())) { - $a[self::FIELD_PROCEDURE] = $vs; + $a[self::FIELD_PROCEDURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCEDURE][] = $v; + } } if ([] !== ($vs = $this->getProcessNote())) { - $a[self::FIELD_PROCESS_NOTE] = $vs; + $a[self::FIELD_PROCESS_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESS_NOTE][] = $v; + } } if (null !== ($v = $this->getProvider())) { $a[self::FIELD_PROVIDER] = $v; @@ -3633,12 +3766,20 @@ public function jsonSerialize() $a[self::FIELD_REFERRAL] = $v; } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExplanationOfBenefitStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExplanationOfBenefitStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3646,21 +3787,38 @@ public function jsonSerialize() $a[self::FIELD_SUB_TYPE] = $v; } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } } if ([] !== ($vs = $this->getTotal())) { - $a[self::FIELD_TOTAL] = $vs; + $a[self::FIELD_TOTAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOTAL][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php index 1ee396814a..20e035b0ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRFamilyMemberHistory extends FHIRDomainResource implements PHPFHIRConta const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A duration of time during which an organism (or a process) has existed. @@ -497,36 +497,50 @@ public function __construct($data = null) $this->setAgeRange(new FHIRRange($data[self::FIELD_AGE_RANGE])); } } - if (isset($data[self::FIELD_AGE_STRING])) { - $ext = (isset($data[self::FIELD_AGE_STRING_EXT]) && is_array($data[self::FIELD_AGE_STRING_EXT])) - ? $data[self::FIELD_AGE_STRING_EXT] - : null; - if ($data[self::FIELD_AGE_STRING] instanceof FHIRString) { - $this->setAgeString($data[self::FIELD_AGE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AGE_STRING])) { - $this->setAgeString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AGE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AGE_STRING])) { - $this->setAgeString(new FHIRString(array_merge($ext, $data[self::FIELD_AGE_STRING]))); - } + if (isset($data[self::FIELD_AGE_STRING]) || isset($data[self::FIELD_AGE_STRING_EXT])) { + if (isset($data[self::FIELD_AGE_STRING])) { + $value = $data[self::FIELD_AGE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AGE_STRING_EXT]) && is_array($data[self::FIELD_AGE_STRING_EXT])) { + $ext = $data[self::FIELD_AGE_STRING_EXT]; } else { - $this->setAgeString(new FHIRString($data[self::FIELD_AGE_STRING])); - } - } - if (isset($data[self::FIELD_BORN_DATE])) { - $ext = (isset($data[self::FIELD_BORN_DATE_EXT]) && is_array($data[self::FIELD_BORN_DATE_EXT])) - ? $data[self::FIELD_BORN_DATE_EXT] - : null; - if ($data[self::FIELD_BORN_DATE] instanceof FHIRDate) { - $this->setBornDate($data[self::FIELD_BORN_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BORN_DATE])) { - $this->setBornDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BORN_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BORN_DATE])) { - $this->setBornDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BORN_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAgeString($value); + } else if (is_array($value)) { + $this->setAgeString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAgeString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAgeString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_BORN_DATE]) || isset($data[self::FIELD_BORN_DATE_EXT])) { + if (isset($data[self::FIELD_BORN_DATE])) { + $value = $data[self::FIELD_BORN_DATE]; } else { - $this->setBornDate(new FHIRDate($data[self::FIELD_BORN_DATE])); + $value = null; + } + if (isset($data[self::FIELD_BORN_DATE_EXT]) && is_array($data[self::FIELD_BORN_DATE_EXT])) { + $ext = $data[self::FIELD_BORN_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBornDate($value); + } else if (is_array($value)) { + $this->setBornDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBornDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBornDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_BORN_PERIOD])) { @@ -536,20 +550,27 @@ public function __construct($data = null) $this->setBornPeriod(new FHIRPeriod($data[self::FIELD_BORN_PERIOD])); } } - if (isset($data[self::FIELD_BORN_STRING])) { - $ext = (isset($data[self::FIELD_BORN_STRING_EXT]) && is_array($data[self::FIELD_BORN_STRING_EXT])) - ? $data[self::FIELD_BORN_STRING_EXT] - : null; - if ($data[self::FIELD_BORN_STRING] instanceof FHIRString) { - $this->setBornString($data[self::FIELD_BORN_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BORN_STRING])) { - $this->setBornString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BORN_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_BORN_STRING])) { - $this->setBornString(new FHIRString(array_merge($ext, $data[self::FIELD_BORN_STRING]))); - } + if (isset($data[self::FIELD_BORN_STRING]) || isset($data[self::FIELD_BORN_STRING_EXT])) { + if (isset($data[self::FIELD_BORN_STRING])) { + $value = $data[self::FIELD_BORN_STRING]; } else { - $this->setBornString(new FHIRString($data[self::FIELD_BORN_STRING])); + $value = null; + } + if (isset($data[self::FIELD_BORN_STRING_EXT]) && is_array($data[self::FIELD_BORN_STRING_EXT])) { + $ext = $data[self::FIELD_BORN_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBornString($value); + } else if (is_array($value)) { + $this->setBornString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBornString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBornString(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONDITION])) { @@ -577,20 +598,27 @@ public function __construct($data = null) $this->setDataAbsentReason(new FHIRCodeableConcept($data[self::FIELD_DATA_ABSENT_REASON])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DECEASED_AGE])) { @@ -600,36 +628,50 @@ public function __construct($data = null) $this->setDeceasedAge(new FHIRAge($data[self::FIELD_DECEASED_AGE])); } } - if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) - ? $data[self::FIELD_DECEASED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DECEASED_BOOLEAN] instanceof FHIRBoolean) { - $this->setDeceasedBoolean($data[self::FIELD_DECEASED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DECEASED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DECEASED_BOOLEAN]))); - } + if (isset($data[self::FIELD_DECEASED_BOOLEAN]) || isset($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { + $value = $data[self::FIELD_DECEASED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DECEASED_BOOLEAN_EXT]; } else { - $this->setDeceasedBoolean(new FHIRBoolean($data[self::FIELD_DECEASED_BOOLEAN])); - } - } - if (isset($data[self::FIELD_DECEASED_DATE])) { - $ext = (isset($data[self::FIELD_DECEASED_DATE_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_EXT])) - ? $data[self::FIELD_DECEASED_DATE_EXT] - : null; - if ($data[self::FIELD_DECEASED_DATE] instanceof FHIRDate) { - $this->setDeceasedDate($data[self::FIELD_DECEASED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_DATE])) { - $this->setDeceasedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DECEASED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_DATE])) { - $this->setDeceasedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DECEASED_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeceasedBoolean($value); + } else if (is_array($value)) { + $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DECEASED_DATE]) || isset($data[self::FIELD_DECEASED_DATE_EXT])) { + if (isset($data[self::FIELD_DECEASED_DATE])) { + $value = $data[self::FIELD_DECEASED_DATE]; } else { - $this->setDeceasedDate(new FHIRDate($data[self::FIELD_DECEASED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_DATE_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_EXT])) { + $ext = $data[self::FIELD_DECEASED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDeceasedDate($value); + } else if (is_array($value)) { + $this->setDeceasedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDeceasedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeceasedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_DECEASED_RANGE])) { @@ -639,36 +681,50 @@ public function __construct($data = null) $this->setDeceasedRange(new FHIRRange($data[self::FIELD_DECEASED_RANGE])); } } - if (isset($data[self::FIELD_DECEASED_STRING])) { - $ext = (isset($data[self::FIELD_DECEASED_STRING_EXT]) && is_array($data[self::FIELD_DECEASED_STRING_EXT])) - ? $data[self::FIELD_DECEASED_STRING_EXT] - : null; - if ($data[self::FIELD_DECEASED_STRING] instanceof FHIRString) { - $this->setDeceasedString($data[self::FIELD_DECEASED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_STRING])) { - $this->setDeceasedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DECEASED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_STRING])) { - $this->setDeceasedString(new FHIRString(array_merge($ext, $data[self::FIELD_DECEASED_STRING]))); - } + if (isset($data[self::FIELD_DECEASED_STRING]) || isset($data[self::FIELD_DECEASED_STRING_EXT])) { + if (isset($data[self::FIELD_DECEASED_STRING])) { + $value = $data[self::FIELD_DECEASED_STRING]; } else { - $this->setDeceasedString(new FHIRString($data[self::FIELD_DECEASED_STRING])); - } - } - if (isset($data[self::FIELD_ESTIMATED_AGE])) { - $ext = (isset($data[self::FIELD_ESTIMATED_AGE_EXT]) && is_array($data[self::FIELD_ESTIMATED_AGE_EXT])) - ? $data[self::FIELD_ESTIMATED_AGE_EXT] - : null; - if ($data[self::FIELD_ESTIMATED_AGE] instanceof FHIRBoolean) { - $this->setEstimatedAge($data[self::FIELD_ESTIMATED_AGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ESTIMATED_AGE])) { - $this->setEstimatedAge(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ESTIMATED_AGE]] + $ext)); - } else if (is_array($data[self::FIELD_ESTIMATED_AGE])) { - $this->setEstimatedAge(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ESTIMATED_AGE]))); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_STRING_EXT]) && is_array($data[self::FIELD_DECEASED_STRING_EXT])) { + $ext = $data[self::FIELD_DECEASED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeceasedString($value); + } else if (is_array($value)) { + $this->setDeceasedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeceasedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ESTIMATED_AGE]) || isset($data[self::FIELD_ESTIMATED_AGE_EXT])) { + if (isset($data[self::FIELD_ESTIMATED_AGE])) { + $value = $data[self::FIELD_ESTIMATED_AGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ESTIMATED_AGE_EXT]) && is_array($data[self::FIELD_ESTIMATED_AGE_EXT])) { + $ext = $data[self::FIELD_ESTIMATED_AGE_EXT]; } else { - $this->setEstimatedAge(new FHIRBoolean($data[self::FIELD_ESTIMATED_AGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setEstimatedAge($value); + } else if (is_array($value)) { + $this->setEstimatedAge(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setEstimatedAge(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEstimatedAge(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -689,78 +745,103 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -838,20 +919,27 @@ public function __construct($data = null) $this->setSex(new FHIRCodeableConcept($data[self::FIELD_SEX])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFamilyHistoryStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFamilyHistoryStatus([FHIRFamilyHistoryStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFamilyHistoryStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFamilyHistoryStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFamilyHistoryStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFamilyHistoryStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFamilyHistoryStatus([FHIRFamilyHistoryStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFamilyHistoryStatus($ext)); } } } @@ -2383,15 +2471,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAgeString())) { $a[self::FIELD_AGE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AGE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getBornDate())) { $a[self::FIELD_BORN_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BORN_DATE_EXT] = $enc; } } @@ -2400,21 +2492,31 @@ public function jsonSerialize() } if (null !== ($v = $this->getBornString())) { $a[self::FIELD_BORN_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BORN_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if (null !== ($v = $this->getDataAbsentReason())) { $a[self::FIELD_DATA_ABSENT_REASON] = $v; } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -2423,15 +2525,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDeceasedBoolean())) { $a[self::FIELD_DECEASED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DECEASED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDeceasedDate())) { $a[self::FIELD_DECEASED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DECEASED_DATE_EXT] = $enc; } } @@ -2440,69 +2546,115 @@ public function jsonSerialize() } if (null !== ($v = $this->getDeceasedString())) { $a[self::FIELD_DECEASED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DECEASED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getEstimatedAge())) { $a[self::FIELD_ESTIMATED_AGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ESTIMATED_AGE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; @@ -2512,11 +2664,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFamilyHistoryStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFamilyHistoryStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFlag.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFlag.php index d1b16ce8fa..f523db4ecc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFlag.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRFlag.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRFlag extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -279,20 +279,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFlagStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFlagStatus([FHIRFlagStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFlagStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFlagStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFlagStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFlagStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFlagStatus([FHIRFlagStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFlagStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -786,7 +793,13 @@ public function jsonSerialize() $a[self::FIELD_AUTHOR] = $v; } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -795,21 +808,32 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFlagStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFlagStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGoal.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGoal.php index 9a8c0343f5..17c77c3b2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRGoal extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -418,20 +418,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_LIFECYCLE_STATUS])) { - $ext = (isset($data[self::FIELD_LIFECYCLE_STATUS_EXT]) && is_array($data[self::FIELD_LIFECYCLE_STATUS_EXT])) - ? $data[self::FIELD_LIFECYCLE_STATUS_EXT] - : null; - if ($data[self::FIELD_LIFECYCLE_STATUS] instanceof FHIRGoalLifecycleStatus) { - $this->setLifecycleStatus($data[self::FIELD_LIFECYCLE_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LIFECYCLE_STATUS])) { - $this->setLifecycleStatus(new FHIRGoalLifecycleStatus([FHIRGoalLifecycleStatus::FIELD_VALUE => $data[self::FIELD_LIFECYCLE_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_LIFECYCLE_STATUS])) { - $this->setLifecycleStatus(new FHIRGoalLifecycleStatus(array_merge($ext, $data[self::FIELD_LIFECYCLE_STATUS]))); - } + if (isset($data[self::FIELD_LIFECYCLE_STATUS]) || isset($data[self::FIELD_LIFECYCLE_STATUS_EXT])) { + if (isset($data[self::FIELD_LIFECYCLE_STATUS])) { + $value = $data[self::FIELD_LIFECYCLE_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIFECYCLE_STATUS_EXT]) && is_array($data[self::FIELD_LIFECYCLE_STATUS_EXT])) { + $ext = $data[self::FIELD_LIFECYCLE_STATUS_EXT]; } else { - $this->setLifecycleStatus(new FHIRGoalLifecycleStatus($data[self::FIELD_LIFECYCLE_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGoalLifecycleStatus) { + $this->setLifecycleStatus($value); + } else if (is_array($value)) { + $this->setLifecycleStatus(new FHIRGoalLifecycleStatus(array_merge($ext, $value))); + } else { + $this->setLifecycleStatus(new FHIRGoalLifecycleStatus([FHIRGoalLifecycleStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLifecycleStatus(new FHIRGoalLifecycleStatus($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -502,52 +509,73 @@ public function __construct($data = null) $this->setStartCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_START_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_START_DATE])) { - $ext = (isset($data[self::FIELD_START_DATE_EXT]) && is_array($data[self::FIELD_START_DATE_EXT])) - ? $data[self::FIELD_START_DATE_EXT] - : null; - if ($data[self::FIELD_START_DATE] instanceof FHIRDate) { - $this->setStartDate($data[self::FIELD_START_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START_DATE])) { - $this->setStartDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_START_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_START_DATE])) { - $this->setStartDate(new FHIRDate(array_merge($ext, $data[self::FIELD_START_DATE]))); - } + if (isset($data[self::FIELD_START_DATE]) || isset($data[self::FIELD_START_DATE_EXT])) { + if (isset($data[self::FIELD_START_DATE])) { + $value = $data[self::FIELD_START_DATE]; } else { - $this->setStartDate(new FHIRDate($data[self::FIELD_START_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS_DATE])) { - $ext = (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) - ? $data[self::FIELD_STATUS_DATE_EXT] - : null; - if ($data[self::FIELD_STATUS_DATE] instanceof FHIRDate) { - $this->setStatusDate($data[self::FIELD_STATUS_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_STATUS_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDate(array_merge($ext, $data[self::FIELD_STATUS_DATE]))); - } + if (isset($data[self::FIELD_START_DATE_EXT]) && is_array($data[self::FIELD_START_DATE_EXT])) { + $ext = $data[self::FIELD_START_DATE_EXT]; } else { - $this->setStatusDate(new FHIRDate($data[self::FIELD_STATUS_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setStartDate($value); + } else if (is_array($value)) { + $this->setStartDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setStartDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStartDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_STATUS_REASON])) { - $ext = (isset($data[self::FIELD_STATUS_REASON_EXT]) && is_array($data[self::FIELD_STATUS_REASON_EXT])) - ? $data[self::FIELD_STATUS_REASON_EXT] - : null; - if ($data[self::FIELD_STATUS_REASON] instanceof FHIRString) { - $this->setStatusReason($data[self::FIELD_STATUS_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_REASON])) { - $this->setStatusReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATUS_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_REASON])) { - $this->setStatusReason(new FHIRString(array_merge($ext, $data[self::FIELD_STATUS_REASON]))); + if (isset($data[self::FIELD_STATUS_DATE]) || isset($data[self::FIELD_STATUS_DATE_EXT])) { + if (isset($data[self::FIELD_STATUS_DATE])) { + $value = $data[self::FIELD_STATUS_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) { + $ext = $data[self::FIELD_STATUS_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setStatusDate($value); + } else if (is_array($value)) { + $this->setStatusDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setStatusDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatusDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_STATUS_REASON]) || isset($data[self::FIELD_STATUS_REASON_EXT])) { + if (isset($data[self::FIELD_STATUS_REASON])) { + $value = $data[self::FIELD_STATUS_REASON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_REASON_EXT]) && is_array($data[self::FIELD_STATUS_REASON_EXT])) { + $ext = $data[self::FIELD_STATUS_REASON_EXT]; } else { - $this->setStatusReason(new FHIRString($data[self::FIELD_STATUS_REASON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setStatusReason($value); + } else if (is_array($value)) { + $this->setStatusReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setStatusReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatusReason(new FHIRString($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1622,10 +1650,22 @@ public function jsonSerialize() $a[self::FIELD_ACHIEVEMENT_STATUS] = $v; } if ([] !== ($vs = $this->getAddresses())) { - $a[self::FIELD_ADDRESSES] = $vs; + $a[self::FIELD_ADDRESSES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESSES][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v; @@ -1634,23 +1674,49 @@ public function jsonSerialize() $a[self::FIELD_EXPRESSED_BY] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLifecycleStatus())) { $a[self::FIELD_LIFECYCLE_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGoalLifecycleStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGoalLifecycleStatus::FIELD_VALUE]); $a[self::FIELD_LIFECYCLE_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getOutcomeCode())) { - $a[self::FIELD_OUTCOME_CODE] = $vs; + $a[self::FIELD_OUTCOME_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME_CODE][] = $v; + } } if ([] !== ($vs = $this->getOutcomeReference())) { - $a[self::FIELD_OUTCOME_REFERENCE] = $vs; + $a[self::FIELD_OUTCOME_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME_REFERENCE][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v; @@ -1660,22 +1726,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getStartDate())) { $a[self::FIELD_START_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_START_DATE_EXT] = $enc; } } if (null !== ($v = $this->getStatusDate())) { $a[self::FIELD_STATUS_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_STATUS_DATE_EXT] = $enc; } } if (null !== ($v = $this->getStatusReason())) { $a[self::FIELD_STATUS_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATUS_REASON_EXT] = $enc; } } @@ -1683,7 +1755,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php index e53a380172..5377cc9c02 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRGraphDefinition extends FHIRDomainResource implements PHPFHIRContained const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -367,52 +367,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -451,116 +472,165 @@ public function __construct($data = null) $this->addLink(new FHIRGraphDefinitionLink($data[self::FIELD_LINK])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRCanonical) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_PROFILE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; } else { - $this->setProfile(new FHIRCanonical($data[self::FIELD_PROFILE])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProfile(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRCode) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRCode(array_merge($ext, $data[self::FIELD_START]))); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; + } else { + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; } else { - $this->setStart(new FHIRCode($data[self::FIELD_START])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStart(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -581,20 +651,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1622,94 +1699,143 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGroup.php index 2f7784011e..5f6cbe4779 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRGroup extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -246,36 +246,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $value = null; } - } - if (isset($data[self::FIELD_ACTUAL])) { - $ext = (isset($data[self::FIELD_ACTUAL_EXT]) && is_array($data[self::FIELD_ACTUAL_EXT])) - ? $data[self::FIELD_ACTUAL_EXT] - : null; - if ($data[self::FIELD_ACTUAL] instanceof FHIRBoolean) { - $this->setActual($data[self::FIELD_ACTUAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTUAL])) { - $this->setActual(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTUAL]] + $ext)); - } else if (is_array($data[self::FIELD_ACTUAL])) { - $this->setActual(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTUAL]))); + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_ACTUAL]) || isset($data[self::FIELD_ACTUAL_EXT])) { + if (isset($data[self::FIELD_ACTUAL])) { + $value = $data[self::FIELD_ACTUAL]; } else { - $this->setActual(new FHIRBoolean($data[self::FIELD_ACTUAL])); + $value = null; + } + if (isset($data[self::FIELD_ACTUAL_EXT]) && is_array($data[self::FIELD_ACTUAL_EXT])) { + $ext = $data[self::FIELD_ACTUAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActual($value); + } else if (is_array($value)) { + $this->setActual(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActual(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActual(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CHARACTERISTIC])) { @@ -346,52 +360,73 @@ public function __construct($data = null) $this->addMember(new FHIRGroupMember($data[self::FIELD_MEMBER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_QUANTITY])) { - $ext = (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) - ? $data[self::FIELD_QUANTITY_EXT] - : null; - if ($data[self::FIELD_QUANTITY] instanceof FHIRUnsignedInt) { - $this->setQuantity($data[self::FIELD_QUANTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_QUANTITY]] + $ext)); - } else if (is_array($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_QUANTITY]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setQuantity(new FHIRUnsignedInt($data[self::FIELD_QUANTITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRGroupType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGroupType([FHIRGroupType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGroupType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_QUANTITY]) || isset($data[self::FIELD_QUANTITY_EXT])) { + if (isset($data[self::FIELD_QUANTITY])) { + $value = $data[self::FIELD_QUANTITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) { + $ext = $data[self::FIELD_QUANTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setQuantity($value); + } else if (is_array($value)) { + $this->setQuantity(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setQuantity(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setQuantity(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRGroupType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGroupType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRGroupType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRGroupType([FHIRGroupType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRGroupType($ext)); } } } @@ -1034,54 +1069,85 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getActual())) { $a[self::FIELD_ACTUAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTUAL_EXT] = $enc; } } if ([] !== ($vs = $this->getCharacteristic())) { - $a[self::FIELD_CHARACTERISTIC] = $vs; + $a[self::FIELD_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTIC][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManagingEntity())) { $a[self::FIELD_MANAGING_ENTITY] = $v; } if ([] !== ($vs = $this->getMember())) { - $a[self::FIELD_MEMBER] = $vs; + $a[self::FIELD_MEMBER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEMBER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_QUANTITY_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGroupType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGroupType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php index f0ad814632..092c9bf3f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRGuidanceResponse extends FHIRDomainResource implements PHPFHIRContaine const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes a required data item for evaluation in terms of the type of data, and @@ -418,20 +418,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MODULE_CANONICAL])) { - $ext = (isset($data[self::FIELD_MODULE_CANONICAL_EXT]) && is_array($data[self::FIELD_MODULE_CANONICAL_EXT])) - ? $data[self::FIELD_MODULE_CANONICAL_EXT] - : null; - if ($data[self::FIELD_MODULE_CANONICAL] instanceof FHIRCanonical) { - $this->setModuleCanonical($data[self::FIELD_MODULE_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODULE_CANONICAL])) { - $this->setModuleCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_MODULE_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_MODULE_CANONICAL])) { - $this->setModuleCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_MODULE_CANONICAL]))); - } + if (isset($data[self::FIELD_MODULE_CANONICAL]) || isset($data[self::FIELD_MODULE_CANONICAL_EXT])) { + if (isset($data[self::FIELD_MODULE_CANONICAL])) { + $value = $data[self::FIELD_MODULE_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODULE_CANONICAL_EXT]) && is_array($data[self::FIELD_MODULE_CANONICAL_EXT])) { + $ext = $data[self::FIELD_MODULE_CANONICAL_EXT]; } else { - $this->setModuleCanonical(new FHIRCanonical($data[self::FIELD_MODULE_CANONICAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setModuleCanonical($value); + } else if (is_array($value)) { + $this->setModuleCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setModuleCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setModuleCanonical(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_MODULE_CODEABLE_CONCEPT])) { @@ -441,20 +448,27 @@ public function __construct($data = null) $this->setModuleCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_MODULE_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_MODULE_URI])) { - $ext = (isset($data[self::FIELD_MODULE_URI_EXT]) && is_array($data[self::FIELD_MODULE_URI_EXT])) - ? $data[self::FIELD_MODULE_URI_EXT] - : null; - if ($data[self::FIELD_MODULE_URI] instanceof FHIRUri) { - $this->setModuleUri($data[self::FIELD_MODULE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODULE_URI])) { - $this->setModuleUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_MODULE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_MODULE_URI])) { - $this->setModuleUri(new FHIRUri(array_merge($ext, $data[self::FIELD_MODULE_URI]))); - } + if (isset($data[self::FIELD_MODULE_URI]) || isset($data[self::FIELD_MODULE_URI_EXT])) { + if (isset($data[self::FIELD_MODULE_URI])) { + $value = $data[self::FIELD_MODULE_URI]; } else { - $this->setModuleUri(new FHIRUri($data[self::FIELD_MODULE_URI])); + $value = null; + } + if (isset($data[self::FIELD_MODULE_URI_EXT]) && is_array($data[self::FIELD_MODULE_URI_EXT])) { + $ext = $data[self::FIELD_MODULE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setModuleUri($value); + } else if (is_array($value)) { + $this->setModuleUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setModuleUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setModuleUri(new FHIRUri($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -475,20 +489,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OUTPUT_PARAMETERS])) { @@ -555,20 +576,27 @@ public function __construct($data = null) $this->setResult(new FHIRReference($data[self::FIELD_RESULT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRGuidanceResponseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRGuidanceResponseStatus([FHIRGuidanceResponseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRGuidanceResponseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRGuidanceResponseStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGuidanceResponseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRGuidanceResponseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRGuidanceResponseStatus([FHIRGuidanceResponseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRGuidanceResponseStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1619,21 +1647,41 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDataRequirement())) { - $a[self::FIELD_DATA_REQUIREMENT] = $vs; + $a[self::FIELD_DATA_REQUIREMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA_REQUIREMENT][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvaluationMessage())) { - $a[self::FIELD_EVALUATION_MESSAGE] = $vs; + $a[self::FIELD_EVALUATION_MESSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVALUATION_MESSAGE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getModuleCanonical())) { $a[self::FIELD_MODULE_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_MODULE_CANONICAL_EXT] = $enc; } } @@ -1642,18 +1690,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getModuleUri())) { $a[self::FIELD_MODULE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_MODULE_URI_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -1664,10 +1722,22 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRequestIdentifier())) { $a[self::FIELD_REQUEST_IDENTIFIER] = $v; @@ -1677,14 +1747,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGuidanceResponseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGuidanceResponseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php index 2c87e0634e..85ae04eca7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRHealthcareService extends FHIRDomainResource implements PHPFHIRContain const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -435,52 +435,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); - } - } - if (isset($data[self::FIELD_APPOINTMENT_REQUIRED])) { - $ext = (isset($data[self::FIELD_APPOINTMENT_REQUIRED_EXT]) && is_array($data[self::FIELD_APPOINTMENT_REQUIRED_EXT])) - ? $data[self::FIELD_APPOINTMENT_REQUIRED_EXT] - : null; - if ($data[self::FIELD_APPOINTMENT_REQUIRED] instanceof FHIRBoolean) { - $this->setAppointmentRequired($data[self::FIELD_APPOINTMENT_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPOINTMENT_REQUIRED])) { - $this->setAppointmentRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_APPOINTMENT_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_APPOINTMENT_REQUIRED])) { - $this->setAppointmentRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_APPOINTMENT_REQUIRED]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_APPOINTMENT_REQUIRED]) || isset($data[self::FIELD_APPOINTMENT_REQUIRED_EXT])) { + if (isset($data[self::FIELD_APPOINTMENT_REQUIRED])) { + $value = $data[self::FIELD_APPOINTMENT_REQUIRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPOINTMENT_REQUIRED_EXT]) && is_array($data[self::FIELD_APPOINTMENT_REQUIRED_EXT])) { + $ext = $data[self::FIELD_APPOINTMENT_REQUIRED_EXT]; } else { - $this->setAppointmentRequired(new FHIRBoolean($data[self::FIELD_APPOINTMENT_REQUIRED])); - } - } - if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY_EXCEPTIONS] instanceof FHIRString) { - $this->setAvailabilityExceptions($data[self::FIELD_AVAILABILITY_EXCEPTIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AVAILABILITY_EXCEPTIONS]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $data[self::FIELD_AVAILABILITY_EXCEPTIONS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAppointmentRequired($value); + } else if (is_array($value)) { + $this->setAppointmentRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAppointmentRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAppointmentRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS]) || isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $value = $data[self::FIELD_AVAILABILITY_EXCEPTIONS]; } else { - $this->setAvailabilityExceptions(new FHIRString($data[self::FIELD_AVAILABILITY_EXCEPTIONS])); + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAvailabilityExceptions($value); + } else if (is_array($value)) { + $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailabilityExceptions(new FHIRString($ext)); } } if (isset($data[self::FIELD_AVAILABLE_TIME])) { @@ -537,20 +558,27 @@ public function __construct($data = null) $this->addCharacteristic(new FHIRCodeableConcept($data[self::FIELD_CHARACTERISTIC])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_COMMUNICATION])) { @@ -625,20 +653,27 @@ public function __construct($data = null) $this->addEndpoint(new FHIRReference($data[self::FIELD_ENDPOINT])); } } - if (isset($data[self::FIELD_EXTRA_DETAILS])) { - $ext = (isset($data[self::FIELD_EXTRA_DETAILS_EXT]) && is_array($data[self::FIELD_EXTRA_DETAILS_EXT])) - ? $data[self::FIELD_EXTRA_DETAILS_EXT] - : null; - if ($data[self::FIELD_EXTRA_DETAILS] instanceof FHIRMarkdown) { - $this->setExtraDetails($data[self::FIELD_EXTRA_DETAILS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXTRA_DETAILS])) { - $this->setExtraDetails(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_EXTRA_DETAILS]] + $ext)); - } else if (is_array($data[self::FIELD_EXTRA_DETAILS])) { - $this->setExtraDetails(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_EXTRA_DETAILS]))); - } + if (isset($data[self::FIELD_EXTRA_DETAILS]) || isset($data[self::FIELD_EXTRA_DETAILS_EXT])) { + if (isset($data[self::FIELD_EXTRA_DETAILS])) { + $value = $data[self::FIELD_EXTRA_DETAILS]; } else { - $this->setExtraDetails(new FHIRMarkdown($data[self::FIELD_EXTRA_DETAILS])); + $value = null; + } + if (isset($data[self::FIELD_EXTRA_DETAILS_EXT]) && is_array($data[self::FIELD_EXTRA_DETAILS_EXT])) { + $ext = $data[self::FIELD_EXTRA_DETAILS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setExtraDetails($value); + } else if (is_array($value)) { + $this->setExtraDetails(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setExtraDetails(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExtraDetails(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -677,20 +712,27 @@ public function __construct($data = null) $this->addLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOT_AVAILABLE])) { @@ -2491,99 +2533,210 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getAppointmentRequired())) { $a[self::FIELD_APPOINTMENT_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_APPOINTMENT_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getAvailabilityExceptions())) { $a[self::FIELD_AVAILABILITY_EXCEPTIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] = $enc; } } if ([] !== ($vs = $this->getAvailableTime())) { - $a[self::FIELD_AVAILABLE_TIME] = $vs; + $a[self::FIELD_AVAILABLE_TIME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AVAILABLE_TIME][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getCharacteristic())) { - $a[self::FIELD_CHARACTERISTIC] = $vs; + $a[self::FIELD_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTIC][] = $v; + } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if ([] !== ($vs = $this->getCoverageArea())) { - $a[self::FIELD_COVERAGE_AREA] = $vs; + $a[self::FIELD_COVERAGE_AREA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE_AREA][] = $v; + } } if ([] !== ($vs = $this->getEligibility())) { - $a[self::FIELD_ELIGIBILITY] = $vs; + $a[self::FIELD_ELIGIBILITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELIGIBILITY][] = $v; + } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if (null !== ($v = $this->getExtraDetails())) { $a[self::FIELD_EXTRA_DETAILS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_EXTRA_DETAILS_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNotAvailable())) { - $a[self::FIELD_NOT_AVAILABLE] = $vs; + $a[self::FIELD_NOT_AVAILABLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOT_AVAILABLE][] = $v; + } } if (null !== ($v = $this->getPhoto())) { $a[self::FIELD_PHOTO] = $v; } if ([] !== ($vs = $this->getProgram())) { - $a[self::FIELD_PROGRAM] = $vs; + $a[self::FIELD_PROGRAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM][] = $v; + } } if (null !== ($v = $this->getProvidedBy())) { $a[self::FIELD_PROVIDED_BY] = $v; } if ([] !== ($vs = $this->getReferralMethod())) { - $a[self::FIELD_REFERRAL_METHOD] = $vs; + $a[self::FIELD_REFERRAL_METHOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERRAL_METHOD][] = $v; + } } if ([] !== ($vs = $this->getServiceProvisionCode())) { - $a[self::FIELD_SERVICE_PROVISION_CODE] = $vs; + $a[self::FIELD_SERVICE_PROVISION_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_PROVISION_CODE][] = $v; + } } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php index 041e0bd253..00ba1ecbdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRImagingStudy extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -406,20 +406,27 @@ public function __construct($data = null) $this->addBasedOn(new FHIRReference($data[self::FIELD_BASED_ON])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -526,36 +533,50 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) - ? $data[self::FIELD_NUMBER_OF_INSTANCES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_INSTANCES] instanceof FHIRUnsignedInt) { - $this->setNumberOfInstances($data[self::FIELD_NUMBER_OF_INSTANCES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_INSTANCES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_INSTANCES]))); - } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES]) || isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { + $value = $data[self::FIELD_NUMBER_OF_INSTANCES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_INSTANCES_EXT]; } else { - $this->setNumberOfInstances(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_INSTANCES])); - } - } - if (isset($data[self::FIELD_NUMBER_OF_SERIES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_SERIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SERIES_EXT])) - ? $data[self::FIELD_NUMBER_OF_SERIES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_SERIES] instanceof FHIRUnsignedInt) { - $this->setNumberOfSeries($data[self::FIELD_NUMBER_OF_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_SERIES])) { - $this->setNumberOfSeries(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_SERIES])) { - $this->setNumberOfSeries(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_SERIES]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfInstances($value); + } else if (is_array($value)) { + $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumberOfInstances(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_SERIES]) || isset($data[self::FIELD_NUMBER_OF_SERIES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_SERIES])) { + $value = $data[self::FIELD_NUMBER_OF_SERIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_SERIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SERIES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_SERIES_EXT]; } else { - $this->setNumberOfSeries(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_SERIES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfSeries($value); + } else if (is_array($value)) { + $this->setNumberOfSeries(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfSeries(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfSeries(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_PROCEDURE_CODE])) { @@ -644,36 +665,50 @@ public function __construct($data = null) $this->addSeries(new FHIRImagingStudySeries($data[self::FIELD_SERIES])); } } - if (isset($data[self::FIELD_STARTED])) { - $ext = (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) - ? $data[self::FIELD_STARTED_EXT] - : null; - if ($data[self::FIELD_STARTED] instanceof FHIRDateTime) { - $this->setStarted($data[self::FIELD_STARTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STARTED]] + $ext)); - } else if (is_array($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STARTED]))); - } + if (isset($data[self::FIELD_STARTED]) || isset($data[self::FIELD_STARTED_EXT])) { + if (isset($data[self::FIELD_STARTED])) { + $value = $data[self::FIELD_STARTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) { + $ext = $data[self::FIELD_STARTED_EXT]; } else { - $this->setStarted(new FHIRDateTime($data[self::FIELD_STARTED])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRImagingStudyStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRImagingStudyStatus([FHIRImagingStudyStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRImagingStudyStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStarted($value); + } else if (is_array($value)) { + $this->setStarted(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStarted(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRImagingStudyStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRImagingStudyStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRImagingStudyStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRImagingStudyStatus([FHIRImagingStudyStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRImagingStudyStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1965,12 +2000,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1978,72 +2021,137 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInterpreter())) { - $a[self::FIELD_INTERPRETER] = $vs; + $a[self::FIELD_INTERPRETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERPRETER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if ([] !== ($vs = $this->getModality())) { - $a[self::FIELD_MODALITY] = $vs; + $a[self::FIELD_MODALITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODALITY][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getNumberOfInstances())) { $a[self::FIELD_NUMBER_OF_INSTANCES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_INSTANCES_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfSeries())) { $a[self::FIELD_NUMBER_OF_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_SERIES_EXT] = $enc; } } if ([] !== ($vs = $this->getProcedureCode())) { - $a[self::FIELD_PROCEDURE_CODE] = $vs; + $a[self::FIELD_PROCEDURE_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCEDURE_CODE][] = $v; + } } if (null !== ($v = $this->getProcedureReference())) { $a[self::FIELD_PROCEDURE_REFERENCE] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getReferrer())) { $a[self::FIELD_REFERRER] = $v; } if ([] !== ($vs = $this->getSeries())) { - $a[self::FIELD_SERIES] = $vs; + $a[self::FIELD_SERIES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERIES][] = $v; + } } if (null !== ($v = $this->getStarted())) { $a[self::FIELD_STARTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STARTED_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRImagingStudyStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRImagingStudyStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunization.php index a248a0d6c1..3a827a06ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRImmunization extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_VACCINE_CODE = 'vaccineCode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -536,20 +536,27 @@ public function __construct($data = null) $this->setEncounter(new FHIRReference($data[self::FIELD_ENCOUNTER])); } } - if (isset($data[self::FIELD_EXPIRATION_DATE])) { - $ext = (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) - ? $data[self::FIELD_EXPIRATION_DATE_EXT] - : null; - if ($data[self::FIELD_EXPIRATION_DATE] instanceof FHIRDate) { - $this->setExpirationDate($data[self::FIELD_EXPIRATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_EXPIRATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDate(array_merge($ext, $data[self::FIELD_EXPIRATION_DATE]))); - } + if (isset($data[self::FIELD_EXPIRATION_DATE]) || isset($data[self::FIELD_EXPIRATION_DATE_EXT])) { + if (isset($data[self::FIELD_EXPIRATION_DATE])) { + $value = $data[self::FIELD_EXPIRATION_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) { + $ext = $data[self::FIELD_EXPIRATION_DATE_EXT]; } else { - $this->setExpirationDate(new FHIRDate($data[self::FIELD_EXPIRATION_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setExpirationDate($value); + } else if (is_array($value)) { + $this->setExpirationDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setExpirationDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpirationDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_FUNDING_SOURCE])) { @@ -577,20 +584,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_IS_SUBPOTENT])) { - $ext = (isset($data[self::FIELD_IS_SUBPOTENT_EXT]) && is_array($data[self::FIELD_IS_SUBPOTENT_EXT])) - ? $data[self::FIELD_IS_SUBPOTENT_EXT] - : null; - if ($data[self::FIELD_IS_SUBPOTENT] instanceof FHIRBoolean) { - $this->setIsSubpotent($data[self::FIELD_IS_SUBPOTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_SUBPOTENT])) { - $this->setIsSubpotent(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_SUBPOTENT]] + $ext)); - } else if (is_array($data[self::FIELD_IS_SUBPOTENT])) { - $this->setIsSubpotent(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_SUBPOTENT]))); - } + if (isset($data[self::FIELD_IS_SUBPOTENT]) || isset($data[self::FIELD_IS_SUBPOTENT_EXT])) { + if (isset($data[self::FIELD_IS_SUBPOTENT])) { + $value = $data[self::FIELD_IS_SUBPOTENT]; } else { - $this->setIsSubpotent(new FHIRBoolean($data[self::FIELD_IS_SUBPOTENT])); + $value = null; + } + if (isset($data[self::FIELD_IS_SUBPOTENT_EXT]) && is_array($data[self::FIELD_IS_SUBPOTENT_EXT])) { + $ext = $data[self::FIELD_IS_SUBPOTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsSubpotent($value); + } else if (is_array($value)) { + $this->setIsSubpotent(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsSubpotent(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsSubpotent(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_LOCATION])) { @@ -600,20 +614,27 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); - } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); } } if (isset($data[self::FIELD_MANUFACTURER])) { @@ -641,36 +662,50 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_OCCURRENCE_STRING])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_STRING_EXT]) && is_array($data[self::FIELD_OCCURRENCE_STRING_EXT])) - ? $data[self::FIELD_OCCURRENCE_STRING_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_STRING] instanceof FHIRString) { - $this->setOccurrenceString($data[self::FIELD_OCCURRENCE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_STRING])) { - $this->setOccurrenceString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_STRING])) { - $this->setOccurrenceString(new FHIRString(array_merge($ext, $data[self::FIELD_OCCURRENCE_STRING]))); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_OCCURRENCE_STRING]) || isset($data[self::FIELD_OCCURRENCE_STRING_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_STRING])) { + $value = $data[self::FIELD_OCCURRENCE_STRING]; } else { - $this->setOccurrenceString(new FHIRString($data[self::FIELD_OCCURRENCE_STRING])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_STRING_EXT]) && is_array($data[self::FIELD_OCCURRENCE_STRING_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOccurrenceString($value); + } else if (is_array($value)) { + $this->setOccurrenceString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOccurrenceString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceString(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -698,20 +733,27 @@ public function __construct($data = null) $this->addPerformer(new FHIRImmunizationPerformer($data[self::FIELD_PERFORMER])); } } - if (isset($data[self::FIELD_PRIMARY_SOURCE])) { - $ext = (isset($data[self::FIELD_PRIMARY_SOURCE_EXT]) && is_array($data[self::FIELD_PRIMARY_SOURCE_EXT])) - ? $data[self::FIELD_PRIMARY_SOURCE_EXT] - : null; - if ($data[self::FIELD_PRIMARY_SOURCE] instanceof FHIRBoolean) { - $this->setPrimarySource($data[self::FIELD_PRIMARY_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIMARY_SOURCE])) { - $this->setPrimarySource(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PRIMARY_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_PRIMARY_SOURCE])) { - $this->setPrimarySource(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PRIMARY_SOURCE]))); - } + if (isset($data[self::FIELD_PRIMARY_SOURCE]) || isset($data[self::FIELD_PRIMARY_SOURCE_EXT])) { + if (isset($data[self::FIELD_PRIMARY_SOURCE])) { + $value = $data[self::FIELD_PRIMARY_SOURCE]; } else { - $this->setPrimarySource(new FHIRBoolean($data[self::FIELD_PRIMARY_SOURCE])); + $value = null; + } + if (isset($data[self::FIELD_PRIMARY_SOURCE_EXT]) && is_array($data[self::FIELD_PRIMARY_SOURCE_EXT])) { + $ext = $data[self::FIELD_PRIMARY_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPrimarySource($value); + } else if (is_array($value)) { + $this->setPrimarySource(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPrimarySource(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrimarySource(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PROGRAM_ELIGIBILITY])) { @@ -804,20 +846,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_RECORDED])) { - $ext = (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) - ? $data[self::FIELD_RECORDED_EXT] - : null; - if ($data[self::FIELD_RECORDED] instanceof FHIRDateTime) { - $this->setRecorded($data[self::FIELD_RECORDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED]))); - } + if (isset($data[self::FIELD_RECORDED]) || isset($data[self::FIELD_RECORDED_EXT])) { + if (isset($data[self::FIELD_RECORDED])) { + $value = $data[self::FIELD_RECORDED]; } else { - $this->setRecorded(new FHIRDateTime($data[self::FIELD_RECORDED])); + $value = null; + } + if (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) { + $ext = $data[self::FIELD_RECORDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecorded($value); + } else if (is_array($value)) { + $this->setRecorded(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecorded(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecorded(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_REPORT_ORIGIN])) { @@ -841,20 +890,27 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRImmunizationStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRImmunizationStatusCodes([FHIRImmunizationStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRImmunizationStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRImmunizationStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRImmunizationStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRImmunizationStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRImmunizationStatusCodes([FHIRImmunizationStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRImmunizationStatusCodes($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -2545,15 +2601,23 @@ public function jsonSerialize() $a[self::FIELD_DOSE_QUANTITY] = $v; } if ([] !== ($vs = $this->getEducation())) { - $a[self::FIELD_EDUCATION] = $vs; + $a[self::FIELD_EDUCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDUCATION][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if (null !== ($v = $this->getExpirationDate())) { $a[self::FIELD_EXPIRATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_EXPIRATION_DATE_EXT] = $enc; } } @@ -2561,12 +2625,20 @@ public function jsonSerialize() $a[self::FIELD_FUNDING_SOURCE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIsSubpotent())) { $a[self::FIELD_IS_SUBPOTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_SUBPOTENT_EXT] = $enc; } } @@ -2575,8 +2647,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } @@ -2584,19 +2658,29 @@ public function jsonSerialize() $a[self::FIELD_MANUFACTURER] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getOccurrenceString())) { $a[self::FIELD_OCCURRENCE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_STRING_EXT] = $enc; } } @@ -2604,34 +2688,74 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getPrimarySource())) { $a[self::FIELD_PRIMARY_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PRIMARY_SOURCE_EXT] = $enc; } } if ([] !== ($vs = $this->getProgramEligibility())) { - $a[self::FIELD_PROGRAM_ELIGIBILITY] = $vs; + $a[self::FIELD_PROGRAM_ELIGIBILITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_ELIGIBILITY][] = $v; + } } if ([] !== ($vs = $this->getProtocolApplied())) { - $a[self::FIELD_PROTOCOL_APPLIED] = $vs; + $a[self::FIELD_PROTOCOL_APPLIED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROTOCOL_APPLIED][] = $v; + } } if ([] !== ($vs = $this->getReaction())) { - $a[self::FIELD_REACTION] = $vs; + $a[self::FIELD_REACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REACTION][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRecorded())) { $a[self::FIELD_RECORDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_EXT] = $enc; } } @@ -2646,8 +2770,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRImmunizationStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRImmunizationStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2655,11 +2781,20 @@ public function jsonSerialize() $a[self::FIELD_STATUS_REASON] = $v; } if ([] !== ($vs = $this->getSubpotentReason())) { - $a[self::FIELD_SUBPOTENT_REASON] = $vs; + $a[self::FIELD_SUBPOTENT_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBPOTENT_REASON][] = $v; + } } if (null !== ($v = $this->getVaccineCode())) { $a[self::FIELD_VACCINE_CODE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluation.php index d3778a4508..e68fb45a33 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRImmunizationEvaluation extends FHIRDomainResource implements PHPFHIRCo const FIELD_TARGET_DISEASE = 'targetDisease'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -320,68 +320,96 @@ public function __construct($data = null) $this->setAuthority(new FHIRReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; } - } - if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT])) - ? $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setDoseNumberPositiveInt($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { - $this->setDoseNumberPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { - $this->setDoseNumberPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]))); + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDoseNumberPositiveInt(new FHIRPositiveInt($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_DOSE_NUMBER_STRING])) { - $ext = (isset($data[self::FIELD_DOSE_NUMBER_STRING_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_STRING_EXT])) - ? $data[self::FIELD_DOSE_NUMBER_STRING_EXT] - : null; - if ($data[self::FIELD_DOSE_NUMBER_STRING] instanceof FHIRString) { - $this->setDoseNumberString($data[self::FIELD_DOSE_NUMBER_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_NUMBER_STRING])) { - $this->setDoseNumberString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOSE_NUMBER_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_NUMBER_STRING])) { - $this->setDoseNumberString(new FHIRString(array_merge($ext, $data[self::FIELD_DOSE_NUMBER_STRING]))); + if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]) || isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT])) { + $value = $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDoseNumberPositiveInt($value); + } else if (is_array($value)) { + $this->setDoseNumberPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDoseNumberPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDoseNumberPositiveInt(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_DOSE_NUMBER_STRING]) || isset($data[self::FIELD_DOSE_NUMBER_STRING_EXT])) { + if (isset($data[self::FIELD_DOSE_NUMBER_STRING])) { + $value = $data[self::FIELD_DOSE_NUMBER_STRING]; } else { - $this->setDoseNumberString(new FHIRString($data[self::FIELD_DOSE_NUMBER_STRING])); + $value = null; + } + if (isset($data[self::FIELD_DOSE_NUMBER_STRING_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_STRING_EXT])) { + $ext = $data[self::FIELD_DOSE_NUMBER_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDoseNumberString($value); + } else if (is_array($value)) { + $this->setDoseNumberString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDoseNumberString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoseNumberString(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOSE_STATUS])) { @@ -441,68 +469,96 @@ public function __construct($data = null) $this->setPatient(new FHIRReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_SERIES])) { - $ext = (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) - ? $data[self::FIELD_SERIES_EXT] - : null; - if ($data[self::FIELD_SERIES] instanceof FHIRString) { - $this->setSeries($data[self::FIELD_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES]))); - } + if (isset($data[self::FIELD_SERIES]) || isset($data[self::FIELD_SERIES_EXT])) { + if (isset($data[self::FIELD_SERIES])) { + $value = $data[self::FIELD_SERIES]; } else { - $this->setSeries(new FHIRString($data[self::FIELD_SERIES])); + $value = null; } - } - if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT])) - ? $data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_SERIES_DOSES_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setSeriesDosesPositiveInt($data[self::FIELD_SERIES_DOSES_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { - $this->setSeriesDosesPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SERIES_DOSES_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { - $this->setSeriesDosesPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SERIES_DOSES_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) { + $ext = $data[self::FIELD_SERIES_EXT]; } else { - $this->setSeriesDosesPositiveInt(new FHIRPositiveInt($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])); + $ext = []; } - } - if (isset($data[self::FIELD_SERIES_DOSES_STRING])) { - $ext = (isset($data[self::FIELD_SERIES_DOSES_STRING_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_STRING_EXT])) - ? $data[self::FIELD_SERIES_DOSES_STRING_EXT] - : null; - if ($data[self::FIELD_SERIES_DOSES_STRING] instanceof FHIRString) { - $this->setSeriesDosesString($data[self::FIELD_SERIES_DOSES_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES_DOSES_STRING])) { - $this->setSeriesDosesString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES_DOSES_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES_DOSES_STRING])) { - $this->setSeriesDosesString(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES_DOSES_STRING]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeries($value); + } else if (is_array($value)) { + $this->setSeries(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeries(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT]) || isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT])) { + $value = $data[self::FIELD_SERIES_DOSES_POSITIVE_INT]; } else { - $this->setSeriesDosesString(new FHIRString($data[self::FIELD_SERIES_DOSES_STRING])); + $value = null; + } + if (isset($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSeriesDosesPositiveInt($value); + } else if (is_array($value)) { + $this->setSeriesDosesPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSeriesDosesPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeriesDosesPositiveInt(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRImmunizationEvaluationStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRImmunizationEvaluationStatusCodes([FHIRImmunizationEvaluationStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRImmunizationEvaluationStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SERIES_DOSES_STRING]) || isset($data[self::FIELD_SERIES_DOSES_STRING_EXT])) { + if (isset($data[self::FIELD_SERIES_DOSES_STRING])) { + $value = $data[self::FIELD_SERIES_DOSES_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERIES_DOSES_STRING_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_STRING_EXT])) { + $ext = $data[self::FIELD_SERIES_DOSES_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeriesDosesString($value); + } else if (is_array($value)) { + $this->setSeriesDosesString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeriesDosesString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeriesDosesString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRImmunizationEvaluationStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRImmunizationEvaluationStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRImmunizationEvaluationStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRImmunizationEvaluationStatusCodes([FHIRImmunizationEvaluationStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRImmunizationEvaluationStatusCodes($ext)); } } if (isset($data[self::FIELD_TARGET_DISEASE])) { @@ -1364,29 +1420,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoseNumberPositiveInt())) { $a[self::FIELD_DOSE_NUMBER_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DOSE_NUMBER_POSITIVE_INT_EXT] = $enc; } } if (null !== ($v = $this->getDoseNumberString())) { $a[self::FIELD_DOSE_NUMBER_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOSE_NUMBER_STRING_EXT] = $enc; } } @@ -1394,10 +1458,22 @@ public function jsonSerialize() $a[self::FIELD_DOSE_STATUS] = $v; } if ([] !== ($vs = $this->getDoseStatusReason())) { - $a[self::FIELD_DOSE_STATUS_REASON] = $vs; + $a[self::FIELD_DOSE_STATUS_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSE_STATUS_REASON][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getImmunizationEvent())) { $a[self::FIELD_IMMUNIZATION_EVENT] = $v; @@ -1407,35 +1483,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getSeries())) { $a[self::FIELD_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_EXT] = $enc; } } if (null !== ($v = $this->getSeriesDosesPositiveInt())) { $a[self::FIELD_SERIES_DOSES_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SERIES_DOSES_POSITIVE_INT_EXT] = $enc; } } if (null !== ($v = $this->getSeriesDosesString())) { $a[self::FIELD_SERIES_DOSES_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_DOSES_STRING_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRImmunizationEvaluationStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRImmunizationEvaluationStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTargetDisease())) { $a[self::FIELD_TARGET_DISEASE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php index 6b36f66a22..20944e938a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRImmunizationRecommendation extends FHIRDomainResource implements PHPFH const FIELD_RECOMMENDATION = 'recommendation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -184,20 +184,27 @@ public function __construct($data = null) $this->setAuthority(new FHIRReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -618,19 +625,36 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getRecommendation())) { - $a[self::FIELD_RECOMMENDATION] = $vs; + $a[self::FIELD_RECOMMENDATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECOMMENDATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php index f7013b8925..04cf8bc3c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRImplementationGuide extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -457,36 +457,50 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DEFINITION])) { @@ -514,65 +528,88 @@ public function __construct($data = null) $this->addDependsOn(new FHIRImplementationGuideDependsOn($data[self::FIELD_DEPENDS_ON])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if (is_array($data[self::FIELD_FHIR_VERSION])) { - foreach($data[self::FIELD_FHIR_VERSION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRFHIRVersion) { - $this->addFhirVersion($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFhirVersion(new FHIRFHIRVersion(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRVersion) { + $this->addFhirVersion($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRFHIRVersion) { + $this->addFhirVersion($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFhirVersion(new FHIRFHIRVersion(array_merge($v, $iext))); + } else { + $this->addFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFhirVersion(new FHIRFHIRVersion($v)); } + } elseif (is_array($value)) { + $this->addFhirVersion(new FHIRFHIRVersion(array_merge($ext, $value))); + } else { + $this->addFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFhirVersion(new FHIRFHIRVersion($iext)); } - } elseif ($data[self::FIELD_FHIR_VERSION] instanceof FHIRFHIRVersion) { - $this->addFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->addFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else { - $this->addFhirVersion(new FHIRFHIRVersion($data[self::FIELD_FHIR_VERSION])); } } if (isset($data[self::FIELD_GLOBAL])) { @@ -611,20 +648,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LICENSE])) { - $ext = (isset($data[self::FIELD_LICENSE_EXT]) && is_array($data[self::FIELD_LICENSE_EXT])) - ? $data[self::FIELD_LICENSE_EXT] - : null; - if ($data[self::FIELD_LICENSE] instanceof FHIRSPDXLicense) { - $this->setLicense($data[self::FIELD_LICENSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LICENSE])) { - $this->setLicense(new FHIRSPDXLicense([FHIRSPDXLicense::FIELD_VALUE => $data[self::FIELD_LICENSE]] + $ext)); - } else if (is_array($data[self::FIELD_LICENSE])) { - $this->setLicense(new FHIRSPDXLicense(array_merge($ext, $data[self::FIELD_LICENSE]))); - } + if (isset($data[self::FIELD_LICENSE]) || isset($data[self::FIELD_LICENSE_EXT])) { + if (isset($data[self::FIELD_LICENSE])) { + $value = $data[self::FIELD_LICENSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LICENSE_EXT]) && is_array($data[self::FIELD_LICENSE_EXT])) { + $ext = $data[self::FIELD_LICENSE_EXT]; } else { - $this->setLicense(new FHIRSPDXLicense($data[self::FIELD_LICENSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSPDXLicense) { + $this->setLicense($value); + } else if (is_array($value)) { + $this->setLicense(new FHIRSPDXLicense(array_merge($ext, $value))); + } else { + $this->setLicense(new FHIRSPDXLicense([FHIRSPDXLicense::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLicense(new FHIRSPDXLicense($ext)); } } if (isset($data[self::FIELD_MANIFEST])) { @@ -634,100 +678,142 @@ public function __construct($data = null) $this->setManifest(new FHIRImplementationGuideManifest($data[self::FIELD_MANIFEST])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PACKAGE_ID])) { - $ext = (isset($data[self::FIELD_PACKAGE_ID_EXT]) && is_array($data[self::FIELD_PACKAGE_ID_EXT])) - ? $data[self::FIELD_PACKAGE_ID_EXT] - : null; - if ($data[self::FIELD_PACKAGE_ID] instanceof FHIRId) { - $this->setPackageId($data[self::FIELD_PACKAGE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PACKAGE_ID])) { - $this->setPackageId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_PACKAGE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_PACKAGE_ID])) { - $this->setPackageId(new FHIRId(array_merge($ext, $data[self::FIELD_PACKAGE_ID]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PACKAGE_ID]) || isset($data[self::FIELD_PACKAGE_ID_EXT])) { + if (isset($data[self::FIELD_PACKAGE_ID])) { + $value = $data[self::FIELD_PACKAGE_ID]; } else { - $this->setPackageId(new FHIRId($data[self::FIELD_PACKAGE_ID])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_PACKAGE_ID_EXT]) && is_array($data[self::FIELD_PACKAGE_ID_EXT])) { + $ext = $data[self::FIELD_PACKAGE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setPackageId($value); + } else if (is_array($value)) { + $this->setPackageId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setPackageId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPackageId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -748,20 +834,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2079,19 +2172,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -2099,47 +2202,79 @@ public function jsonSerialize() $a[self::FIELD_DEFINITION] = $v; } if ([] !== ($vs = $this->getDependsOn())) { - $a[self::FIELD_DEPENDS_ON] = $vs; + $a[self::FIELD_DEPENDS_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEPENDS_ON][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FHIR_VERSION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FHIR_VERSION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRFHIRVersion::FIELD_VALUE]) || array_key_exists(FHIRFHIRVersion::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FHIR_VERSION_EXT][] = null; + unset($enc[FHIRFHIRVersion::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FHIR_VERSION_EXT] = $encs; + } } if ([] !== ($vs = $this->getGlobal())) { - $a[self::FIELD_GLOBAL] = $vs; + $a[self::FIELD_GLOBAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GLOBAL][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLicense())) { $a[self::FIELD_LICENSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSPDXLicense::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSPDXLicense::FIELD_VALUE]); $a[self::FIELD_LICENSE_EXT] = $enc; } } @@ -2148,56 +2283,79 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPackageId())) { $a[self::FIELD_PACKAGE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_PACKAGE_ID_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInsurancePlan.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInsurancePlan.php index 5dc0de1237..9801346743 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInsurancePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInsurancePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRInsurancePlan extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -292,33 +292,42 @@ public function __construct($data = null) $this->setAdministeredBy(new FHIRReference($data[self::FIELD_ADMINISTERED_BY])); } } - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if (is_array($data[self::FIELD_ALIAS])) { - foreach($data[self::FIELD_ALIAS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAlias($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAlias(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAlias($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAlias($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAlias(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAlias(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAlias(new FHIRString($iext)); } - } elseif ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->addAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ALIAS])) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else { - $this->addAlias(new FHIRString($data[self::FIELD_ALIAS])); } } if (isset($data[self::FIELD_CONTACT])) { @@ -411,20 +420,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NETWORK])) { @@ -477,20 +493,27 @@ public function __construct($data = null) $this->addPlan(new FHIRInsurancePlanPlan($data[self::FIELD_PLAN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1444,43 +1467,89 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getAlias())) { $a[self::FIELD_ALIAS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ALIAS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ALIAS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ALIAS_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ALIAS_EXT] = $encs; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getCoverage())) { - $a[self::FIELD_COVERAGE] = $vs; + $a[self::FIELD_COVERAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE][] = $v; + } } if ([] !== ($vs = $this->getCoverageArea())) { - $a[self::FIELD_COVERAGE_AREA] = $vs; + $a[self::FIELD_COVERAGE_AREA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE_AREA][] = $v; + } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNetwork())) { - $a[self::FIELD_NETWORK] = $vs; + $a[self::FIELD_NETWORK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NETWORK][] = $v; + } } if (null !== ($v = $this->getOwnedBy())) { $a[self::FIELD_OWNED_BY] = $v; @@ -1489,17 +1558,34 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPlan())) { - $a[self::FIELD_PLAN] = $vs; + $a[self::FIELD_PLAN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PLAN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInvoice.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInvoice.php index ac6a9d5408..8ce4177e33 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInvoice.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRInvoice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRInvoice extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -335,36 +335,50 @@ public function __construct($data = null) $this->setAccount(new FHIRReference($data[self::FIELD_ACCOUNT])); } } - if (isset($data[self::FIELD_CANCELLED_REASON])) { - $ext = (isset($data[self::FIELD_CANCELLED_REASON_EXT]) && is_array($data[self::FIELD_CANCELLED_REASON_EXT])) - ? $data[self::FIELD_CANCELLED_REASON_EXT] - : null; - if ($data[self::FIELD_CANCELLED_REASON] instanceof FHIRString) { - $this->setCancelledReason($data[self::FIELD_CANCELLED_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CANCELLED_REASON])) { - $this->setCancelledReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CANCELLED_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_CANCELLED_REASON])) { - $this->setCancelledReason(new FHIRString(array_merge($ext, $data[self::FIELD_CANCELLED_REASON]))); - } + if (isset($data[self::FIELD_CANCELLED_REASON]) || isset($data[self::FIELD_CANCELLED_REASON_EXT])) { + if (isset($data[self::FIELD_CANCELLED_REASON])) { + $value = $data[self::FIELD_CANCELLED_REASON]; } else { - $this->setCancelledReason(new FHIRString($data[self::FIELD_CANCELLED_REASON])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + if (isset($data[self::FIELD_CANCELLED_REASON_EXT]) && is_array($data[self::FIELD_CANCELLED_REASON_EXT])) { + $ext = $data[self::FIELD_CANCELLED_REASON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCancelledReason($value); + } else if (is_array($value)) { + $this->setCancelledReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCancelledReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCancelledReason(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -446,20 +460,27 @@ public function __construct($data = null) $this->addParticipant(new FHIRInvoiceParticipant($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_PAYMENT_TERMS])) { - $ext = (isset($data[self::FIELD_PAYMENT_TERMS_EXT]) && is_array($data[self::FIELD_PAYMENT_TERMS_EXT])) - ? $data[self::FIELD_PAYMENT_TERMS_EXT] - : null; - if ($data[self::FIELD_PAYMENT_TERMS] instanceof FHIRMarkdown) { - $this->setPaymentTerms($data[self::FIELD_PAYMENT_TERMS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAYMENT_TERMS])) { - $this->setPaymentTerms(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PAYMENT_TERMS]] + $ext)); - } else if (is_array($data[self::FIELD_PAYMENT_TERMS])) { - $this->setPaymentTerms(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PAYMENT_TERMS]))); - } + if (isset($data[self::FIELD_PAYMENT_TERMS]) || isset($data[self::FIELD_PAYMENT_TERMS_EXT])) { + if (isset($data[self::FIELD_PAYMENT_TERMS])) { + $value = $data[self::FIELD_PAYMENT_TERMS]; } else { - $this->setPaymentTerms(new FHIRMarkdown($data[self::FIELD_PAYMENT_TERMS])); + $value = null; + } + if (isset($data[self::FIELD_PAYMENT_TERMS_EXT]) && is_array($data[self::FIELD_PAYMENT_TERMS_EXT])) { + $ext = $data[self::FIELD_PAYMENT_TERMS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPaymentTerms($value); + } else if (is_array($value)) { + $this->setPaymentTerms(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPaymentTerms(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPaymentTerms(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RECIPIENT])) { @@ -469,20 +490,27 @@ public function __construct($data = null) $this->setRecipient(new FHIRReference($data[self::FIELD_RECIPIENT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRInvoiceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRInvoiceStatus([FHIRInvoiceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRInvoiceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRInvoiceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInvoiceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRInvoiceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRInvoiceStatus([FHIRInvoiceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRInvoiceStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1461,37 +1489,67 @@ public function jsonSerialize() } if (null !== ($v = $this->getCancelledReason())) { $a[self::FIELD_CANCELLED_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CANCELLED_REASON_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIssuer())) { $a[self::FIELD_ISSUER] = $v; } if ([] !== ($vs = $this->getLineItem())) { - $a[self::FIELD_LINE_ITEM] = $vs; + $a[self::FIELD_LINE_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINE_ITEM][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPaymentTerms())) { $a[self::FIELD_PAYMENT_TERMS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PAYMENT_TERMS_EXT] = $enc; } } @@ -1500,8 +1558,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInvoiceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInvoiceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1515,11 +1575,20 @@ public function jsonSerialize() $a[self::FIELD_TOTAL_NET] = $v; } if ([] !== ($vs = $this->getTotalPriceComponent())) { - $a[self::FIELD_TOTAL_PRICE_COMPONENT] = $vs; + $a[self::FIELD_TOTAL_PRICE_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOTAL_PRICE_COMPONENT][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLibrary.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLibrary.php index 1db943aa3d..4eae6a363e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLibrary.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLibrary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRLibrary extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -598,20 +598,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -668,20 +675,27 @@ public function __construct($data = null) $this->addContent(new FHIRAttachment($data[self::FIELD_CONTENT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DATA_REQUIREMENT])) { @@ -702,36 +716,50 @@ public function __construct($data = null) $this->addDataRequirement(new FHIRDataRequirement($data[self::FIELD_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -777,20 +805,27 @@ public function __construct($data = null) $this->addEndorser(new FHIRContactDetail($data[self::FIELD_ENDORSER])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -829,36 +864,50 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -879,36 +928,50 @@ public function __construct($data = null) $this->addParameter(new FHIRParameterDefinition($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -947,20 +1010,27 @@ public function __construct($data = null) $this->addReviewer(new FHIRContactDetail($data[self::FIELD_REVIEWER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { @@ -977,36 +1047,50 @@ public function __construct($data = null) $this->setSubjectReference(new FHIRReference($data[self::FIELD_SUBJECT_REFERENCE])); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1034,36 +1118,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1084,20 +1182,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -3186,107 +3291,193 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if ([] !== ($vs = $this->getDataRequirement())) { - $a[self::FIELD_DATA_REQUIREMENT] = $vs; + $a[self::FIELD_DATA_REQUIREMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA_REQUIREMENT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3298,48 +3489,73 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLinkage.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLinkage.php index 913933bee3..04ef86625f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLinkage.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLinkage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRLinkage extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -151,20 +151,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -458,8 +465,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } @@ -467,7 +476,16 @@ public function jsonSerialize() $a[self::FIELD_AUTHOR] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRList.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRList.php index af6d61709d..ed3467ea85 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRList.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRList extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -290,20 +290,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EMPTY_REASON])) { @@ -356,20 +363,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRListMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIRListMode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRListMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRListMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRListMode($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -404,20 +418,27 @@ public function __construct($data = null) $this->setSource(new FHIRReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRListStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRListStatus([FHIRListStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRListStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRListStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRListStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRListStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRListStatus([FHIRListStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRListStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -427,20 +448,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -1170,8 +1198,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1182,20 +1212,40 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRListMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRListMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOrderedBy())) { $a[self::FIELD_ORDERED_BY] = $v; @@ -1205,8 +1255,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRListStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRListStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1215,11 +1267,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLocation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLocation.php index a3819a909c..8ad974e975 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRLocation extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An address expressed using postal conventions (as opposed to GPS or other @@ -353,65 +353,88 @@ public function __construct($data = null) $this->setAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if (is_array($data[self::FIELD_ALIAS])) { - foreach($data[self::FIELD_ALIAS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAlias($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAlias(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAlias($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAlias($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAlias(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAlias(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->addAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ALIAS])) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else { - $this->addAlias(new FHIRString($data[self::FIELD_ALIAS])); - } - } - if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY_EXCEPTIONS] instanceof FHIRString) { - $this->setAvailabilityExceptions($data[self::FIELD_AVAILABILITY_EXCEPTIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AVAILABILITY_EXCEPTIONS]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $data[self::FIELD_AVAILABILITY_EXCEPTIONS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAlias(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS]) || isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $value = $data[self::FIELD_AVAILABILITY_EXCEPTIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]; } else { - $this->setAvailabilityExceptions(new FHIRString($data[self::FIELD_AVAILABILITY_EXCEPTIONS])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAvailabilityExceptions($value); + } else if (is_array($value)) { + $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAvailabilityExceptions(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENDPOINT])) { @@ -475,36 +498,50 @@ public function __construct($data = null) $this->setManagingOrganization(new FHIRReference($data[self::FIELD_MANAGING_ORGANIZATION])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRLocationMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRLocationMode([FHIRLocationMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRLocationMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIRLocationMode($data[self::FIELD_MODE])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLocationMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRLocationMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRLocationMode([FHIRLocationMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRLocationMode($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { @@ -535,20 +572,27 @@ public function __construct($data = null) $this->setPosition(new FHIRLocationPosition($data[self::FIELD_POSITION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRLocationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRLocationStatus([FHIRLocationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRLocationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRLocationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLocationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRLocationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRLocationStatus([FHIRLocationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRLocationStatus($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -1604,56 +1648,90 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getAlias())) { $a[self::FIELD_ALIAS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ALIAS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ALIAS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ALIAS_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ALIAS_EXT] = $encs; + } } if (null !== ($v = $this->getAvailabilityExceptions())) { $a[self::FIELD_AVAILABILITY_EXCEPTIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getHoursOfOperation())) { - $a[self::FIELD_HOURS_OF_OPERATION] = $vs; + $a[self::FIELD_HOURS_OF_OPERATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_HOURS_OF_OPERATION][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLocationMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLocationMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1671,16 +1749,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLocationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLocationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasure.php index ef3cb2436c..f0f1517db2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -162,7 +162,7 @@ class FHIRMeasure extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -754,20 +754,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -788,20 +795,27 @@ public function __construct($data = null) $this->addAuthor(new FHIRContactDetail($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { - $ext = (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT]) && is_array($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT])) - ? $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT] - : null; - if ($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] instanceof FHIRMarkdown) { - $this->setClinicalRecommendationStatement($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { - $this->setClinicalRecommendationStatement(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { - $this->setClinicalRecommendationStatement(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]))); - } + if (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]) || isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT])) { + if (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { + $value = $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]; } else { - $this->setClinicalRecommendationStatement(new FHIRMarkdown($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])); + $value = null; + } + if (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT]) && is_array($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT])) { + $ext = $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setClinicalRecommendationStatement($value); + } else if (is_array($value)) { + $this->setClinicalRecommendationStatement(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setClinicalRecommendationStatement(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setClinicalRecommendationStatement(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_COMPOSITE_SCORING])) { @@ -829,97 +843,134 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if (is_array($data[self::FIELD_DEFINITION])) { - foreach($data[self::FIELD_DEFINITION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRMarkdown) { - $this->addDefinition($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDefinition(new FHIRMarkdown(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->addDefinition($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRMarkdown) { + $this->addDefinition($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDefinition(new FHIRMarkdown(array_merge($v, $iext))); + } else { + $this->addDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDefinition(new FHIRMarkdown($v)); } + } elseif (is_array($value)) { + $this->addDefinition(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->addDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DEFINITION] instanceof FHIRMarkdown) { - $this->addDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DEFINITION])) { - $this->addDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else { - $this->addDefinition(new FHIRMarkdown($data[self::FIELD_DEFINITION])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDefinition(new FHIRMarkdown($iext)); } + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DISCLAIMER])) { - $ext = (isset($data[self::FIELD_DISCLAIMER_EXT]) && is_array($data[self::FIELD_DISCLAIMER_EXT])) - ? $data[self::FIELD_DISCLAIMER_EXT] - : null; - if ($data[self::FIELD_DISCLAIMER] instanceof FHIRMarkdown) { - $this->setDisclaimer($data[self::FIELD_DISCLAIMER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISCLAIMER])) { - $this->setDisclaimer(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DISCLAIMER]] + $ext)); - } else if (is_array($data[self::FIELD_DISCLAIMER])) { - $this->setDisclaimer(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DISCLAIMER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DISCLAIMER]) || isset($data[self::FIELD_DISCLAIMER_EXT])) { + if (isset($data[self::FIELD_DISCLAIMER])) { + $value = $data[self::FIELD_DISCLAIMER]; } else { - $this->setDisclaimer(new FHIRMarkdown($data[self::FIELD_DISCLAIMER])); + $value = null; + } + if (isset($data[self::FIELD_DISCLAIMER_EXT]) && is_array($data[self::FIELD_DISCLAIMER_EXT])) { + $ext = $data[self::FIELD_DISCLAIMER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDisclaimer($value); + } else if (is_array($value)) { + $this->setDisclaimer(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDisclaimer(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisclaimer(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -965,20 +1016,27 @@ public function __construct($data = null) $this->addEndorser(new FHIRContactDetail($data[self::FIELD_ENDORSER])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_GROUP])) { @@ -999,20 +1057,27 @@ public function __construct($data = null) $this->addGroup(new FHIRMeasureGroup($data[self::FIELD_GROUP])); } } - if (isset($data[self::FIELD_GUIDANCE])) { - $ext = (isset($data[self::FIELD_GUIDANCE_EXT]) && is_array($data[self::FIELD_GUIDANCE_EXT])) - ? $data[self::FIELD_GUIDANCE_EXT] - : null; - if ($data[self::FIELD_GUIDANCE] instanceof FHIRMarkdown) { - $this->setGuidance($data[self::FIELD_GUIDANCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GUIDANCE])) { - $this->setGuidance(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_GUIDANCE]] + $ext)); - } else if (is_array($data[self::FIELD_GUIDANCE])) { - $this->setGuidance(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_GUIDANCE]))); - } + if (isset($data[self::FIELD_GUIDANCE]) || isset($data[self::FIELD_GUIDANCE_EXT])) { + if (isset($data[self::FIELD_GUIDANCE])) { + $value = $data[self::FIELD_GUIDANCE]; } else { - $this->setGuidance(new FHIRMarkdown($data[self::FIELD_GUIDANCE])); + $value = null; + } + if (isset($data[self::FIELD_GUIDANCE_EXT]) && is_array($data[self::FIELD_GUIDANCE_EXT])) { + $ext = $data[self::FIELD_GUIDANCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setGuidance($value); + } else if (is_array($value)) { + $this->setGuidance(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setGuidance(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGuidance(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -1058,129 +1123,180 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_LIBRARY])) { - $ext = (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) - ? $data[self::FIELD_LIBRARY_EXT] - : null; - if (is_array($data[self::FIELD_LIBRARY])) { - foreach($data[self::FIELD_LIBRARY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addLibrary($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLibrary(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LIBRARY]) || isset($data[self::FIELD_LIBRARY_EXT])) { + if (isset($data[self::FIELD_LIBRARY])) { + $value = $data[self::FIELD_LIBRARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) { + $ext = $data[self::FIELD_LIBRARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addLibrary($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addLibrary($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLibrary(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLibrary(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addLibrary(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_LIBRARY] instanceof FHIRCanonical) { - $this->addLibrary($data[self::FIELD_LIBRARY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LIBRARY])) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_LIBRARY]] + $ext)); - } else { - $this->addLibrary(new FHIRCanonical($data[self::FIELD_LIBRARY])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLibrary(new FHIRCanonical($iext)); } + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_RATE_AGGREGATION])) { - $ext = (isset($data[self::FIELD_RATE_AGGREGATION_EXT]) && is_array($data[self::FIELD_RATE_AGGREGATION_EXT])) - ? $data[self::FIELD_RATE_AGGREGATION_EXT] - : null; - if ($data[self::FIELD_RATE_AGGREGATION] instanceof FHIRString) { - $this->setRateAggregation($data[self::FIELD_RATE_AGGREGATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RATE_AGGREGATION])) { - $this->setRateAggregation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RATE_AGGREGATION]] + $ext)); - } else if (is_array($data[self::FIELD_RATE_AGGREGATION])) { - $this->setRateAggregation(new FHIRString(array_merge($ext, $data[self::FIELD_RATE_AGGREGATION]))); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_RATE_AGGREGATION]) || isset($data[self::FIELD_RATE_AGGREGATION_EXT])) { + if (isset($data[self::FIELD_RATE_AGGREGATION])) { + $value = $data[self::FIELD_RATE_AGGREGATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RATE_AGGREGATION_EXT]) && is_array($data[self::FIELD_RATE_AGGREGATION_EXT])) { + $ext = $data[self::FIELD_RATE_AGGREGATION_EXT]; } else { - $this->setRateAggregation(new FHIRString($data[self::FIELD_RATE_AGGREGATION])); - } - } - if (isset($data[self::FIELD_RATIONALE])) { - $ext = (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) - ? $data[self::FIELD_RATIONALE_EXT] - : null; - if ($data[self::FIELD_RATIONALE] instanceof FHIRMarkdown) { - $this->setRationale($data[self::FIELD_RATIONALE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_RATIONALE]] + $ext)); - } else if (is_array($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_RATIONALE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRateAggregation($value); + } else if (is_array($value)) { + $this->setRateAggregation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRateAggregation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRateAggregation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RATIONALE]) || isset($data[self::FIELD_RATIONALE_EXT])) { + if (isset($data[self::FIELD_RATIONALE])) { + $value = $data[self::FIELD_RATIONALE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) { + $ext = $data[self::FIELD_RATIONALE_EXT]; } else { - $this->setRationale(new FHIRMarkdown($data[self::FIELD_RATIONALE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setRationale($value); + } else if (is_array($value)) { + $this->setRationale(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setRationale(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRationale(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -1219,20 +1335,27 @@ public function __construct($data = null) $this->addReviewer(new FHIRContactDetail($data[self::FIELD_REVIEWER])); } } - if (isset($data[self::FIELD_RISK_ADJUSTMENT])) { - $ext = (isset($data[self::FIELD_RISK_ADJUSTMENT_EXT]) && is_array($data[self::FIELD_RISK_ADJUSTMENT_EXT])) - ? $data[self::FIELD_RISK_ADJUSTMENT_EXT] - : null; - if ($data[self::FIELD_RISK_ADJUSTMENT] instanceof FHIRString) { - $this->setRiskAdjustment($data[self::FIELD_RISK_ADJUSTMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RISK_ADJUSTMENT])) { - $this->setRiskAdjustment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RISK_ADJUSTMENT]] + $ext)); - } else if (is_array($data[self::FIELD_RISK_ADJUSTMENT])) { - $this->setRiskAdjustment(new FHIRString(array_merge($ext, $data[self::FIELD_RISK_ADJUSTMENT]))); - } + if (isset($data[self::FIELD_RISK_ADJUSTMENT]) || isset($data[self::FIELD_RISK_ADJUSTMENT_EXT])) { + if (isset($data[self::FIELD_RISK_ADJUSTMENT])) { + $value = $data[self::FIELD_RISK_ADJUSTMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RISK_ADJUSTMENT_EXT]) && is_array($data[self::FIELD_RISK_ADJUSTMENT_EXT])) { + $ext = $data[self::FIELD_RISK_ADJUSTMENT_EXT]; } else { - $this->setRiskAdjustment(new FHIRString($data[self::FIELD_RISK_ADJUSTMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRiskAdjustment($value); + } else if (is_array($value)) { + $this->setRiskAdjustment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRiskAdjustment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRiskAdjustment(new FHIRString($ext)); } } if (isset($data[self::FIELD_SCORING])) { @@ -1242,20 +1365,27 @@ public function __construct($data = null) $this->setScoring(new FHIRCodeableConcept($data[self::FIELD_SCORING])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { @@ -1272,20 +1402,27 @@ public function __construct($data = null) $this->setSubjectReference(new FHIRReference($data[self::FIELD_SUBJECT_REFERENCE])); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $value = null; + } + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_SUPPLEMENTAL_DATA])) { @@ -1306,20 +1443,27 @@ public function __construct($data = null) $this->addSupplementalData(new FHIRMeasureSupplementalData($data[self::FIELD_SUPPLEMENTAL_DATA])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1358,36 +1502,50 @@ public function __construct($data = null) $this->addType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1408,20 +1566,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -4109,18 +4274,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getClinicalRecommendationStatement())) { $a[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT] = $enc; } } @@ -4128,153 +4303,243 @@ public function jsonSerialize() $a[self::FIELD_COMPOSITE_SCORING] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DEFINITION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DEFINITION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRMarkdown::FIELD_VALUE]) || array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DEFINITION_EXT][] = null; + unset($enc[FHIRMarkdown::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DEFINITION_EXT] = $encs; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDisclaimer())) { $a[self::FIELD_DISCLAIMER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DISCLAIMER_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getGuidance())) { $a[self::FIELD_GUIDANCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_GUIDANCE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getImprovementNotation())) { $a[self::FIELD_IMPROVEMENT_NOTATION] = $v; } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getLibrary())) { $a[self::FIELD_LIBRARY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LIBRARY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LIBRARY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LIBRARY_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LIBRARY_EXT] = $encs; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getRateAggregation())) { $a[self::FIELD_RATE_AGGREGATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RATE_AGGREGATION_EXT] = $enc; } } if (null !== ($v = $this->getRationale())) { $a[self::FIELD_RATIONALE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_RATIONALE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getRiskAdjustment())) { $a[self::FIELD_RISK_ADJUSTMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RISK_ADJUSTMENT_EXT] = $enc; } } @@ -4283,8 +4548,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -4296,51 +4563,88 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getSupplementalData())) { - $a[self::FIELD_SUPPLEMENTAL_DATA] = $vs; + $a[self::FIELD_SUPPLEMENTAL_DATA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPLEMENTAL_DATA][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php index 6f8cb373b8..cd194c7c62 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRMeasureReport extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -263,20 +263,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EVALUATED_RESOURCE])) { @@ -340,20 +347,27 @@ public function __construct($data = null) $this->setImprovementNotation(new FHIRCodeableConcept($data[self::FIELD_IMPROVEMENT_NOTATION])); } } - if (isset($data[self::FIELD_MEASURE])) { - $ext = (isset($data[self::FIELD_MEASURE_EXT]) && is_array($data[self::FIELD_MEASURE_EXT])) - ? $data[self::FIELD_MEASURE_EXT] - : null; - if ($data[self::FIELD_MEASURE] instanceof FHIRCanonical) { - $this->setMeasure($data[self::FIELD_MEASURE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEASURE])) { - $this->setMeasure(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_MEASURE]] + $ext)); - } else if (is_array($data[self::FIELD_MEASURE])) { - $this->setMeasure(new FHIRCanonical(array_merge($ext, $data[self::FIELD_MEASURE]))); - } + if (isset($data[self::FIELD_MEASURE]) || isset($data[self::FIELD_MEASURE_EXT])) { + if (isset($data[self::FIELD_MEASURE])) { + $value = $data[self::FIELD_MEASURE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MEASURE_EXT]) && is_array($data[self::FIELD_MEASURE_EXT])) { + $ext = $data[self::FIELD_MEASURE_EXT]; } else { - $this->setMeasure(new FHIRCanonical($data[self::FIELD_MEASURE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setMeasure($value); + } else if (is_array($value)) { + $this->setMeasure(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setMeasure(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeasure(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -370,20 +384,27 @@ public function __construct($data = null) $this->setReporter(new FHIRReference($data[self::FIELD_REPORTER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMeasureReportStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMeasureReportStatus([FHIRMeasureReportStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMeasureReportStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRMeasureReportStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMeasureReportStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMeasureReportStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMeasureReportStatus([FHIRMeasureReportStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMeasureReportStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -393,20 +414,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRMeasureReportType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRMeasureReportType([FHIRMeasureReportType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRMeasureReportType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRMeasureReportType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMeasureReportType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRMeasureReportType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRMeasureReportType([FHIRMeasureReportType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRMeasureReportType($ext)); } } } @@ -1069,27 +1097,49 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getEvaluatedResource())) { - $a[self::FIELD_EVALUATED_RESOURCE] = $vs; + $a[self::FIELD_EVALUATED_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVALUATED_RESOURCE][] = $v; + } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getImprovementNotation())) { $a[self::FIELD_IMPROVEMENT_NOTATION] = $v; } if (null !== ($v = $this->getMeasure())) { $a[self::FIELD_MEASURE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_MEASURE_EXT] = $enc; } } @@ -1101,8 +1151,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMeasureReportStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMeasureReportStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1111,11 +1163,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMeasureReportType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMeasureReportType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedia.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedia.php index 498b92421e..16a89668c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRMedia extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_WIDTH_EXT = '_width'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -461,20 +461,27 @@ public function __construct($data = null) $this->setContent(new FHIRAttachment($data[self::FIELD_CONTENT])); } } - if (isset($data[self::FIELD_CREATED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_CREATED_DATE_TIME_EXT]) && is_array($data[self::FIELD_CREATED_DATE_TIME_EXT])) - ? $data[self::FIELD_CREATED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_CREATED_DATE_TIME] instanceof FHIRDateTime) { - $this->setCreatedDateTime($data[self::FIELD_CREATED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED_DATE_TIME])) { - $this->setCreatedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED_DATE_TIME])) { - $this->setCreatedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED_DATE_TIME]))); - } + if (isset($data[self::FIELD_CREATED_DATE_TIME]) || isset($data[self::FIELD_CREATED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_CREATED_DATE_TIME])) { + $value = $data[self::FIELD_CREATED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_DATE_TIME_EXT]) && is_array($data[self::FIELD_CREATED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_CREATED_DATE_TIME_EXT]; } else { - $this->setCreatedDateTime(new FHIRDateTime($data[self::FIELD_CREATED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreatedDateTime($value); + } else if (is_array($value)) { + $this->setCreatedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreatedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreatedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_CREATED_PERIOD])) { @@ -491,36 +498,50 @@ public function __construct($data = null) $this->setDevice(new FHIRReference($data[self::FIELD_DEVICE])); } } - if (isset($data[self::FIELD_DEVICE_NAME])) { - $ext = (isset($data[self::FIELD_DEVICE_NAME_EXT]) && is_array($data[self::FIELD_DEVICE_NAME_EXT])) - ? $data[self::FIELD_DEVICE_NAME_EXT] - : null; - if ($data[self::FIELD_DEVICE_NAME] instanceof FHIRString) { - $this->setDeviceName($data[self::FIELD_DEVICE_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEVICE_NAME])) { - $this->setDeviceName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEVICE_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_DEVICE_NAME])) { - $this->setDeviceName(new FHIRString(array_merge($ext, $data[self::FIELD_DEVICE_NAME]))); - } + if (isset($data[self::FIELD_DEVICE_NAME]) || isset($data[self::FIELD_DEVICE_NAME_EXT])) { + if (isset($data[self::FIELD_DEVICE_NAME])) { + $value = $data[self::FIELD_DEVICE_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEVICE_NAME_EXT]) && is_array($data[self::FIELD_DEVICE_NAME_EXT])) { + $ext = $data[self::FIELD_DEVICE_NAME_EXT]; } else { - $this->setDeviceName(new FHIRString($data[self::FIELD_DEVICE_NAME])); - } - } - if (isset($data[self::FIELD_DURATION])) { - $ext = (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) - ? $data[self::FIELD_DURATION_EXT] - : null; - if ($data[self::FIELD_DURATION] instanceof FHIRDecimal) { - $this->setDuration($data[self::FIELD_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DURATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeviceName($value); + } else if (is_array($value)) { + $this->setDeviceName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeviceName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeviceName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DURATION]) || isset($data[self::FIELD_DURATION_EXT])) { + if (isset($data[self::FIELD_DURATION])) { + $value = $data[self::FIELD_DURATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) { + $ext = $data[self::FIELD_DURATION_EXT]; } else { - $this->setDuration(new FHIRDecimal($data[self::FIELD_DURATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDuration($value); + } else if (is_array($value)) { + $this->setDuration(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDuration(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -530,36 +551,50 @@ public function __construct($data = null) $this->setEncounter(new FHIRReference($data[self::FIELD_ENCOUNTER])); } } - if (isset($data[self::FIELD_FRAMES])) { - $ext = (isset($data[self::FIELD_FRAMES_EXT]) && is_array($data[self::FIELD_FRAMES_EXT])) - ? $data[self::FIELD_FRAMES_EXT] - : null; - if ($data[self::FIELD_FRAMES] instanceof FHIRPositiveInt) { - $this->setFrames($data[self::FIELD_FRAMES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FRAMES])) { - $this->setFrames(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_FRAMES]] + $ext)); - } else if (is_array($data[self::FIELD_FRAMES])) { - $this->setFrames(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_FRAMES]))); - } + if (isset($data[self::FIELD_FRAMES]) || isset($data[self::FIELD_FRAMES_EXT])) { + if (isset($data[self::FIELD_FRAMES])) { + $value = $data[self::FIELD_FRAMES]; } else { - $this->setFrames(new FHIRPositiveInt($data[self::FIELD_FRAMES])); - } - } - if (isset($data[self::FIELD_HEIGHT])) { - $ext = (isset($data[self::FIELD_HEIGHT_EXT]) && is_array($data[self::FIELD_HEIGHT_EXT])) - ? $data[self::FIELD_HEIGHT_EXT] - : null; - if ($data[self::FIELD_HEIGHT] instanceof FHIRPositiveInt) { - $this->setHeight($data[self::FIELD_HEIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEIGHT])) { - $this->setHeight(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_HEIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_HEIGHT])) { - $this->setHeight(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_HEIGHT]))); + $value = null; + } + if (isset($data[self::FIELD_FRAMES_EXT]) && is_array($data[self::FIELD_FRAMES_EXT])) { + $ext = $data[self::FIELD_FRAMES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setFrames($value); + } else if (is_array($value)) { + $this->setFrames(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setFrames(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFrames(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_HEIGHT]) || isset($data[self::FIELD_HEIGHT_EXT])) { + if (isset($data[self::FIELD_HEIGHT])) { + $value = $data[self::FIELD_HEIGHT]; } else { - $this->setHeight(new FHIRPositiveInt($data[self::FIELD_HEIGHT])); + $value = null; + } + if (isset($data[self::FIELD_HEIGHT_EXT]) && is_array($data[self::FIELD_HEIGHT_EXT])) { + $ext = $data[self::FIELD_HEIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setHeight($value); + } else if (is_array($value)) { + $this->setHeight(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setHeight(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHeight(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -580,20 +615,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRInstant) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRInstant($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_MODALITY])) { @@ -664,20 +706,27 @@ public function __construct($data = null) $this->addReasonCode(new FHIRCodeableConcept($data[self::FIELD_REASON_CODE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREventStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREventStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREventStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREventStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -701,20 +750,27 @@ public function __construct($data = null) $this->setView(new FHIRCodeableConcept($data[self::FIELD_VIEW])); } } - if (isset($data[self::FIELD_WIDTH])) { - $ext = (isset($data[self::FIELD_WIDTH_EXT]) && is_array($data[self::FIELD_WIDTH_EXT])) - ? $data[self::FIELD_WIDTH_EXT] - : null; - if ($data[self::FIELD_WIDTH] instanceof FHIRPositiveInt) { - $this->setWidth($data[self::FIELD_WIDTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WIDTH])) { - $this->setWidth(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_WIDTH]] + $ext)); - } else if (is_array($data[self::FIELD_WIDTH])) { - $this->setWidth(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_WIDTH]))); - } + if (isset($data[self::FIELD_WIDTH]) || isset($data[self::FIELD_WIDTH_EXT])) { + if (isset($data[self::FIELD_WIDTH])) { + $value = $data[self::FIELD_WIDTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WIDTH_EXT]) && is_array($data[self::FIELD_WIDTH_EXT])) { + $ext = $data[self::FIELD_WIDTH_EXT]; } else { - $this->setWidth(new FHIRPositiveInt($data[self::FIELD_WIDTH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setWidth($value); + } else if (is_array($value)) { + $this->setWidth(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setWidth(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWidth(new FHIRPositiveInt($ext)); } } } @@ -1986,7 +2042,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getBodySite())) { $a[self::FIELD_BODY_SITE] = $v; @@ -1996,8 +2058,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreatedDateTime())) { $a[self::FIELD_CREATED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_DATE_TIME_EXT] = $enc; } } @@ -2009,15 +2073,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDeviceName())) { $a[self::FIELD_DEVICE_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEVICE_NAME_EXT] = $enc; } } if (null !== ($v = $this->getDuration())) { $a[self::FIELD_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DURATION_EXT] = $enc; } } @@ -2026,25 +2094,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getFrames())) { $a[self::FIELD_FRAMES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_FRAMES_EXT] = $enc; } } if (null !== ($v = $this->getHeight())) { $a[self::FIELD_HEIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_HEIGHT_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } @@ -2052,21 +2132,41 @@ public function jsonSerialize() $a[self::FIELD_MODALITY] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOperator())) { $a[self::FIELD_OPERATOR] = $v; } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2081,11 +2181,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getWidth())) { $a[self::FIELD_WIDTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_WIDTH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedication.php index 010fb22f87..95ae7ff407 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRMedication extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A relationship of two Quantity values - expressed as a numerator and a @@ -291,20 +291,27 @@ public function __construct($data = null) $this->setManufacturer(new FHIRReference($data[self::FIELD_MANUFACTURER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatusCodes([FHIRMedicationStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationStatusCodes([FHIRMedicationStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationStatusCodes($ext)); } } } @@ -797,21 +804,38 @@ public function jsonSerialize() $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } } if (null !== ($v = $this->getManufacturer())) { $a[self::FIELD_MANUFACTURER] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php index f9b2f25901..fa5ce77ff2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRMedicationAdministration extends FHIRDomainResource implements PHPFHIR const FIELD_SUPPORTING_INFORMATION = 'supportingInformation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -453,20 +453,27 @@ public function __construct($data = null) $this->setDosage(new FHIRMedicationAdministrationDosage($data[self::FIELD_DOSAGE])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -512,33 +519,42 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANTIATES])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_EXT]) && is_array($data[self::FIELD_INSTANTIATES_EXT])) - ? $data[self::FIELD_INSTANTIATES_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES])) { - foreach($data[self::FIELD_INSTANTIATES] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiates($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiates(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES]) || isset($data[self::FIELD_INSTANTIATES_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES])) { + $value = $data[self::FIELD_INSTANTIATES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_EXT]) && is_array($data[self::FIELD_INSTANTIATES_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiates($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiates($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiates(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiates(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiates(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiates(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES] instanceof FHIRUri) { - $this->addInstantiates($data[self::FIELD_INSTANTIATES]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES])) { - $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES]] + $ext)); - } else { - $this->addInstantiates(new FHIRUri($data[self::FIELD_INSTANTIATES])); } } if (isset($data[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { @@ -652,20 +668,27 @@ public function __construct($data = null) $this->setRequest(new FHIRReference($data[self::FIELD_REQUEST])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -2077,15 +2100,23 @@ public function jsonSerialize() $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDevice())) { - $a[self::FIELD_DEVICE] = $vs; + $a[self::FIELD_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEVICE][] = $v; + } } if (null !== ($v = $this->getDosage())) { $a[self::FIELD_DOSAGE] = $v; } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -2093,25 +2124,45 @@ public function jsonSerialize() $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEventHistory())) { - $a[self::FIELD_EVENT_HISTORY] = $vs; + $a[self::FIELD_EVENT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstantiates())) { $a[self::FIELD_INSTANTIATES] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_EXT] = $encs; + } } if (null !== ($v = $this->getMedicationCodeableConcept())) { $a[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $v; @@ -2120,38 +2171,85 @@ public function jsonSerialize() $a[self::FIELD_MEDICATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStatusReason())) { - $a[self::FIELD_STATUS_REASON] = $vs; + $a[self::FIELD_STATUS_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STATUS_REASON][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php index d08e09fb95..88185d903c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRMedicationDispense extends FHIRDomainResource implements PHPFHIRContai const FIELD_WHEN_PREPARED_EXT = '_whenPrepared'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -696,20 +696,27 @@ public function __construct($data = null) $this->addReceiver(new FHIRReference($data[self::FIELD_RECEIVER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } if (isset($data[self::FIELD_STATUS_REASON_CODEABLE_CONCEPT])) { @@ -765,36 +772,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_WHEN_HANDED_OVER])) { - $ext = (isset($data[self::FIELD_WHEN_HANDED_OVER_EXT]) && is_array($data[self::FIELD_WHEN_HANDED_OVER_EXT])) - ? $data[self::FIELD_WHEN_HANDED_OVER_EXT] - : null; - if ($data[self::FIELD_WHEN_HANDED_OVER] instanceof FHIRDateTime) { - $this->setWhenHandedOver($data[self::FIELD_WHEN_HANDED_OVER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN_HANDED_OVER])) { - $this->setWhenHandedOver(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_WHEN_HANDED_OVER]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN_HANDED_OVER])) { - $this->setWhenHandedOver(new FHIRDateTime(array_merge($ext, $data[self::FIELD_WHEN_HANDED_OVER]))); - } + if (isset($data[self::FIELD_WHEN_HANDED_OVER]) || isset($data[self::FIELD_WHEN_HANDED_OVER_EXT])) { + if (isset($data[self::FIELD_WHEN_HANDED_OVER])) { + $value = $data[self::FIELD_WHEN_HANDED_OVER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHEN_HANDED_OVER_EXT]) && is_array($data[self::FIELD_WHEN_HANDED_OVER_EXT])) { + $ext = $data[self::FIELD_WHEN_HANDED_OVER_EXT]; } else { - $this->setWhenHandedOver(new FHIRDateTime($data[self::FIELD_WHEN_HANDED_OVER])); - } - } - if (isset($data[self::FIELD_WHEN_PREPARED])) { - $ext = (isset($data[self::FIELD_WHEN_PREPARED_EXT]) && is_array($data[self::FIELD_WHEN_PREPARED_EXT])) - ? $data[self::FIELD_WHEN_PREPARED_EXT] - : null; - if ($data[self::FIELD_WHEN_PREPARED] instanceof FHIRDateTime) { - $this->setWhenPrepared($data[self::FIELD_WHEN_PREPARED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN_PREPARED])) { - $this->setWhenPrepared(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_WHEN_PREPARED]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN_PREPARED])) { - $this->setWhenPrepared(new FHIRDateTime(array_merge($ext, $data[self::FIELD_WHEN_PREPARED]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setWhenHandedOver($value); + } else if (is_array($value)) { + $this->setWhenHandedOver(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setWhenHandedOver(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setWhenHandedOver(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_WHEN_PREPARED]) || isset($data[self::FIELD_WHEN_PREPARED_EXT])) { + if (isset($data[self::FIELD_WHEN_PREPARED])) { + $value = $data[self::FIELD_WHEN_PREPARED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHEN_PREPARED_EXT]) && is_array($data[self::FIELD_WHEN_PREPARED_EXT])) { + $ext = $data[self::FIELD_WHEN_PREPARED_EXT]; } else { - $this->setWhenPrepared(new FHIRDateTime($data[self::FIELD_WHEN_PREPARED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setWhenPrepared($value); + } else if (is_array($value)) { + $this->setWhenPrepared(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setWhenPrepared(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhenPrepared(new FHIRDateTime($ext)); } } } @@ -2319,7 +2340,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthorizingPrescription())) { - $a[self::FIELD_AUTHORIZING_PRESCRIPTION] = $vs; + $a[self::FIELD_AUTHORIZING_PRESCRIPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHORIZING_PRESCRIPTION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -2334,16 +2361,40 @@ public function jsonSerialize() $a[self::FIELD_DESTINATION] = $v; } if ([] !== ($vs = $this->getDetectedIssue())) { - $a[self::FIELD_DETECTED_ISSUE] = $vs; + $a[self::FIELD_DETECTED_ISSUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETECTED_ISSUE][] = $v; + } } if ([] !== ($vs = $this->getDosageInstruction())) { - $a[self::FIELD_DOSAGE_INSTRUCTION] = $vs; + $a[self::FIELD_DOSAGE_INSTRUCTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE_INSTRUCTION][] = $v; + } } if ([] !== ($vs = $this->getEventHistory())) { - $a[self::FIELD_EVENT_HISTORY] = $vs; + $a[self::FIELD_EVENT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; @@ -2355,24 +2406,50 @@ public function jsonSerialize() $a[self::FIELD_MEDICATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReceiver())) { - $a[self::FIELD_RECEIVER] = $vs; + $a[self::FIELD_RECEIVER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECEIVER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2389,25 +2466,38 @@ public function jsonSerialize() $a[self::FIELD_SUBSTITUTION] = $v; } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getWhenHandedOver())) { $a[self::FIELD_WHEN_HANDED_OVER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_WHEN_HANDED_OVER_EXT] = $enc; } } if (null !== ($v = $this->getWhenPrepared())) { $a[self::FIELD_WHEN_PREPARED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_WHEN_PREPARED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledge.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledge.php index 50648a34a0..5b6616d57f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledge.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRMedicationKnowledge extends FHIRDomainResource implements PHPFHIRConta const FIELD_SYNONYM_EXT = '_synonym'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Information about a medication that is used to support knowledge. @@ -628,20 +628,27 @@ public function __construct($data = null) $this->setPackaging(new FHIRMedicationKnowledgePackaging($data[self::FIELD_PACKAGING])); } } - if (isset($data[self::FIELD_PREPARATION_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_PREPARATION_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PREPARATION_INSTRUCTION_EXT])) - ? $data[self::FIELD_PREPARATION_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_PREPARATION_INSTRUCTION] instanceof FHIRMarkdown) { - $this->setPreparationInstruction($data[self::FIELD_PREPARATION_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREPARATION_INSTRUCTION])) { - $this->setPreparationInstruction(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PREPARATION_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_PREPARATION_INSTRUCTION])) { - $this->setPreparationInstruction(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PREPARATION_INSTRUCTION]))); - } + if (isset($data[self::FIELD_PREPARATION_INSTRUCTION]) || isset($data[self::FIELD_PREPARATION_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_PREPARATION_INSTRUCTION])) { + $value = $data[self::FIELD_PREPARATION_INSTRUCTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREPARATION_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PREPARATION_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_PREPARATION_INSTRUCTION_EXT]; } else { - $this->setPreparationInstruction(new FHIRMarkdown($data[self::FIELD_PREPARATION_INSTRUCTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPreparationInstruction($value); + } else if (is_array($value)) { + $this->setPreparationInstruction(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPreparationInstruction(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreparationInstruction(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_PRODUCT_TYPE])) { @@ -698,49 +705,65 @@ public function __construct($data = null) $this->addRelatedMedicationKnowledge(new FHIRMedicationKnowledgeRelatedMedicationKnowledge($data[self::FIELD_RELATED_MEDICATION_KNOWLEDGE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCode) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCode(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRCode($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_SYNONYM])) { - $ext = (isset($data[self::FIELD_SYNONYM_EXT]) && is_array($data[self::FIELD_SYNONYM_EXT])) - ? $data[self::FIELD_SYNONYM_EXT] - : null; - if (is_array($data[self::FIELD_SYNONYM])) { - foreach($data[self::FIELD_SYNONYM] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSynonym($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSynonym(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSynonym(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SYNONYM]) || isset($data[self::FIELD_SYNONYM_EXT])) { + if (isset($data[self::FIELD_SYNONYM])) { + $value = $data[self::FIELD_SYNONYM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYNONYM_EXT]) && is_array($data[self::FIELD_SYNONYM_EXT])) { + $ext = $data[self::FIELD_SYNONYM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSynonym($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSynonym($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSynonym(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSynonym(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSynonym(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSynonym(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSynonym(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSynonym(new FHIRString($iext)); } - } elseif ($data[self::FIELD_SYNONYM] instanceof FHIRString) { - $this->addSynonym($data[self::FIELD_SYNONYM]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SYNONYM])) { - $this->addSynonym(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SYNONYM]] + $ext)); - } else { - $this->addSynonym(new FHIRString($data[self::FIELD_SYNONYM])); } } } @@ -2178,90 +2201,189 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdministrationGuidelines())) { - $a[self::FIELD_ADMINISTRATION_GUIDELINES] = $vs; + $a[self::FIELD_ADMINISTRATION_GUIDELINES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADMINISTRATION_GUIDELINES][] = $v; + } } if (null !== ($v = $this->getAmount())) { $a[self::FIELD_AMOUNT] = $v; } if ([] !== ($vs = $this->getAssociatedMedication())) { - $a[self::FIELD_ASSOCIATED_MEDICATION] = $vs; + $a[self::FIELD_ASSOCIATED_MEDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ASSOCIATED_MEDICATION][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getContraindication())) { - $a[self::FIELD_CONTRAINDICATION] = $vs; + $a[self::FIELD_CONTRAINDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRAINDICATION][] = $v; + } } if ([] !== ($vs = $this->getCost())) { - $a[self::FIELD_COST] = $vs; + $a[self::FIELD_COST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COST][] = $v; + } } if (null !== ($v = $this->getDoseForm())) { $a[self::FIELD_DOSE_FORM] = $v; } if ([] !== ($vs = $this->getDrugCharacteristic())) { - $a[self::FIELD_DRUG_CHARACTERISTIC] = $vs; + $a[self::FIELD_DRUG_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DRUG_CHARACTERISTIC][] = $v; + } } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } } if ([] !== ($vs = $this->getIntendedRoute())) { - $a[self::FIELD_INTENDED_ROUTE] = $vs; + $a[self::FIELD_INTENDED_ROUTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTENDED_ROUTE][] = $v; + } } if ([] !== ($vs = $this->getKinetics())) { - $a[self::FIELD_KINETICS] = $vs; + $a[self::FIELD_KINETICS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_KINETICS][] = $v; + } } if (null !== ($v = $this->getManufacturer())) { $a[self::FIELD_MANUFACTURER] = $v; } if ([] !== ($vs = $this->getMedicineClassification())) { - $a[self::FIELD_MEDICINE_CLASSIFICATION] = $vs; + $a[self::FIELD_MEDICINE_CLASSIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEDICINE_CLASSIFICATION][] = $v; + } } if ([] !== ($vs = $this->getMonitoringProgram())) { - $a[self::FIELD_MONITORING_PROGRAM] = $vs; + $a[self::FIELD_MONITORING_PROGRAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MONITORING_PROGRAM][] = $v; + } } if ([] !== ($vs = $this->getMonograph())) { - $a[self::FIELD_MONOGRAPH] = $vs; + $a[self::FIELD_MONOGRAPH] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MONOGRAPH][] = $v; + } } if (null !== ($v = $this->getPackaging())) { $a[self::FIELD_PACKAGING] = $v; } if (null !== ($v = $this->getPreparationInstruction())) { $a[self::FIELD_PREPARATION_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PREPARATION_INSTRUCTION_EXT] = $enc; } } if ([] !== ($vs = $this->getProductType())) { - $a[self::FIELD_PRODUCT_TYPE] = $vs; + $a[self::FIELD_PRODUCT_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRODUCT_TYPE][] = $v; + } } if ([] !== ($vs = $this->getRegulatory())) { - $a[self::FIELD_REGULATORY] = $vs; + $a[self::FIELD_REGULATORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REGULATORY][] = $v; + } } if ([] !== ($vs = $this->getRelatedMedicationKnowledge())) { - $a[self::FIELD_RELATED_MEDICATION_KNOWLEDGE] = $vs; + $a[self::FIELD_RELATED_MEDICATION_KNOWLEDGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_MEDICATION_KNOWLEDGE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSynonym())) { $a[self::FIELD_SYNONYM] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SYNONYM][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SYNONYM_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SYNONYM_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SYNONYM_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php index a7202fd0b6..e45f03b621 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRMedicationRequest extends FHIRDomainResource implements PHPFHIRContain const FIELD_SUPPORTING_INFORMATION = 'supportingInformation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -598,20 +598,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -682,20 +689,27 @@ public function __construct($data = null) $this->setDispenseRequest(new FHIRMedicationRequestDispenseRequest($data[self::FIELD_DISPENSE_REQUEST])); } } - if (isset($data[self::FIELD_DO_NOT_PERFORM])) { - $ext = (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) - ? $data[self::FIELD_DO_NOT_PERFORM_EXT] - : null; - if ($data[self::FIELD_DO_NOT_PERFORM] instanceof FHIRBoolean) { - $this->setDoNotPerform($data[self::FIELD_DO_NOT_PERFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DO_NOT_PERFORM]] + $ext)); - } else if (is_array($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DO_NOT_PERFORM]))); - } + if (isset($data[self::FIELD_DO_NOT_PERFORM]) || isset($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + if (isset($data[self::FIELD_DO_NOT_PERFORM])) { + $value = $data[self::FIELD_DO_NOT_PERFORM]; } else { - $this->setDoNotPerform(new FHIRBoolean($data[self::FIELD_DO_NOT_PERFORM])); + $value = null; + } + if (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + $ext = $data[self::FIELD_DO_NOT_PERFORM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDoNotPerform($value); + } else if (is_array($value)) { + $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoNotPerform(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_DOSAGE_INSTRUCTION])) { @@ -766,62 +780,80 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); } } if (isset($data[self::FIELD_INSURANCE])) { @@ -842,20 +874,27 @@ public function __construct($data = null) $this->addInsurance(new FHIRReference($data[self::FIELD_INSURANCE])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRMedicationRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRMedicationRequestIntent([FHIRMedicationRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRMedicationRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; } else { - $this->setIntent(new FHIRMedicationRequestIntent($data[self::FIELD_INTENT])); + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRMedicationRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRMedicationRequestIntent([FHIRMedicationRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRMedicationRequestIntent($ext)); } } if (isset($data[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { @@ -911,20 +950,27 @@ public function __construct($data = null) $this->setPriorPrescription(new FHIRReference($data[self::FIELD_PRIOR_PRESCRIPTION])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -970,20 +1016,27 @@ public function __construct($data = null) $this->setRecorder(new FHIRReference($data[self::FIELD_RECORDER])); } } - if (isset($data[self::FIELD_REPORTED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_REPORTED_BOOLEAN_EXT]) && is_array($data[self::FIELD_REPORTED_BOOLEAN_EXT])) - ? $data[self::FIELD_REPORTED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_REPORTED_BOOLEAN] instanceof FHIRBoolean) { - $this->setReportedBoolean($data[self::FIELD_REPORTED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPORTED_BOOLEAN])) { - $this->setReportedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPORTED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_REPORTED_BOOLEAN])) { - $this->setReportedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPORTED_BOOLEAN]))); - } + if (isset($data[self::FIELD_REPORTED_BOOLEAN]) || isset($data[self::FIELD_REPORTED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_REPORTED_BOOLEAN])) { + $value = $data[self::FIELD_REPORTED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPORTED_BOOLEAN_EXT]) && is_array($data[self::FIELD_REPORTED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_REPORTED_BOOLEAN_EXT]; } else { - $this->setReportedBoolean(new FHIRBoolean($data[self::FIELD_REPORTED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReportedBoolean($value); + } else if (is_array($value)) { + $this->setReportedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReportedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReportedBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_REPORTED_REFERENCE])) { @@ -1000,20 +1053,27 @@ public function __construct($data = null) $this->setRequester(new FHIRReference($data[self::FIELD_REQUESTER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationrequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationrequestStatus([FHIRMedicationrequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationrequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationrequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationrequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationrequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationrequestStatus([FHIRMedicationrequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationrequestStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -3018,85 +3078,149 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCourseOfTherapyType())) { $a[self::FIELD_COURSE_OF_THERAPY_TYPE] = $v; } if ([] !== ($vs = $this->getDetectedIssue())) { - $a[self::FIELD_DETECTED_ISSUE] = $vs; + $a[self::FIELD_DETECTED_ISSUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETECTED_ISSUE][] = $v; + } } if (null !== ($v = $this->getDispenseRequest())) { $a[self::FIELD_DISPENSE_REQUEST] = $v; } if (null !== ($v = $this->getDoNotPerform())) { $a[self::FIELD_DO_NOT_PERFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DO_NOT_PERFORM_EXT] = $enc; } } if ([] !== ($vs = $this->getDosageInstruction())) { - $a[self::FIELD_DOSAGE_INSTRUCTION] = $vs; + $a[self::FIELD_DOSAGE_INSTRUCTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE_INSTRUCTION][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEventHistory())) { - $a[self::FIELD_EVENT_HISTORY] = $vs; + $a[self::FIELD_EVENT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT_HISTORY][] = $v; + } } if (null !== ($v = $this->getGroupIdentifier())) { $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } @@ -3107,7 +3231,13 @@ public function jsonSerialize() $a[self::FIELD_MEDICATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPerformer())) { $a[self::FIELD_PERFORMER] = $v; @@ -3120,24 +3250,40 @@ public function jsonSerialize() } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRecorder())) { $a[self::FIELD_RECORDER] = $v; } if (null !== ($v = $this->getReportedBoolean())) { $a[self::FIELD_REPORTED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPORTED_BOOLEAN_EXT] = $enc; } } @@ -3149,8 +3295,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationrequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationrequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3164,7 +3312,16 @@ public function jsonSerialize() $a[self::FIELD_SUBSTITUTION] = $v; } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php index a7f5c3950c..a9746d6f32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRMedicationStatement extends FHIRDomainResource implements PHPFHIRConta const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -428,20 +428,27 @@ public function __construct($data = null) $this->setContext(new FHIRReference($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_DATE_ASSERTED])) { - $ext = (isset($data[self::FIELD_DATE_ASSERTED_EXT]) && is_array($data[self::FIELD_DATE_ASSERTED_EXT])) - ? $data[self::FIELD_DATE_ASSERTED_EXT] - : null; - if ($data[self::FIELD_DATE_ASSERTED] instanceof FHIRDateTime) { - $this->setDateAsserted($data[self::FIELD_DATE_ASSERTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_ASSERTED])) { - $this->setDateAsserted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_ASSERTED]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_ASSERTED])) { - $this->setDateAsserted(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_ASSERTED]))); - } + if (isset($data[self::FIELD_DATE_ASSERTED]) || isset($data[self::FIELD_DATE_ASSERTED_EXT])) { + if (isset($data[self::FIELD_DATE_ASSERTED])) { + $value = $data[self::FIELD_DATE_ASSERTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_ASSERTED_EXT]) && is_array($data[self::FIELD_DATE_ASSERTED_EXT])) { + $ext = $data[self::FIELD_DATE_ASSERTED_EXT]; } else { - $this->setDateAsserted(new FHIRDateTime($data[self::FIELD_DATE_ASSERTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateAsserted($value); + } else if (is_array($value)) { + $this->setDateAsserted(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateAsserted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateAsserted(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DERIVED_FROM])) { @@ -480,20 +487,27 @@ public function __construct($data = null) $this->addDosage(new FHIRDosage($data[self::FIELD_DOSAGE])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -614,20 +628,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatusCodes([FHIRMedicationStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationStatusCodes([FHIRMedicationStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationStatusCodes($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -1849,7 +1870,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -1859,21 +1886,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDateAsserted())) { $a[self::FIELD_DATE_ASSERTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_ASSERTED_EXT] = $enc; } } if ([] !== ($vs = $this->getDerivedFrom())) { - $a[self::FIELD_DERIVED_FROM] = $vs; + $a[self::FIELD_DERIVED_FROM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DERIVED_FROM][] = $v; + } } if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -1881,7 +1924,13 @@ public function jsonSerialize() $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInformationSource())) { $a[self::FIELD_INFORMATION_SOURCE] = $v; @@ -1893,30 +1942,65 @@ public function jsonSerialize() $a[self::FIELD_MEDICATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStatusReason())) { - $a[self::FIELD_STATUS_REASON] = $vs; + $a[self::FIELD_STATUS_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STATUS_REASON][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProduct.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProduct.php index 88d4c0143c..bc3f0ae9fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProduct.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProduct.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRMedicinalProduct extends FHIRDomainResource implements PHPFHIRContaine const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -643,33 +643,42 @@ public function __construct($data = null) $this->addSpecialDesignation(new FHIRMedicinalProductSpecialDesignation($data[self::FIELD_SPECIAL_DESIGNATION])); } } - if (isset($data[self::FIELD_SPECIAL_MEASURES])) { - $ext = (isset($data[self::FIELD_SPECIAL_MEASURES_EXT]) && is_array($data[self::FIELD_SPECIAL_MEASURES_EXT])) - ? $data[self::FIELD_SPECIAL_MEASURES_EXT] - : null; - if (is_array($data[self::FIELD_SPECIAL_MEASURES])) { - foreach($data[self::FIELD_SPECIAL_MEASURES] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSpecialMeasures($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSpecialMeasures(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSpecialMeasures(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SPECIAL_MEASURES]) || isset($data[self::FIELD_SPECIAL_MEASURES_EXT])) { + if (isset($data[self::FIELD_SPECIAL_MEASURES])) { + $value = $data[self::FIELD_SPECIAL_MEASURES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SPECIAL_MEASURES_EXT]) && is_array($data[self::FIELD_SPECIAL_MEASURES_EXT])) { + $ext = $data[self::FIELD_SPECIAL_MEASURES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSpecialMeasures($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSpecialMeasures($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSpecialMeasures(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSpecialMeasures(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSpecialMeasures(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSpecialMeasures(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSpecialMeasures(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSpecialMeasures(new FHIRString($iext)); } - } elseif ($data[self::FIELD_SPECIAL_MEASURES] instanceof FHIRString) { - $this->addSpecialMeasures($data[self::FIELD_SPECIAL_MEASURES]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SPECIAL_MEASURES])) { - $this->addSpecialMeasures(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SPECIAL_MEASURES]] + $ext)); - } else { - $this->addSpecialMeasures(new FHIRString($data[self::FIELD_SPECIAL_MEASURES])); } } if (isset($data[self::FIELD_TYPE])) { @@ -2012,74 +2021,163 @@ public function jsonSerialize() $a[self::FIELD_ADDITIONAL_MONITORING_INDICATOR] = $v; } if ([] !== ($vs = $this->getAttachedDocument())) { - $a[self::FIELD_ATTACHED_DOCUMENT] = $vs; + $a[self::FIELD_ATTACHED_DOCUMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ATTACHED_DOCUMENT][] = $v; + } } if ([] !== ($vs = $this->getClinicalTrial())) { - $a[self::FIELD_CLINICAL_TRIAL] = $vs; + $a[self::FIELD_CLINICAL_TRIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CLINICAL_TRIAL][] = $v; + } } if (null !== ($v = $this->getCombinedPharmaceuticalDoseForm())) { $a[self::FIELD_COMBINED_PHARMACEUTICAL_DOSE_FORM] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getCrossReference())) { - $a[self::FIELD_CROSS_REFERENCE] = $vs; + $a[self::FIELD_CROSS_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CROSS_REFERENCE][] = $v; + } } if (null !== ($v = $this->getDomain())) { $a[self::FIELD_DOMAIN] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLegalStatusOfSupply())) { $a[self::FIELD_LEGAL_STATUS_OF_SUPPLY] = $v; } if ([] !== ($vs = $this->getManufacturingBusinessOperation())) { - $a[self::FIELD_MANUFACTURING_BUSINESS_OPERATION] = $vs; + $a[self::FIELD_MANUFACTURING_BUSINESS_OPERATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANUFACTURING_BUSINESS_OPERATION][] = $v; + } } if ([] !== ($vs = $this->getMarketingStatus())) { - $a[self::FIELD_MARKETING_STATUS] = $vs; + $a[self::FIELD_MARKETING_STATUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MARKETING_STATUS][] = $v; + } } if ([] !== ($vs = $this->getMasterFile())) { - $a[self::FIELD_MASTER_FILE] = $vs; + $a[self::FIELD_MASTER_FILE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MASTER_FILE][] = $v; + } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if ([] !== ($vs = $this->getPackagedMedicinalProduct())) { - $a[self::FIELD_PACKAGED_MEDICINAL_PRODUCT] = $vs; + $a[self::FIELD_PACKAGED_MEDICINAL_PRODUCT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PACKAGED_MEDICINAL_PRODUCT][] = $v; + } } if (null !== ($v = $this->getPaediatricUseIndicator())) { $a[self::FIELD_PAEDIATRIC_USE_INDICATOR] = $v; } if ([] !== ($vs = $this->getPharmaceuticalProduct())) { - $a[self::FIELD_PHARMACEUTICAL_PRODUCT] = $vs; + $a[self::FIELD_PHARMACEUTICAL_PRODUCT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHARMACEUTICAL_PRODUCT][] = $v; + } } if ([] !== ($vs = $this->getProductClassification())) { - $a[self::FIELD_PRODUCT_CLASSIFICATION] = $vs; + $a[self::FIELD_PRODUCT_CLASSIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRODUCT_CLASSIFICATION][] = $v; + } } if ([] !== ($vs = $this->getSpecialDesignation())) { - $a[self::FIELD_SPECIAL_DESIGNATION] = $vs; + $a[self::FIELD_SPECIAL_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_DESIGNATION][] = $v; + } } if ([] !== ($vs = $this->getSpecialMeasures())) { $a[self::FIELD_SPECIAL_MEASURES] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SPECIAL_MEASURES][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SPECIAL_MEASURES_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SPECIAL_MEASURES_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SPECIAL_MEASURES_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorization.php index 1ae96557d0..2ce94e6fc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRMedicinalProductAuthorization extends FHIRDomainResource implements PH const FIELD_VALIDITY_PERIOD = 'validityPeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -351,20 +351,27 @@ public function __construct($data = null) $this->setDataExclusivityPeriod(new FHIRPeriod($data[self::FIELD_DATA_EXCLUSIVITY_PERIOD])); } } - if (isset($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) { - $ext = (isset($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION_EXT]) && is_array($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION_EXT])) - ? $data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION_EXT] - : null; - if ($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] instanceof FHIRDateTime) { - $this->setDateOfFirstAuthorization($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) { - $this->setDateOfFirstAuthorization(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) { - $this->setDateOfFirstAuthorization(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION]))); - } + if (isset($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION]) || isset($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION_EXT])) { + if (isset($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) { + $value = $data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION_EXT]) && is_array($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION_EXT])) { + $ext = $data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION_EXT]; } else { - $this->setDateOfFirstAuthorization(new FHIRDateTime($data[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateOfFirstAuthorization($value); + } else if (is_array($value)) { + $this->setDateOfFirstAuthorization(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateOfFirstAuthorization(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateOfFirstAuthorization(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_HOLDER])) { @@ -392,20 +399,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INTERNATIONAL_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_INTERNATIONAL_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_INTERNATIONAL_BIRTH_DATE_EXT])) - ? $data[self::FIELD_INTERNATIONAL_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_INTERNATIONAL_BIRTH_DATE] instanceof FHIRDateTime) { - $this->setInternationalBirthDate($data[self::FIELD_INTERNATIONAL_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTERNATIONAL_BIRTH_DATE])) { - $this->setInternationalBirthDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_INTERNATIONAL_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_INTERNATIONAL_BIRTH_DATE])) { - $this->setInternationalBirthDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_INTERNATIONAL_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_INTERNATIONAL_BIRTH_DATE]) || isset($data[self::FIELD_INTERNATIONAL_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_INTERNATIONAL_BIRTH_DATE])) { + $value = $data[self::FIELD_INTERNATIONAL_BIRTH_DATE]; } else { - $this->setInternationalBirthDate(new FHIRDateTime($data[self::FIELD_INTERNATIONAL_BIRTH_DATE])); + $value = null; + } + if (isset($data[self::FIELD_INTERNATIONAL_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_INTERNATIONAL_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_INTERNATIONAL_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setInternationalBirthDate($value); + } else if (is_array($value)) { + $this->setInternationalBirthDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setInternationalBirthDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInternationalBirthDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -465,20 +479,27 @@ public function __construct($data = null) $this->setRegulator(new FHIRReference($data[self::FIELD_REGULATOR])); } } - if (isset($data[self::FIELD_RESTORE_DATE])) { - $ext = (isset($data[self::FIELD_RESTORE_DATE_EXT]) && is_array($data[self::FIELD_RESTORE_DATE_EXT])) - ? $data[self::FIELD_RESTORE_DATE_EXT] - : null; - if ($data[self::FIELD_RESTORE_DATE] instanceof FHIRDateTime) { - $this->setRestoreDate($data[self::FIELD_RESTORE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESTORE_DATE])) { - $this->setRestoreDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RESTORE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RESTORE_DATE])) { - $this->setRestoreDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RESTORE_DATE]))); - } + if (isset($data[self::FIELD_RESTORE_DATE]) || isset($data[self::FIELD_RESTORE_DATE_EXT])) { + if (isset($data[self::FIELD_RESTORE_DATE])) { + $value = $data[self::FIELD_RESTORE_DATE]; } else { - $this->setRestoreDate(new FHIRDateTime($data[self::FIELD_RESTORE_DATE])); + $value = null; + } + if (isset($data[self::FIELD_RESTORE_DATE_EXT]) && is_array($data[self::FIELD_RESTORE_DATE_EXT])) { + $ext = $data[self::FIELD_RESTORE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRestoreDate($value); + } else if (is_array($value)) { + $this->setRestoreDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRestoreDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRestoreDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_STATUS])) { @@ -488,20 +509,27 @@ public function __construct($data = null) $this->setStatus(new FHIRCodeableConcept($data[self::FIELD_STATUS])); } } - if (isset($data[self::FIELD_STATUS_DATE])) { - $ext = (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) - ? $data[self::FIELD_STATUS_DATE_EXT] - : null; - if ($data[self::FIELD_STATUS_DATE] instanceof FHIRDateTime) { - $this->setStatusDate($data[self::FIELD_STATUS_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STATUS_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STATUS_DATE]))); - } + if (isset($data[self::FIELD_STATUS_DATE]) || isset($data[self::FIELD_STATUS_DATE_EXT])) { + if (isset($data[self::FIELD_STATUS_DATE])) { + $value = $data[self::FIELD_STATUS_DATE]; } else { - $this->setStatusDate(new FHIRDateTime($data[self::FIELD_STATUS_DATE])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) { + $ext = $data[self::FIELD_STATUS_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStatusDate($value); + } else if (is_array($value)) { + $this->setStatusDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStatusDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatusDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1432,15 +1460,23 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCountry())) { - $a[self::FIELD_COUNTRY] = $vs; + $a[self::FIELD_COUNTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COUNTRY][] = $v; + } } if (null !== ($v = $this->getDataExclusivityPeriod())) { $a[self::FIELD_DATA_EXCLUSIVITY_PERIOD] = $v; } if (null !== ($v = $this->getDateOfFirstAuthorization())) { $a[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_OF_FIRST_AUTHORIZATION_EXT] = $enc; } } @@ -1448,20 +1484,40 @@ public function jsonSerialize() $a[self::FIELD_HOLDER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInternationalBirthDate())) { $a[self::FIELD_INTERNATIONAL_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_INTERNATIONAL_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getJurisdictionalAuthorization())) { - $a[self::FIELD_JURISDICTIONAL_AUTHORIZATION] = $vs; + $a[self::FIELD_JURISDICTIONAL_AUTHORIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTIONAL_AUTHORIZATION][] = $v; + } } if (null !== ($v = $this->getLegalBasis())) { $a[self::FIELD_LEGAL_BASIS] = $v; @@ -1474,8 +1530,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getRestoreDate())) { $a[self::FIELD_RESTORE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RESTORE_DATE_EXT] = $enc; } } @@ -1484,8 +1542,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatusDate())) { $a[self::FIELD_STATUS_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STATUS_DATE_EXT] = $enc; } } @@ -1495,6 +1555,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValidityPeriod())) { $a[self::FIELD_VALIDITY_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindication.php index b51e0f6747..a9ac9b8a32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicinalProductContraindication extends FHIRDomainResource implements const FIELD_THERAPEUTIC_INDICATION = 'therapeuticIndication'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -831,7 +831,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getComorbidity())) { - $a[self::FIELD_COMORBIDITY] = $vs; + $a[self::FIELD_COMORBIDITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMORBIDITY][] = $v; + } } if (null !== ($v = $this->getDisease())) { $a[self::FIELD_DISEASE] = $v; @@ -840,16 +846,43 @@ public function jsonSerialize() $a[self::FIELD_DISEASE_STATUS] = $v; } if ([] !== ($vs = $this->getOtherTherapy())) { - $a[self::FIELD_OTHER_THERAPY] = $vs; + $a[self::FIELD_OTHER_THERAPY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OTHER_THERAPY][] = $v; + } } if ([] !== ($vs = $this->getPopulation())) { - $a[self::FIELD_POPULATION] = $vs; + $a[self::FIELD_POPULATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POPULATION][] = $v; + } } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if ([] !== ($vs = $this->getTherapeuticIndication())) { - $a[self::FIELD_THERAPEUTIC_INDICATION] = $vs; + $a[self::FIELD_THERAPEUTIC_INDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_THERAPEUTIC_INDICATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndication.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndication.php index 7b2c9e25fe..3d7e83dc65 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndication.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRMedicinalProductIndication extends FHIRDomainResource implements PHPFH const FIELD_UNDESIRABLE_EFFECT = 'undesirableEffect'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -942,7 +942,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getComorbidity())) { - $a[self::FIELD_COMORBIDITY] = $vs; + $a[self::FIELD_COMORBIDITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMORBIDITY][] = $v; + } } if (null !== ($v = $this->getDiseaseStatus())) { $a[self::FIELD_DISEASE_STATUS] = $v; @@ -957,16 +963,43 @@ public function jsonSerialize() $a[self::FIELD_INTENDED_EFFECT] = $v; } if ([] !== ($vs = $this->getOtherTherapy())) { - $a[self::FIELD_OTHER_THERAPY] = $vs; + $a[self::FIELD_OTHER_THERAPY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OTHER_THERAPY][] = $v; + } } if ([] !== ($vs = $this->getPopulation())) { - $a[self::FIELD_POPULATION] = $vs; + $a[self::FIELD_POPULATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POPULATION][] = $v; + } } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if ([] !== ($vs = $this->getUndesirableEffect())) { - $a[self::FIELD_UNDESIRABLE_EFFECT] = $vs; + $a[self::FIELD_UNDESIRABLE_EFFECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UNDESIRABLE_EFFECT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredient.php index 1a47020e8f..de77cc083b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMedicinalProductIngredient extends FHIRDomainResource implements PHPFH const FIELD_SUBSTANCE = 'substance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -182,20 +182,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALLERGENIC_INDICATOR])) { - $ext = (isset($data[self::FIELD_ALLERGENIC_INDICATOR_EXT]) && is_array($data[self::FIELD_ALLERGENIC_INDICATOR_EXT])) - ? $data[self::FIELD_ALLERGENIC_INDICATOR_EXT] - : null; - if ($data[self::FIELD_ALLERGENIC_INDICATOR] instanceof FHIRBoolean) { - $this->setAllergenicIndicator($data[self::FIELD_ALLERGENIC_INDICATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLERGENIC_INDICATOR])) { - $this->setAllergenicIndicator(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALLERGENIC_INDICATOR]] + $ext)); - } else if (is_array($data[self::FIELD_ALLERGENIC_INDICATOR])) { - $this->setAllergenicIndicator(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALLERGENIC_INDICATOR]))); - } + if (isset($data[self::FIELD_ALLERGENIC_INDICATOR]) || isset($data[self::FIELD_ALLERGENIC_INDICATOR_EXT])) { + if (isset($data[self::FIELD_ALLERGENIC_INDICATOR])) { + $value = $data[self::FIELD_ALLERGENIC_INDICATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALLERGENIC_INDICATOR_EXT]) && is_array($data[self::FIELD_ALLERGENIC_INDICATOR_EXT])) { + $ext = $data[self::FIELD_ALLERGENIC_INDICATOR_EXT]; } else { - $this->setAllergenicIndicator(new FHIRBoolean($data[self::FIELD_ALLERGENIC_INDICATOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllergenicIndicator($value); + } else if (is_array($value)) { + $this->setAllergenicIndicator(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllergenicIndicator(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllergenicIndicator(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -653,8 +660,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllergenicIndicator())) { $a[self::FIELD_ALLERGENIC_INDICATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALLERGENIC_INDICATOR_EXT] = $enc; } } @@ -662,17 +671,32 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getManufacturer())) { - $a[self::FIELD_MANUFACTURER] = $vs; + $a[self::FIELD_MANUFACTURER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANUFACTURER][] = $v; + } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } if ([] !== ($vs = $this->getSpecifiedSubstance())) { - $a[self::FIELD_SPECIFIED_SUBSTANCE] = $vs; + $a[self::FIELD_SPECIFIED_SUBSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIFIED_SUBSTANCE][] = $v; + } } if (null !== ($v = $this->getSubstance())) { $a[self::FIELD_SUBSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteraction.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteraction.php index 64e2d73e73..28530d9775 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMedicinalProductInteraction extends FHIRDomainResource implements PHPF const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -199,20 +199,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_EFFECT])) { @@ -726,8 +733,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -738,17 +747,32 @@ public function jsonSerialize() $a[self::FIELD_INCIDENCE] = $v; } if ([] !== ($vs = $this->getInteractant())) { - $a[self::FIELD_INTERACTANT] = $vs; + $a[self::FIELD_INTERACTANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERACTANT][] = $v; + } } if (null !== ($v = $this->getManagement())) { $a[self::FIELD_MANAGEMENT] = $v; } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufactured.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufactured.php index 50d1ae8ffc..095e80ec0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufactured.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufactured.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRMedicinalProductManufactured extends FHIRDomainResource implements PHP const FIELD_UNIT_OF_PRESENTATION = 'unitOfPresentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -757,16 +757,34 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } } if (null !== ($v = $this->getManufacturedDoseForm())) { $a[self::FIELD_MANUFACTURED_DOSE_FORM] = $v; } if ([] !== ($vs = $this->getManufacturer())) { - $a[self::FIELD_MANUFACTURER] = $vs; + $a[self::FIELD_MANUFACTURER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANUFACTURER][] = $v; + } } if ([] !== ($vs = $this->getOtherCharacteristics())) { - $a[self::FIELD_OTHER_CHARACTERISTICS] = $vs; + $a[self::FIELD_OTHER_CHARACTERISTICS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OTHER_CHARACTERISTICS][] = $v; + } } if (null !== ($v = $this->getPhysicalCharacteristics())) { $a[self::FIELD_PHYSICAL_CHARACTERISTICS] = $v; @@ -777,6 +795,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitOfPresentation())) { $a[self::FIELD_UNIT_OF_PRESENTATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackaged.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackaged.php index 7cfc58f2d8..f1f6685af6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackaged.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackaged.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRMedicinalProductPackaged extends FHIRDomainResource implements PHPFHIR const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A medicinal product in a container or package. @@ -243,20 +243,27 @@ public function __construct($data = null) $this->addBatchIdentifier(new FHIRMedicinalProductPackagedBatchIdentifier($data[self::FIELD_BATCH_IDENTIFIER])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -1005,35 +1012,76 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBatchIdentifier())) { - $a[self::FIELD_BATCH_IDENTIFIER] = $vs; + $a[self::FIELD_BATCH_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BATCH_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLegalStatusOfSupply())) { $a[self::FIELD_LEGAL_STATUS_OF_SUPPLY] = $v; } if ([] !== ($vs = $this->getManufacturer())) { - $a[self::FIELD_MANUFACTURER] = $vs; + $a[self::FIELD_MANUFACTURER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANUFACTURER][] = $v; + } } if (null !== ($v = $this->getMarketingAuthorization())) { $a[self::FIELD_MARKETING_AUTHORIZATION] = $v; } if ([] !== ($vs = $this->getMarketingStatus())) { - $a[self::FIELD_MARKETING_STATUS] = $vs; + $a[self::FIELD_MARKETING_STATUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MARKETING_STATUS][] = $v; + } } if ([] !== ($vs = $this->getPackageItem())) { - $a[self::FIELD_PACKAGE_ITEM] = $vs; + $a[self::FIELD_PACKAGE_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PACKAGE_ITEM][] = $v; + } } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceutical.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceutical.php index fbee624808..287a3b2119 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceutical.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceutical.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRMedicinalProductPharmaceutical extends FHIRDomainResource implements P const FIELD_UNIT_OF_PRESENTATION = 'unitOfPresentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -822,23 +822,56 @@ public function jsonSerialize() $a[self::FIELD_ADMINISTRABLE_DOSE_FORM] = $v; } if ([] !== ($vs = $this->getCharacteristics())) { - $a[self::FIELD_CHARACTERISTICS] = $vs; + $a[self::FIELD_CHARACTERISTICS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTICS][] = $v; + } } if ([] !== ($vs = $this->getDevice())) { - $a[self::FIELD_DEVICE] = $vs; + $a[self::FIELD_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEVICE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } } if ([] !== ($vs = $this->getRouteOfAdministration())) { - $a[self::FIELD_ROUTE_OF_ADMINISTRATION] = $vs; + $a[self::FIELD_ROUTE_OF_ADMINISTRATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROUTE_OF_ADMINISTRATION][] = $v; + } } if (null !== ($v = $this->getUnitOfPresentation())) { $a[self::FIELD_UNIT_OF_PRESENTATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffect.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffect.php index 6775c0ca29..8aa66c2cf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffect.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffect.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRMedicinalProductUndesirableEffect extends FHIRDomainResource implement const FIELD_SYMPTOM_CONDITION_EFFECT = 'symptomConditionEffect'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -588,14 +588,29 @@ public function jsonSerialize() $a[self::FIELD_FREQUENCY_OF_OCCURRENCE] = $v; } if ([] !== ($vs = $this->getPopulation())) { - $a[self::FIELD_POPULATION] = $vs; + $a[self::FIELD_POPULATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POPULATION][] = $v; + } } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if (null !== ($v = $this->getSymptomConditionEffect())) { $a[self::FIELD_SYMPTOM_CONDITION_EFFECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php index 07fc53a516..6fdebcec93 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRMessageDefinition extends FHIRDomainResource implements PHPFHIRContain const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Defines the characteristics of a message that can be shared between systems, @@ -515,36 +515,50 @@ public function __construct($data = null) $this->addAllowedResponse(new FHIRMessageDefinitionAllowedResponse($data[self::FIELD_ALLOWED_RESPONSE])); } } - if (isset($data[self::FIELD_BASE])) { - $ext = (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) - ? $data[self::FIELD_BASE_EXT] - : null; - if ($data[self::FIELD_BASE] instanceof FHIRCanonical) { - $this->setBase($data[self::FIELD_BASE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE])) { - $this->setBase(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_BASE]] + $ext)); - } else if (is_array($data[self::FIELD_BASE])) { - $this->setBase(new FHIRCanonical(array_merge($ext, $data[self::FIELD_BASE]))); - } + if (isset($data[self::FIELD_BASE]) || isset($data[self::FIELD_BASE_EXT])) { + if (isset($data[self::FIELD_BASE])) { + $value = $data[self::FIELD_BASE]; } else { - $this->setBase(new FHIRCanonical($data[self::FIELD_BASE])); + $value = null; } - } - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRMessageSignificanceCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); + if (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) { + $ext = $data[self::FIELD_BASE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setBase($value); + } else if (is_array($value)) { + $this->setBase(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setBase(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBase(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; } else { - $this->setCategory(new FHIRMessageSignificanceCategory($data[self::FIELD_CATEGORY])); + $value = null; + } + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMessageSignificanceCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCategory(new FHIRMessageSignificanceCategory($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -565,52 +579,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EVENT_CODING])) { @@ -620,36 +655,50 @@ public function __construct($data = null) $this->setEventCoding(new FHIRCoding($data[self::FIELD_EVENT_CODING])); } } - if (isset($data[self::FIELD_EVENT_URI])) { - $ext = (isset($data[self::FIELD_EVENT_URI_EXT]) && is_array($data[self::FIELD_EVENT_URI_EXT])) - ? $data[self::FIELD_EVENT_URI_EXT] - : null; - if ($data[self::FIELD_EVENT_URI] instanceof FHIRUri) { - $this->setEventUri($data[self::FIELD_EVENT_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EVENT_URI])) { - $this->setEventUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_EVENT_URI]] + $ext)); - } else if (is_array($data[self::FIELD_EVENT_URI])) { - $this->setEventUri(new FHIRUri(array_merge($ext, $data[self::FIELD_EVENT_URI]))); - } + if (isset($data[self::FIELD_EVENT_URI]) || isset($data[self::FIELD_EVENT_URI_EXT])) { + if (isset($data[self::FIELD_EVENT_URI])) { + $value = $data[self::FIELD_EVENT_URI]; } else { - $this->setEventUri(new FHIRUri($data[self::FIELD_EVENT_URI])); + $value = null; } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + if (isset($data[self::FIELD_EVENT_URI_EXT]) && is_array($data[self::FIELD_EVENT_URI_EXT])) { + $ext = $data[self::FIELD_EVENT_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEventUri($value); + } else if (is_array($value)) { + $this->setEventUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEventUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEventUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FOCUS])) { @@ -670,33 +719,42 @@ public function __construct($data = null) $this->addFocus(new FHIRMessageDefinitionFocus($data[self::FIELD_FOCUS])); } } - if (isset($data[self::FIELD_GRAPH])) { - $ext = (isset($data[self::FIELD_GRAPH_EXT]) && is_array($data[self::FIELD_GRAPH_EXT])) - ? $data[self::FIELD_GRAPH_EXT] - : null; - if (is_array($data[self::FIELD_GRAPH])) { - foreach($data[self::FIELD_GRAPH] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addGraph($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addGraph(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addGraph(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_GRAPH]) || isset($data[self::FIELD_GRAPH_EXT])) { + if (isset($data[self::FIELD_GRAPH])) { + $value = $data[self::FIELD_GRAPH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GRAPH_EXT]) && is_array($data[self::FIELD_GRAPH_EXT])) { + $ext = $data[self::FIELD_GRAPH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addGraph($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addGraph($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addGraph(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addGraph(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addGraph(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addGraph(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addGraph(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addGraph(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_GRAPH] instanceof FHIRCanonical) { - $this->addGraph($data[self::FIELD_GRAPH]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_GRAPH])) { - $this->addGraph(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_GRAPH]] + $ext)); - } else { - $this->addGraph(new FHIRCanonical($data[self::FIELD_GRAPH])); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -735,174 +793,241 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PARENT])) { - $ext = (isset($data[self::FIELD_PARENT_EXT]) && is_array($data[self::FIELD_PARENT_EXT])) - ? $data[self::FIELD_PARENT_EXT] - : null; - if (is_array($data[self::FIELD_PARENT])) { - foreach($data[self::FIELD_PARENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addParent($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addParent(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addParent(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PARENT]) || isset($data[self::FIELD_PARENT_EXT])) { + if (isset($data[self::FIELD_PARENT])) { + $value = $data[self::FIELD_PARENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARENT_EXT]) && is_array($data[self::FIELD_PARENT_EXT])) { + $ext = $data[self::FIELD_PARENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addParent($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addParent($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addParent(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addParent(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addParent(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addParent(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addParent(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_PARENT] instanceof FHIRCanonical) { - $this->addParent($data[self::FIELD_PARENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PARENT])) { - $this->addParent(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_PARENT]] + $ext)); - } else { - $this->addParent(new FHIRCanonical($data[self::FIELD_PARENT])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addParent(new FHIRCanonical($iext)); } - } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_REPLACES])) { - $ext = (isset($data[self::FIELD_REPLACES_EXT]) && is_array($data[self::FIELD_REPLACES_EXT])) - ? $data[self::FIELD_REPLACES_EXT] - : null; - if (is_array($data[self::FIELD_REPLACES])) { - foreach($data[self::FIELD_REPLACES] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addReplaces($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addReplaces(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addReplaces(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_REPLACES]) || isset($data[self::FIELD_REPLACES_EXT])) { + if (isset($data[self::FIELD_REPLACES])) { + $value = $data[self::FIELD_REPLACES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPLACES_EXT]) && is_array($data[self::FIELD_REPLACES_EXT])) { + $ext = $data[self::FIELD_REPLACES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addReplaces($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addReplaces($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addReplaces(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addReplaces(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addReplaces(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addReplaces(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addReplaces(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_REPLACES] instanceof FHIRCanonical) { - $this->addReplaces($data[self::FIELD_REPLACES]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REPLACES])) { - $this->addReplaces(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_REPLACES]] + $ext)); - } else { - $this->addReplaces(new FHIRCanonical($data[self::FIELD_REPLACES])); - } - } - if (isset($data[self::FIELD_RESPONSE_REQUIRED])) { - $ext = (isset($data[self::FIELD_RESPONSE_REQUIRED_EXT]) && is_array($data[self::FIELD_RESPONSE_REQUIRED_EXT])) - ? $data[self::FIELD_RESPONSE_REQUIRED_EXT] - : null; - if ($data[self::FIELD_RESPONSE_REQUIRED] instanceof FHIRMessageheaderResponseRequest) { - $this->setResponseRequired($data[self::FIELD_RESPONSE_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE_REQUIRED])) { - $this->setResponseRequired(new FHIRMessageheaderResponseRequest([FHIRMessageheaderResponseRequest::FIELD_VALUE => $data[self::FIELD_RESPONSE_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE_REQUIRED])) { - $this->setResponseRequired(new FHIRMessageheaderResponseRequest(array_merge($ext, $data[self::FIELD_RESPONSE_REQUIRED]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addReplaces(new FHIRCanonical($iext)); } - } else { - $this->setResponseRequired(new FHIRMessageheaderResponseRequest($data[self::FIELD_RESPONSE_REQUIRED])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_RESPONSE_REQUIRED]) || isset($data[self::FIELD_RESPONSE_REQUIRED_EXT])) { + if (isset($data[self::FIELD_RESPONSE_REQUIRED])) { + $value = $data[self::FIELD_RESPONSE_REQUIRED]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_RESPONSE_REQUIRED_EXT]) && is_array($data[self::FIELD_RESPONSE_REQUIRED_EXT])) { + $ext = $data[self::FIELD_RESPONSE_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMessageheaderResponseRequest) { + $this->setResponseRequired($value); + } else if (is_array($value)) { + $this->setResponseRequired(new FHIRMessageheaderResponseRequest(array_merge($ext, $value))); + } else { + $this->setResponseRequired(new FHIRMessageheaderResponseRequest([FHIRMessageheaderResponseRequest::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponseRequired(new FHIRMessageheaderResponseRequest($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -923,20 +1048,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2592,43 +2724,65 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAllowedResponse())) { - $a[self::FIELD_ALLOWED_RESPONSE] = $vs; + $a[self::FIELD_ALLOWED_RESPONSE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ALLOWED_RESPONSE][] = $v; + } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_BASE_EXT] = $enc; } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMessageSignificanceCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMessageSignificanceCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2637,131 +2791,202 @@ public function jsonSerialize() } if (null !== ($v = $this->getEventUri())) { $a[self::FIELD_EVENT_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_EVENT_URI_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFocus())) { - $a[self::FIELD_FOCUS] = $vs; + $a[self::FIELD_FOCUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCUS][] = $v; + } } if ([] !== ($vs = $this->getGraph())) { $a[self::FIELD_GRAPH] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_GRAPH][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_GRAPH_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_GRAPH_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_GRAPH_EXT] = $encs; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParent())) { $a[self::FIELD_PARENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PARENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PARENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PARENT_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PARENT_EXT] = $encs; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getReplaces())) { $a[self::FIELD_REPLACES] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REPLACES][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REPLACES_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REPLACES_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REPLACES_EXT] = $encs; + } } if (null !== ($v = $this->getResponseRequired())) { $a[self::FIELD_RESPONSE_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMessageheaderResponseRequest::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMessageheaderResponseRequest::FIELD_VALUE]); $a[self::FIELD_RESPONSE_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php index 43bcceec60..9cf955e3af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRMessageHeader extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_SOURCE = 'source'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -288,20 +288,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRCanonical) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRCanonical($data[self::FIELD_DEFINITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_DESTINATION])) { @@ -336,20 +343,27 @@ public function __construct($data = null) $this->setEventCoding(new FHIRCoding($data[self::FIELD_EVENT_CODING])); } } - if (isset($data[self::FIELD_EVENT_URI])) { - $ext = (isset($data[self::FIELD_EVENT_URI_EXT]) && is_array($data[self::FIELD_EVENT_URI_EXT])) - ? $data[self::FIELD_EVENT_URI_EXT] - : null; - if ($data[self::FIELD_EVENT_URI] instanceof FHIRUri) { - $this->setEventUri($data[self::FIELD_EVENT_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EVENT_URI])) { - $this->setEventUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_EVENT_URI]] + $ext)); - } else if (is_array($data[self::FIELD_EVENT_URI])) { - $this->setEventUri(new FHIRUri(array_merge($ext, $data[self::FIELD_EVENT_URI]))); - } + if (isset($data[self::FIELD_EVENT_URI]) || isset($data[self::FIELD_EVENT_URI_EXT])) { + if (isset($data[self::FIELD_EVENT_URI])) { + $value = $data[self::FIELD_EVENT_URI]; } else { - $this->setEventUri(new FHIRUri($data[self::FIELD_EVENT_URI])); + $value = null; + } + if (isset($data[self::FIELD_EVENT_URI_EXT]) && is_array($data[self::FIELD_EVENT_URI_EXT])) { + $ext = $data[self::FIELD_EVENT_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEventUri($value); + } else if (is_array($value)) { + $this->setEventUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEventUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEventUri(new FHIRUri($ext)); } } if (isset($data[self::FIELD_FOCUS])) { @@ -1084,13 +1098,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getDestination())) { - $a[self::FIELD_DESTINATION] = $vs; + $a[self::FIELD_DESTINATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESTINATION][] = $v; + } } if (null !== ($v = $this->getEnterer())) { $a[self::FIELD_ENTERER] = $v; @@ -1100,13 +1122,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getEventUri())) { $a[self::FIELD_EVENT_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_EVENT_URI_EXT] = $enc; } } if ([] !== ($vs = $this->getFocus())) { - $a[self::FIELD_FOCUS] = $vs; + $a[self::FIELD_FOCUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCUS][] = $v; + } } if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v; @@ -1123,6 +1153,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMolecularSequence.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMolecularSequence.php index e4e6764836..fc021dbe85 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMolecularSequence.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRMolecularSequence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRMolecularSequence extends FHIRDomainResource implements PHPFHIRContain const FIELD_VARIANT = 'variant'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -317,20 +317,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COORDINATE_SYSTEM])) { - $ext = (isset($data[self::FIELD_COORDINATE_SYSTEM_EXT]) && is_array($data[self::FIELD_COORDINATE_SYSTEM_EXT])) - ? $data[self::FIELD_COORDINATE_SYSTEM_EXT] - : null; - if ($data[self::FIELD_COORDINATE_SYSTEM] instanceof FHIRInteger) { - $this->setCoordinateSystem($data[self::FIELD_COORDINATE_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COORDINATE_SYSTEM])) { - $this->setCoordinateSystem(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COORDINATE_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_COORDINATE_SYSTEM])) { - $this->setCoordinateSystem(new FHIRInteger(array_merge($ext, $data[self::FIELD_COORDINATE_SYSTEM]))); - } + if (isset($data[self::FIELD_COORDINATE_SYSTEM]) || isset($data[self::FIELD_COORDINATE_SYSTEM_EXT])) { + if (isset($data[self::FIELD_COORDINATE_SYSTEM])) { + $value = $data[self::FIELD_COORDINATE_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COORDINATE_SYSTEM_EXT]) && is_array($data[self::FIELD_COORDINATE_SYSTEM_EXT])) { + $ext = $data[self::FIELD_COORDINATE_SYSTEM_EXT]; } else { - $this->setCoordinateSystem(new FHIRInteger($data[self::FIELD_COORDINATE_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCoordinateSystem($value); + } else if (is_array($value)) { + $this->setCoordinateSystem(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCoordinateSystem(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCoordinateSystem(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_DEVICE])) { @@ -358,20 +365,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_OBSERVED_SEQ])) { - $ext = (isset($data[self::FIELD_OBSERVED_SEQ_EXT]) && is_array($data[self::FIELD_OBSERVED_SEQ_EXT])) - ? $data[self::FIELD_OBSERVED_SEQ_EXT] - : null; - if ($data[self::FIELD_OBSERVED_SEQ] instanceof FHIRString) { - $this->setObservedSeq($data[self::FIELD_OBSERVED_SEQ]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OBSERVED_SEQ])) { - $this->setObservedSeq(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OBSERVED_SEQ]] + $ext)); - } else if (is_array($data[self::FIELD_OBSERVED_SEQ])) { - $this->setObservedSeq(new FHIRString(array_merge($ext, $data[self::FIELD_OBSERVED_SEQ]))); - } + if (isset($data[self::FIELD_OBSERVED_SEQ]) || isset($data[self::FIELD_OBSERVED_SEQ_EXT])) { + if (isset($data[self::FIELD_OBSERVED_SEQ])) { + $value = $data[self::FIELD_OBSERVED_SEQ]; } else { - $this->setObservedSeq(new FHIRString($data[self::FIELD_OBSERVED_SEQ])); + $value = null; + } + if (isset($data[self::FIELD_OBSERVED_SEQ_EXT]) && is_array($data[self::FIELD_OBSERVED_SEQ_EXT])) { + $ext = $data[self::FIELD_OBSERVED_SEQ_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setObservedSeq($value); + } else if (is_array($value)) { + $this->setObservedSeq(new FHIRString(array_merge($ext, $value))); + } else { + $this->setObservedSeq(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setObservedSeq(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -431,20 +445,27 @@ public function __construct($data = null) $this->setQuantity(new FHIRQuantity($data[self::FIELD_QUANTITY])); } } - if (isset($data[self::FIELD_READ_COVERAGE])) { - $ext = (isset($data[self::FIELD_READ_COVERAGE_EXT]) && is_array($data[self::FIELD_READ_COVERAGE_EXT])) - ? $data[self::FIELD_READ_COVERAGE_EXT] - : null; - if ($data[self::FIELD_READ_COVERAGE] instanceof FHIRInteger) { - $this->setReadCoverage($data[self::FIELD_READ_COVERAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READ_COVERAGE])) { - $this->setReadCoverage(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_READ_COVERAGE]] + $ext)); - } else if (is_array($data[self::FIELD_READ_COVERAGE])) { - $this->setReadCoverage(new FHIRInteger(array_merge($ext, $data[self::FIELD_READ_COVERAGE]))); - } + if (isset($data[self::FIELD_READ_COVERAGE]) || isset($data[self::FIELD_READ_COVERAGE_EXT])) { + if (isset($data[self::FIELD_READ_COVERAGE])) { + $value = $data[self::FIELD_READ_COVERAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_READ_COVERAGE_EXT]) && is_array($data[self::FIELD_READ_COVERAGE_EXT])) { + $ext = $data[self::FIELD_READ_COVERAGE_EXT]; } else { - $this->setReadCoverage(new FHIRInteger($data[self::FIELD_READ_COVERAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setReadCoverage($value); + } else if (is_array($value)) { + $this->setReadCoverage(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setReadCoverage(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReadCoverage(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_REFERENCE_SEQ])) { @@ -497,20 +518,27 @@ public function __construct($data = null) $this->addStructureVariant(new FHIRMolecularSequenceStructureVariant($data[self::FIELD_STRUCTURE_VARIANT])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSequenceType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSequenceType([FHIRSequenceType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSequenceType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRSequenceType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSequenceType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSequenceType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSequenceType([FHIRSequenceType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRSequenceType($ext)); } } if (isset($data[self::FIELD_VARIANT])) { @@ -1470,8 +1498,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCoordinateSystem())) { $a[self::FIELD_COORDINATE_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COORDINATE_SYSTEM_EXT] = $enc; } } @@ -1479,12 +1509,20 @@ public function jsonSerialize() $a[self::FIELD_DEVICE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getObservedSeq())) { $a[self::FIELD_OBSERVED_SEQ] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OBSERVED_SEQ_EXT] = $enc; } } @@ -1495,18 +1533,32 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getPointer())) { - $a[self::FIELD_POINTER] = $vs; + $a[self::FIELD_POINTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POINTER][] = $v; + } } if ([] !== ($vs = $this->getQuality())) { - $a[self::FIELD_QUALITY] = $vs; + $a[self::FIELD_QUALITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUALITY][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } if (null !== ($v = $this->getReadCoverage())) { $a[self::FIELD_READ_COVERAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_READ_COVERAGE_EXT] = $enc; } } @@ -1514,23 +1566,46 @@ public function jsonSerialize() $a[self::FIELD_REFERENCE_SEQ] = $v; } if ([] !== ($vs = $this->getRepository())) { - $a[self::FIELD_REPOSITORY] = $vs; + $a[self::FIELD_REPOSITORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPOSITORY][] = $v; + } } if (null !== ($v = $this->getSpecimen())) { $a[self::FIELD_SPECIMEN] = $v; } if ([] !== ($vs = $this->getStructureVariant())) { - $a[self::FIELD_STRUCTURE_VARIANT] = $vs; + $a[self::FIELD_STRUCTURE_VARIANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRUCTURE_VARIANT][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSequenceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSequenceType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if ([] !== ($vs = $this->getVariant())) { - $a[self::FIELD_VARIANT] = $vs; + $a[self::FIELD_VARIANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VARIANT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php index f88dab8b6e..bfc4623bf2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRNamingSystem extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_USE_CONTEXT = 'useContext'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -328,36 +328,50 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -378,84 +392,119 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRNamingSystemType) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRNamingSystemType([FHIRNamingSystemType::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRNamingSystemType(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRNamingSystemType($data[self::FIELD_KIND])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + if (null !== $value) { + if ($value instanceof FHIRNamingSystemType) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRNamingSystemType(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRNamingSystemType([FHIRNamingSystemType::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + } else if ([] !== $ext) { + $this->setKind(new FHIRNamingSystemType($ext)); } } - if (isset($data[self::FIELD_RESPONSIBLE])) { - $ext = (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) - ? $data[self::FIELD_RESPONSIBLE_EXT] - : null; - if ($data[self::FIELD_RESPONSIBLE] instanceof FHIRString) { - $this->setResponsible($data[self::FIELD_RESPONSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESPONSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRString(array_merge($ext, $data[self::FIELD_RESPONSIBLE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setResponsible(new FHIRString($data[self::FIELD_RESPONSIBLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_RESPONSIBLE]) || isset($data[self::FIELD_RESPONSIBLE_EXT])) { + if (isset($data[self::FIELD_RESPONSIBLE])) { + $value = $data[self::FIELD_RESPONSIBLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) { + $ext = $data[self::FIELD_RESPONSIBLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResponsible($value); + } else if (is_array($value)) { + $this->setResponsible(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResponsible(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponsible(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -483,20 +532,27 @@ public function __construct($data = null) $this->addUniqueId(new FHIRNamingSystemUniqueId($data[self::FIELD_UNIQUE_ID])); } } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); - } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1380,57 +1436,83 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNamingSystemType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNamingSystemType::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getResponsible())) { $a[self::FIELD_RESPONSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESPONSIBLE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1438,17 +1520,34 @@ public function jsonSerialize() $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getUniqueId())) { - $a[self::FIELD_UNIQUE_ID] = $vs; + $a[self::FIELD_UNIQUE_ID] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UNIQUE_ID][] = $v; + } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php index b3232ff542..0d1016fef2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRNutritionOrder extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_SUPPLEMENT = 'supplement'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -373,20 +373,27 @@ public function __construct($data = null) $this->addAllergyIntolerance(new FHIRReference($data[self::FIELD_ALLERGY_INTOLERANCE])); } } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -457,107 +464,141 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANTIATES])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_EXT]) && is_array($data[self::FIELD_INSTANTIATES_EXT])) - ? $data[self::FIELD_INSTANTIATES_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES])) { - foreach($data[self::FIELD_INSTANTIATES] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiates($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiates(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES]) || isset($data[self::FIELD_INSTANTIATES_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES])) { + $value = $data[self::FIELD_INSTANTIATES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_EXT]) && is_array($data[self::FIELD_INSTANTIATES_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiates($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiates($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiates(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiates(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiates(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiates(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES] instanceof FHIRUri) { - $this->addInstantiates($data[self::FIELD_INSTANTIATES]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES])) { - $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES]] + $ext)); - } else { - $this->addInstantiates(new FHIRUri($data[self::FIELD_INSTANTIATES])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); - } - } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; } else { - $this->setIntent(new FHIRRequestIntent($data[self::FIELD_INTENT])); + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRRequestIntent($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -599,20 +640,27 @@ public function __construct($data = null) $this->setPatient(new FHIRReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUPPLEMENT])) { @@ -1763,12 +1811,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAllergyIntolerance())) { - $a[self::FIELD_ALLERGY_INTOLERANCE] = $vs; + $a[self::FIELD_ALLERGY_INTOLERANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ALLERGY_INTOLERANCE][] = $v; + } } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } @@ -1779,68 +1835,118 @@ public function jsonSerialize() $a[self::FIELD_ENTERAL_FORMULA] = $v; } if ([] !== ($vs = $this->getExcludeFoodModifier())) { - $a[self::FIELD_EXCLUDE_FOOD_MODIFIER] = $vs; + $a[self::FIELD_EXCLUDE_FOOD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCLUDE_FOOD_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getFoodPreferenceModifier())) { - $a[self::FIELD_FOOD_PREFERENCE_MODIFIER] = $vs; + $a[self::FIELD_FOOD_PREFERENCE_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOOD_PREFERENCE_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstantiates())) { $a[self::FIELD_INSTANTIATES] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOralDiet())) { $a[self::FIELD_ORAL_DIET] = $v; @@ -1853,13 +1959,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupplement())) { - $a[self::FIELD_SUPPLEMENT] = $vs; + $a[self::FIELD_SUPPLEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPLEMENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservation.php index 04b7d0605f..9914979a3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRObservation extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_VALUE_TIME_EXT = '_valueTime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -762,36 +762,50 @@ public function __construct($data = null) $this->setDevice(new FHIRReference($data[self::FIELD_DEVICE])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_EFFECTIVE_INSTANT])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_INSTANT_EXT]) && is_array($data[self::FIELD_EFFECTIVE_INSTANT_EXT])) - ? $data[self::FIELD_EFFECTIVE_INSTANT_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_INSTANT] instanceof FHIRInstant) { - $this->setEffectiveInstant($data[self::FIELD_EFFECTIVE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_INSTANT])) { - $this->setEffectiveInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_INSTANT])) { - $this->setEffectiveInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_EFFECTIVE_INSTANT]))); + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_EFFECTIVE_INSTANT]) || isset($data[self::FIELD_EFFECTIVE_INSTANT_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_INSTANT])) { + $value = $data[self::FIELD_EFFECTIVE_INSTANT]; } else { - $this->setEffectiveInstant(new FHIRInstant($data[self::FIELD_EFFECTIVE_INSTANT])); + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_INSTANT_EXT]) && is_array($data[self::FIELD_EFFECTIVE_INSTANT_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_INSTANT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEffectiveInstant($value); + } else if (is_array($value)) { + $this->setEffectiveInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEffectiveInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveInstant(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -887,20 +901,27 @@ public function __construct($data = null) $this->addInterpretation(new FHIRCodeableConcept($data[self::FIELD_INTERPRETATION])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRInstant) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRInstant($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_METHOD])) { @@ -989,20 +1010,27 @@ public function __construct($data = null) $this->setSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRObservationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRObservationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRObservationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRObservationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1012,20 +1040,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -1035,36 +1070,50 @@ public function __construct($data = null) $this->setValueCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_VALUE_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -1102,36 +1151,50 @@ public function __construct($data = null) $this->setValueSampledData(new FHIRSampledData($data[self::FIELD_VALUE_SAMPLED_DATA])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } } @@ -3287,40 +3350,68 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getBodySite())) { $a[self::FIELD_BODY_SITE] = $v; } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getComponent())) { - $a[self::FIELD_COMPONENT] = $vs; + $a[self::FIELD_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPONENT][] = $v; + } } if (null !== ($v = $this->getDataAbsentReason())) { $a[self::FIELD_DATA_ABSENT_REASON] = $v; } if ([] !== ($vs = $this->getDerivedFrom())) { - $a[self::FIELD_DERIVED_FROM] = $vs; + $a[self::FIELD_DERIVED_FROM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DERIVED_FROM][] = $v; + } } if (null !== ($v = $this->getDevice())) { $a[self::FIELD_DEVICE] = $v; } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getEffectiveInstant())) { $a[self::FIELD_EFFECTIVE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_INSTANT_EXT] = $enc; } } @@ -3334,21 +3425,47 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getFocus())) { - $a[self::FIELD_FOCUS] = $vs; + $a[self::FIELD_FOCUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCUS][] = $v; + } } if ([] !== ($vs = $this->getHasMember())) { - $a[self::FIELD_HAS_MEMBER] = $vs; + $a[self::FIELD_HAS_MEMBER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_HAS_MEMBER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInterpretation())) { - $a[self::FIELD_INTERPRETATION] = $vs; + $a[self::FIELD_INTERPRETATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERPRETATION][] = $v; + } } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } @@ -3356,24 +3473,50 @@ public function jsonSerialize() $a[self::FIELD_METHOD] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getReferenceRange())) { - $a[self::FIELD_REFERENCE_RANGE] = $vs; + $a[self::FIELD_REFERENCE_RANGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_RANGE][] = $v; + } } if (null !== ($v = $this->getSpecimen())) { $a[self::FIELD_SPECIMEN] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3382,8 +3525,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -3392,15 +3537,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } @@ -3421,18 +3570,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservationDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservationDefinition.php index f82b2f6adb..abe154a314 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservationDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRObservationDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRObservationDefinition extends FHIRDomainResource implements PHPFHIRCon const FIELD_VALID_CODED_VALUE_SET = 'validCodedValueSet'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -345,20 +345,27 @@ public function __construct($data = null) $this->setMethod(new FHIRCodeableConcept($data[self::FIELD_METHOD])); } } - if (isset($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED])) { - $ext = (isset($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED_EXT]) && is_array($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED_EXT])) - ? $data[self::FIELD_MULTIPLE_RESULTS_ALLOWED_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED] instanceof FHIRBoolean) { - $this->setMultipleResultsAllowed($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED])) { - $this->setMultipleResultsAllowed(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MULTIPLE_RESULTS_ALLOWED]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED])) { - $this->setMultipleResultsAllowed(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MULTIPLE_RESULTS_ALLOWED]))); - } + if (isset($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED]) || isset($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED])) { + $value = $data[self::FIELD_MULTIPLE_RESULTS_ALLOWED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED_EXT]) && is_array($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_RESULTS_ALLOWED_EXT]; } else { - $this->setMultipleResultsAllowed(new FHIRBoolean($data[self::FIELD_MULTIPLE_RESULTS_ALLOWED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMultipleResultsAllowed($value); + } else if (is_array($value)) { + $this->setMultipleResultsAllowed(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMultipleResultsAllowed(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMultipleResultsAllowed(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_NORMAL_CODED_VALUE_SET])) { @@ -368,49 +375,65 @@ public function __construct($data = null) $this->setNormalCodedValueSet(new FHIRReference($data[self::FIELD_NORMAL_CODED_VALUE_SET])); } } - if (isset($data[self::FIELD_PERMITTED_DATA_TYPE])) { - $ext = (isset($data[self::FIELD_PERMITTED_DATA_TYPE_EXT]) && is_array($data[self::FIELD_PERMITTED_DATA_TYPE_EXT])) - ? $data[self::FIELD_PERMITTED_DATA_TYPE_EXT] - : null; - if (is_array($data[self::FIELD_PERMITTED_DATA_TYPE])) { - foreach($data[self::FIELD_PERMITTED_DATA_TYPE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRObservationDataType) { - $this->addPermittedDataType($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPermittedDataType(new FHIRObservationDataType([FHIRObservationDataType::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPermittedDataType(new FHIRObservationDataType(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PERMITTED_DATA_TYPE]) || isset($data[self::FIELD_PERMITTED_DATA_TYPE_EXT])) { + if (isset($data[self::FIELD_PERMITTED_DATA_TYPE])) { + $value = $data[self::FIELD_PERMITTED_DATA_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERMITTED_DATA_TYPE_EXT]) && is_array($data[self::FIELD_PERMITTED_DATA_TYPE_EXT])) { + $ext = $data[self::FIELD_PERMITTED_DATA_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationDataType) { + $this->addPermittedDataType($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRObservationDataType) { + $this->addPermittedDataType($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPermittedDataType(new FHIRObservationDataType(array_merge($v, $iext))); + } else { + $this->addPermittedDataType(new FHIRObservationDataType([FHIRObservationDataType::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPermittedDataType(new FHIRObservationDataType($v)); } + } elseif (is_array($value)) { + $this->addPermittedDataType(new FHIRObservationDataType(array_merge($ext, $value))); + } else { + $this->addPermittedDataType(new FHIRObservationDataType([FHIRObservationDataType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPermittedDataType(new FHIRObservationDataType($iext)); } - } elseif ($data[self::FIELD_PERMITTED_DATA_TYPE] instanceof FHIRObservationDataType) { - $this->addPermittedDataType($data[self::FIELD_PERMITTED_DATA_TYPE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PERMITTED_DATA_TYPE])) { - $this->addPermittedDataType(new FHIRObservationDataType([FHIRObservationDataType::FIELD_VALUE => $data[self::FIELD_PERMITTED_DATA_TYPE]] + $ext)); - } else { - $this->addPermittedDataType(new FHIRObservationDataType($data[self::FIELD_PERMITTED_DATA_TYPE])); } } - if (isset($data[self::FIELD_PREFERRED_REPORT_NAME])) { - $ext = (isset($data[self::FIELD_PREFERRED_REPORT_NAME_EXT]) && is_array($data[self::FIELD_PREFERRED_REPORT_NAME_EXT])) - ? $data[self::FIELD_PREFERRED_REPORT_NAME_EXT] - : null; - if ($data[self::FIELD_PREFERRED_REPORT_NAME] instanceof FHIRString) { - $this->setPreferredReportName($data[self::FIELD_PREFERRED_REPORT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERRED_REPORT_NAME])) { - $this->setPreferredReportName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREFERRED_REPORT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERRED_REPORT_NAME])) { - $this->setPreferredReportName(new FHIRString(array_merge($ext, $data[self::FIELD_PREFERRED_REPORT_NAME]))); - } + if (isset($data[self::FIELD_PREFERRED_REPORT_NAME]) || isset($data[self::FIELD_PREFERRED_REPORT_NAME_EXT])) { + if (isset($data[self::FIELD_PREFERRED_REPORT_NAME])) { + $value = $data[self::FIELD_PREFERRED_REPORT_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFERRED_REPORT_NAME_EXT]) && is_array($data[self::FIELD_PREFERRED_REPORT_NAME_EXT])) { + $ext = $data[self::FIELD_PREFERRED_REPORT_NAME_EXT]; } else { - $this->setPreferredReportName(new FHIRString($data[self::FIELD_PREFERRED_REPORT_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPreferredReportName($value); + } else if (is_array($value)) { + $this->setPreferredReportName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPreferredReportName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreferredReportName(new FHIRString($ext)); } } if (isset($data[self::FIELD_QUALIFIED_INTERVAL])) { @@ -1203,7 +1226,13 @@ public function jsonSerialize() $a[self::FIELD_ABNORMAL_CODED_VALUE_SET] = $v; } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -1212,15 +1241,23 @@ public function jsonSerialize() $a[self::FIELD_CRITICAL_CODED_VALUE_SET] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMethod())) { $a[self::FIELD_METHOD] = $v; } if (null !== ($v = $this->getMultipleResultsAllowed())) { $a[self::FIELD_MULTIPLE_RESULTS_ALLOWED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_RESULTS_ALLOWED_EXT] = $enc; } } @@ -1229,28 +1266,44 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPermittedDataType())) { $a[self::FIELD_PERMITTED_DATA_TYPE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PERMITTED_DATA_TYPE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PERMITTED_DATA_TYPE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRObservationDataType::FIELD_VALUE]) || array_key_exists(FHIRObservationDataType::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PERMITTED_DATA_TYPE_EXT][] = null; + unset($enc[FHIRObservationDataType::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PERMITTED_DATA_TYPE_EXT] = $encs; + } } if (null !== ($v = $this->getPreferredReportName())) { $a[self::FIELD_PREFERRED_REPORT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PREFERRED_REPORT_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getQualifiedInterval())) { - $a[self::FIELD_QUALIFIED_INTERVAL] = $vs; + $a[self::FIELD_QUALIFIED_INTERVAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUALIFIED_INTERVAL][] = $v; + } } if (null !== ($v = $this->getQuantitativeDetails())) { $a[self::FIELD_QUANTITATIVE_DETAILS] = $v; @@ -1258,6 +1311,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValidCodedValueSet())) { $a[self::FIELD_VALID_CODED_VALUE_SET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php index 5174441a7d..2d8b6f21c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -142,7 +142,7 @@ class FHIROperationDefinition extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -505,68 +505,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AFFECTS_STATE])) { - $ext = (isset($data[self::FIELD_AFFECTS_STATE_EXT]) && is_array($data[self::FIELD_AFFECTS_STATE_EXT])) - ? $data[self::FIELD_AFFECTS_STATE_EXT] - : null; - if ($data[self::FIELD_AFFECTS_STATE] instanceof FHIRBoolean) { - $this->setAffectsState($data[self::FIELD_AFFECTS_STATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AFFECTS_STATE])) { - $this->setAffectsState(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AFFECTS_STATE]] + $ext)); - } else if (is_array($data[self::FIELD_AFFECTS_STATE])) { - $this->setAffectsState(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AFFECTS_STATE]))); - } + if (isset($data[self::FIELD_AFFECTS_STATE]) || isset($data[self::FIELD_AFFECTS_STATE_EXT])) { + if (isset($data[self::FIELD_AFFECTS_STATE])) { + $value = $data[self::FIELD_AFFECTS_STATE]; } else { - $this->setAffectsState(new FHIRBoolean($data[self::FIELD_AFFECTS_STATE])); + $value = null; } - } - if (isset($data[self::FIELD_BASE])) { - $ext = (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) - ? $data[self::FIELD_BASE_EXT] - : null; - if ($data[self::FIELD_BASE] instanceof FHIRCanonical) { - $this->setBase($data[self::FIELD_BASE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE])) { - $this->setBase(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_BASE]] + $ext)); - } else if (is_array($data[self::FIELD_BASE])) { - $this->setBase(new FHIRCanonical(array_merge($ext, $data[self::FIELD_BASE]))); - } + if (isset($data[self::FIELD_AFFECTS_STATE_EXT]) && is_array($data[self::FIELD_AFFECTS_STATE_EXT])) { + $ext = $data[self::FIELD_AFFECTS_STATE_EXT]; } else { - $this->setBase(new FHIRCanonical($data[self::FIELD_BASE])); + $ext = []; } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAffectsState($value); + } else if (is_array($value)) { + $this->setAffectsState(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAffectsState(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAffectsState(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_BASE]) || isset($data[self::FIELD_BASE_EXT])) { + if (isset($data[self::FIELD_BASE])) { + $value = $data[self::FIELD_BASE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; + } + if (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) { + $ext = $data[self::FIELD_BASE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setBase($value); + } else if (is_array($value)) { + $this->setBase(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setBase(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBase(new FHIRCanonical($ext)); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRMarkdown) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COMMENT]))); + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRMarkdown($data[self::FIELD_COMMENT])); + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -587,84 +615,119 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_INPUT_PROFILE])) { - $ext = (isset($data[self::FIELD_INPUT_PROFILE_EXT]) && is_array($data[self::FIELD_INPUT_PROFILE_EXT])) - ? $data[self::FIELD_INPUT_PROFILE_EXT] - : null; - if ($data[self::FIELD_INPUT_PROFILE] instanceof FHIRCanonical) { - $this->setInputProfile($data[self::FIELD_INPUT_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INPUT_PROFILE])) { - $this->setInputProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INPUT_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_INPUT_PROFILE])) { - $this->setInputProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_INPUT_PROFILE]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setInputProfile(new FHIRCanonical($data[self::FIELD_INPUT_PROFILE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_INSTANCE])) { - $ext = (isset($data[self::FIELD_INSTANCE_EXT]) && is_array($data[self::FIELD_INSTANCE_EXT])) - ? $data[self::FIELD_INSTANCE_EXT] - : null; - if ($data[self::FIELD_INSTANCE] instanceof FHIRBoolean) { - $this->setInstance($data[self::FIELD_INSTANCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTANCE])) { - $this->setInstance(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INSTANCE]] + $ext)); - } else if (is_array($data[self::FIELD_INSTANCE])) { - $this->setInstance(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INSTANCE]))); + if (isset($data[self::FIELD_INPUT_PROFILE]) || isset($data[self::FIELD_INPUT_PROFILE_EXT])) { + if (isset($data[self::FIELD_INPUT_PROFILE])) { + $value = $data[self::FIELD_INPUT_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INPUT_PROFILE_EXT]) && is_array($data[self::FIELD_INPUT_PROFILE_EXT])) { + $ext = $data[self::FIELD_INPUT_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setInputProfile($value); + } else if (is_array($value)) { + $this->setInputProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setInputProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInputProfile(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_INSTANCE]) || isset($data[self::FIELD_INSTANCE_EXT])) { + if (isset($data[self::FIELD_INSTANCE])) { + $value = $data[self::FIELD_INSTANCE]; } else { - $this->setInstance(new FHIRBoolean($data[self::FIELD_INSTANCE])); + $value = null; + } + if (isset($data[self::FIELD_INSTANCE_EXT]) && is_array($data[self::FIELD_INSTANCE_EXT])) { + $ext = $data[self::FIELD_INSTANCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInstance($value); + } else if (is_array($value)) { + $this->setInstance(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInstance(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInstance(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -685,52 +748,73 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIROperationKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIROperationKind([FHIROperationKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIROperationKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIROperationKind($data[self::FIELD_KIND])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROperationKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIROperationKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIROperationKind([FHIROperationKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIROperationKind($ext)); } } - if (isset($data[self::FIELD_OUTPUT_PROFILE])) { - $ext = (isset($data[self::FIELD_OUTPUT_PROFILE_EXT]) && is_array($data[self::FIELD_OUTPUT_PROFILE_EXT])) - ? $data[self::FIELD_OUTPUT_PROFILE_EXT] - : null; - if ($data[self::FIELD_OUTPUT_PROFILE] instanceof FHIRCanonical) { - $this->setOutputProfile($data[self::FIELD_OUTPUT_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTPUT_PROFILE])) { - $this->setOutputProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_OUTPUT_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_OUTPUT_PROFILE])) { - $this->setOutputProfile(new FHIRCanonical(array_merge($ext, $data[self::FIELD_OUTPUT_PROFILE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_OUTPUT_PROFILE]) || isset($data[self::FIELD_OUTPUT_PROFILE_EXT])) { + if (isset($data[self::FIELD_OUTPUT_PROFILE])) { + $value = $data[self::FIELD_OUTPUT_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OUTPUT_PROFILE_EXT]) && is_array($data[self::FIELD_OUTPUT_PROFILE_EXT])) { + $ext = $data[self::FIELD_OUTPUT_PROFILE_EXT]; } else { - $this->setOutputProfile(new FHIRCanonical($data[self::FIELD_OUTPUT_PROFILE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setOutputProfile($value); + } else if (is_array($value)) { + $this->setOutputProfile(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setOutputProfile(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutputProfile(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_OVERLOAD])) { @@ -769,145 +853,203 @@ public function __construct($data = null) $this->addParameter(new FHIROperationDefinitionParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_RESOURCE])) { - $ext = (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) - ? $data[self::FIELD_RESOURCE_EXT] - : null; - if (is_array($data[self::FIELD_RESOURCE])) { - foreach($data[self::FIELD_RESOURCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addResource($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addResource(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addResource(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_RESOURCE]) || isset($data[self::FIELD_RESOURCE_EXT])) { + if (isset($data[self::FIELD_RESOURCE])) { + $value = $data[self::FIELD_RESOURCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addResource($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addResource($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addResource(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addResource(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addResource(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addResource(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addResource(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_RESOURCE] instanceof FHIRCode) { - $this->addResource($data[self::FIELD_RESOURCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_RESOURCE])) { - $this->addResource(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_RESOURCE]] + $ext)); - } else { - $this->addResource(new FHIRCode($data[self::FIELD_RESOURCE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addResource(new FHIRCode($iext)); } - } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRBoolean) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRBoolean(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setSystem(new FHIRBoolean($data[self::FIELD_SYSTEM])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRBoolean) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBoolean(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setType(new FHIRBoolean($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setType(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -928,20 +1070,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2595,174 +2744,255 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAffectsState())) { $a[self::FIELD_AFFECTS_STATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AFFECTS_STATE_EXT] = $enc; } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_BASE_EXT] = $enc; } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getInputProfile())) { $a[self::FIELD_INPUT_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_INPUT_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getInstance())) { $a[self::FIELD_INSTANCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INSTANCE_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROperationKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIROperationKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getOutputProfile())) { $a[self::FIELD_OUTPUT_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_OUTPUT_PROFILE_EXT] = $enc; } } if ([] !== ($vs = $this->getOverload())) { - $a[self::FIELD_OVERLOAD] = $vs; + $a[self::FIELD_OVERLOAD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OVERLOAD][] = $v; + } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getResource())) { $a[self::FIELD_RESOURCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_RESOURCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_RESOURCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_RESOURCE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_RESOURCE_EXT] = $encs; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php index 52e4f91ee2..085542446c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIROperationOutcome extends FHIRDomainResource implements PHPFHIRContaine const FIELD_ISSUE = 'issue'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A collection of error, warning, or information messages that result from a @@ -308,7 +308,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIssue())) { - $a[self::FIELD_ISSUE] = $vs; + $a[self::FIELD_ISSUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ISSUE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganization.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganization.php index dc122057bf..7639efb8ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganization.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIROrganization extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -247,20 +247,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -281,33 +288,42 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if (is_array($data[self::FIELD_ALIAS])) { - foreach($data[self::FIELD_ALIAS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAlias($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAlias(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAlias($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAlias($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAlias(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAlias(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAlias(new FHIRString($iext)); } - } elseif ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->addAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ALIAS])) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else { - $this->addAlias(new FHIRString($data[self::FIELD_ALIAS])); } } if (isset($data[self::FIELD_CONTACT])) { @@ -364,20 +380,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART_OF])) { @@ -1186,42 +1209,78 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if ([] !== ($vs = $this->getAlias())) { $a[self::FIELD_ALIAS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ALIAS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ALIAS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ALIAS_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ALIAS_EXT] = $encs; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1229,10 +1288,25 @@ public function jsonSerialize() $a[self::FIELD_PART_OF] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliation.php index 0123349672..c3b991b937 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIROrganizationAffiliation extends FHIRDomainResource implements PHPFHIRC const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -263,20 +263,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -1280,28 +1287,66 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getHealthcareService())) { - $a[self::FIELD_HEALTHCARE_SERVICE] = $vs; + $a[self::FIELD_HEALTHCARE_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_HEALTHCARE_SERVICE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if ([] !== ($vs = $this->getNetwork())) { - $a[self::FIELD_NETWORK] = $vs; + $a[self::FIELD_NETWORK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NETWORK][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -1313,10 +1358,25 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPatient.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPatient.php index 98c8a0a1b2..858cfa58a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPatient.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPatient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRPatient extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -357,20 +357,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -391,20 +398,27 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; + } + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_COMMUNICATION])) { @@ -443,52 +457,73 @@ public function __construct($data = null) $this->addContact(new FHIRPatientContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) - ? $data[self::FIELD_DECEASED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DECEASED_BOOLEAN] instanceof FHIRBoolean) { - $this->setDeceasedBoolean($data[self::FIELD_DECEASED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DECEASED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DECEASED_BOOLEAN]))); - } + if (isset($data[self::FIELD_DECEASED_BOOLEAN]) || isset($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { + $value = $data[self::FIELD_DECEASED_BOOLEAN]; } else { - $this->setDeceasedBoolean(new FHIRBoolean($data[self::FIELD_DECEASED_BOOLEAN])); - } - } - if (isset($data[self::FIELD_DECEASED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DECEASED_DATE_TIME_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_TIME_EXT])) - ? $data[self::FIELD_DECEASED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DECEASED_DATE_TIME] instanceof FHIRDateTime) { - $this->setDeceasedDateTime($data[self::FIELD_DECEASED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_DATE_TIME])) { - $this->setDeceasedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DECEASED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_DATE_TIME])) { - $this->setDeceasedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DECEASED_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DECEASED_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeceasedBoolean($value); + } else if (is_array($value)) { + $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DECEASED_DATE_TIME]) || isset($data[self::FIELD_DECEASED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DECEASED_DATE_TIME])) { + $value = $data[self::FIELD_DECEASED_DATE_TIME]; } else { - $this->setDeceasedDateTime(new FHIRDateTime($data[self::FIELD_DECEASED_DATE_TIME])); - } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_DATE_TIME_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DECEASED_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDeceasedDateTime($value); + } else if (is_array($value)) { + $this->setDeceasedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDeceasedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_GENERAL_PRACTITIONER])) { @@ -559,36 +594,50 @@ public function __construct($data = null) $this->setMaritalStatus(new FHIRCodeableConcept($data[self::FIELD_MARITAL_STATUS])); } } - if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $ext = (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) - ? $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] instanceof FHIRBoolean) { - $this->setMultipleBirthBoolean($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $this->setMultipleBirthBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $this->setMultipleBirthBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]))); - } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]) || isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $value = $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]; } else { - $this->setMultipleBirthBoolean(new FHIRBoolean($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])); - } - } - if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $ext = (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) - ? $data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_BIRTH_INTEGER] instanceof FHIRInteger) { - $this->setMultipleBirthInteger($data[self::FIELD_MULTIPLE_BIRTH_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $this->setMultipleBirthInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $this->setMultipleBirthInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]))); + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMultipleBirthBoolean($value); + } else if (is_array($value)) { + $this->setMultipleBirthBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMultipleBirthBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMultipleBirthBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER]) || isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $value = $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]; } else { - $this->setMultipleBirthInteger(new FHIRInteger($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMultipleBirthInteger($value); + } else if (is_array($value)) { + $this->setMultipleBirthInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMultipleBirthInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMultipleBirthInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_NAME])) { @@ -1823,56 +1872,102 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDeceasedBoolean())) { $a[self::FIELD_DECEASED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DECEASED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDeceasedDateTime())) { $a[self::FIELD_DECEASED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DECEASED_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getGeneralPractitioner())) { - $a[self::FIELD_GENERAL_PRACTITIONER] = $vs; + $a[self::FIELD_GENERAL_PRACTITIONER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GENERAL_PRACTITIONER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; @@ -1882,26 +1977,51 @@ public function jsonSerialize() } if (null !== ($v = $this->getMultipleBirthBoolean())) { $a[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getMultipleBirthInteger())) { $a[self::FIELD_MULTIPLE_BIRTH_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT] = $enc; } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php index cbb995fb5b..e421b662e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRPaymentNotice extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -272,20 +272,27 @@ public function __construct($data = null) $this->setAmount(new FHIRMoney($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -320,20 +327,27 @@ public function __construct($data = null) $this->setPayment(new FHIRReference($data[self::FIELD_PAYMENT])); } } - if (isset($data[self::FIELD_PAYMENT_DATE])) { - $ext = (isset($data[self::FIELD_PAYMENT_DATE_EXT]) && is_array($data[self::FIELD_PAYMENT_DATE_EXT])) - ? $data[self::FIELD_PAYMENT_DATE_EXT] - : null; - if ($data[self::FIELD_PAYMENT_DATE] instanceof FHIRDate) { - $this->setPaymentDate($data[self::FIELD_PAYMENT_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAYMENT_DATE])) { - $this->setPaymentDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_PAYMENT_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PAYMENT_DATE])) { - $this->setPaymentDate(new FHIRDate(array_merge($ext, $data[self::FIELD_PAYMENT_DATE]))); - } + if (isset($data[self::FIELD_PAYMENT_DATE]) || isset($data[self::FIELD_PAYMENT_DATE_EXT])) { + if (isset($data[self::FIELD_PAYMENT_DATE])) { + $value = $data[self::FIELD_PAYMENT_DATE]; } else { - $this->setPaymentDate(new FHIRDate($data[self::FIELD_PAYMENT_DATE])); + $value = null; + } + if (isset($data[self::FIELD_PAYMENT_DATE_EXT]) && is_array($data[self::FIELD_PAYMENT_DATE_EXT])) { + $ext = $data[self::FIELD_PAYMENT_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setPaymentDate($value); + } else if (is_array($value)) { + $this->setPaymentDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setPaymentDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPaymentDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_PAYMENT_STATUS])) { @@ -371,20 +385,27 @@ public function __construct($data = null) $this->setResponse(new FHIRReference($data[self::FIELD_RESPONSE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -1004,13 +1025,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPayee())) { $a[self::FIELD_PAYEE] = $v; @@ -1020,8 +1049,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPaymentDate())) { $a[self::FIELD_PAYMENT_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_PAYMENT_DATE_EXT] = $enc; } } @@ -1042,11 +1073,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php index b7eba84e8e..596349a877 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRPaymentReconciliation extends FHIRDomainResource implements PHPFHIRCon const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -306,20 +306,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -340,20 +347,27 @@ public function __construct($data = null) $this->addDetail(new FHIRPaymentReconciliationDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); - } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_FORM_CODE])) { @@ -381,20 +395,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRRemittanceOutcome) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRRemittanceOutcome([FHIRRemittanceOutcome::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRRemittanceOutcome(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; } else { - $this->setOutcome(new FHIRRemittanceOutcome($data[self::FIELD_OUTCOME])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRemittanceOutcome) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRRemittanceOutcome(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRRemittanceOutcome([FHIRRemittanceOutcome::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRRemittanceOutcome($ext)); } } if (isset($data[self::FIELD_PAYMENT_AMOUNT])) { @@ -404,20 +425,27 @@ public function __construct($data = null) $this->setPaymentAmount(new FHIRMoney($data[self::FIELD_PAYMENT_AMOUNT])); } } - if (isset($data[self::FIELD_PAYMENT_DATE])) { - $ext = (isset($data[self::FIELD_PAYMENT_DATE_EXT]) && is_array($data[self::FIELD_PAYMENT_DATE_EXT])) - ? $data[self::FIELD_PAYMENT_DATE_EXT] - : null; - if ($data[self::FIELD_PAYMENT_DATE] instanceof FHIRDate) { - $this->setPaymentDate($data[self::FIELD_PAYMENT_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAYMENT_DATE])) { - $this->setPaymentDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_PAYMENT_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PAYMENT_DATE])) { - $this->setPaymentDate(new FHIRDate(array_merge($ext, $data[self::FIELD_PAYMENT_DATE]))); - } + if (isset($data[self::FIELD_PAYMENT_DATE]) || isset($data[self::FIELD_PAYMENT_DATE_EXT])) { + if (isset($data[self::FIELD_PAYMENT_DATE])) { + $value = $data[self::FIELD_PAYMENT_DATE]; } else { - $this->setPaymentDate(new FHIRDate($data[self::FIELD_PAYMENT_DATE])); + $value = null; + } + if (isset($data[self::FIELD_PAYMENT_DATE_EXT]) && is_array($data[self::FIELD_PAYMENT_DATE_EXT])) { + $ext = $data[self::FIELD_PAYMENT_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setPaymentDate($value); + } else if (is_array($value)) { + $this->setPaymentDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setPaymentDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPaymentDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_PAYMENT_IDENTIFIER])) { @@ -473,20 +501,27 @@ public function __construct($data = null) $this->setRequestor(new FHIRReference($data[self::FIELD_REQUESTOR])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -1287,18 +1322,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } @@ -1306,12 +1351,20 @@ public function jsonSerialize() $a[self::FIELD_FORM_CODE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRemittanceOutcome::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRemittanceOutcome::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } @@ -1320,8 +1373,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPaymentDate())) { $a[self::FIELD_PAYMENT_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_PAYMENT_DATE_EXT] = $enc; } } @@ -1335,7 +1390,13 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getProcessNote())) { - $a[self::FIELD_PROCESS_NOTE] = $vs; + $a[self::FIELD_PROCESS_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESS_NOTE][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -1345,11 +1406,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPerson.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPerson.php index bc851d48a7..d75e3c40cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRPerson extends FHIRDomainResource implements PHPFHIRContainedTypeInter const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -242,20 +242,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -276,36 +283,50 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -1068,45 +1089,84 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if (null !== ($v = $this->getPhoto())) { $a[self::FIELD_PHOTO] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php index a0d2d5516c..65cb96d98d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -148,7 +148,7 @@ class FHIRPlanDefinition extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource allows for the definition of various types of plans as a sharable, @@ -620,20 +620,27 @@ public function __construct($data = null) $this->addAction(new FHIRPlanDefinitionAction($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -672,52 +679,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -763,20 +791,27 @@ public function __construct($data = null) $this->addEndorser(new FHIRContactDetail($data[self::FIELD_ENDORSER])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_GOAL])) { @@ -833,97 +868,134 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_LIBRARY])) { - $ext = (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) - ? $data[self::FIELD_LIBRARY_EXT] - : null; - if (is_array($data[self::FIELD_LIBRARY])) { - foreach($data[self::FIELD_LIBRARY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addLibrary($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLibrary(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LIBRARY]) || isset($data[self::FIELD_LIBRARY_EXT])) { + if (isset($data[self::FIELD_LIBRARY])) { + $value = $data[self::FIELD_LIBRARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) { + $ext = $data[self::FIELD_LIBRARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addLibrary($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addLibrary($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLibrary(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLibrary(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addLibrary(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_LIBRARY] instanceof FHIRCanonical) { - $this->addLibrary($data[self::FIELD_LIBRARY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LIBRARY])) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_LIBRARY]] + $ext)); - } else { - $this->addLibrary(new FHIRCanonical($data[self::FIELD_LIBRARY])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLibrary(new FHIRCanonical($iext)); } - } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -962,20 +1034,27 @@ public function __construct($data = null) $this->addReviewer(new FHIRContactDetail($data[self::FIELD_REVIEWER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { @@ -992,36 +1071,50 @@ public function __construct($data = null) $this->setSubjectReference(new FHIRReference($data[self::FIELD_SUBJECT_REFERENCE])); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1049,36 +1142,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1099,20 +1206,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -3215,120 +3329,208 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getGoal())) { - $a[self::FIELD_GOAL] = $vs; + $a[self::FIELD_GOAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GOAL][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getLibrary())) { $a[self::FIELD_LIBRARY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LIBRARY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LIBRARY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LIBRARY_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LIBRARY_EXT] = $encs; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3340,48 +3542,73 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitioner.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitioner.php index ea370ddb5b..19c655755d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRPractitioner extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -249,20 +249,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -283,20 +290,27 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; + } + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_COMMUNICATION])) { @@ -317,20 +331,27 @@ public function __construct($data = null) $this->addCommunication(new FHIRCodeableConcept($data[self::FIELD_COMMUNICATION])); } } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); - } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -1184,45 +1205,96 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if ([] !== ($vs = $this->getQualification())) { - $a[self::FIELD_QUALIFICATION] = $vs; + $a[self::FIELD_QUALIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUALIFICATION][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php index fbcf89827d..712ab92619 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRPractitionerRole extends FHIRDomainResource implements PHPFHIRContaine const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -292,36 +292,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $value = null; } - } - if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY_EXCEPTIONS] instanceof FHIRString) { - $this->setAvailabilityExceptions($data[self::FIELD_AVAILABILITY_EXCEPTIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AVAILABILITY_EXCEPTIONS]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $data[self::FIELD_AVAILABILITY_EXCEPTIONS]))); + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS]) || isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $value = $data[self::FIELD_AVAILABILITY_EXCEPTIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]; } else { - $this->setAvailabilityExceptions(new FHIRString($data[self::FIELD_AVAILABILITY_EXCEPTIONS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAvailabilityExceptions($value); + } else if (is_array($value)) { + $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailabilityExceptions(new FHIRString($ext)); } } if (isset($data[self::FIELD_AVAILABLE_TIME])) { @@ -1466,38 +1480,84 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getAvailabilityExceptions())) { $a[self::FIELD_AVAILABILITY_EXCEPTIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] = $enc; } } if ([] !== ($vs = $this->getAvailableTime())) { - $a[self::FIELD_AVAILABLE_TIME] = $vs; + $a[self::FIELD_AVAILABLE_TIME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AVAILABLE_TIME][] = $v; + } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getHealthcareService())) { - $a[self::FIELD_HEALTHCARE_SERVICE] = $vs; + $a[self::FIELD_HEALTHCARE_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_HEALTHCARE_SERVICE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if ([] !== ($vs = $this->getNotAvailable())) { - $a[self::FIELD_NOT_AVAILABLE] = $vs; + $a[self::FIELD_NOT_AVAILABLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOT_AVAILABLE][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -1509,10 +1569,25 @@ public function jsonSerialize() $a[self::FIELD_PRACTITIONER] = $v; } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProcedure.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProcedure.php index 9cdd330b28..9389f65f19 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRProcedure extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_USED_REFERENCE = 'usedReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -714,62 +714,80 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); } } if (isset($data[self::FIELD_LOCATION])) { @@ -829,20 +847,27 @@ public function __construct($data = null) $this->setPerformedAge(new FHIRAge($data[self::FIELD_PERFORMED_AGE])); } } - if (isset($data[self::FIELD_PERFORMED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_PERFORMED_DATE_TIME_EXT]) && is_array($data[self::FIELD_PERFORMED_DATE_TIME_EXT])) - ? $data[self::FIELD_PERFORMED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_PERFORMED_DATE_TIME] instanceof FHIRDateTime) { - $this->setPerformedDateTime($data[self::FIELD_PERFORMED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERFORMED_DATE_TIME])) { - $this->setPerformedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PERFORMED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PERFORMED_DATE_TIME])) { - $this->setPerformedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PERFORMED_DATE_TIME]))); - } + if (isset($data[self::FIELD_PERFORMED_DATE_TIME]) || isset($data[self::FIELD_PERFORMED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_PERFORMED_DATE_TIME])) { + $value = $data[self::FIELD_PERFORMED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERFORMED_DATE_TIME_EXT]) && is_array($data[self::FIELD_PERFORMED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_PERFORMED_DATE_TIME_EXT]; } else { - $this->setPerformedDateTime(new FHIRDateTime($data[self::FIELD_PERFORMED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPerformedDateTime($value); + } else if (is_array($value)) { + $this->setPerformedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPerformedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPerformedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_PERFORMED_PERIOD])) { @@ -859,20 +884,27 @@ public function __construct($data = null) $this->setPerformedRange(new FHIRRange($data[self::FIELD_PERFORMED_RANGE])); } } - if (isset($data[self::FIELD_PERFORMED_STRING])) { - $ext = (isset($data[self::FIELD_PERFORMED_STRING_EXT]) && is_array($data[self::FIELD_PERFORMED_STRING_EXT])) - ? $data[self::FIELD_PERFORMED_STRING_EXT] - : null; - if ($data[self::FIELD_PERFORMED_STRING] instanceof FHIRString) { - $this->setPerformedString($data[self::FIELD_PERFORMED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERFORMED_STRING])) { - $this->setPerformedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PERFORMED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_PERFORMED_STRING])) { - $this->setPerformedString(new FHIRString(array_merge($ext, $data[self::FIELD_PERFORMED_STRING]))); - } + if (isset($data[self::FIELD_PERFORMED_STRING]) || isset($data[self::FIELD_PERFORMED_STRING_EXT])) { + if (isset($data[self::FIELD_PERFORMED_STRING])) { + $value = $data[self::FIELD_PERFORMED_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERFORMED_STRING_EXT]) && is_array($data[self::FIELD_PERFORMED_STRING_EXT])) { + $ext = $data[self::FIELD_PERFORMED_STRING_EXT]; } else { - $this->setPerformedString(new FHIRString($data[self::FIELD_PERFORMED_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPerformedString($value); + } else if (is_array($value)) { + $this->setPerformedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPerformedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPerformedString(new FHIRString($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -954,20 +986,27 @@ public function __construct($data = null) $this->addReport(new FHIRReference($data[self::FIELD_REPORT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREventStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIREventStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREventStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREventStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -3013,10 +3052,22 @@ public function jsonSerialize() $a[self::FIELD_ASSERTER] = $v; } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -3025,72 +3076,132 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getComplication())) { - $a[self::FIELD_COMPLICATION] = $vs; + $a[self::FIELD_COMPLICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPLICATION][] = $v; + } } if ([] !== ($vs = $this->getComplicationDetail())) { - $a[self::FIELD_COMPLICATION_DETAIL] = $vs; + $a[self::FIELD_COMPLICATION_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPLICATION_DETAIL][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getFocalDevice())) { - $a[self::FIELD_FOCAL_DEVICE] = $vs; + $a[self::FIELD_FOCAL_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCAL_DEVICE][] = $v; + } } if ([] !== ($vs = $this->getFollowUp())) { - $a[self::FIELD_FOLLOW_UP] = $vs; + $a[self::FIELD_FOLLOW_UP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOLLOW_UP][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v; } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if (null !== ($v = $this->getPerformedAge())) { $a[self::FIELD_PERFORMED_AGE] = $v; } if (null !== ($v = $this->getPerformedDateTime())) { $a[self::FIELD_PERFORMED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PERFORMED_DATE_TIME_EXT] = $enc; } } @@ -3102,30 +3213,58 @@ public function jsonSerialize() } if (null !== ($v = $this->getPerformedString())) { $a[self::FIELD_PERFORMED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PERFORMED_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRecorder())) { $a[self::FIELD_RECORDER] = $v; } if ([] !== ($vs = $this->getReport())) { - $a[self::FIELD_REPORT] = $vs; + $a[self::FIELD_REPORT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPORT][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3136,10 +3275,25 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getUsedCode())) { - $a[self::FIELD_USED_CODE] = $vs; + $a[self::FIELD_USED_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USED_CODE][] = $v; + } } if ([] !== ($vs = $this->getUsedReference())) { - $a[self::FIELD_USED_REFERENCE] = $vs; + $a[self::FIELD_USED_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USED_REFERENCE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProvenance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProvenance.php index d831cf4a56..4d07d3197d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProvenance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRProvenance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRProvenance extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -348,20 +348,27 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_OCCURRED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRED_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRED_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRED_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurredDateTime($data[self::FIELD_OCCURRED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRED_DATE_TIME])) { - $this->setOccurredDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRED_DATE_TIME])) { - $this->setOccurredDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRED_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRED_DATE_TIME]) || isset($data[self::FIELD_OCCURRED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRED_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRED_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRED_DATE_TIME_EXT]; } else { - $this->setOccurredDateTime(new FHIRDateTime($data[self::FIELD_OCCURRED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurredDateTime($value); + } else if (is_array($value)) { + $this->setOccurredDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurredDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurredDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRED_PERIOD])) { @@ -371,33 +378,42 @@ public function __construct($data = null) $this->setOccurredPeriod(new FHIRPeriod($data[self::FIELD_OCCURRED_PERIOD])); } } - if (isset($data[self::FIELD_POLICY])) { - $ext = (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) - ? $data[self::FIELD_POLICY_EXT] - : null; - if (is_array($data[self::FIELD_POLICY])) { - foreach($data[self::FIELD_POLICY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addPolicy($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPolicy(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_POLICY]) || isset($data[self::FIELD_POLICY_EXT])) { + if (isset($data[self::FIELD_POLICY])) { + $value = $data[self::FIELD_POLICY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) { + $ext = $data[self::FIELD_POLICY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addPolicy($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addPolicy($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPolicy(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPolicy(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addPolicy(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPolicy(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_POLICY] instanceof FHIRUri) { - $this->addPolicy($data[self::FIELD_POLICY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_POLICY])) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_POLICY]] + $ext)); - } else { - $this->addPolicy(new FHIRUri($data[self::FIELD_POLICY])); } } if (isset($data[self::FIELD_REASON])) { @@ -418,20 +434,27 @@ public function __construct($data = null) $this->addReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_RECORDED])) { - $ext = (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) - ? $data[self::FIELD_RECORDED_EXT] - : null; - if ($data[self::FIELD_RECORDED] instanceof FHIRInstant) { - $this->setRecorded($data[self::FIELD_RECORDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_RECORDED]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant(array_merge($ext, $data[self::FIELD_RECORDED]))); - } + if (isset($data[self::FIELD_RECORDED]) || isset($data[self::FIELD_RECORDED_EXT])) { + if (isset($data[self::FIELD_RECORDED])) { + $value = $data[self::FIELD_RECORDED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) { + $ext = $data[self::FIELD_RECORDED_EXT]; } else { - $this->setRecorded(new FHIRInstant($data[self::FIELD_RECORDED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setRecorded($value); + } else if (is_array($value)) { + $this->setRecorded(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecorded(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_SIGNATURE])) { @@ -1301,18 +1324,32 @@ public function jsonSerialize() $a[self::FIELD_ACTIVITY] = $v; } if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if ([] !== ($vs = $this->getEntity())) { - $a[self::FIELD_ENTITY] = $vs; + $a[self::FIELD_ENTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTITY][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getOccurredDateTime())) { $a[self::FIELD_OCCURRED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRED_DATE_TIME_EXT] = $enc; } } @@ -1321,34 +1358,65 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPolicy())) { $a[self::FIELD_POLICY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_POLICY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_POLICY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_POLICY_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_POLICY_EXT] = $encs; + } } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if (null !== ($v = $this->getRecorded())) { $a[self::FIELD_RECORDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_RECORDED_EXT] = $enc; } } if ([] !== ($vs = $this->getSignature())) { - $a[self::FIELD_SIGNATURE] = $vs; + $a[self::FIELD_SIGNATURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SIGNATURE][] = $v; + } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php index 4b304df063..5003ade35a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRQuestionnaire extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -457,20 +457,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -509,81 +516,111 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_DERIVED_FROM])) { - $ext = (isset($data[self::FIELD_DERIVED_FROM_EXT]) && is_array($data[self::FIELD_DERIVED_FROM_EXT])) - ? $data[self::FIELD_DERIVED_FROM_EXT] - : null; - if (is_array($data[self::FIELD_DERIVED_FROM])) { - foreach($data[self::FIELD_DERIVED_FROM] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addDerivedFrom($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDerivedFrom(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDerivedFrom(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DERIVED_FROM]) || isset($data[self::FIELD_DERIVED_FROM_EXT])) { + if (isset($data[self::FIELD_DERIVED_FROM])) { + $value = $data[self::FIELD_DERIVED_FROM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DERIVED_FROM_EXT]) && is_array($data[self::FIELD_DERIVED_FROM_EXT])) { + $ext = $data[self::FIELD_DERIVED_FROM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addDerivedFrom($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addDerivedFrom($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDerivedFrom(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addDerivedFrom(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDerivedFrom(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addDerivedFrom(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addDerivedFrom(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DERIVED_FROM] instanceof FHIRCanonical) { - $this->addDerivedFrom($data[self::FIELD_DERIVED_FROM]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DERIVED_FROM])) { - $this->addDerivedFrom(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DERIVED_FROM]] + $ext)); - } else { - $this->addDerivedFrom(new FHIRCanonical($data[self::FIELD_DERIVED_FROM])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDerivedFrom(new FHIRCanonical($iext)); } + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -593,20 +630,27 @@ public function __construct($data = null) $this->setEffectivePeriod(new FHIRPeriod($data[self::FIELD_EFFECTIVE_PERIOD])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -663,145 +707,203 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_SUBJECT_TYPE])) { - $ext = (isset($data[self::FIELD_SUBJECT_TYPE_EXT]) && is_array($data[self::FIELD_SUBJECT_TYPE_EXT])) - ? $data[self::FIELD_SUBJECT_TYPE_EXT] - : null; - if (is_array($data[self::FIELD_SUBJECT_TYPE])) { - foreach($data[self::FIELD_SUBJECT_TYPE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addSubjectType($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSubjectType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSubjectType(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUBJECT_TYPE]) || isset($data[self::FIELD_SUBJECT_TYPE_EXT])) { + if (isset($data[self::FIELD_SUBJECT_TYPE])) { + $value = $data[self::FIELD_SUBJECT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBJECT_TYPE_EXT]) && is_array($data[self::FIELD_SUBJECT_TYPE_EXT])) { + $ext = $data[self::FIELD_SUBJECT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addSubjectType($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addSubjectType($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSubjectType(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addSubjectType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSubjectType(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addSubjectType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addSubjectType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_SUBJECT_TYPE] instanceof FHIRCode) { - $this->addSubjectType($data[self::FIELD_SUBJECT_TYPE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUBJECT_TYPE])) { - $this->addSubjectType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_SUBJECT_TYPE]] + $ext)); - } else { - $this->addSubjectType(new FHIRCode($data[self::FIELD_SUBJECT_TYPE])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSubjectType(new FHIRCode($iext)); } + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -822,20 +924,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2335,50 +2444,78 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDerivedFrom())) { $a[self::FIELD_DERIVED_FROM] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DERIVED_FROM][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DERIVED_FROM_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DERIVED_FROM_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DERIVED_FROM_EXT] = $encs; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2387,94 +2524,147 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSubjectType())) { $a[self::FIELD_SUBJECT_TYPE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUBJECT_TYPE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUBJECT_TYPE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUBJECT_TYPE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUBJECT_TYPE_EXT] = $encs; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php index 5c162267a3..966520d50c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRQuestionnaireResponse extends FHIRDomainResource implements PHPFHIRCon const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -269,20 +269,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_AUTHORED])) { - $ext = (isset($data[self::FIELD_AUTHORED_EXT]) && is_array($data[self::FIELD_AUTHORED_EXT])) - ? $data[self::FIELD_AUTHORED_EXT] - : null; - if ($data[self::FIELD_AUTHORED] instanceof FHIRDateTime) { - $this->setAuthored($data[self::FIELD_AUTHORED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED])) { - $this->setAuthored(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED])) { - $this->setAuthored(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED]))); - } + if (isset($data[self::FIELD_AUTHORED]) || isset($data[self::FIELD_AUTHORED_EXT])) { + if (isset($data[self::FIELD_AUTHORED])) { + $value = $data[self::FIELD_AUTHORED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_EXT]) && is_array($data[self::FIELD_AUTHORED_EXT])) { + $ext = $data[self::FIELD_AUTHORED_EXT]; } else { - $this->setAuthored(new FHIRDateTime($data[self::FIELD_AUTHORED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthored($value); + } else if (is_array($value)) { + $this->setAuthored(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthored(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthored(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -353,20 +360,27 @@ public function __construct($data = null) $this->addPartOf(new FHIRReference($data[self::FIELD_PART_OF])); } } - if (isset($data[self::FIELD_QUESTIONNAIRE])) { - $ext = (isset($data[self::FIELD_QUESTIONNAIRE_EXT]) && is_array($data[self::FIELD_QUESTIONNAIRE_EXT])) - ? $data[self::FIELD_QUESTIONNAIRE_EXT] - : null; - if ($data[self::FIELD_QUESTIONNAIRE] instanceof FHIRCanonical) { - $this->setQuestionnaire($data[self::FIELD_QUESTIONNAIRE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUESTIONNAIRE])) { - $this->setQuestionnaire(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_QUESTIONNAIRE]] + $ext)); - } else if (is_array($data[self::FIELD_QUESTIONNAIRE])) { - $this->setQuestionnaire(new FHIRCanonical(array_merge($ext, $data[self::FIELD_QUESTIONNAIRE]))); - } + if (isset($data[self::FIELD_QUESTIONNAIRE]) || isset($data[self::FIELD_QUESTIONNAIRE_EXT])) { + if (isset($data[self::FIELD_QUESTIONNAIRE])) { + $value = $data[self::FIELD_QUESTIONNAIRE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUESTIONNAIRE_EXT]) && is_array($data[self::FIELD_QUESTIONNAIRE_EXT])) { + $ext = $data[self::FIELD_QUESTIONNAIRE_EXT]; } else { - $this->setQuestionnaire(new FHIRCanonical($data[self::FIELD_QUESTIONNAIRE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setQuestionnaire($value); + } else if (is_array($value)) { + $this->setQuestionnaire(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setQuestionnaire(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQuestionnaire(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -376,20 +390,27 @@ public function __construct($data = null) $this->setSource(new FHIRReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRQuestionnaireResponseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireResponseStatus([FHIRQuestionnaireResponseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireResponseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRQuestionnaireResponseStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuestionnaireResponseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRQuestionnaireResponseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRQuestionnaireResponseStatus([FHIRQuestionnaireResponseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRQuestionnaireResponseStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1068,13 +1089,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthored())) { $a[self::FIELD_AUTHORED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; @@ -1083,15 +1112,29 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if (null !== ($v = $this->getQuestionnaire())) { $a[self::FIELD_QUESTIONNAIRE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_QUESTIONNAIRE_EXT] = $enc; } } @@ -1100,14 +1143,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuestionnaireResponseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuestionnaireResponseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php index 2a7488e9f4..796a285b86 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRRelatedPerson extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -272,20 +272,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -306,20 +313,27 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; + } + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_COMMUNICATION])) { @@ -340,20 +354,27 @@ public function __construct($data = null) $this->addCommunication(new FHIRRelatedPersonCommunication($data[self::FIELD_COMMUNICATION])); } } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); - } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -1280,36 +1301,66 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -1318,13 +1369,34 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if ([] !== ($vs = $this->getRelationship())) { - $a[self::FIELD_RELATIONSHIP] = $vs; + $a[self::FIELD_RELATIONSHIP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATIONSHIP][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php index 8e569056c3..f9f68fbc4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRRequestGroup extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A group of related requests that can be used to capture intended activities that @@ -377,20 +377,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -450,78 +457,103 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); - } - } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; } else { - $this->setIntent(new FHIRRequestIntent($data[self::FIELD_INTENT])); + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRRequestIntent($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -542,20 +574,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -612,20 +651,27 @@ public function __construct($data = null) $this->addReplaces(new FHIRReference($data[self::FIELD_REPLACES])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1748,20 +1794,34 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getAuthor())) { $a[self::FIELD_AUTHOR] = $v; } if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -1773,74 +1833,129 @@ public function jsonSerialize() $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchDefinition.php index 9e81b79bb1..4757ca41ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -150,7 +150,7 @@ class FHIRResearchDefinition extends FHIRDomainResource implements PHPFHIRContai const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -640,20 +640,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -674,33 +681,42 @@ public function __construct($data = null) $this->addAuthor(new FHIRContactDetail($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if (is_array($data[self::FIELD_COMMENT])) { - foreach($data[self::FIELD_COMMENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addComment($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addComment(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addComment($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addComment($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addComment(new FHIRString(array_merge($v, $iext))); + } else { + $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addComment(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addComment(new FHIRString($iext)); } - } elseif ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->addComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COMMENT])) { - $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else { - $this->addComment(new FHIRString($data[self::FIELD_COMMENT])); } } if (isset($data[self::FIELD_CONTACT])) { @@ -721,52 +737,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -812,20 +849,27 @@ public function __construct($data = null) $this->addEndorser(new FHIRContactDetail($data[self::FIELD_ENDORSER])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_EXPOSURE])) { @@ -878,65 +922,88 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_LIBRARY])) { - $ext = (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) - ? $data[self::FIELD_LIBRARY_EXT] - : null; - if (is_array($data[self::FIELD_LIBRARY])) { - foreach($data[self::FIELD_LIBRARY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addLibrary($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLibrary(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LIBRARY]) || isset($data[self::FIELD_LIBRARY_EXT])) { + if (isset($data[self::FIELD_LIBRARY])) { + $value = $data[self::FIELD_LIBRARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) { + $ext = $data[self::FIELD_LIBRARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addLibrary($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addLibrary($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLibrary(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLibrary(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addLibrary(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_LIBRARY] instanceof FHIRCanonical) { - $this->addLibrary($data[self::FIELD_LIBRARY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LIBRARY])) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_LIBRARY]] + $ext)); - } else { - $this->addLibrary(new FHIRCanonical($data[self::FIELD_LIBRARY])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLibrary(new FHIRCanonical($iext)); } + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OUTCOME])) { @@ -953,36 +1020,50 @@ public function __construct($data = null) $this->setPopulation(new FHIRReference($data[self::FIELD_POPULATION])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -1021,36 +1102,50 @@ public function __construct($data = null) $this->addReviewer(new FHIRContactDetail($data[self::FIELD_REVIEWER])); } } - if (isset($data[self::FIELD_SHORT_TITLE])) { - $ext = (isset($data[self::FIELD_SHORT_TITLE_EXT]) && is_array($data[self::FIELD_SHORT_TITLE_EXT])) - ? $data[self::FIELD_SHORT_TITLE_EXT] - : null; - if ($data[self::FIELD_SHORT_TITLE] instanceof FHIRString) { - $this->setShortTitle($data[self::FIELD_SHORT_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SHORT_TITLE])) { - $this->setShortTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SHORT_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SHORT_TITLE])) { - $this->setShortTitle(new FHIRString(array_merge($ext, $data[self::FIELD_SHORT_TITLE]))); - } + if (isset($data[self::FIELD_SHORT_TITLE]) || isset($data[self::FIELD_SHORT_TITLE_EXT])) { + if (isset($data[self::FIELD_SHORT_TITLE])) { + $value = $data[self::FIELD_SHORT_TITLE]; } else { - $this->setShortTitle(new FHIRString($data[self::FIELD_SHORT_TITLE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SHORT_TITLE_EXT]) && is_array($data[self::FIELD_SHORT_TITLE_EXT])) { + $ext = $data[self::FIELD_SHORT_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setShortTitle($value); + } else if (is_array($value)) { + $this->setShortTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setShortTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setShortTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { @@ -1067,36 +1162,50 @@ public function __construct($data = null) $this->setSubjectReference(new FHIRReference($data[self::FIELD_SUBJECT_REFERENCE])); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1117,36 +1226,50 @@ public function __construct($data = null) $this->addTopic(new FHIRCodeableConcept($data[self::FIELD_TOPIC])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1167,20 +1290,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -3385,66 +3515,108 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getComment())) { $a[self::FIELD_COMMENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COMMENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COMMENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COMMENT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COMMENT_EXT] = $encs; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } @@ -3455,37 +3627,61 @@ public function jsonSerialize() $a[self::FIELD_EXPOSURE_ALTERNATIVE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getLibrary())) { $a[self::FIELD_LIBRARY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LIBRARY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LIBRARY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LIBRARY_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LIBRARY_EXT] = $encs; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -3497,35 +3693,55 @@ public function jsonSerialize() } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getShortTitle())) { $a[self::FIELD_SHORT_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SHORT_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3537,45 +3753,70 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinition.php index b25d9304d4..fcc219381c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -153,7 +153,7 @@ class FHIRResearchElementDefinition extends FHIRDomainResource implements PHPFHI const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -634,20 +634,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -686,33 +693,42 @@ public function __construct($data = null) $this->addCharacteristic(new FHIRResearchElementDefinitionCharacteristic($data[self::FIELD_CHARACTERISTIC])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if (is_array($data[self::FIELD_COMMENT])) { - foreach($data[self::FIELD_COMMENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addComment($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addComment(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addComment($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addComment($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addComment(new FHIRString(array_merge($v, $iext))); + } else { + $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addComment(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addComment(new FHIRString($iext)); } - } elseif ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->addComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COMMENT])) { - $this->addComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else { - $this->addComment(new FHIRString($data[self::FIELD_COMMENT])); } } if (isset($data[self::FIELD_CONTACT])) { @@ -733,52 +749,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -824,20 +861,27 @@ public function __construct($data = null) $this->addEndorser(new FHIRContactDetail($data[self::FIELD_ENDORSER])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -876,97 +920,134 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_LIBRARY])) { - $ext = (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) - ? $data[self::FIELD_LIBRARY_EXT] - : null; - if (is_array($data[self::FIELD_LIBRARY])) { - foreach($data[self::FIELD_LIBRARY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addLibrary($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLibrary(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LIBRARY]) || isset($data[self::FIELD_LIBRARY_EXT])) { + if (isset($data[self::FIELD_LIBRARY])) { + $value = $data[self::FIELD_LIBRARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIBRARY_EXT]) && is_array($data[self::FIELD_LIBRARY_EXT])) { + $ext = $data[self::FIELD_LIBRARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addLibrary($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addLibrary($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLibrary(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLibrary(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addLibrary(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_LIBRARY] instanceof FHIRCanonical) { - $this->addLibrary($data[self::FIELD_LIBRARY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LIBRARY])) { - $this->addLibrary(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_LIBRARY]] + $ext)); - } else { - $this->addLibrary(new FHIRCanonical($data[self::FIELD_LIBRARY])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLibrary(new FHIRCanonical($iext)); } - } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -1005,36 +1086,50 @@ public function __construct($data = null) $this->addReviewer(new FHIRContactDetail($data[self::FIELD_REVIEWER])); } } - if (isset($data[self::FIELD_SHORT_TITLE])) { - $ext = (isset($data[self::FIELD_SHORT_TITLE_EXT]) && is_array($data[self::FIELD_SHORT_TITLE_EXT])) - ? $data[self::FIELD_SHORT_TITLE_EXT] - : null; - if ($data[self::FIELD_SHORT_TITLE] instanceof FHIRString) { - $this->setShortTitle($data[self::FIELD_SHORT_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SHORT_TITLE])) { - $this->setShortTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SHORT_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SHORT_TITLE])) { - $this->setShortTitle(new FHIRString(array_merge($ext, $data[self::FIELD_SHORT_TITLE]))); - } + if (isset($data[self::FIELD_SHORT_TITLE]) || isset($data[self::FIELD_SHORT_TITLE_EXT])) { + if (isset($data[self::FIELD_SHORT_TITLE])) { + $value = $data[self::FIELD_SHORT_TITLE]; } else { - $this->setShortTitle(new FHIRString($data[self::FIELD_SHORT_TITLE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SHORT_TITLE_EXT]) && is_array($data[self::FIELD_SHORT_TITLE_EXT])) { + $ext = $data[self::FIELD_SHORT_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setShortTitle($value); + } else if (is_array($value)) { + $this->setShortTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setShortTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setShortTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT_CODEABLE_CONCEPT])) { @@ -1051,36 +1146,50 @@ public function __construct($data = null) $this->setSubjectReference(new FHIRReference($data[self::FIELD_SUBJECT_REFERENCE])); } } - if (isset($data[self::FIELD_SUBTITLE])) { - $ext = (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) - ? $data[self::FIELD_SUBTITLE_EXT] - : null; - if ($data[self::FIELD_SUBTITLE] instanceof FHIRString) { - $this->setSubtitle($data[self::FIELD_SUBTITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBTITLE]] + $ext)); - } else if (is_array($data[self::FIELD_SUBTITLE])) { - $this->setSubtitle(new FHIRString(array_merge($ext, $data[self::FIELD_SUBTITLE]))); - } + if (isset($data[self::FIELD_SUBTITLE]) || isset($data[self::FIELD_SUBTITLE_EXT])) { + if (isset($data[self::FIELD_SUBTITLE])) { + $value = $data[self::FIELD_SUBTITLE]; } else { - $this->setSubtitle(new FHIRString($data[self::FIELD_SUBTITLE])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_SUBTITLE_EXT]) && is_array($data[self::FIELD_SUBTITLE_EXT])) { + $ext = $data[self::FIELD_SUBTITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubtitle($value); + } else if (is_array($value)) { + $this->setSubtitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubtitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubtitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1101,52 +1210,73 @@ public function __construct($data = null) $this->addTopic(new FHIRCodeableConcept($data[self::FIELD_TOPIC])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRResearchElementType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRResearchElementType([FHIRResearchElementType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRResearchElementType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRResearchElementType($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResearchElementType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRResearchElementType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRResearchElementType([FHIRResearchElementType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRResearchElementType($ext)); } } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1167,36 +1297,50 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VARIABLE_TYPE])) { - $ext = (isset($data[self::FIELD_VARIABLE_TYPE_EXT]) && is_array($data[self::FIELD_VARIABLE_TYPE_EXT])) - ? $data[self::FIELD_VARIABLE_TYPE_EXT] - : null; - if ($data[self::FIELD_VARIABLE_TYPE] instanceof FHIRVariableType) { - $this->setVariableType($data[self::FIELD_VARIABLE_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VARIABLE_TYPE])) { - $this->setVariableType(new FHIRVariableType([FHIRVariableType::FIELD_VALUE => $data[self::FIELD_VARIABLE_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_VARIABLE_TYPE])) { - $this->setVariableType(new FHIRVariableType(array_merge($ext, $data[self::FIELD_VARIABLE_TYPE]))); - } + if (isset($data[self::FIELD_VARIABLE_TYPE]) || isset($data[self::FIELD_VARIABLE_TYPE_EXT])) { + if (isset($data[self::FIELD_VARIABLE_TYPE])) { + $value = $data[self::FIELD_VARIABLE_TYPE]; } else { - $this->setVariableType(new FHIRVariableType($data[self::FIELD_VARIABLE_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_VARIABLE_TYPE_EXT]) && is_array($data[self::FIELD_VARIABLE_TYPE_EXT])) { + $ext = $data[self::FIELD_VARIABLE_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRVariableType) { + $this->setVariableType($value); + } else if (is_array($value)) { + $this->setVariableType(new FHIRVariableType(array_merge($ext, $value))); + } else { + $this->setVariableType(new FHIRVariableType([FHIRVariableType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setVariableType(new FHIRVariableType($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -3394,138 +3538,230 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getCharacteristic())) { - $a[self::FIELD_CHARACTERISTIC] = $vs; + $a[self::FIELD_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTIC][] = $v; + } } if ([] !== ($vs = $this->getComment())) { $a[self::FIELD_COMMENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COMMENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COMMENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COMMENT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COMMENT_EXT] = $encs; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getLibrary())) { $a[self::FIELD_LIBRARY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LIBRARY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LIBRARY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LIBRARY_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LIBRARY_EXT] = $encs; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getShortTitle())) { $a[self::FIELD_SHORT_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SHORT_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3537,59 +3773,88 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubtitle())) { $a[self::FIELD_SUBTITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBTITLE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResearchElementType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResearchElementType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVariableType())) { $a[self::FIELD_VARIABLE_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRVariableType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRVariableType::FIELD_VALUE]); $a[self::FIELD_VARIABLE_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php index b28b7e780c..5832a65f45 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRResearchStudy extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A process where a researcher or organization plans and then executes a series of @@ -520,20 +520,27 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_ENROLLMENT])) { @@ -776,36 +783,50 @@ public function __construct($data = null) $this->setSponsor(new FHIRReference($data[self::FIELD_SPONSOR])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRResearchStudyStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResearchStudyStatus([FHIRResearchStudyStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResearchStudyStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRResearchStudyStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResearchStudyStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRResearchStudyStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRResearchStudyStatus([FHIRResearchStudyStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRResearchStudyStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -2397,47 +2418,121 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getArm())) { - $a[self::FIELD_ARM] = $vs; + $a[self::FIELD_ARM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ARM][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEnrollment())) { - $a[self::FIELD_ENROLLMENT] = $vs; + $a[self::FIELD_ENROLLMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENROLLMENT][] = $v; + } } if ([] !== ($vs = $this->getFocus())) { - $a[self::FIELD_FOCUS] = $vs; + $a[self::FIELD_FOCUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCUS][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getKeyword())) { - $a[self::FIELD_KEYWORD] = $vs; + $a[self::FIELD_KEYWORD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_KEYWORD][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getObjective())) { - $a[self::FIELD_OBJECTIVE] = $vs; + $a[self::FIELD_OBJECTIVE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OBJECTIVE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; @@ -2452,34 +2547,59 @@ public function jsonSerialize() $a[self::FIELD_PRINCIPAL_INVESTIGATOR] = $v; } if ([] !== ($vs = $this->getProtocol())) { - $a[self::FIELD_PROTOCOL] = $vs; + $a[self::FIELD_PROTOCOL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROTOCOL][] = $v; + } } if (null !== ($v = $this->getReasonStopped())) { $a[self::FIELD_REASON_STOPPED] = $v; } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getSite())) { - $a[self::FIELD_SITE] = $vs; + $a[self::FIELD_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SITE][] = $v; + } } if (null !== ($v = $this->getSponsor())) { $a[self::FIELD_SPONSOR] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResearchStudyStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResearchStudyStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php index 32c9ce03af..b119df316d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRResearchSubject extends FHIRDomainResource implements PHPFHIRContained const FIELD_STUDY = 'study'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -211,36 +211,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTUAL_ARM])) { - $ext = (isset($data[self::FIELD_ACTUAL_ARM_EXT]) && is_array($data[self::FIELD_ACTUAL_ARM_EXT])) - ? $data[self::FIELD_ACTUAL_ARM_EXT] - : null; - if ($data[self::FIELD_ACTUAL_ARM] instanceof FHIRString) { - $this->setActualArm($data[self::FIELD_ACTUAL_ARM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTUAL_ARM])) { - $this->setActualArm(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ACTUAL_ARM]] + $ext)); - } else if (is_array($data[self::FIELD_ACTUAL_ARM])) { - $this->setActualArm(new FHIRString(array_merge($ext, $data[self::FIELD_ACTUAL_ARM]))); - } + if (isset($data[self::FIELD_ACTUAL_ARM]) || isset($data[self::FIELD_ACTUAL_ARM_EXT])) { + if (isset($data[self::FIELD_ACTUAL_ARM])) { + $value = $data[self::FIELD_ACTUAL_ARM]; } else { - $this->setActualArm(new FHIRString($data[self::FIELD_ACTUAL_ARM])); + $value = null; } - } - if (isset($data[self::FIELD_ASSIGNED_ARM])) { - $ext = (isset($data[self::FIELD_ASSIGNED_ARM_EXT]) && is_array($data[self::FIELD_ASSIGNED_ARM_EXT])) - ? $data[self::FIELD_ASSIGNED_ARM_EXT] - : null; - if ($data[self::FIELD_ASSIGNED_ARM] instanceof FHIRString) { - $this->setAssignedArm($data[self::FIELD_ASSIGNED_ARM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ASSIGNED_ARM])) { - $this->setAssignedArm(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ASSIGNED_ARM]] + $ext)); - } else if (is_array($data[self::FIELD_ASSIGNED_ARM])) { - $this->setAssignedArm(new FHIRString(array_merge($ext, $data[self::FIELD_ASSIGNED_ARM]))); + if (isset($data[self::FIELD_ACTUAL_ARM_EXT]) && is_array($data[self::FIELD_ACTUAL_ARM_EXT])) { + $ext = $data[self::FIELD_ACTUAL_ARM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setActualArm($value); + } else if (is_array($value)) { + $this->setActualArm(new FHIRString(array_merge($ext, $value))); + } else { + $this->setActualArm(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActualArm(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ASSIGNED_ARM]) || isset($data[self::FIELD_ASSIGNED_ARM_EXT])) { + if (isset($data[self::FIELD_ASSIGNED_ARM])) { + $value = $data[self::FIELD_ASSIGNED_ARM]; } else { - $this->setAssignedArm(new FHIRString($data[self::FIELD_ASSIGNED_ARM])); + $value = null; + } + if (isset($data[self::FIELD_ASSIGNED_ARM_EXT]) && is_array($data[self::FIELD_ASSIGNED_ARM_EXT])) { + $ext = $data[self::FIELD_ASSIGNED_ARM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAssignedArm($value); + } else if (is_array($value)) { + $this->setAssignedArm(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAssignedArm(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAssignedArm(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONSENT])) { @@ -282,20 +296,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRResearchSubjectStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResearchSubjectStatus([FHIRResearchSubjectStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResearchSubjectStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRResearchSubjectStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResearchSubjectStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRResearchSubjectStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRResearchSubjectStatus([FHIRResearchSubjectStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRResearchSubjectStatus($ext)); } } if (isset($data[self::FIELD_STUDY])) { @@ -767,15 +788,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActualArm())) { $a[self::FIELD_ACTUAL_ARM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ACTUAL_ARM_EXT] = $enc; } } if (null !== ($v = $this->getAssignedArm())) { $a[self::FIELD_ASSIGNED_ARM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ASSIGNED_ARM_EXT] = $enc; } } @@ -783,7 +808,13 @@ public function jsonSerialize() $a[self::FIELD_CONSENT] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIndividual())) { $a[self::FIELD_INDIVIDUAL] = $v; @@ -793,14 +824,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResearchSubjectStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResearchSubjectStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStudy())) { $a[self::FIELD_STUDY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php index 7ced1f0567..ce3f30df09 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRRiskAssessment extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -415,20 +415,27 @@ public function __construct($data = null) $this->setMethod(new FHIRCodeableConcept($data[self::FIELD_METHOD])); } } - if (isset($data[self::FIELD_MITIGATION])) { - $ext = (isset($data[self::FIELD_MITIGATION_EXT]) && is_array($data[self::FIELD_MITIGATION_EXT])) - ? $data[self::FIELD_MITIGATION_EXT] - : null; - if ($data[self::FIELD_MITIGATION] instanceof FHIRString) { - $this->setMitigation($data[self::FIELD_MITIGATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MITIGATION])) { - $this->setMitigation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MITIGATION]] + $ext)); - } else if (is_array($data[self::FIELD_MITIGATION])) { - $this->setMitigation(new FHIRString(array_merge($ext, $data[self::FIELD_MITIGATION]))); - } + if (isset($data[self::FIELD_MITIGATION]) || isset($data[self::FIELD_MITIGATION_EXT])) { + if (isset($data[self::FIELD_MITIGATION])) { + $value = $data[self::FIELD_MITIGATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MITIGATION_EXT]) && is_array($data[self::FIELD_MITIGATION_EXT])) { + $ext = $data[self::FIELD_MITIGATION_EXT]; } else { - $this->setMitigation(new FHIRString($data[self::FIELD_MITIGATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMitigation($value); + } else if (is_array($value)) { + $this->setMitigation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMitigation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMitigation(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -449,20 +456,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -540,20 +554,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRObservationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRObservationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRObservationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRObservationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1572,7 +1593,13 @@ public function jsonSerialize() $a[self::FIELD_BASED_ON] = $v; } if ([] !== ($vs = $this->getBasis())) { - $a[self::FIELD_BASIS] = $vs; + $a[self::FIELD_BASIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASIS][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -1584,25 +1611,41 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMethod())) { $a[self::FIELD_METHOD] = $v; } if (null !== ($v = $this->getMitigation())) { $a[self::FIELD_MITIGATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MITIGATION_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -1616,24 +1659,47 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getPrediction())) { - $a[self::FIELD_PREDICTION] = $vs; + $a[self::FIELD_PREDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PREDICTION][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesis.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesis.php index 96b5e4b304..33c7cab3f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesis.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRRiskEvidenceSynthesis extends FHIRDomainResource implements PHPFHIRCon const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -569,20 +569,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -639,52 +646,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EDITOR])) { @@ -773,36 +801,50 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -837,20 +879,27 @@ public function __construct($data = null) $this->setPopulation(new FHIRReference($data[self::FIELD_POPULATION])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -903,20 +952,27 @@ public function __construct($data = null) $this->setSampleSize(new FHIRRiskEvidenceSynthesisSampleSize($data[self::FIELD_SAMPLE_SIZE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_STUDY_TYPE])) { @@ -933,20 +989,27 @@ public function __construct($data = null) $this->setSynthesisType(new FHIRCodeableConcept($data[self::FIELD_SYNTHESIS_TYPE])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -967,20 +1030,27 @@ public function __construct($data = null) $this->addTopic(new FHIRCodeableConcept($data[self::FIELD_TOPIC])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1001,20 +1071,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2942,75 +3019,135 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getCertainty())) { - $a[self::FIELD_CERTAINTY] = $vs; + $a[self::FIELD_CERTAINTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CERTAINTY][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEditor())) { - $a[self::FIELD_EDITOR] = $vs; + $a[self::FIELD_EDITOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EDITOR][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEndorser())) { - $a[self::FIELD_ENDORSER] = $vs; + $a[self::FIELD_ENDORSER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDORSER][] = $v; + } } if (null !== ($v = $this->getExposure())) { $a[self::FIELD_EXPOSURE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v; @@ -3020,16 +3157,30 @@ public function jsonSerialize() } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getReviewer())) { - $a[self::FIELD_REVIEWER] = $vs; + $a[self::FIELD_REVIEWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REVIEWER][] = $v; + } } if (null !== ($v = $this->getRiskEstimate())) { $a[self::FIELD_RISK_ESTIMATE] = $v; @@ -3039,8 +3190,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3052,31 +3205,52 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSchedule.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSchedule.php index 6ed78ce793..afb295d180 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRSchedule extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_SPECIALTY = 'specialty'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -224,20 +224,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ACTOR])) { @@ -258,20 +265,27 @@ public function __construct($data = null) $this->addActor(new FHIRReference($data[self::FIELD_ACTOR])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -973,35 +987,72 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getActor())) { - $a[self::FIELD_ACTOR] = $vs; + $a[self::FIELD_ACTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTOR][] = $v; + } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPlanningHorizon())) { $a[self::FIELD_PLANNING_HORIZON] = $v; } if ([] !== ($vs = $this->getServiceCategory())) { - $a[self::FIELD_SERVICE_CATEGORY] = $vs; + $a[self::FIELD_SERVICE_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getServiceType())) { - $a[self::FIELD_SERVICE_TYPE] = $vs; + $a[self::FIELD_SERVICE_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_TYPE][] = $v; + } } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php index 3f27012472..4ba75b8b3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -145,7 +145,7 @@ class FHIRSearchParameter extends FHIRDomainResource implements PHPFHIRContained const FIELD_XPATH_USAGE_EXT = '_xpathUsage'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -507,107 +507,141 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BASE])) { - $ext = (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) - ? $data[self::FIELD_BASE_EXT] - : null; - if (is_array($data[self::FIELD_BASE])) { - foreach($data[self::FIELD_BASE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addBase($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addBase(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addBase(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_BASE]) || isset($data[self::FIELD_BASE_EXT])) { + if (isset($data[self::FIELD_BASE])) { + $value = $data[self::FIELD_BASE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) { + $ext = $data[self::FIELD_BASE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addBase($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addBase($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addBase(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addBase(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addBase(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addBase(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addBase(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addBase(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_BASE] instanceof FHIRCode) { - $this->addBase($data[self::FIELD_BASE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_BASE])) { - $this->addBase(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_BASE]] + $ext)); - } else { - $this->addBase(new FHIRCode($data[self::FIELD_BASE])); } } - if (isset($data[self::FIELD_CHAIN])) { - $ext = (isset($data[self::FIELD_CHAIN_EXT]) && is_array($data[self::FIELD_CHAIN_EXT])) - ? $data[self::FIELD_CHAIN_EXT] - : null; - if (is_array($data[self::FIELD_CHAIN])) { - foreach($data[self::FIELD_CHAIN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addChain($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addChain(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CHAIN]) || isset($data[self::FIELD_CHAIN_EXT])) { + if (isset($data[self::FIELD_CHAIN])) { + $value = $data[self::FIELD_CHAIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CHAIN_EXT]) && is_array($data[self::FIELD_CHAIN_EXT])) { + $ext = $data[self::FIELD_CHAIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addChain($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addChain($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addChain(new FHIRString(array_merge($v, $iext))); + } else { + $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addChain(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addChain(new FHIRString(array_merge($ext, $value))); + } else { + $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_CHAIN] instanceof FHIRString) { - $this->addChain($data[self::FIELD_CHAIN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CHAIN])) { - $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CHAIN]] + $ext)); - } else { - $this->addChain(new FHIRString($data[self::FIELD_CHAIN])); - } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addChain(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_COMPARATOR])) { - $ext = (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) - ? $data[self::FIELD_COMPARATOR_EXT] - : null; - if (is_array($data[self::FIELD_COMPARATOR])) { - foreach($data[self::FIELD_COMPARATOR] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRSearchComparator) { - $this->addComparator($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addComparator(new FHIRSearchComparator([FHIRSearchComparator::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addComparator(new FHIRSearchComparator(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMPARATOR]) || isset($data[self::FIELD_COMPARATOR_EXT])) { + if (isset($data[self::FIELD_COMPARATOR])) { + $value = $data[self::FIELD_COMPARATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) { + $ext = $data[self::FIELD_COMPARATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchComparator) { + $this->addComparator($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRSearchComparator) { + $this->addComparator($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addComparator(new FHIRSearchComparator(array_merge($v, $iext))); + } else { + $this->addComparator(new FHIRSearchComparator([FHIRSearchComparator::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addComparator(new FHIRSearchComparator($v)); } + } elseif (is_array($value)) { + $this->addComparator(new FHIRSearchComparator(array_merge($ext, $value))); + } else { + $this->addComparator(new FHIRSearchComparator([FHIRSearchComparator::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addComparator(new FHIRSearchComparator($iext)); } - } elseif ($data[self::FIELD_COMPARATOR] instanceof FHIRSearchComparator) { - $this->addComparator($data[self::FIELD_COMPARATOR]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COMPARATOR])) { - $this->addComparator(new FHIRSearchComparator([FHIRSearchComparator::FIELD_VALUE => $data[self::FIELD_COMPARATOR]] + $ext)); - } else { - $this->addComparator(new FHIRSearchComparator($data[self::FIELD_COMPARATOR])); } } if (isset($data[self::FIELD_COMPONENT])) { @@ -646,84 +680,119 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DERIVED_FROM])) { - $ext = (isset($data[self::FIELD_DERIVED_FROM_EXT]) && is_array($data[self::FIELD_DERIVED_FROM_EXT])) - ? $data[self::FIELD_DERIVED_FROM_EXT] - : null; - if ($data[self::FIELD_DERIVED_FROM] instanceof FHIRCanonical) { - $this->setDerivedFrom($data[self::FIELD_DERIVED_FROM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DERIVED_FROM])) { - $this->setDerivedFrom(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_DERIVED_FROM]] + $ext)); - } else if (is_array($data[self::FIELD_DERIVED_FROM])) { - $this->setDerivedFrom(new FHIRCanonical(array_merge($ext, $data[self::FIELD_DERIVED_FROM]))); - } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDerivedFrom(new FHIRCanonical($data[self::FIELD_DERIVED_FROM])); + $ext = []; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + if (isset($data[self::FIELD_DERIVED_FROM]) || isset($data[self::FIELD_DERIVED_FROM_EXT])) { + if (isset($data[self::FIELD_DERIVED_FROM])) { + $value = $data[self::FIELD_DERIVED_FROM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DERIVED_FROM_EXT]) && is_array($data[self::FIELD_DERIVED_FROM_EXT])) { + $ext = $data[self::FIELD_DERIVED_FROM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setDerivedFrom($value); + } else if (is_array($value)) { + $this->setDerivedFrom(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setDerivedFrom(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDerivedFrom(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -744,190 +813,264 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_MODIFIER])) { - $ext = (isset($data[self::FIELD_MODIFIER_EXT]) && is_array($data[self::FIELD_MODIFIER_EXT])) - ? $data[self::FIELD_MODIFIER_EXT] - : null; - if (is_array($data[self::FIELD_MODIFIER])) { - foreach($data[self::FIELD_MODIFIER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRSearchModifierCode) { - $this->addModifier($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addModifier(new FHIRSearchModifierCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MODIFIER]) || isset($data[self::FIELD_MODIFIER_EXT])) { + if (isset($data[self::FIELD_MODIFIER])) { + $value = $data[self::FIELD_MODIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODIFIER_EXT]) && is_array($data[self::FIELD_MODIFIER_EXT])) { + $ext = $data[self::FIELD_MODIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchModifierCode) { + $this->addModifier($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRSearchModifierCode) { + $this->addModifier($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addModifier(new FHIRSearchModifierCode(array_merge($v, $iext))); + } else { + $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addModifier(new FHIRSearchModifierCode($v)); } + } elseif (is_array($value)) { + $this->addModifier(new FHIRSearchModifierCode(array_merge($ext, $value))); + } else { + $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_MODIFIER] instanceof FHIRSearchModifierCode) { - $this->addModifier($data[self::FIELD_MODIFIER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MODIFIER])) { - $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $data[self::FIELD_MODIFIER]] + $ext)); - } else { - $this->addModifier(new FHIRSearchModifierCode($data[self::FIELD_MODIFIER])); - } - } - if (isset($data[self::FIELD_MULTIPLE_AND])) { - $ext = (isset($data[self::FIELD_MULTIPLE_AND_EXT]) && is_array($data[self::FIELD_MULTIPLE_AND_EXT])) - ? $data[self::FIELD_MULTIPLE_AND_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_AND] instanceof FHIRBoolean) { - $this->setMultipleAnd($data[self::FIELD_MULTIPLE_AND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_AND])) { - $this->setMultipleAnd(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MULTIPLE_AND]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_AND])) { - $this->setMultipleAnd(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MULTIPLE_AND]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addModifier(new FHIRSearchModifierCode($iext)); } - } else { - $this->setMultipleAnd(new FHIRBoolean($data[self::FIELD_MULTIPLE_AND])); } } - if (isset($data[self::FIELD_MULTIPLE_OR])) { - $ext = (isset($data[self::FIELD_MULTIPLE_OR_EXT]) && is_array($data[self::FIELD_MULTIPLE_OR_EXT])) - ? $data[self::FIELD_MULTIPLE_OR_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_OR] instanceof FHIRBoolean) { - $this->setMultipleOr($data[self::FIELD_MULTIPLE_OR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_OR])) { - $this->setMultipleOr(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MULTIPLE_OR]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_OR])) { - $this->setMultipleOr(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MULTIPLE_OR]))); - } + if (isset($data[self::FIELD_MULTIPLE_AND]) || isset($data[self::FIELD_MULTIPLE_AND_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_AND])) { + $value = $data[self::FIELD_MULTIPLE_AND]; } else { - $this->setMultipleOr(new FHIRBoolean($data[self::FIELD_MULTIPLE_OR])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_MULTIPLE_AND_EXT]) && is_array($data[self::FIELD_MULTIPLE_AND_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_AND_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMultipleAnd($value); + } else if (is_array($value)) { + $this->setMultipleAnd(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMultipleAnd(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMultipleAnd(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_MULTIPLE_OR]) || isset($data[self::FIELD_MULTIPLE_OR_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_OR])) { + $value = $data[self::FIELD_MULTIPLE_OR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_OR_EXT]) && is_array($data[self::FIELD_MULTIPLE_OR_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_OR_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMultipleOr($value); + } else if (is_array($value)) { + $this->setMultipleOr(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMultipleOr(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMultipleOr(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_TARGET])) { - $ext = (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) - ? $data[self::FIELD_TARGET_EXT] - : null; - if (is_array($data[self::FIELD_TARGET])) { - foreach($data[self::FIELD_TARGET] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addTarget($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTarget(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TARGET]) || isset($data[self::FIELD_TARGET_EXT])) { + if (isset($data[self::FIELD_TARGET])) { + $value = $data[self::FIELD_TARGET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) { + $ext = $data[self::FIELD_TARGET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addTarget($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addTarget($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTarget(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTarget(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addTarget(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_TARGET] instanceof FHIRCode) { - $this->addTarget($data[self::FIELD_TARGET]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TARGET])) { - $this->addTarget(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TARGET]] + $ext)); - } else { - $this->addTarget(new FHIRCode($data[self::FIELD_TARGET])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSearchParamType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType(array_merge($ext, $data[self::FIELD_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTarget(new FHIRCode($iext)); } - } else { - $this->setType(new FHIRSearchParamType($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchParamType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSearchParamType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRSearchParamType($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -948,52 +1091,73 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; } - } - if (isset($data[self::FIELD_XPATH])) { - $ext = (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) - ? $data[self::FIELD_XPATH_EXT] - : null; - if ($data[self::FIELD_XPATH] instanceof FHIRString) { - $this->setXpath($data[self::FIELD_XPATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_XPATH]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString(array_merge($ext, $data[self::FIELD_XPATH]))); - } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setXpath(new FHIRString($data[self::FIELD_XPATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } - if (isset($data[self::FIELD_XPATH_USAGE])) { - $ext = (isset($data[self::FIELD_XPATH_USAGE_EXT]) && is_array($data[self::FIELD_XPATH_USAGE_EXT])) - ? $data[self::FIELD_XPATH_USAGE_EXT] - : null; - if ($data[self::FIELD_XPATH_USAGE] instanceof FHIRXPathUsageType) { - $this->setXpathUsage($data[self::FIELD_XPATH_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH_USAGE])) { - $this->setXpathUsage(new FHIRXPathUsageType([FHIRXPathUsageType::FIELD_VALUE => $data[self::FIELD_XPATH_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH_USAGE])) { - $this->setXpathUsage(new FHIRXPathUsageType(array_merge($ext, $data[self::FIELD_XPATH_USAGE]))); + if (isset($data[self::FIELD_XPATH]) || isset($data[self::FIELD_XPATH_EXT])) { + if (isset($data[self::FIELD_XPATH])) { + $value = $data[self::FIELD_XPATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) { + $ext = $data[self::FIELD_XPATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setXpath($value); + } else if (is_array($value)) { + $this->setXpath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setXpath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_XPATH_USAGE]) || isset($data[self::FIELD_XPATH_USAGE_EXT])) { + if (isset($data[self::FIELD_XPATH_USAGE])) { + $value = $data[self::FIELD_XPATH_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_XPATH_USAGE_EXT]) && is_array($data[self::FIELD_XPATH_USAGE_EXT])) { + $ext = $data[self::FIELD_XPATH_USAGE_EXT]; } else { - $this->setXpathUsage(new FHIRXPathUsageType($data[self::FIELD_XPATH_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRXPathUsageType) { + $this->setXpathUsage($value); + } else if (is_array($value)) { + $this->setXpathUsage(new FHIRXPathUsageType(array_merge($ext, $value))); + } else { + $this->setXpathUsage(new FHIRXPathUsageType([FHIRXPathUsageType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setXpathUsage(new FHIRXPathUsageType($ext)); } } } @@ -2691,210 +2855,311 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBase())) { $a[self::FIELD_BASE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_BASE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_BASE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_BASE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_BASE_EXT] = $encs; + } } if ([] !== ($vs = $this->getChain())) { $a[self::FIELD_CHAIN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CHAIN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CHAIN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CHAIN_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CHAIN_EXT] = $encs; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getComparator())) { $a[self::FIELD_COMPARATOR] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COMPARATOR][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COMPARATOR_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRSearchComparator::FIELD_VALUE]) || array_key_exists(FHIRSearchComparator::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COMPARATOR_EXT][] = null; + unset($enc[FHIRSearchComparator::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COMPARATOR_EXT] = $encs; + } } if ([] !== ($vs = $this->getComponent())) { - $a[self::FIELD_COMPONENT] = $vs; + $a[self::FIELD_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPONENT][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDerivedFrom())) { $a[self::FIELD_DERIVED_FROM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_DERIVED_FROM_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getModifier())) { $a[self::FIELD_MODIFIER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MODIFIER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MODIFIER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRSearchModifierCode::FIELD_VALUE]) || array_key_exists(FHIRSearchModifierCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MODIFIER_EXT][] = null; + unset($enc[FHIRSearchModifierCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MODIFIER_EXT] = $encs; + } } if (null !== ($v = $this->getMultipleAnd())) { $a[self::FIELD_MULTIPLE_AND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_AND_EXT] = $enc; } } if (null !== ($v = $this->getMultipleOr())) { $a[self::FIELD_MULTIPLE_OR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_OR_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { $a[self::FIELD_TARGET] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TARGET][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TARGET_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TARGET_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TARGET_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchParamType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchParamType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } if (null !== ($v = $this->getXpath())) { $a[self::FIELD_XPATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_XPATH_EXT] = $enc; } } if (null !== ($v = $this->getXpathUsage())) { $a[self::FIELD_XPATH_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRXPathUsageType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRXPathUsageType::FIELD_VALUE]); $a[self::FIELD_XPATH_USAGE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRServiceRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRServiceRequest.php index a6f079b75b..a6b45121f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRServiceRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRServiceRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRServiceRequest extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_SUPPORTING_INFO = 'supportingInfo'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -658,20 +658,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -681,20 +688,27 @@ public function __construct($data = null) $this->setAsNeededCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -758,20 +772,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DO_NOT_PERFORM])) { - $ext = (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) - ? $data[self::FIELD_DO_NOT_PERFORM_EXT] - : null; - if ($data[self::FIELD_DO_NOT_PERFORM] instanceof FHIRBoolean) { - $this->setDoNotPerform($data[self::FIELD_DO_NOT_PERFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DO_NOT_PERFORM]] + $ext)); - } else if (is_array($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DO_NOT_PERFORM]))); - } + if (isset($data[self::FIELD_DO_NOT_PERFORM]) || isset($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + if (isset($data[self::FIELD_DO_NOT_PERFORM])) { + $value = $data[self::FIELD_DO_NOT_PERFORM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + $ext = $data[self::FIELD_DO_NOT_PERFORM_EXT]; } else { - $this->setDoNotPerform(new FHIRBoolean($data[self::FIELD_DO_NOT_PERFORM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDoNotPerform($value); + } else if (is_array($value)) { + $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoNotPerform(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -799,62 +820,80 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - foreach($data[self::FIELD_INSTANTIATES_CANONICAL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addInstantiatesCanonical($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesCanonical(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->addInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->addInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else { - $this->addInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); } } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - foreach($data[self::FIELD_INSTANTIATES_URI] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiatesUri($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiatesUri(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiatesUri($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiatesUri($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiatesUri(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiatesUri(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->addInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->addInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else { - $this->addInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); } } if (isset($data[self::FIELD_INSURANCE])) { @@ -875,20 +914,27 @@ public function __construct($data = null) $this->addInsurance(new FHIRReference($data[self::FIELD_INSURANCE])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; } else { - $this->setIntent(new FHIRRequestIntent($data[self::FIELD_INTENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRRequestIntent($ext)); } } if (isset($data[self::FIELD_LOCATION_CODE])) { @@ -945,20 +991,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -993,20 +1046,27 @@ public function __construct($data = null) $this->addOrderDetail(new FHIRCodeableConcept($data[self::FIELD_ORDER_DETAIL])); } } - if (isset($data[self::FIELD_PATIENT_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) - ? $data[self::FIELD_PATIENT_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_PATIENT_INSTRUCTION] instanceof FHIRString) { - $this->setPatientInstruction($data[self::FIELD_PATIENT_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATIENT_INSTRUCTION])) { - $this->setPatientInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATIENT_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_PATIENT_INSTRUCTION])) { - $this->setPatientInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_PATIENT_INSTRUCTION]))); - } + if (isset($data[self::FIELD_PATIENT_INSTRUCTION]) || isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_PATIENT_INSTRUCTION])) { + $value = $data[self::FIELD_PATIENT_INSTRUCTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_PATIENT_INSTRUCTION_EXT]; } else { - $this->setPatientInstruction(new FHIRString($data[self::FIELD_PATIENT_INSTRUCTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPatientInstruction($value); + } else if (is_array($value)) { + $this->setPatientInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPatientInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatientInstruction(new FHIRString($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -1034,20 +1094,27 @@ public function __construct($data = null) $this->setPerformerType(new FHIRCodeableConcept($data[self::FIELD_PERFORMER_TYPE])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_QUANTITY_QUANTITY])) { @@ -1175,20 +1242,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -3549,8 +3623,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -3559,27 +3635,49 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if (null !== ($v = $this->getDoNotPerform())) { $a[self::FIELD_DO_NOT_PERFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DO_NOT_PERFORM_EXT] = $enc; } } @@ -3587,61 +3685,111 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_CANONICAL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_CANONICAL_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES_URI][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_URI_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_URI_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_URI_EXT] = $encs; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getLocationCode())) { - $a[self::FIELD_LOCATION_CODE] = $vs; + $a[self::FIELD_LOCATION_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION_CODE][] = $v; + } } if ([] !== ($vs = $this->getLocationReference())) { - $a[self::FIELD_LOCATION_REFERENCE] = $vs; + $a[self::FIELD_LOCATION_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -3652,25 +3800,41 @@ public function jsonSerialize() $a[self::FIELD_OCCURRENCE_TIMING] = $v; } if ([] !== ($vs = $this->getOrderDetail())) { - $a[self::FIELD_ORDER_DETAIL] = $vs; + $a[self::FIELD_ORDER_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ORDER_DETAIL][] = $v; + } } if (null !== ($v = $this->getPatientInstruction())) { $a[self::FIELD_PATIENT_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATIENT_INSTRUCTION_EXT] = $enc; } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getPerformerType())) { $a[self::FIELD_PERFORMER_TYPE] = $v; } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } @@ -3684,16 +3848,40 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY_RATIO] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getRelevantHistory())) { - $a[self::FIELD_RELEVANT_HISTORY] = $vs; + $a[self::FIELD_RELEVANT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELEVANT_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; @@ -3702,12 +3890,20 @@ public function jsonSerialize() $a[self::FIELD_REQUISITION] = $v; } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -3715,7 +3911,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSlot.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSlot.php index a5b38ebfc0..ce1f0eae15 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSlot.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSlot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRSlot extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -272,36 +272,50 @@ public function __construct($data = null) $this->setAppointmentType(new FHIRCodeableConcept($data[self::FIELD_APPOINTMENT_TYPE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -322,20 +336,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_OVERBOOKED])) { - $ext = (isset($data[self::FIELD_OVERBOOKED_EXT]) && is_array($data[self::FIELD_OVERBOOKED_EXT])) - ? $data[self::FIELD_OVERBOOKED_EXT] - : null; - if ($data[self::FIELD_OVERBOOKED] instanceof FHIRBoolean) { - $this->setOverbooked($data[self::FIELD_OVERBOOKED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OVERBOOKED])) { - $this->setOverbooked(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_OVERBOOKED]] + $ext)); - } else if (is_array($data[self::FIELD_OVERBOOKED])) { - $this->setOverbooked(new FHIRBoolean(array_merge($ext, $data[self::FIELD_OVERBOOKED]))); - } + if (isset($data[self::FIELD_OVERBOOKED]) || isset($data[self::FIELD_OVERBOOKED_EXT])) { + if (isset($data[self::FIELD_OVERBOOKED])) { + $value = $data[self::FIELD_OVERBOOKED]; } else { - $this->setOverbooked(new FHIRBoolean($data[self::FIELD_OVERBOOKED])); + $value = null; + } + if (isset($data[self::FIELD_OVERBOOKED_EXT]) && is_array($data[self::FIELD_OVERBOOKED_EXT])) { + $ext = $data[self::FIELD_OVERBOOKED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOverbooked($value); + } else if (is_array($value)) { + $this->setOverbooked(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOverbooked(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOverbooked(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_SCHEDULE])) { @@ -399,36 +420,50 @@ public function __construct($data = null) $this->addSpecialty(new FHIRCodeableConcept($data[self::FIELD_SPECIALTY])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInstant) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInstant($data[self::FIELD_START])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSlotStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSlotStatus([FHIRSlotStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSlotStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStart(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSlotStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSlotStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSlotStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSlotStatus([FHIRSlotStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSlotStatus($ext)); } } } @@ -1173,25 +1208,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOverbooked())) { $a[self::FIELD_OVERBOOKED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_OVERBOOKED_EXT] = $enc; } } @@ -1199,28 +1246,53 @@ public function jsonSerialize() $a[self::FIELD_SCHEDULE] = $v; } if ([] !== ($vs = $this->getServiceCategory())) { - $a[self::FIELD_SERVICE_CATEGORY] = $vs; + $a[self::FIELD_SERVICE_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getServiceType())) { - $a[self::FIELD_SERVICE_TYPE] = $vs; + $a[self::FIELD_SERVICE_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_TYPE][] = $v; + } } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSlotStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSlotStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimen.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimen.php index 31a0fd7760..17335b3946 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimen.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRSpecimen extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An identifier - identifies some entity uniquely and unambiguously. Typically @@ -401,20 +401,27 @@ public function __construct($data = null) $this->addProcessing(new FHIRSpecimenProcessing($data[self::FIELD_PROCESSING])); } } - if (isset($data[self::FIELD_RECEIVED_TIME])) { - $ext = (isset($data[self::FIELD_RECEIVED_TIME_EXT]) && is_array($data[self::FIELD_RECEIVED_TIME_EXT])) - ? $data[self::FIELD_RECEIVED_TIME_EXT] - : null; - if ($data[self::FIELD_RECEIVED_TIME] instanceof FHIRDateTime) { - $this->setReceivedTime($data[self::FIELD_RECEIVED_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECEIVED_TIME])) { - $this->setReceivedTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECEIVED_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_RECEIVED_TIME])) { - $this->setReceivedTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECEIVED_TIME]))); - } + if (isset($data[self::FIELD_RECEIVED_TIME]) || isset($data[self::FIELD_RECEIVED_TIME_EXT])) { + if (isset($data[self::FIELD_RECEIVED_TIME])) { + $value = $data[self::FIELD_RECEIVED_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECEIVED_TIME_EXT]) && is_array($data[self::FIELD_RECEIVED_TIME_EXT])) { + $ext = $data[self::FIELD_RECEIVED_TIME_EXT]; } else { - $this->setReceivedTime(new FHIRDateTime($data[self::FIELD_RECEIVED_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReceivedTime($value); + } else if (is_array($value)) { + $this->setReceivedTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReceivedTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReceivedTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -435,20 +442,27 @@ public function __construct($data = null) $this->addRequest(new FHIRReference($data[self::FIELD_REQUEST])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSpecimenStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSpecimenStatus([FHIRSpecimenStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSpecimenStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRSpecimenStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSpecimenStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSpecimenStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSpecimenStatus([FHIRSpecimenStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSpecimenStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1307,37 +1321,83 @@ public function jsonSerialize() $a[self::FIELD_COLLECTION] = $v; } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if ([] !== ($vs = $this->getContainer())) { - $a[self::FIELD_CONTAINER] = $vs; + $a[self::FIELD_CONTAINER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getParent())) { - $a[self::FIELD_PARENT] = $vs; + $a[self::FIELD_PARENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARENT][] = $v; + } } if ([] !== ($vs = $this->getProcessing())) { - $a[self::FIELD_PROCESSING] = $vs; + $a[self::FIELD_PROCESSING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESSING][] = $v; + } } if (null !== ($v = $this->getReceivedTime())) { $a[self::FIELD_RECEIVED_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECEIVED_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getRequest())) { - $a[self::FIELD_REQUEST] = $vs; + $a[self::FIELD_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUEST][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSpecimenStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSpecimenStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1347,6 +1407,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinition.php index 28c179171e..5ae47523e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSpecimenDefinition extends FHIRDomainResource implements PHPFHIRContai const FIELD_TYPE_TESTED = 'typeTested'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -226,20 +226,27 @@ public function __construct($data = null) $this->addPatientPreparation(new FHIRCodeableConcept($data[self::FIELD_PATIENT_PREPARATION])); } } - if (isset($data[self::FIELD_TIME_ASPECT])) { - $ext = (isset($data[self::FIELD_TIME_ASPECT_EXT]) && is_array($data[self::FIELD_TIME_ASPECT_EXT])) - ? $data[self::FIELD_TIME_ASPECT_EXT] - : null; - if ($data[self::FIELD_TIME_ASPECT] instanceof FHIRString) { - $this->setTimeAspect($data[self::FIELD_TIME_ASPECT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME_ASPECT])) { - $this->setTimeAspect(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TIME_ASPECT]] + $ext)); - } else if (is_array($data[self::FIELD_TIME_ASPECT])) { - $this->setTimeAspect(new FHIRString(array_merge($ext, $data[self::FIELD_TIME_ASPECT]))); - } + if (isset($data[self::FIELD_TIME_ASPECT]) || isset($data[self::FIELD_TIME_ASPECT_EXT])) { + if (isset($data[self::FIELD_TIME_ASPECT])) { + $value = $data[self::FIELD_TIME_ASPECT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_ASPECT_EXT]) && is_array($data[self::FIELD_TIME_ASPECT_EXT])) { + $ext = $data[self::FIELD_TIME_ASPECT_EXT]; } else { - $this->setTimeAspect(new FHIRString($data[self::FIELD_TIME_ASPECT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTimeAspect($value); + } else if (is_array($value)) { + $this->setTimeAspect(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTimeAspect(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimeAspect(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE_COLLECTED])) { @@ -705,18 +712,32 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCollection())) { - $a[self::FIELD_COLLECTION] = $vs; + $a[self::FIELD_COLLECTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COLLECTION][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getPatientPreparation())) { - $a[self::FIELD_PATIENT_PREPARATION] = $vs; + $a[self::FIELD_PATIENT_PREPARATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PATIENT_PREPARATION][] = $v; + } } if (null !== ($v = $this->getTimeAspect())) { $a[self::FIELD_TIME_ASPECT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TIME_ASPECT_EXT] = $enc; } } @@ -724,7 +745,16 @@ public function jsonSerialize() $a[self::FIELD_TYPE_COLLECTED] = $v; } if ([] !== ($vs = $this->getTypeTested())) { - $a[self::FIELD_TYPE_TESTED] = $vs; + $a[self::FIELD_TYPE_TESTED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE_TESTED][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php index f97aba108b..7b4d05f3ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRStructureDefinition extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -530,36 +530,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ABSTRACT])) { - $ext = (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) - ? $data[self::FIELD_ABSTRACT_EXT] - : null; - if ($data[self::FIELD_ABSTRACT] instanceof FHIRBoolean) { - $this->setAbstract($data[self::FIELD_ABSTRACT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABSTRACT]] + $ext)); - } else if (is_array($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABSTRACT]))); - } + if (isset($data[self::FIELD_ABSTRACT]) || isset($data[self::FIELD_ABSTRACT_EXT])) { + if (isset($data[self::FIELD_ABSTRACT])) { + $value = $data[self::FIELD_ABSTRACT]; } else { - $this->setAbstract(new FHIRBoolean($data[self::FIELD_ABSTRACT])); + $value = null; } - } - if (isset($data[self::FIELD_BASE_DEFINITION])) { - $ext = (isset($data[self::FIELD_BASE_DEFINITION_EXT]) && is_array($data[self::FIELD_BASE_DEFINITION_EXT])) - ? $data[self::FIELD_BASE_DEFINITION_EXT] - : null; - if ($data[self::FIELD_BASE_DEFINITION] instanceof FHIRCanonical) { - $this->setBaseDefinition($data[self::FIELD_BASE_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE_DEFINITION])) { - $this->setBaseDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_BASE_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_BASE_DEFINITION])) { - $this->setBaseDefinition(new FHIRCanonical(array_merge($ext, $data[self::FIELD_BASE_DEFINITION]))); + if (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) { + $ext = $data[self::FIELD_ABSTRACT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbstract($value); + } else if (is_array($value)) { + $this->setAbstract(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbstract(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_BASE_DEFINITION]) || isset($data[self::FIELD_BASE_DEFINITION_EXT])) { + if (isset($data[self::FIELD_BASE_DEFINITION])) { + $value = $data[self::FIELD_BASE_DEFINITION]; } else { - $this->setBaseDefinition(new FHIRCanonical($data[self::FIELD_BASE_DEFINITION])); + $value = null; + } + if (isset($data[self::FIELD_BASE_DEFINITION_EXT]) && is_array($data[self::FIELD_BASE_DEFINITION_EXT])) { + $ext = $data[self::FIELD_BASE_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setBaseDefinition($value); + } else if (is_array($value)) { + $this->setBaseDefinition(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setBaseDefinition(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBaseDefinition(new FHIRCanonical($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -598,97 +612,134 @@ public function __construct($data = null) $this->addContext(new FHIRStructureDefinitionContext($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_CONTEXT_INVARIANT])) { - $ext = (isset($data[self::FIELD_CONTEXT_INVARIANT_EXT]) && is_array($data[self::FIELD_CONTEXT_INVARIANT_EXT])) - ? $data[self::FIELD_CONTEXT_INVARIANT_EXT] - : null; - if (is_array($data[self::FIELD_CONTEXT_INVARIANT])) { - foreach($data[self::FIELD_CONTEXT_INVARIANT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addContextInvariant($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addContextInvariant(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addContextInvariant(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CONTEXT_INVARIANT]) || isset($data[self::FIELD_CONTEXT_INVARIANT_EXT])) { + if (isset($data[self::FIELD_CONTEXT_INVARIANT])) { + $value = $data[self::FIELD_CONTEXT_INVARIANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_INVARIANT_EXT]) && is_array($data[self::FIELD_CONTEXT_INVARIANT_EXT])) { + $ext = $data[self::FIELD_CONTEXT_INVARIANT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addContextInvariant($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addContextInvariant($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addContextInvariant(new FHIRString(array_merge($v, $iext))); + } else { + $this->addContextInvariant(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addContextInvariant(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addContextInvariant(new FHIRString(array_merge($ext, $value))); + } else { + $this->addContextInvariant(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_CONTEXT_INVARIANT] instanceof FHIRString) { - $this->addContextInvariant($data[self::FIELD_CONTEXT_INVARIANT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONTEXT_INVARIANT])) { - $this->addContextInvariant(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTEXT_INVARIANT]] + $ext)); - } else { - $this->addContextInvariant(new FHIRString($data[self::FIELD_CONTEXT_INVARIANT])); - } - } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addContextInvariant(new FHIRString($iext)); } - } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DERIVATION])) { - $ext = (isset($data[self::FIELD_DERIVATION_EXT]) && is_array($data[self::FIELD_DERIVATION_EXT])) - ? $data[self::FIELD_DERIVATION_EXT] - : null; - if ($data[self::FIELD_DERIVATION] instanceof FHIRTypeDerivationRule) { - $this->setDerivation($data[self::FIELD_DERIVATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DERIVATION])) { - $this->setDerivation(new FHIRTypeDerivationRule([FHIRTypeDerivationRule::FIELD_VALUE => $data[self::FIELD_DERIVATION]] + $ext)); - } else if (is_array($data[self::FIELD_DERIVATION])) { - $this->setDerivation(new FHIRTypeDerivationRule(array_merge($ext, $data[self::FIELD_DERIVATION]))); + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDerivation(new FHIRTypeDerivationRule($data[self::FIELD_DERIVATION])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DERIVATION]) || isset($data[self::FIELD_DERIVATION_EXT])) { + if (isset($data[self::FIELD_DERIVATION])) { + $value = $data[self::FIELD_DERIVATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DERIVATION_EXT]) && is_array($data[self::FIELD_DERIVATION_EXT])) { + $ext = $data[self::FIELD_DERIVATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTypeDerivationRule) { + $this->setDerivation($value); + } else if (is_array($value)) { + $this->setDerivation(new FHIRTypeDerivationRule(array_merge($ext, $value))); + } else { + $this->setDerivation(new FHIRTypeDerivationRule([FHIRTypeDerivationRule::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDerivation(new FHIRTypeDerivationRule($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DIFFERENTIAL])) { @@ -698,36 +749,50 @@ public function __construct($data = null) $this->setDifferential(new FHIRStructureDefinitionDifferential($data[self::FIELD_DIFFERENTIAL])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; } - } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRFHIRVersion) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRFHIRVersion(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; } else { - $this->setFhirVersion(new FHIRFHIRVersion($data[self::FIELD_FHIR_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRVersion) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRFHIRVersion(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRFHIRVersion([FHIRFHIRVersion::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRFHIRVersion($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -784,20 +849,27 @@ public function __construct($data = null) $this->addKeyword(new FHIRCoding($data[self::FIELD_KEYWORD])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRStructureDefinitionKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRStructureDefinitionKind([FHIRStructureDefinitionKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRStructureDefinitionKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRStructureDefinitionKind($data[self::FIELD_KIND])); + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureDefinitionKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRStructureDefinitionKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRStructureDefinitionKind([FHIRStructureDefinitionKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRStructureDefinitionKind($ext)); } } if (isset($data[self::FIELD_MAPPING])) { @@ -818,52 +890,73 @@ public function __construct($data = null) $this->addMapping(new FHIRStructureDefinitionMapping($data[self::FIELD_MAPPING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_SNAPSHOT])) { @@ -873,68 +966,96 @@ public function __construct($data = null) $this->setSnapshot(new FHIRStructureDefinitionSnapshot($data[self::FIELD_SNAPSHOT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRUri) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRUri(array_merge($ext, $data[self::FIELD_TYPE]))); + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setType(new FHIRUri($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setType(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -955,20 +1076,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2670,64 +2798,96 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAbstract())) { $a[self::FIELD_ABSTRACT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABSTRACT_EXT] = $enc; } } if (null !== ($v = $this->getBaseDefinition())) { $a[self::FIELD_BASE_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_BASE_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getContext())) { - $a[self::FIELD_CONTEXT] = $vs; + $a[self::FIELD_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTEXT][] = $v; + } } if ([] !== ($vs = $this->getContextInvariant())) { $a[self::FIELD_CONTEXT_INVARIANT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONTEXT_INVARIANT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONTEXT_INVARIANT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONTEXT_INVARIANT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONTEXT_INVARIANT_EXT] = $encs; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDerivation())) { $a[self::FIELD_DERIVATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTypeDerivationRule::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTypeDerivationRule::FIELD_VALUE]); $a[self::FIELD_DERIVATION_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2736,55 +2896,91 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFHIRVersion::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFHIRVersion::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getKeyword())) { - $a[self::FIELD_KEYWORD] = $vs; + $a[self::FIELD_KEYWORD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_KEYWORD][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureDefinitionKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureDefinitionKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } @@ -2793,42 +2989,61 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureMap.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureMap.php index e23ba0d2eb..d649c102f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureMap.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRStructureMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRStructureMap extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -412,68 +412,96 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_GROUP])) { @@ -512,33 +540,42 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_IMPORT])) { - $ext = (isset($data[self::FIELD_IMPORT_EXT]) && is_array($data[self::FIELD_IMPORT_EXT])) - ? $data[self::FIELD_IMPORT_EXT] - : null; - if (is_array($data[self::FIELD_IMPORT])) { - foreach($data[self::FIELD_IMPORT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCanonical) { - $this->addImport($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addImport(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addImport(new FHIRCanonical(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_IMPORT]) || isset($data[self::FIELD_IMPORT_EXT])) { + if (isset($data[self::FIELD_IMPORT])) { + $value = $data[self::FIELD_IMPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPORT_EXT]) && is_array($data[self::FIELD_IMPORT_EXT])) { + $ext = $data[self::FIELD_IMPORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->addImport($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCanonical) { + $this->addImport($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addImport(new FHIRCanonical(array_merge($v, $iext))); + } else { + $this->addImport(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addImport(new FHIRCanonical($v)); } + } elseif (is_array($value)) { + $this->addImport(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->addImport(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addImport(new FHIRCanonical($iext)); } - } elseif ($data[self::FIELD_IMPORT] instanceof FHIRCanonical) { - $this->addImport($data[self::FIELD_IMPORT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_IMPORT])) { - $this->addImport(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_IMPORT]] + $ext)); - } else { - $this->addImport(new FHIRCanonical($data[self::FIELD_IMPORT])); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -559,68 +596,96 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_STRUCTURE])) { @@ -641,36 +706,50 @@ public function __construct($data = null) $this->addStructure(new FHIRStructureMapStructure($data[self::FIELD_STRUCTURE])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -691,20 +770,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1958,115 +2044,184 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getImport())) { $a[self::FIELD_IMPORT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_IMPORT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_IMPORT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCanonical::FIELD_VALUE]) || array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_IMPORT_EXT][] = null; + unset($enc[FHIRCanonical::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_IMPORT_EXT] = $encs; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStructure())) { - $a[self::FIELD_STRUCTURE] = $vs; + $a[self::FIELD_STRUCTURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRUCTURE][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubscription.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubscription.php index d8d940428e..899cae695d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubscription.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubscription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRSubscription extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The subscription resource is used to define a push-based subscription from a @@ -237,84 +237,119 @@ public function __construct($data = null) $this->addContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_CRITERIA])) { - $ext = (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) - ? $data[self::FIELD_CRITERIA_EXT] - : null; - if ($data[self::FIELD_CRITERIA] instanceof FHIRString) { - $this->setCriteria($data[self::FIELD_CRITERIA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CRITERIA]] + $ext)); - } else if (is_array($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString(array_merge($ext, $data[self::FIELD_CRITERIA]))); - } + if (isset($data[self::FIELD_CRITERIA]) || isset($data[self::FIELD_CRITERIA_EXT])) { + if (isset($data[self::FIELD_CRITERIA])) { + $value = $data[self::FIELD_CRITERIA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) { + $ext = $data[self::FIELD_CRITERIA_EXT]; } else { - $this->setCriteria(new FHIRString($data[self::FIELD_CRITERIA])); - } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCriteria($value); + } else if (is_array($value)) { + $this->setCriteria(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCriteria(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); - } - } - if (isset($data[self::FIELD_ERROR])) { - $ext = (isset($data[self::FIELD_ERROR_EXT]) && is_array($data[self::FIELD_ERROR_EXT])) - ? $data[self::FIELD_ERROR_EXT] - : null; - if ($data[self::FIELD_ERROR] instanceof FHIRString) { - $this->setError($data[self::FIELD_ERROR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ERROR])) { - $this->setError(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ERROR]] + $ext)); - } else if (is_array($data[self::FIELD_ERROR])) { - $this->setError(new FHIRString(array_merge($ext, $data[self::FIELD_ERROR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_ERROR]) || isset($data[self::FIELD_ERROR_EXT])) { + if (isset($data[self::FIELD_ERROR])) { + $value = $data[self::FIELD_ERROR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ERROR_EXT]) && is_array($data[self::FIELD_ERROR_EXT])) { + $ext = $data[self::FIELD_ERROR_EXT]; } else { - $this->setError(new FHIRString($data[self::FIELD_ERROR])); - } - } - if (isset($data[self::FIELD_REASON])) { - $ext = (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) - ? $data[self::FIELD_REASON_EXT] - : null; - if ($data[self::FIELD_REASON] instanceof FHIRString) { - $this->setReason($data[self::FIELD_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REASON])) { - $this->setReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_REASON])) { - $this->setReason(new FHIRString(array_merge($ext, $data[self::FIELD_REASON]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setError($value); + } else if (is_array($value)) { + $this->setError(new FHIRString(array_merge($ext, $value))); + } else { + $this->setError(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setError(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REASON]) || isset($data[self::FIELD_REASON_EXT])) { + if (isset($data[self::FIELD_REASON])) { + $value = $data[self::FIELD_REASON]; } else { - $this->setReason(new FHIRString($data[self::FIELD_REASON])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSubscriptionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSubscriptionStatus([FHIRSubscriptionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSubscriptionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) { + $ext = $data[self::FIELD_REASON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReason($value); + } else if (is_array($value)) { + $this->setReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReason(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSubscriptionStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSubscriptionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSubscriptionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSubscriptionStatus([FHIRSubscriptionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSubscriptionStatus($ext)); } } } @@ -794,43 +829,62 @@ public function jsonSerialize() $a[self::FIELD_CHANNEL] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCriteria())) { $a[self::FIELD_CRITERIA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CRITERIA_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getError())) { $a[self::FIELD_ERROR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ERROR_EXT] = $enc; } } if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REASON_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSubscriptionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSubscriptionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstance.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstance.php index 1c3a78a8b9..bdf1e57cc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRSubstance extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -222,20 +222,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -292,20 +299,27 @@ public function __construct($data = null) $this->addInstance(new FHIRSubstanceInstance($data[self::FIELD_INSTANCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFHIRSubstanceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFHIRSubstanceStatus([FHIRFHIRSubstanceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFHIRSubstanceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFHIRSubstanceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRSubstanceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFHIRSubstanceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFHIRSubstanceStatus([FHIRFHIRSubstanceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFHIRSubstanceStatus($ext)); } } } @@ -813,34 +827,65 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFHIRSubstanceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFHIRSubstanceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcid.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcid.php index 70defc60d9..7d01d8b4ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcid.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRSubstanceNucleicAcid extends FHIRDomainResource implements PHPFHIRCont const FIELD_SUBUNIT = 'subunit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -184,36 +184,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AREA_OF_HYBRIDISATION])) { - $ext = (isset($data[self::FIELD_AREA_OF_HYBRIDISATION_EXT]) && is_array($data[self::FIELD_AREA_OF_HYBRIDISATION_EXT])) - ? $data[self::FIELD_AREA_OF_HYBRIDISATION_EXT] - : null; - if ($data[self::FIELD_AREA_OF_HYBRIDISATION] instanceof FHIRString) { - $this->setAreaOfHybridisation($data[self::FIELD_AREA_OF_HYBRIDISATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AREA_OF_HYBRIDISATION])) { - $this->setAreaOfHybridisation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AREA_OF_HYBRIDISATION]] + $ext)); - } else if (is_array($data[self::FIELD_AREA_OF_HYBRIDISATION])) { - $this->setAreaOfHybridisation(new FHIRString(array_merge($ext, $data[self::FIELD_AREA_OF_HYBRIDISATION]))); - } + if (isset($data[self::FIELD_AREA_OF_HYBRIDISATION]) || isset($data[self::FIELD_AREA_OF_HYBRIDISATION_EXT])) { + if (isset($data[self::FIELD_AREA_OF_HYBRIDISATION])) { + $value = $data[self::FIELD_AREA_OF_HYBRIDISATION]; } else { - $this->setAreaOfHybridisation(new FHIRString($data[self::FIELD_AREA_OF_HYBRIDISATION])); + $value = null; } - } - if (isset($data[self::FIELD_NUMBER_OF_SUBUNITS])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT])) - ? $data[self::FIELD_NUMBER_OF_SUBUNITS_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_SUBUNITS] instanceof FHIRInteger) { - $this->setNumberOfSubunits($data[self::FIELD_NUMBER_OF_SUBUNITS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_SUBUNITS])) { - $this->setNumberOfSubunits(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_SUBUNITS]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_SUBUNITS])) { - $this->setNumberOfSubunits(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_SUBUNITS]))); + if (isset($data[self::FIELD_AREA_OF_HYBRIDISATION_EXT]) && is_array($data[self::FIELD_AREA_OF_HYBRIDISATION_EXT])) { + $ext = $data[self::FIELD_AREA_OF_HYBRIDISATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAreaOfHybridisation($value); + } else if (is_array($value)) { + $this->setAreaOfHybridisation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAreaOfHybridisation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAreaOfHybridisation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_SUBUNITS]) || isset($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_SUBUNITS])) { + $value = $data[self::FIELD_NUMBER_OF_SUBUNITS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_SUBUNITS_EXT]; } else { - $this->setNumberOfSubunits(new FHIRInteger($data[self::FIELD_NUMBER_OF_SUBUNITS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfSubunits($value); + } else if (is_array($value)) { + $this->setNumberOfSubunits(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfSubunits(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfSubunits(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_OLIGO_NUCLEOTIDE_TYPE])) { @@ -622,15 +636,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAreaOfHybridisation())) { $a[self::FIELD_AREA_OF_HYBRIDISATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AREA_OF_HYBRIDISATION_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfSubunits())) { $a[self::FIELD_NUMBER_OF_SUBUNITS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_SUBUNITS_EXT] = $enc; } } @@ -641,7 +659,16 @@ public function jsonSerialize() $a[self::FIELD_SEQUENCE_TYPE] = $v; } if ([] !== ($vs = $this->getSubunit())) { - $a[self::FIELD_SUBUNIT] = $vs; + $a[self::FIELD_SUBUNIT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBUNIT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstancePolymer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstancePolymer.php index f836fae506..e575d70c01 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstancePolymer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstancePolymer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSubstancePolymer extends FHIRDomainResource implements PHPFHIRContaine const FIELD_REPEAT = 'repeat'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -212,33 +212,42 @@ public function __construct($data = null) $this->setGeometry(new FHIRCodeableConcept($data[self::FIELD_GEOMETRY])); } } - if (isset($data[self::FIELD_MODIFICATION])) { - $ext = (isset($data[self::FIELD_MODIFICATION_EXT]) && is_array($data[self::FIELD_MODIFICATION_EXT])) - ? $data[self::FIELD_MODIFICATION_EXT] - : null; - if (is_array($data[self::FIELD_MODIFICATION])) { - foreach($data[self::FIELD_MODIFICATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addModification($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addModification(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addModification(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MODIFICATION]) || isset($data[self::FIELD_MODIFICATION_EXT])) { + if (isset($data[self::FIELD_MODIFICATION])) { + $value = $data[self::FIELD_MODIFICATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODIFICATION_EXT]) && is_array($data[self::FIELD_MODIFICATION_EXT])) { + $ext = $data[self::FIELD_MODIFICATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addModification($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addModification($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addModification(new FHIRString(array_merge($v, $iext))); + } else { + $this->addModification(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addModification(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addModification(new FHIRString(array_merge($ext, $value))); + } else { + $this->addModification(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addModification(new FHIRString($iext)); } - } elseif ($data[self::FIELD_MODIFICATION] instanceof FHIRString) { - $this->addModification($data[self::FIELD_MODIFICATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MODIFICATION])) { - $this->addModification(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MODIFICATION]] + $ext)); - } else { - $this->addModification(new FHIRString($data[self::FIELD_MODIFICATION])); } } if (isset($data[self::FIELD_MONOMER_SET])) { @@ -734,31 +743,60 @@ public function jsonSerialize() $a[self::FIELD_CLASS] = $v; } if ([] !== ($vs = $this->getCopolymerConnectivity())) { - $a[self::FIELD_COPOLYMER_CONNECTIVITY] = $vs; + $a[self::FIELD_COPOLYMER_CONNECTIVITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COPOLYMER_CONNECTIVITY][] = $v; + } } if (null !== ($v = $this->getGeometry())) { $a[self::FIELD_GEOMETRY] = $v; } if ([] !== ($vs = $this->getModification())) { $a[self::FIELD_MODIFICATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MODIFICATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MODIFICATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MODIFICATION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MODIFICATION_EXT] = $encs; + } } if ([] !== ($vs = $this->getMonomerSet())) { - $a[self::FIELD_MONOMER_SET] = $vs; + $a[self::FIELD_MONOMER_SET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MONOMER_SET][] = $v; + } } if ([] !== ($vs = $this->getRepeat())) { - $a[self::FIELD_REPEAT] = $vs; + $a[self::FIELD_REPEAT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPEAT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceProtein.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceProtein.php index d5a3f67b0e..fae3fa718a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceProtein.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceProtein.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRSubstanceProtein extends FHIRDomainResource implements PHPFHIRContaine const FIELD_SUBUNIT = 'subunit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -187,49 +187,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISULFIDE_LINKAGE])) { - $ext = (isset($data[self::FIELD_DISULFIDE_LINKAGE_EXT]) && is_array($data[self::FIELD_DISULFIDE_LINKAGE_EXT])) - ? $data[self::FIELD_DISULFIDE_LINKAGE_EXT] - : null; - if (is_array($data[self::FIELD_DISULFIDE_LINKAGE])) { - foreach($data[self::FIELD_DISULFIDE_LINKAGE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addDisulfideLinkage($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDisulfideLinkage(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDisulfideLinkage(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DISULFIDE_LINKAGE]) || isset($data[self::FIELD_DISULFIDE_LINKAGE_EXT])) { + if (isset($data[self::FIELD_DISULFIDE_LINKAGE])) { + $value = $data[self::FIELD_DISULFIDE_LINKAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISULFIDE_LINKAGE_EXT]) && is_array($data[self::FIELD_DISULFIDE_LINKAGE_EXT])) { + $ext = $data[self::FIELD_DISULFIDE_LINKAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addDisulfideLinkage($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addDisulfideLinkage($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDisulfideLinkage(new FHIRString(array_merge($v, $iext))); + } else { + $this->addDisulfideLinkage(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDisulfideLinkage(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addDisulfideLinkage(new FHIRString(array_merge($ext, $value))); + } else { + $this->addDisulfideLinkage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDisulfideLinkage(new FHIRString($iext)); } - } elseif ($data[self::FIELD_DISULFIDE_LINKAGE] instanceof FHIRString) { - $this->addDisulfideLinkage($data[self::FIELD_DISULFIDE_LINKAGE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DISULFIDE_LINKAGE])) { - $this->addDisulfideLinkage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISULFIDE_LINKAGE]] + $ext)); - } else { - $this->addDisulfideLinkage(new FHIRString($data[self::FIELD_DISULFIDE_LINKAGE])); } } - if (isset($data[self::FIELD_NUMBER_OF_SUBUNITS])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT])) - ? $data[self::FIELD_NUMBER_OF_SUBUNITS_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_SUBUNITS] instanceof FHIRInteger) { - $this->setNumberOfSubunits($data[self::FIELD_NUMBER_OF_SUBUNITS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_SUBUNITS])) { - $this->setNumberOfSubunits(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_SUBUNITS]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_SUBUNITS])) { - $this->setNumberOfSubunits(new FHIRInteger(array_merge($ext, $data[self::FIELD_NUMBER_OF_SUBUNITS]))); - } + if (isset($data[self::FIELD_NUMBER_OF_SUBUNITS]) || isset($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_SUBUNITS])) { + $value = $data[self::FIELD_NUMBER_OF_SUBUNITS]; } else { - $this->setNumberOfSubunits(new FHIRInteger($data[self::FIELD_NUMBER_OF_SUBUNITS])); + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SUBUNITS_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_SUBUNITS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setNumberOfSubunits($value); + } else if (is_array($value)) { + $this->setNumberOfSubunits(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setNumberOfSubunits(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfSubunits(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_SEQUENCE_TYPE])) { @@ -656,23 +672,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDisulfideLinkage())) { $a[self::FIELD_DISULFIDE_LINKAGE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DISULFIDE_LINKAGE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DISULFIDE_LINKAGE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DISULFIDE_LINKAGE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DISULFIDE_LINKAGE_EXT] = $encs; + } } if (null !== ($v = $this->getNumberOfSubunits())) { $a[self::FIELD_NUMBER_OF_SUBUNITS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_SUBUNITS_EXT] = $enc; } } @@ -680,7 +706,16 @@ public function jsonSerialize() $a[self::FIELD_SEQUENCE_TYPE] = $v; } if ([] !== ($vs = $this->getSubunit())) { - $a[self::FIELD_SUBUNIT] = $vs; + $a[self::FIELD_SUBUNIT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBUNIT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformation.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformation.php index 849323e0d0..24440b615d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformation.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSubstanceReferenceInformation extends FHIRDomainResource implements PH const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Todo. @@ -180,20 +180,27 @@ public function __construct($data = null) $this->addClassification(new FHIRSubstanceReferenceInformationClassification($data[self::FIELD_CLASSIFICATION])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_GENE])) { @@ -657,23 +664,52 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getClassification())) { - $a[self::FIELD_CLASSIFICATION] = $vs; + $a[self::FIELD_CLASSIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CLASSIFICATION][] = $v; + } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getGene())) { - $a[self::FIELD_GENE] = $vs; + $a[self::FIELD_GENE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GENE][] = $v; + } } if ([] !== ($vs = $this->getGeneElement())) { - $a[self::FIELD_GENE_ELEMENT] = $vs; + $a[self::FIELD_GENE_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GENE_ELEMENT][] = $v; + } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterial.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterial.php index 7e396979ce..8c4b4c873c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterial.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRSubstanceSourceMaterial extends FHIRDomainResource implements PHPFHIRC const FIELD_SOURCE_MATERIAL_TYPE = 'sourceMaterialType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -384,33 +384,42 @@ public function __construct($data = null) $this->addFractionDescription(new FHIRSubstanceSourceMaterialFractionDescription($data[self::FIELD_FRACTION_DESCRIPTION])); } } - if (isset($data[self::FIELD_GEOGRAPHICAL_LOCATION])) { - $ext = (isset($data[self::FIELD_GEOGRAPHICAL_LOCATION_EXT]) && is_array($data[self::FIELD_GEOGRAPHICAL_LOCATION_EXT])) - ? $data[self::FIELD_GEOGRAPHICAL_LOCATION_EXT] - : null; - if (is_array($data[self::FIELD_GEOGRAPHICAL_LOCATION])) { - foreach($data[self::FIELD_GEOGRAPHICAL_LOCATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addGeographicalLocation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addGeographicalLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addGeographicalLocation(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_GEOGRAPHICAL_LOCATION]) || isset($data[self::FIELD_GEOGRAPHICAL_LOCATION_EXT])) { + if (isset($data[self::FIELD_GEOGRAPHICAL_LOCATION])) { + $value = $data[self::FIELD_GEOGRAPHICAL_LOCATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GEOGRAPHICAL_LOCATION_EXT]) && is_array($data[self::FIELD_GEOGRAPHICAL_LOCATION_EXT])) { + $ext = $data[self::FIELD_GEOGRAPHICAL_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addGeographicalLocation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addGeographicalLocation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addGeographicalLocation(new FHIRString(array_merge($v, $iext))); + } else { + $this->addGeographicalLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addGeographicalLocation(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addGeographicalLocation(new FHIRString(array_merge($ext, $value))); + } else { + $this->addGeographicalLocation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addGeographicalLocation(new FHIRString($iext)); } - } elseif ($data[self::FIELD_GEOGRAPHICAL_LOCATION] instanceof FHIRString) { - $this->addGeographicalLocation($data[self::FIELD_GEOGRAPHICAL_LOCATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_GEOGRAPHICAL_LOCATION])) { - $this->addGeographicalLocation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GEOGRAPHICAL_LOCATION]] + $ext)); - } else { - $this->addGeographicalLocation(new FHIRString($data[self::FIELD_GEOGRAPHICAL_LOCATION])); } } if (isset($data[self::FIELD_ORGANISM])) { @@ -427,20 +436,27 @@ public function __construct($data = null) $this->setOrganismId(new FHIRIdentifier($data[self::FIELD_ORGANISM_ID])); } } - if (isset($data[self::FIELD_ORGANISM_NAME])) { - $ext = (isset($data[self::FIELD_ORGANISM_NAME_EXT]) && is_array($data[self::FIELD_ORGANISM_NAME_EXT])) - ? $data[self::FIELD_ORGANISM_NAME_EXT] - : null; - if ($data[self::FIELD_ORGANISM_NAME] instanceof FHIRString) { - $this->setOrganismName($data[self::FIELD_ORGANISM_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORGANISM_NAME])) { - $this->setOrganismName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ORGANISM_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_ORGANISM_NAME])) { - $this->setOrganismName(new FHIRString(array_merge($ext, $data[self::FIELD_ORGANISM_NAME]))); - } + if (isset($data[self::FIELD_ORGANISM_NAME]) || isset($data[self::FIELD_ORGANISM_NAME_EXT])) { + if (isset($data[self::FIELD_ORGANISM_NAME])) { + $value = $data[self::FIELD_ORGANISM_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ORGANISM_NAME_EXT]) && is_array($data[self::FIELD_ORGANISM_NAME_EXT])) { + $ext = $data[self::FIELD_ORGANISM_NAME_EXT]; } else { - $this->setOrganismName(new FHIRString($data[self::FIELD_ORGANISM_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOrganismName($value); + } else if (is_array($value)) { + $this->setOrganismName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOrganismName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOrganismName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARENT_SUBSTANCE_ID])) { @@ -461,33 +477,42 @@ public function __construct($data = null) $this->addParentSubstanceId(new FHIRIdentifier($data[self::FIELD_PARENT_SUBSTANCE_ID])); } } - if (isset($data[self::FIELD_PARENT_SUBSTANCE_NAME])) { - $ext = (isset($data[self::FIELD_PARENT_SUBSTANCE_NAME_EXT]) && is_array($data[self::FIELD_PARENT_SUBSTANCE_NAME_EXT])) - ? $data[self::FIELD_PARENT_SUBSTANCE_NAME_EXT] - : null; - if (is_array($data[self::FIELD_PARENT_SUBSTANCE_NAME])) { - foreach($data[self::FIELD_PARENT_SUBSTANCE_NAME] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addParentSubstanceName($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addParentSubstanceName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addParentSubstanceName(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PARENT_SUBSTANCE_NAME]) || isset($data[self::FIELD_PARENT_SUBSTANCE_NAME_EXT])) { + if (isset($data[self::FIELD_PARENT_SUBSTANCE_NAME])) { + $value = $data[self::FIELD_PARENT_SUBSTANCE_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARENT_SUBSTANCE_NAME_EXT]) && is_array($data[self::FIELD_PARENT_SUBSTANCE_NAME_EXT])) { + $ext = $data[self::FIELD_PARENT_SUBSTANCE_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addParentSubstanceName($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addParentSubstanceName($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addParentSubstanceName(new FHIRString(array_merge($v, $iext))); + } else { + $this->addParentSubstanceName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addParentSubstanceName(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addParentSubstanceName(new FHIRString(array_merge($ext, $value))); + } else { + $this->addParentSubstanceName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addParentSubstanceName(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PARENT_SUBSTANCE_NAME] instanceof FHIRString) { - $this->addParentSubstanceName($data[self::FIELD_PARENT_SUBSTANCE_NAME]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PARENT_SUBSTANCE_NAME])) { - $this->addParentSubstanceName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARENT_SUBSTANCE_NAME]] + $ext)); - } else { - $this->addParentSubstanceName(new FHIRString($data[self::FIELD_PARENT_SUBSTANCE_NAME])); } } if (isset($data[self::FIELD_PART_DESCRIPTION])) { @@ -1485,28 +1510,48 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCountryOfOrigin())) { - $a[self::FIELD_COUNTRY_OF_ORIGIN] = $vs; + $a[self::FIELD_COUNTRY_OF_ORIGIN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COUNTRY_OF_ORIGIN][] = $v; + } } if (null !== ($v = $this->getDevelopmentStage())) { $a[self::FIELD_DEVELOPMENT_STAGE] = $v; } if ([] !== ($vs = $this->getFractionDescription())) { - $a[self::FIELD_FRACTION_DESCRIPTION] = $vs; + $a[self::FIELD_FRACTION_DESCRIPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FRACTION_DESCRIPTION][] = $v; + } } if ([] !== ($vs = $this->getGeographicalLocation())) { $a[self::FIELD_GEOGRAPHICAL_LOCATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_GEOGRAPHICAL_LOCATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_GEOGRAPHICAL_LOCATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_GEOGRAPHICAL_LOCATION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_GEOGRAPHICAL_LOCATION_EXT] = $encs; + } } if (null !== ($v = $this->getOrganism())) { $a[self::FIELD_ORGANISM] = $v; @@ -1516,31 +1561,53 @@ public function jsonSerialize() } if (null !== ($v = $this->getOrganismName())) { $a[self::FIELD_ORGANISM_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ORGANISM_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParentSubstanceId())) { - $a[self::FIELD_PARENT_SUBSTANCE_ID] = $vs; + $a[self::FIELD_PARENT_SUBSTANCE_ID] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARENT_SUBSTANCE_ID][] = $v; + } } if ([] !== ($vs = $this->getParentSubstanceName())) { $a[self::FIELD_PARENT_SUBSTANCE_NAME] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PARENT_SUBSTANCE_NAME][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PARENT_SUBSTANCE_NAME_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PARENT_SUBSTANCE_NAME_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PARENT_SUBSTANCE_NAME_EXT] = $encs; + } } if ([] !== ($vs = $this->getPartDescription())) { - $a[self::FIELD_PART_DESCRIPTION] = $vs; + $a[self::FIELD_PART_DESCRIPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_DESCRIPTION][] = $v; + } } if (null !== ($v = $this->getSourceMaterialClass())) { $a[self::FIELD_SOURCE_MATERIAL_CLASS] = $v; @@ -1551,6 +1618,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSourceMaterialType())) { $a[self::FIELD_SOURCE_MATERIAL_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecification.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecification.php index d451bb12d0..f99e130482 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecification.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRSubstanceSpecification extends FHIRDomainResource implements PHPFHIRCo const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The detailed description of a substance, typically at a level beyond what is @@ -362,36 +362,50 @@ public function __construct($data = null) $this->addCode(new FHIRSubstanceSpecificationCode($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOMAIN])) { @@ -1613,19 +1627,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1636,13 +1660,31 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getMoiety())) { - $a[self::FIELD_MOIETY] = $vs; + $a[self::FIELD_MOIETY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MOIETY][] = $v; + } } if ([] !== ($vs = $this->getMolecularWeight())) { - $a[self::FIELD_MOLECULAR_WEIGHT] = $vs; + $a[self::FIELD_MOLECULAR_WEIGHT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MOLECULAR_WEIGHT][] = $v; + } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if (null !== ($v = $this->getNucleicAcid())) { $a[self::FIELD_NUCLEIC_ACID] = $v; @@ -1651,7 +1693,13 @@ public function jsonSerialize() $a[self::FIELD_POLYMER] = $v; } if ([] !== ($vs = $this->getProperty())) { - $a[self::FIELD_PROPERTY] = $vs; + $a[self::FIELD_PROPERTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROPERTY][] = $v; + } } if (null !== ($v = $this->getProtein())) { $a[self::FIELD_PROTEIN] = $v; @@ -1660,10 +1708,22 @@ public function jsonSerialize() $a[self::FIELD_REFERENCE_INFORMATION] = $v; } if ([] !== ($vs = $this->getRelationship())) { - $a[self::FIELD_RELATIONSHIP] = $vs; + $a[self::FIELD_RELATIONSHIP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATIONSHIP][] = $v; + } } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if (null !== ($v = $this->getSourceMaterial())) { $a[self::FIELD_SOURCE_MATERIAL] = $v; @@ -1677,6 +1737,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php index e65a9ca8ca..f73f28b70f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRSupplyDelivery extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -325,20 +325,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -398,20 +405,27 @@ public function __construct($data = null) $this->addReceiver(new FHIRReference($data[self::FIELD_RECEIVER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSupplyDeliveryStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyDeliveryStatus([FHIRSupplyDeliveryStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyDeliveryStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSupplyDeliveryStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSupplyDeliveryStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSupplyDeliveryStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSupplyDeliveryStatus([FHIRSupplyDeliveryStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSupplyDeliveryStatus($ext)); } } if (isset($data[self::FIELD_SUPPLIED_ITEM])) { @@ -1180,18 +1194,32 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getDestination())) { $a[self::FIELD_DESTINATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -1202,18 +1230,32 @@ public function jsonSerialize() $a[self::FIELD_OCCURRENCE_TIMING] = $v; } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getReceiver())) { - $a[self::FIELD_RECEIVER] = $vs; + $a[self::FIELD_RECEIVER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECEIVER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSupplyDeliveryStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSupplyDeliveryStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1226,6 +1268,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php index 31d29563c0..d3aa409abb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRSupplyRequest extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_SUPPLIER = 'supplier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -360,20 +360,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_CATEGORY])) { @@ -429,20 +436,27 @@ public function __construct($data = null) $this->setItemReference(new FHIRReference($data[self::FIELD_ITEM_REFERENCE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -477,20 +491,27 @@ public function __construct($data = null) $this->addParameter(new FHIRSupplyRequestParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -543,20 +564,27 @@ public function __construct($data = null) $this->setRequester(new FHIRReference($data[self::FIELD_REQUESTER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSupplyRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyRequestStatus([FHIRSupplyRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSupplyRequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSupplyRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSupplyRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSupplyRequestStatus([FHIRSupplyRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSupplyRequestStatus($ext)); } } if (isset($data[self::FIELD_SUPPLIER])) { @@ -1580,8 +1608,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } @@ -1595,7 +1625,13 @@ public function jsonSerialize() $a[self::FIELD_DELIVER_TO] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getItemCodeableConcept())) { $a[self::FIELD_ITEM_CODEABLE_CONCEPT] = $v; @@ -1605,8 +1641,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -1617,12 +1655,20 @@ public function jsonSerialize() $a[self::FIELD_OCCURRENCE_TIMING] = $v; } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } @@ -1630,23 +1676,46 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSupplyRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSupplyRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupplier())) { - $a[self::FIELD_SUPPLIER] = $vs; + $a[self::FIELD_SUPPLIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPLIER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTask.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTask.php index 9191595cbb..add74cde23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTask.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTask.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRTask extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_STATUS_REASON = 'statusReason'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -525,20 +525,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -573,20 +580,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -660,36 +674,50 @@ public function __construct($data = null) $this->addInput(new FHIRTaskInput($data[self::FIELD_INPUT])); } } - if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) - ? $data[self::FIELD_INSTANTIATES_CANONICAL_EXT] - : null; - if ($data[self::FIELD_INSTANTIATES_CANONICAL] instanceof FHIRCanonical) { - $this->setInstantiatesCanonical($data[self::FIELD_INSTANTIATES_CANONICAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->setInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_CANONICAL]] + $ext)); - } else if (is_array($data[self::FIELD_INSTANTIATES_CANONICAL])) { - $this->setInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $data[self::FIELD_INSTANTIATES_CANONICAL]))); - } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL]) || isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL])) { + $value = $data[self::FIELD_INSTANTIATES_CANONICAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_CANONICAL_EXT]) && is_array($data[self::FIELD_INSTANTIATES_CANONICAL_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_CANONICAL_EXT]; } else { - $this->setInstantiatesCanonical(new FHIRCanonical($data[self::FIELD_INSTANTIATES_CANONICAL])); - } - } - if (isset($data[self::FIELD_INSTANTIATES_URI])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) - ? $data[self::FIELD_INSTANTIATES_URI_EXT] - : null; - if ($data[self::FIELD_INSTANTIATES_URI] instanceof FHIRUri) { - $this->setInstantiatesUri($data[self::FIELD_INSTANTIATES_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTANTIATES_URI])) { - $this->setInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES_URI]] + $ext)); - } else if (is_array($data[self::FIELD_INSTANTIATES_URI])) { - $this->setInstantiatesUri(new FHIRUri(array_merge($ext, $data[self::FIELD_INSTANTIATES_URI]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCanonical) { + $this->setInstantiatesCanonical($value); + } else if (is_array($value)) { + $this->setInstantiatesCanonical(new FHIRCanonical(array_merge($ext, $value))); + } else { + $this->setInstantiatesCanonical(new FHIRCanonical([FHIRCanonical::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInstantiatesCanonical(new FHIRCanonical($ext)); + } + } + if (isset($data[self::FIELD_INSTANTIATES_URI]) || isset($data[self::FIELD_INSTANTIATES_URI_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES_URI])) { + $value = $data[self::FIELD_INSTANTIATES_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_URI_EXT]) && is_array($data[self::FIELD_INSTANTIATES_URI_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_URI_EXT]; } else { - $this->setInstantiatesUri(new FHIRUri($data[self::FIELD_INSTANTIATES_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setInstantiatesUri($value); + } else if (is_array($value)) { + $this->setInstantiatesUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setInstantiatesUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInstantiatesUri(new FHIRUri($ext)); } } if (isset($data[self::FIELD_INSURANCE])) { @@ -710,36 +738,50 @@ public function __construct($data = null) $this->addInsurance(new FHIRReference($data[self::FIELD_INSURANCE])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRTaskIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRTaskIntent([FHIRTaskIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRTaskIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; } else { - $this->setIntent(new FHIRTaskIntent($data[self::FIELD_INTENT])); - } - } - if (isset($data[self::FIELD_LAST_MODIFIED])) { - $ext = (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) - ? $data[self::FIELD_LAST_MODIFIED_EXT] - : null; - if ($data[self::FIELD_LAST_MODIFIED] instanceof FHIRDateTime) { - $this->setLastModified($data[self::FIELD_LAST_MODIFIED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_LAST_MODIFIED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRDateTime(array_merge($ext, $data[self::FIELD_LAST_MODIFIED]))); + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTaskIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRTaskIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRTaskIntent([FHIRTaskIntent::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIntent(new FHIRTaskIntent($ext)); + } + } + if (isset($data[self::FIELD_LAST_MODIFIED]) || isset($data[self::FIELD_LAST_MODIFIED_EXT])) { + if (isset($data[self::FIELD_LAST_MODIFIED])) { + $value = $data[self::FIELD_LAST_MODIFIED]; } else { - $this->setLastModified(new FHIRDateTime($data[self::FIELD_LAST_MODIFIED])); + $value = null; + } + if (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) { + $ext = $data[self::FIELD_LAST_MODIFIED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setLastModified($value); + } else if (is_array($value)) { + $this->setLastModified(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setLastModified(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastModified(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_LOCATION])) { @@ -828,20 +870,27 @@ public function __construct($data = null) $this->addPerformerType(new FHIRCodeableConcept($data[self::FIELD_PERFORMER_TYPE])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -890,20 +939,27 @@ public function __construct($data = null) $this->setRestriction(new FHIRTaskRestriction($data[self::FIELD_RESTRICTION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRTaskStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRTaskStatus([FHIRTaskStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRTaskStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRTaskStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTaskStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRTaskStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRTaskStatus([FHIRTaskStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRTaskStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -2570,13 +2626,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getBusinessStatus())) { $a[self::FIELD_BUSINESS_STATUS] = $v; @@ -2586,8 +2650,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2607,39 +2673,65 @@ public function jsonSerialize() $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInput())) { - $a[self::FIELD_INPUT] = $vs; + $a[self::FIELD_INPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INPUT][] = $v; + } } if (null !== ($v = $this->getInstantiatesCanonical())) { $a[self::FIELD_INSTANTIATES_CANONICAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCanonical::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCanonical::FIELD_VALUE]); $a[self::FIELD_INSTANTIATES_CANONICAL_EXT] = $enc; } } if (null !== ($v = $this->getInstantiatesUri())) { $a[self::FIELD_INSTANTIATES_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_INSTANTIATES_URI_EXT] = $enc; } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTaskIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTaskIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if (null !== ($v = $this->getLastModified())) { $a[self::FIELD_LAST_MODIFIED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_LAST_MODIFIED_EXT] = $enc; } } @@ -2647,24 +2739,50 @@ public function jsonSerialize() $a[self::FIELD_LOCATION] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getOutput())) { - $a[self::FIELD_OUTPUT] = $vs; + $a[self::FIELD_OUTPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTPUT][] = $v; + } } if (null !== ($v = $this->getOwner())) { $a[self::FIELD_OWNER] = $v; } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPerformerType())) { - $a[self::FIELD_PERFORMER_TYPE] = $vs; + $a[self::FIELD_PERFORMER_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER_TYPE][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } @@ -2675,7 +2793,13 @@ public function jsonSerialize() $a[self::FIELD_REASON_REFERENCE] = $v; } if ([] !== ($vs = $this->getRelevantHistory())) { - $a[self::FIELD_RELEVANT_HISTORY] = $vs; + $a[self::FIELD_RELEVANT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELEVANT_HISTORY][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; @@ -2685,14 +2809,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTaskStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTaskStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStatusReason())) { $a[self::FIELD_STATUS_REASON] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilities.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilities.php index c043a60469..45ec6442ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilities.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilities.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRTerminologyCapabilities extends FHIRDomainResource implements PHPFHIRC const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A TerminologyCapabilities resource documents a set of capabilities (behaviors) @@ -491,20 +491,27 @@ public function __construct($data = null) $this->setClosure(new FHIRTerminologyCapabilitiesClosure($data[self::FIELD_CLOSURE])); } } - if (isset($data[self::FIELD_CODE_SEARCH])) { - $ext = (isset($data[self::FIELD_CODE_SEARCH_EXT]) && is_array($data[self::FIELD_CODE_SEARCH_EXT])) - ? $data[self::FIELD_CODE_SEARCH_EXT] - : null; - if ($data[self::FIELD_CODE_SEARCH] instanceof FHIRCodeSearchSupport) { - $this->setCodeSearch($data[self::FIELD_CODE_SEARCH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE_SEARCH])) { - $this->setCodeSearch(new FHIRCodeSearchSupport([FHIRCodeSearchSupport::FIELD_VALUE => $data[self::FIELD_CODE_SEARCH]] + $ext)); - } else if (is_array($data[self::FIELD_CODE_SEARCH])) { - $this->setCodeSearch(new FHIRCodeSearchSupport(array_merge($ext, $data[self::FIELD_CODE_SEARCH]))); - } + if (isset($data[self::FIELD_CODE_SEARCH]) || isset($data[self::FIELD_CODE_SEARCH_EXT])) { + if (isset($data[self::FIELD_CODE_SEARCH])) { + $value = $data[self::FIELD_CODE_SEARCH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_SEARCH_EXT]) && is_array($data[self::FIELD_CODE_SEARCH_EXT])) { + $ext = $data[self::FIELD_CODE_SEARCH_EXT]; } else { - $this->setCodeSearch(new FHIRCodeSearchSupport($data[self::FIELD_CODE_SEARCH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCodeSearchSupport) { + $this->setCodeSearch($value); + } else if (is_array($value)) { + $this->setCodeSearch(new FHIRCodeSearchSupport(array_merge($ext, $value))); + } else { + $this->setCodeSearch(new FHIRCodeSearchSupport([FHIRCodeSearchSupport::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCodeSearch(new FHIRCodeSearchSupport($ext)); } } if (isset($data[self::FIELD_CODE_SYSTEM])) { @@ -543,52 +550,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EXPANSION])) { @@ -598,20 +626,27 @@ public function __construct($data = null) $this->setExpansion(new FHIRTerminologyCapabilitiesExpansion($data[self::FIELD_EXPANSION])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IMPLEMENTATION])) { @@ -639,84 +674,119 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRCapabilityStatementKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRCapabilityStatementKind([FHIRCapabilityStatementKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRCapabilityStatementKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRCapabilityStatementKind($data[self::FIELD_KIND])); - } - } - if (isset($data[self::FIELD_LOCKED_DATE])) { - $ext = (isset($data[self::FIELD_LOCKED_DATE_EXT]) && is_array($data[self::FIELD_LOCKED_DATE_EXT])) - ? $data[self::FIELD_LOCKED_DATE_EXT] - : null; - if ($data[self::FIELD_LOCKED_DATE] instanceof FHIRBoolean) { - $this->setLockedDate($data[self::FIELD_LOCKED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOCKED_DATE])) { - $this->setLockedDate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_LOCKED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LOCKED_DATE])) { - $this->setLockedDate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_LOCKED_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCapabilityStatementKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRCapabilityStatementKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRCapabilityStatementKind([FHIRCapabilityStatementKind::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKind(new FHIRCapabilityStatementKind($ext)); + } + } + if (isset($data[self::FIELD_LOCKED_DATE]) || isset($data[self::FIELD_LOCKED_DATE_EXT])) { + if (isset($data[self::FIELD_LOCKED_DATE])) { + $value = $data[self::FIELD_LOCKED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LOCKED_DATE_EXT]) && is_array($data[self::FIELD_LOCKED_DATE_EXT])) { + $ext = $data[self::FIELD_LOCKED_DATE_EXT]; } else { - $this->setLockedDate(new FHIRBoolean($data[self::FIELD_LOCKED_DATE])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setLockedDate($value); + } else if (is_array($value)) { + $this->setLockedDate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setLockedDate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLockedDate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_SOFTWARE])) { @@ -726,36 +796,50 @@ public function __construct($data = null) $this->setSoftware(new FHIRTerminologyCapabilitiesSoftware($data[self::FIELD_SOFTWARE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TRANSLATION])) { @@ -765,20 +849,27 @@ public function __construct($data = null) $this->setTranslation(new FHIRTerminologyCapabilitiesTranslation($data[self::FIELD_TRANSLATION])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -806,20 +897,27 @@ public function __construct($data = null) $this->setValidateCode(new FHIRTerminologyCapabilitiesValidateCode($data[self::FIELD_VALIDATE_CODE])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2229,35 +2327,55 @@ public function jsonSerialize() } if (null !== ($v = $this->getCodeSearch())) { $a[self::FIELD_CODE_SEARCH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCodeSearchSupport::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCodeSearchSupport::FIELD_VALUE]); $a[self::FIELD_CODE_SEARCH_EXT] = $enc; } } if ([] !== ($vs = $this->getCodeSystem())) { - $a[self::FIELD_CODE_SYSTEM] = $vs; + $a[self::FIELD_CODE_SYSTEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE_SYSTEM][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2266,8 +2384,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } @@ -2275,40 +2395,56 @@ public function jsonSerialize() $a[self::FIELD_IMPLEMENTATION] = $v; } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCapabilityStatementKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCapabilityStatementKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getLockedDate())) { $a[self::FIELD_LOCKED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_LOCKED_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } @@ -2317,15 +2453,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } @@ -2334,24 +2474,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getValidateCode())) { $a[self::FIELD_VALIDATE_CODE] = $v; } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestReport.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestReport.php index c9010a7fd8..a19a094262 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestReport.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRTestReport extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_TESTER_EXT = '_tester'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An identifier - identifies some entity uniquely and unambiguously. Typically @@ -273,36 +273,50 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRDateTime) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; } else { - $this->setIssued(new FHIRDateTime($data[self::FIELD_ISSUED])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIssued(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARTICIPANT])) { @@ -323,36 +337,50 @@ public function __construct($data = null) $this->addParticipant(new FHIRTestReportParticipant($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_RESULT])) { - $ext = (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) - ? $data[self::FIELD_RESULT_EXT] - : null; - if ($data[self::FIELD_RESULT] instanceof FHIRTestReportResult) { - $this->setResult($data[self::FIELD_RESULT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportResult([FHIRTestReportResult::FIELD_VALUE => $data[self::FIELD_RESULT]] + $ext)); - } else if (is_array($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportResult(array_merge($ext, $data[self::FIELD_RESULT]))); - } + if (isset($data[self::FIELD_RESULT]) || isset($data[self::FIELD_RESULT_EXT])) { + if (isset($data[self::FIELD_RESULT])) { + $value = $data[self::FIELD_RESULT]; } else { - $this->setResult(new FHIRTestReportResult($data[self::FIELD_RESULT])); + $value = null; } - } - if (isset($data[self::FIELD_SCORE])) { - $ext = (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) - ? $data[self::FIELD_SCORE_EXT] - : null; - if ($data[self::FIELD_SCORE] instanceof FHIRDecimal) { - $this->setScore($data[self::FIELD_SCORE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_SCORE]] + $ext)); - } else if (is_array($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal(array_merge($ext, $data[self::FIELD_SCORE]))); + if (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) { + $ext = $data[self::FIELD_RESULT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportResult) { + $this->setResult($value); + } else if (is_array($value)) { + $this->setResult(new FHIRTestReportResult(array_merge($ext, $value))); + } else { + $this->setResult(new FHIRTestReportResult([FHIRTestReportResult::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResult(new FHIRTestReportResult($ext)); + } + } + if (isset($data[self::FIELD_SCORE]) || isset($data[self::FIELD_SCORE_EXT])) { + if (isset($data[self::FIELD_SCORE])) { + $value = $data[self::FIELD_SCORE]; } else { - $this->setScore(new FHIRDecimal($data[self::FIELD_SCORE])); + $value = null; + } + if (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) { + $ext = $data[self::FIELD_SCORE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setScore($value); + } else if (is_array($value)) { + $this->setScore(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScore(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_SETUP])) { @@ -362,20 +390,27 @@ public function __construct($data = null) $this->setSetup(new FHIRTestReportSetup($data[self::FIELD_SETUP])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRTestReportStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRTestReportStatus([FHIRTestReportStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRTestReportStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRTestReportStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRTestReportStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRTestReportStatus([FHIRTestReportStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRTestReportStatus($ext)); } } if (isset($data[self::FIELD_TEARDOWN])) { @@ -410,20 +445,27 @@ public function __construct($data = null) $this->setTestScript(new FHIRReference($data[self::FIELD_TEST_SCRIPT])); } } - if (isset($data[self::FIELD_TESTER])) { - $ext = (isset($data[self::FIELD_TESTER_EXT]) && is_array($data[self::FIELD_TESTER_EXT])) - ? $data[self::FIELD_TESTER_EXT] - : null; - if ($data[self::FIELD_TESTER] instanceof FHIRString) { - $this->setTester($data[self::FIELD_TESTER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TESTER])) { - $this->setTester(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TESTER]] + $ext)); - } else if (is_array($data[self::FIELD_TESTER])) { - $this->setTester(new FHIRString(array_merge($ext, $data[self::FIELD_TESTER]))); - } + if (isset($data[self::FIELD_TESTER]) || isset($data[self::FIELD_TESTER_EXT])) { + if (isset($data[self::FIELD_TESTER])) { + $value = $data[self::FIELD_TESTER]; } else { - $this->setTester(new FHIRString($data[self::FIELD_TESTER])); + $value = null; + } + if (isset($data[self::FIELD_TESTER_EXT]) && is_array($data[self::FIELD_TESTER_EXT])) { + $ext = $data[self::FIELD_TESTER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTester($value); + } else if (is_array($value)) { + $this->setTester(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTester(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTester(new FHIRString($ext)); } } } @@ -1094,32 +1136,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getResult())) { $a[self::FIELD_RESULT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportResult::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportResult::FIELD_VALUE]); $a[self::FIELD_RESULT_EXT] = $enc; } } if (null !== ($v = $this->getScore())) { $a[self::FIELD_SCORE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_SCORE_EXT] = $enc; } } @@ -1128,8 +1184,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1137,18 +1195,29 @@ public function jsonSerialize() $a[self::FIELD_TEARDOWN] = $v; } if ([] !== ($vs = $this->getTest())) { - $a[self::FIELD_TEST] = $vs; + $a[self::FIELD_TEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEST][] = $v; + } } if (null !== ($v = $this->getTestScript())) { $a[self::FIELD_TEST_SCRIPT] = $v; } if (null !== ($v = $this->getTester())) { $a[self::FIELD_TESTER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TESTER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestScript.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestScript.php index b8e230d5b1..af370a0883 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestScript.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRTestScript.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -135,7 +135,7 @@ class FHIRTestScript extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -484,52 +484,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DESTINATION])) { @@ -550,20 +571,27 @@ public function __construct($data = null) $this->addDestination(new FHIRTestScriptDestination($data[self::FIELD_DESTINATION])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FIXTURE])) { @@ -616,20 +644,27 @@ public function __construct($data = null) $this->setMetadata(new FHIRTestScriptMetadata($data[self::FIELD_METADATA])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_ORIGIN])) { @@ -668,36 +703,50 @@ public function __construct($data = null) $this->addProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_SETUP])) { @@ -707,20 +756,27 @@ public function __construct($data = null) $this->setSetup(new FHIRTestScriptSetup($data[self::FIELD_SETUP])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_TEARDOWN])) { @@ -748,36 +804,50 @@ public function __construct($data = null) $this->addTest(new FHIRTestScriptTest($data[self::FIELD_TEST])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -816,20 +886,27 @@ public function __construct($data = null) $this->addVariable(new FHIRTestScriptVariable($data[self::FIELD_VARIABLE])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2350,75 +2427,125 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDestination())) { - $a[self::FIELD_DESTINATION] = $vs; + $a[self::FIELD_DESTINATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESTINATION][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFixture())) { - $a[self::FIELD_FIXTURE] = $vs; + $a[self::FIELD_FIXTURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FIXTURE][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getMetadata())) { $a[self::FIELD_METADATA] = $v; } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getOrigin())) { - $a[self::FIELD_ORIGIN] = $vs; + $a[self::FIELD_ORIGIN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ORIGIN][] = $v; + } } if ([] !== ($vs = $this->getProfile())) { - $a[self::FIELD_PROFILE] = $vs; + $a[self::FIELD_PROFILE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROFILE][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } @@ -2427,8 +2554,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2436,35 +2565,62 @@ public function jsonSerialize() $a[self::FIELD_TEARDOWN] = $v; } if ([] !== ($vs = $this->getTest())) { - $a[self::FIELD_TEST] = $vs; + $a[self::FIELD_TEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEST][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if ([] !== ($vs = $this->getVariable())) { - $a[self::FIELD_VARIABLE] = $vs; + $a[self::FIELD_VARIABLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VARIABLE][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRValueSet.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRValueSet.php index 2609029931..c0e6804272 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRValueSet.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRValueSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRValueSet extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A ValueSet resource instance specifies a set of codes drawn from one or more @@ -426,52 +426,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EXPANSION])) { @@ -481,20 +502,27 @@ public function __construct($data = null) $this->setExpansion(new FHIRValueSetExpansion($data[self::FIELD_EXPANSION])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -515,20 +543,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_IMMUTABLE])) { - $ext = (isset($data[self::FIELD_IMMUTABLE_EXT]) && is_array($data[self::FIELD_IMMUTABLE_EXT])) - ? $data[self::FIELD_IMMUTABLE_EXT] - : null; - if ($data[self::FIELD_IMMUTABLE] instanceof FHIRBoolean) { - $this->setImmutable($data[self::FIELD_IMMUTABLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IMMUTABLE])) { - $this->setImmutable(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IMMUTABLE]] + $ext)); - } else if (is_array($data[self::FIELD_IMMUTABLE])) { - $this->setImmutable(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IMMUTABLE]))); - } + if (isset($data[self::FIELD_IMMUTABLE]) || isset($data[self::FIELD_IMMUTABLE_EXT])) { + if (isset($data[self::FIELD_IMMUTABLE])) { + $value = $data[self::FIELD_IMMUTABLE]; } else { - $this->setImmutable(new FHIRBoolean($data[self::FIELD_IMMUTABLE])); + $value = null; + } + if (isset($data[self::FIELD_IMMUTABLE_EXT]) && is_array($data[self::FIELD_IMMUTABLE_EXT])) { + $ext = $data[self::FIELD_IMMUTABLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setImmutable($value); + } else if (is_array($value)) { + $this->setImmutable(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setImmutable(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setImmutable(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -549,100 +584,142 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -663,20 +740,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1861,26 +1945,38 @@ public function jsonSerialize() $a[self::FIELD_COMPOSE] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1889,76 +1985,115 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getImmutable())) { $a[self::FIELD_IMMUTABLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IMMUTABLE_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVerificationResult.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVerificationResult.php index 476d300d78..440550f3ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVerificationResult.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVerificationResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRVerificationResult extends FHIRDomainResource implements PHPFHIRContai const FIELD_VALIDATOR = 'validator'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes validation requirements, source(s), status and dates for one or more @@ -323,20 +323,27 @@ public function __construct($data = null) $this->setFrequency(new FHIRTiming($data[self::FIELD_FREQUENCY])); } } - if (isset($data[self::FIELD_LAST_PERFORMED])) { - $ext = (isset($data[self::FIELD_LAST_PERFORMED_EXT]) && is_array($data[self::FIELD_LAST_PERFORMED_EXT])) - ? $data[self::FIELD_LAST_PERFORMED_EXT] - : null; - if ($data[self::FIELD_LAST_PERFORMED] instanceof FHIRDateTime) { - $this->setLastPerformed($data[self::FIELD_LAST_PERFORMED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_PERFORMED])) { - $this->setLastPerformed(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_LAST_PERFORMED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_PERFORMED])) { - $this->setLastPerformed(new FHIRDateTime(array_merge($ext, $data[self::FIELD_LAST_PERFORMED]))); - } + if (isset($data[self::FIELD_LAST_PERFORMED]) || isset($data[self::FIELD_LAST_PERFORMED_EXT])) { + if (isset($data[self::FIELD_LAST_PERFORMED])) { + $value = $data[self::FIELD_LAST_PERFORMED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_PERFORMED_EXT]) && is_array($data[self::FIELD_LAST_PERFORMED_EXT])) { + $ext = $data[self::FIELD_LAST_PERFORMED_EXT]; } else { - $this->setLastPerformed(new FHIRDateTime($data[self::FIELD_LAST_PERFORMED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setLastPerformed($value); + } else if (is_array($value)) { + $this->setLastPerformed(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setLastPerformed(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastPerformed(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_NEED])) { @@ -346,20 +353,27 @@ public function __construct($data = null) $this->setNeed(new FHIRCodeableConcept($data[self::FIELD_NEED])); } } - if (isset($data[self::FIELD_NEXT_SCHEDULED])) { - $ext = (isset($data[self::FIELD_NEXT_SCHEDULED_EXT]) && is_array($data[self::FIELD_NEXT_SCHEDULED_EXT])) - ? $data[self::FIELD_NEXT_SCHEDULED_EXT] - : null; - if ($data[self::FIELD_NEXT_SCHEDULED] instanceof FHIRDate) { - $this->setNextScheduled($data[self::FIELD_NEXT_SCHEDULED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NEXT_SCHEDULED])) { - $this->setNextScheduled(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_NEXT_SCHEDULED]] + $ext)); - } else if (is_array($data[self::FIELD_NEXT_SCHEDULED])) { - $this->setNextScheduled(new FHIRDate(array_merge($ext, $data[self::FIELD_NEXT_SCHEDULED]))); - } + if (isset($data[self::FIELD_NEXT_SCHEDULED]) || isset($data[self::FIELD_NEXT_SCHEDULED_EXT])) { + if (isset($data[self::FIELD_NEXT_SCHEDULED])) { + $value = $data[self::FIELD_NEXT_SCHEDULED]; } else { - $this->setNextScheduled(new FHIRDate($data[self::FIELD_NEXT_SCHEDULED])); + $value = null; + } + if (isset($data[self::FIELD_NEXT_SCHEDULED_EXT]) && is_array($data[self::FIELD_NEXT_SCHEDULED_EXT])) { + $ext = $data[self::FIELD_NEXT_SCHEDULED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setNextScheduled($value); + } else if (is_array($value)) { + $this->setNextScheduled(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setNextScheduled(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNextScheduled(new FHIRDate($ext)); } } if (isset($data[self::FIELD_PRIMARY_SOURCE])) { @@ -380,36 +394,50 @@ public function __construct($data = null) $this->addPrimarySource(new FHIRVerificationResultPrimarySource($data[self::FIELD_PRIMARY_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRStatus([FHIRStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS_DATE])) { - $ext = (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) - ? $data[self::FIELD_STATUS_DATE_EXT] - : null; - if ($data[self::FIELD_STATUS_DATE] instanceof FHIRDateTime) { - $this->setStatusDate($data[self::FIELD_STATUS_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STATUS_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STATUS_DATE]))); + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRStatus([FHIRStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRStatus($ext)); + } + } + if (isset($data[self::FIELD_STATUS_DATE]) || isset($data[self::FIELD_STATUS_DATE_EXT])) { + if (isset($data[self::FIELD_STATUS_DATE])) { + $value = $data[self::FIELD_STATUS_DATE]; } else { - $this->setStatusDate(new FHIRDateTime($data[self::FIELD_STATUS_DATE])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) { + $ext = $data[self::FIELD_STATUS_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStatusDate($value); + } else if (is_array($value)) { + $this->setStatusDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStatusDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatusDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -430,33 +458,42 @@ public function __construct($data = null) $this->addTarget(new FHIRReference($data[self::FIELD_TARGET])); } } - if (isset($data[self::FIELD_TARGET_LOCATION])) { - $ext = (isset($data[self::FIELD_TARGET_LOCATION_EXT]) && is_array($data[self::FIELD_TARGET_LOCATION_EXT])) - ? $data[self::FIELD_TARGET_LOCATION_EXT] - : null; - if (is_array($data[self::FIELD_TARGET_LOCATION])) { - foreach($data[self::FIELD_TARGET_LOCATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addTargetLocation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTargetLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTargetLocation(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TARGET_LOCATION]) || isset($data[self::FIELD_TARGET_LOCATION_EXT])) { + if (isset($data[self::FIELD_TARGET_LOCATION])) { + $value = $data[self::FIELD_TARGET_LOCATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_LOCATION_EXT]) && is_array($data[self::FIELD_TARGET_LOCATION_EXT])) { + $ext = $data[self::FIELD_TARGET_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addTargetLocation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addTargetLocation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTargetLocation(new FHIRString(array_merge($v, $iext))); + } else { + $this->addTargetLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTargetLocation(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addTargetLocation(new FHIRString(array_merge($ext, $value))); + } else { + $this->addTargetLocation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTargetLocation(new FHIRString($iext)); } - } elseif ($data[self::FIELD_TARGET_LOCATION] instanceof FHIRString) { - $this->addTargetLocation($data[self::FIELD_TARGET_LOCATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TARGET_LOCATION])) { - $this->addTargetLocation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TARGET_LOCATION]] + $ext)); - } else { - $this->addTargetLocation(new FHIRString($data[self::FIELD_TARGET_LOCATION])); } } if (isset($data[self::FIELD_VALIDATION_PROCESS])) { @@ -1368,8 +1405,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getLastPerformed())) { $a[self::FIELD_LAST_PERFORMED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_LAST_PERFORMED_EXT] = $enc; } } @@ -1378,54 +1417,95 @@ public function jsonSerialize() } if (null !== ($v = $this->getNextScheduled())) { $a[self::FIELD_NEXT_SCHEDULED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_NEXT_SCHEDULED_EXT] = $enc; } } if ([] !== ($vs = $this->getPrimarySource())) { - $a[self::FIELD_PRIMARY_SOURCE] = $vs; + $a[self::FIELD_PRIMARY_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRIMARY_SOURCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStatusDate())) { $a[self::FIELD_STATUS_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STATUS_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } } if ([] !== ($vs = $this->getTargetLocation())) { $a[self::FIELD_TARGET_LOCATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TARGET_LOCATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TARGET_LOCATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TARGET_LOCATION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TARGET_LOCATION_EXT] = $encs; + } } if ([] !== ($vs = $this->getValidationProcess())) { - $a[self::FIELD_VALIDATION_PROCESS] = $vs; + $a[self::FIELD_VALIDATION_PROCESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALIDATION_PROCESS][] = $v; + } } if (null !== ($v = $this->getValidationType())) { $a[self::FIELD_VALIDATION_TYPE] = $v; } if ([] !== ($vs = $this->getValidator())) { - $a[self::FIELD_VALIDATOR] = $vs; + $a[self::FIELD_VALIDATOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALIDATOR][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php index 5804b89c5c..c96d9e0113 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRVisionPrescription extends FHIRDomainResource implements PHPFHIRContai const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -221,36 +221,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DATE_WRITTEN])) { - $ext = (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) - ? $data[self::FIELD_DATE_WRITTEN_EXT] - : null; - if ($data[self::FIELD_DATE_WRITTEN] instanceof FHIRDateTime) { - $this->setDateWritten($data[self::FIELD_DATE_WRITTEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_WRITTEN]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_WRITTEN]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DATE_WRITTEN]) || isset($data[self::FIELD_DATE_WRITTEN_EXT])) { + if (isset($data[self::FIELD_DATE_WRITTEN])) { + $value = $data[self::FIELD_DATE_WRITTEN]; } else { - $this->setDateWritten(new FHIRDateTime($data[self::FIELD_DATE_WRITTEN])); + $value = null; + } + if (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) { + $ext = $data[self::FIELD_DATE_WRITTEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateWritten($value); + } else if (is_array($value)) { + $this->setDateWritten(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateWritten(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -310,20 +324,27 @@ public function __construct($data = null) $this->setPrescriber(new FHIRReference($data[self::FIELD_PRESCRIBER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -833,15 +854,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDateWritten())) { $a[self::FIELD_DATE_WRITTEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_WRITTEN_EXT] = $enc; } } @@ -849,10 +874,22 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLensSpecification())) { - $a[self::FIELD_LENS_SPECIFICATION] = $vs; + $a[self::FIELD_LENS_SPECIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LENS_SPECIFICATION][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -862,11 +899,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRParameters.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRParameters.php index d2ef666f72..915c89af66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRParameters.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResource/FHIRParameters.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRParameters extends FHIRResource implements PHPFHIRContainedTypeInterfa const FIELD_PARAMETER = 'parameter'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource is a non-persisted resource used to pass information into and back @@ -309,7 +309,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResourceContainer.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResourceContainer.php index 863019ef4a..88b48d1da6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRResourceContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRResourceContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -370,7 +370,7 @@ class FHIRResourceContainer implements PHPFHIRCommentContainerInterface, PHPFHIR const FIELD_VISION_PRESCRIPTION = 'VisionPrescription'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A financial tool for tracking value accrued for a particular purpose. In the @@ -1831,7 +1831,6 @@ public function __construct($data = null) } else { $this->setAccount(new FHIRAccount($data[self::FIELD_ACCOUNT])); } - return; } if (isset($data[self::FIELD_ACTIVITY_DEFINITION])) { if ($data[self::FIELD_ACTIVITY_DEFINITION] instanceof FHIRActivityDefinition) { @@ -1839,7 +1838,6 @@ public function __construct($data = null) } else { $this->setActivityDefinition(new FHIRActivityDefinition($data[self::FIELD_ACTIVITY_DEFINITION])); } - return; } if (isset($data[self::FIELD_ADVERSE_EVENT])) { if ($data[self::FIELD_ADVERSE_EVENT] instanceof FHIRAdverseEvent) { @@ -1847,7 +1845,6 @@ public function __construct($data = null) } else { $this->setAdverseEvent(new FHIRAdverseEvent($data[self::FIELD_ADVERSE_EVENT])); } - return; } if (isset($data[self::FIELD_ALLERGY_INTOLERANCE])) { if ($data[self::FIELD_ALLERGY_INTOLERANCE] instanceof FHIRAllergyIntolerance) { @@ -1855,7 +1852,6 @@ public function __construct($data = null) } else { $this->setAllergyIntolerance(new FHIRAllergyIntolerance($data[self::FIELD_ALLERGY_INTOLERANCE])); } - return; } if (isset($data[self::FIELD_APPOINTMENT])) { if ($data[self::FIELD_APPOINTMENT] instanceof FHIRAppointment) { @@ -1863,7 +1859,6 @@ public function __construct($data = null) } else { $this->setAppointment(new FHIRAppointment($data[self::FIELD_APPOINTMENT])); } - return; } if (isset($data[self::FIELD_APPOINTMENT_RESPONSE])) { if ($data[self::FIELD_APPOINTMENT_RESPONSE] instanceof FHIRAppointmentResponse) { @@ -1871,7 +1866,6 @@ public function __construct($data = null) } else { $this->setAppointmentResponse(new FHIRAppointmentResponse($data[self::FIELD_APPOINTMENT_RESPONSE])); } - return; } if (isset($data[self::FIELD_AUDIT_EVENT])) { if ($data[self::FIELD_AUDIT_EVENT] instanceof FHIRAuditEvent) { @@ -1879,7 +1873,6 @@ public function __construct($data = null) } else { $this->setAuditEvent(new FHIRAuditEvent($data[self::FIELD_AUDIT_EVENT])); } - return; } if (isset($data[self::FIELD_BASIC])) { if ($data[self::FIELD_BASIC] instanceof FHIRBasic) { @@ -1887,7 +1880,6 @@ public function __construct($data = null) } else { $this->setBasic(new FHIRBasic($data[self::FIELD_BASIC])); } - return; } if (isset($data[self::FIELD_BINARY])) { if ($data[self::FIELD_BINARY] instanceof FHIRBinary) { @@ -1895,7 +1887,6 @@ public function __construct($data = null) } else { $this->setBinary(new FHIRBinary($data[self::FIELD_BINARY])); } - return; } if (isset($data[self::FIELD_BIOLOGICALLY_DERIVED_PRODUCT])) { if ($data[self::FIELD_BIOLOGICALLY_DERIVED_PRODUCT] instanceof FHIRBiologicallyDerivedProduct) { @@ -1903,7 +1894,6 @@ public function __construct($data = null) } else { $this->setBiologicallyDerivedProduct(new FHIRBiologicallyDerivedProduct($data[self::FIELD_BIOLOGICALLY_DERIVED_PRODUCT])); } - return; } if (isset($data[self::FIELD_BODY_STRUCTURE])) { if ($data[self::FIELD_BODY_STRUCTURE] instanceof FHIRBodyStructure) { @@ -1911,7 +1901,6 @@ public function __construct($data = null) } else { $this->setBodyStructure(new FHIRBodyStructure($data[self::FIELD_BODY_STRUCTURE])); } - return; } if (isset($data[self::FIELD_BUNDLE])) { if ($data[self::FIELD_BUNDLE] instanceof FHIRBundle) { @@ -1919,7 +1908,6 @@ public function __construct($data = null) } else { $this->setBundle(new FHIRBundle($data[self::FIELD_BUNDLE])); } - return; } if (isset($data[self::FIELD_CAPABILITY_STATEMENT])) { if ($data[self::FIELD_CAPABILITY_STATEMENT] instanceof FHIRCapabilityStatement) { @@ -1927,7 +1915,6 @@ public function __construct($data = null) } else { $this->setCapabilityStatement(new FHIRCapabilityStatement($data[self::FIELD_CAPABILITY_STATEMENT])); } - return; } if (isset($data[self::FIELD_CARE_PLAN])) { if ($data[self::FIELD_CARE_PLAN] instanceof FHIRCarePlan) { @@ -1935,7 +1922,6 @@ public function __construct($data = null) } else { $this->setCarePlan(new FHIRCarePlan($data[self::FIELD_CARE_PLAN])); } - return; } if (isset($data[self::FIELD_CARE_TEAM])) { if ($data[self::FIELD_CARE_TEAM] instanceof FHIRCareTeam) { @@ -1943,7 +1929,6 @@ public function __construct($data = null) } else { $this->setCareTeam(new FHIRCareTeam($data[self::FIELD_CARE_TEAM])); } - return; } if (isset($data[self::FIELD_CATALOG_ENTRY])) { if ($data[self::FIELD_CATALOG_ENTRY] instanceof FHIRCatalogEntry) { @@ -1951,7 +1936,6 @@ public function __construct($data = null) } else { $this->setCatalogEntry(new FHIRCatalogEntry($data[self::FIELD_CATALOG_ENTRY])); } - return; } if (isset($data[self::FIELD_CHARGE_ITEM])) { if ($data[self::FIELD_CHARGE_ITEM] instanceof FHIRChargeItem) { @@ -1959,7 +1943,6 @@ public function __construct($data = null) } else { $this->setChargeItem(new FHIRChargeItem($data[self::FIELD_CHARGE_ITEM])); } - return; } if (isset($data[self::FIELD_CHARGE_ITEM_DEFINITION])) { if ($data[self::FIELD_CHARGE_ITEM_DEFINITION] instanceof FHIRChargeItemDefinition) { @@ -1967,7 +1950,6 @@ public function __construct($data = null) } else { $this->setChargeItemDefinition(new FHIRChargeItemDefinition($data[self::FIELD_CHARGE_ITEM_DEFINITION])); } - return; } if (isset($data[self::FIELD_CLAIM])) { if ($data[self::FIELD_CLAIM] instanceof FHIRClaim) { @@ -1975,7 +1957,6 @@ public function __construct($data = null) } else { $this->setClaim(new FHIRClaim($data[self::FIELD_CLAIM])); } - return; } if (isset($data[self::FIELD_CLAIM_RESPONSE])) { if ($data[self::FIELD_CLAIM_RESPONSE] instanceof FHIRClaimResponse) { @@ -1983,7 +1964,6 @@ public function __construct($data = null) } else { $this->setClaimResponse(new FHIRClaimResponse($data[self::FIELD_CLAIM_RESPONSE])); } - return; } if (isset($data[self::FIELD_CLINICAL_IMPRESSION])) { if ($data[self::FIELD_CLINICAL_IMPRESSION] instanceof FHIRClinicalImpression) { @@ -1991,7 +1971,6 @@ public function __construct($data = null) } else { $this->setClinicalImpression(new FHIRClinicalImpression($data[self::FIELD_CLINICAL_IMPRESSION])); } - return; } if (isset($data[self::FIELD_CODE_SYSTEM])) { if ($data[self::FIELD_CODE_SYSTEM] instanceof FHIRCodeSystem) { @@ -1999,7 +1978,6 @@ public function __construct($data = null) } else { $this->setCodeSystem(new FHIRCodeSystem($data[self::FIELD_CODE_SYSTEM])); } - return; } if (isset($data[self::FIELD_COMMUNICATION])) { if ($data[self::FIELD_COMMUNICATION] instanceof FHIRCommunication) { @@ -2007,7 +1985,6 @@ public function __construct($data = null) } else { $this->setCommunication(new FHIRCommunication($data[self::FIELD_COMMUNICATION])); } - return; } if (isset($data[self::FIELD_COMMUNICATION_REQUEST])) { if ($data[self::FIELD_COMMUNICATION_REQUEST] instanceof FHIRCommunicationRequest) { @@ -2015,7 +1992,6 @@ public function __construct($data = null) } else { $this->setCommunicationRequest(new FHIRCommunicationRequest($data[self::FIELD_COMMUNICATION_REQUEST])); } - return; } if (isset($data[self::FIELD_COMPARTMENT_DEFINITION])) { if ($data[self::FIELD_COMPARTMENT_DEFINITION] instanceof FHIRCompartmentDefinition) { @@ -2023,7 +1999,6 @@ public function __construct($data = null) } else { $this->setCompartmentDefinition(new FHIRCompartmentDefinition($data[self::FIELD_COMPARTMENT_DEFINITION])); } - return; } if (isset($data[self::FIELD_COMPOSITION])) { if ($data[self::FIELD_COMPOSITION] instanceof FHIRComposition) { @@ -2031,7 +2006,6 @@ public function __construct($data = null) } else { $this->setComposition(new FHIRComposition($data[self::FIELD_COMPOSITION])); } - return; } if (isset($data[self::FIELD_CONCEPT_MAP])) { if ($data[self::FIELD_CONCEPT_MAP] instanceof FHIRConceptMap) { @@ -2039,7 +2013,6 @@ public function __construct($data = null) } else { $this->setConceptMap(new FHIRConceptMap($data[self::FIELD_CONCEPT_MAP])); } - return; } if (isset($data[self::FIELD_CONDITION])) { if ($data[self::FIELD_CONDITION] instanceof FHIRCondition) { @@ -2047,7 +2020,6 @@ public function __construct($data = null) } else { $this->setCondition(new FHIRCondition($data[self::FIELD_CONDITION])); } - return; } if (isset($data[self::FIELD_CONSENT])) { if ($data[self::FIELD_CONSENT] instanceof FHIRConsent) { @@ -2055,7 +2027,6 @@ public function __construct($data = null) } else { $this->setConsent(new FHIRConsent($data[self::FIELD_CONSENT])); } - return; } if (isset($data[self::FIELD_CONTRACT])) { if ($data[self::FIELD_CONTRACT] instanceof FHIRContract) { @@ -2063,7 +2034,6 @@ public function __construct($data = null) } else { $this->setContract(new FHIRContract($data[self::FIELD_CONTRACT])); } - return; } if (isset($data[self::FIELD_COVERAGE])) { if ($data[self::FIELD_COVERAGE] instanceof FHIRCoverage) { @@ -2071,7 +2041,6 @@ public function __construct($data = null) } else { $this->setCoverage(new FHIRCoverage($data[self::FIELD_COVERAGE])); } - return; } if (isset($data[self::FIELD_COVERAGE_ELIGIBILITY_REQUEST])) { if ($data[self::FIELD_COVERAGE_ELIGIBILITY_REQUEST] instanceof FHIRCoverageEligibilityRequest) { @@ -2079,7 +2048,6 @@ public function __construct($data = null) } else { $this->setCoverageEligibilityRequest(new FHIRCoverageEligibilityRequest($data[self::FIELD_COVERAGE_ELIGIBILITY_REQUEST])); } - return; } if (isset($data[self::FIELD_COVERAGE_ELIGIBILITY_RESPONSE])) { if ($data[self::FIELD_COVERAGE_ELIGIBILITY_RESPONSE] instanceof FHIRCoverageEligibilityResponse) { @@ -2087,7 +2055,6 @@ public function __construct($data = null) } else { $this->setCoverageEligibilityResponse(new FHIRCoverageEligibilityResponse($data[self::FIELD_COVERAGE_ELIGIBILITY_RESPONSE])); } - return; } if (isset($data[self::FIELD_DETECTED_ISSUE])) { if ($data[self::FIELD_DETECTED_ISSUE] instanceof FHIRDetectedIssue) { @@ -2095,7 +2062,6 @@ public function __construct($data = null) } else { $this->setDetectedIssue(new FHIRDetectedIssue($data[self::FIELD_DETECTED_ISSUE])); } - return; } if (isset($data[self::FIELD_DEVICE])) { if ($data[self::FIELD_DEVICE] instanceof FHIRDevice) { @@ -2103,7 +2069,6 @@ public function __construct($data = null) } else { $this->setDevice(new FHIRDevice($data[self::FIELD_DEVICE])); } - return; } if (isset($data[self::FIELD_DEVICE_DEFINITION])) { if ($data[self::FIELD_DEVICE_DEFINITION] instanceof FHIRDeviceDefinition) { @@ -2111,7 +2076,6 @@ public function __construct($data = null) } else { $this->setDeviceDefinition(new FHIRDeviceDefinition($data[self::FIELD_DEVICE_DEFINITION])); } - return; } if (isset($data[self::FIELD_DEVICE_METRIC])) { if ($data[self::FIELD_DEVICE_METRIC] instanceof FHIRDeviceMetric) { @@ -2119,7 +2083,6 @@ public function __construct($data = null) } else { $this->setDeviceMetric(new FHIRDeviceMetric($data[self::FIELD_DEVICE_METRIC])); } - return; } if (isset($data[self::FIELD_DEVICE_REQUEST])) { if ($data[self::FIELD_DEVICE_REQUEST] instanceof FHIRDeviceRequest) { @@ -2127,7 +2090,6 @@ public function __construct($data = null) } else { $this->setDeviceRequest(new FHIRDeviceRequest($data[self::FIELD_DEVICE_REQUEST])); } - return; } if (isset($data[self::FIELD_DEVICE_USE_STATEMENT])) { if ($data[self::FIELD_DEVICE_USE_STATEMENT] instanceof FHIRDeviceUseStatement) { @@ -2135,7 +2097,6 @@ public function __construct($data = null) } else { $this->setDeviceUseStatement(new FHIRDeviceUseStatement($data[self::FIELD_DEVICE_USE_STATEMENT])); } - return; } if (isset($data[self::FIELD_DIAGNOSTIC_REPORT])) { if ($data[self::FIELD_DIAGNOSTIC_REPORT] instanceof FHIRDiagnosticReport) { @@ -2143,7 +2104,6 @@ public function __construct($data = null) } else { $this->setDiagnosticReport(new FHIRDiagnosticReport($data[self::FIELD_DIAGNOSTIC_REPORT])); } - return; } if (isset($data[self::FIELD_DOCUMENT_MANIFEST])) { if ($data[self::FIELD_DOCUMENT_MANIFEST] instanceof FHIRDocumentManifest) { @@ -2151,7 +2111,6 @@ public function __construct($data = null) } else { $this->setDocumentManifest(new FHIRDocumentManifest($data[self::FIELD_DOCUMENT_MANIFEST])); } - return; } if (isset($data[self::FIELD_DOCUMENT_REFERENCE])) { if ($data[self::FIELD_DOCUMENT_REFERENCE] instanceof FHIRDocumentReference) { @@ -2159,7 +2118,6 @@ public function __construct($data = null) } else { $this->setDocumentReference(new FHIRDocumentReference($data[self::FIELD_DOCUMENT_REFERENCE])); } - return; } if (isset($data[self::FIELD_EFFECT_EVIDENCE_SYNTHESIS])) { if ($data[self::FIELD_EFFECT_EVIDENCE_SYNTHESIS] instanceof FHIREffectEvidenceSynthesis) { @@ -2167,7 +2125,6 @@ public function __construct($data = null) } else { $this->setEffectEvidenceSynthesis(new FHIREffectEvidenceSynthesis($data[self::FIELD_EFFECT_EVIDENCE_SYNTHESIS])); } - return; } if (isset($data[self::FIELD_ENCOUNTER])) { if ($data[self::FIELD_ENCOUNTER] instanceof FHIREncounter) { @@ -2175,7 +2132,6 @@ public function __construct($data = null) } else { $this->setEncounter(new FHIREncounter($data[self::FIELD_ENCOUNTER])); } - return; } if (isset($data[self::FIELD_ENDPOINT])) { if ($data[self::FIELD_ENDPOINT] instanceof FHIREndpoint) { @@ -2183,7 +2139,6 @@ public function __construct($data = null) } else { $this->setEndpoint(new FHIREndpoint($data[self::FIELD_ENDPOINT])); } - return; } if (isset($data[self::FIELD_ENROLLMENT_REQUEST])) { if ($data[self::FIELD_ENROLLMENT_REQUEST] instanceof FHIREnrollmentRequest) { @@ -2191,7 +2146,6 @@ public function __construct($data = null) } else { $this->setEnrollmentRequest(new FHIREnrollmentRequest($data[self::FIELD_ENROLLMENT_REQUEST])); } - return; } if (isset($data[self::FIELD_ENROLLMENT_RESPONSE])) { if ($data[self::FIELD_ENROLLMENT_RESPONSE] instanceof FHIREnrollmentResponse) { @@ -2199,7 +2153,6 @@ public function __construct($data = null) } else { $this->setEnrollmentResponse(new FHIREnrollmentResponse($data[self::FIELD_ENROLLMENT_RESPONSE])); } - return; } if (isset($data[self::FIELD_EPISODE_OF_CARE])) { if ($data[self::FIELD_EPISODE_OF_CARE] instanceof FHIREpisodeOfCare) { @@ -2207,7 +2160,6 @@ public function __construct($data = null) } else { $this->setEpisodeOfCare(new FHIREpisodeOfCare($data[self::FIELD_EPISODE_OF_CARE])); } - return; } if (isset($data[self::FIELD_EVENT_DEFINITION])) { if ($data[self::FIELD_EVENT_DEFINITION] instanceof FHIREventDefinition) { @@ -2215,7 +2167,6 @@ public function __construct($data = null) } else { $this->setEventDefinition(new FHIREventDefinition($data[self::FIELD_EVENT_DEFINITION])); } - return; } if (isset($data[self::FIELD_EVIDENCE])) { if ($data[self::FIELD_EVIDENCE] instanceof FHIREvidence) { @@ -2223,7 +2174,6 @@ public function __construct($data = null) } else { $this->setEvidence(new FHIREvidence($data[self::FIELD_EVIDENCE])); } - return; } if (isset($data[self::FIELD_EVIDENCE_VARIABLE])) { if ($data[self::FIELD_EVIDENCE_VARIABLE] instanceof FHIREvidenceVariable) { @@ -2231,7 +2181,6 @@ public function __construct($data = null) } else { $this->setEvidenceVariable(new FHIREvidenceVariable($data[self::FIELD_EVIDENCE_VARIABLE])); } - return; } if (isset($data[self::FIELD_EXAMPLE_SCENARIO])) { if ($data[self::FIELD_EXAMPLE_SCENARIO] instanceof FHIRExampleScenario) { @@ -2239,7 +2188,6 @@ public function __construct($data = null) } else { $this->setExampleScenario(new FHIRExampleScenario($data[self::FIELD_EXAMPLE_SCENARIO])); } - return; } if (isset($data[self::FIELD_EXPLANATION_OF_BENEFIT])) { if ($data[self::FIELD_EXPLANATION_OF_BENEFIT] instanceof FHIRExplanationOfBenefit) { @@ -2247,7 +2195,6 @@ public function __construct($data = null) } else { $this->setExplanationOfBenefit(new FHIRExplanationOfBenefit($data[self::FIELD_EXPLANATION_OF_BENEFIT])); } - return; } if (isset($data[self::FIELD_FAMILY_MEMBER_HISTORY])) { if ($data[self::FIELD_FAMILY_MEMBER_HISTORY] instanceof FHIRFamilyMemberHistory) { @@ -2255,7 +2202,6 @@ public function __construct($data = null) } else { $this->setFamilyMemberHistory(new FHIRFamilyMemberHistory($data[self::FIELD_FAMILY_MEMBER_HISTORY])); } - return; } if (isset($data[self::FIELD_FLAG])) { if ($data[self::FIELD_FLAG] instanceof FHIRFlag) { @@ -2263,7 +2209,6 @@ public function __construct($data = null) } else { $this->setFlag(new FHIRFlag($data[self::FIELD_FLAG])); } - return; } if (isset($data[self::FIELD_GOAL])) { if ($data[self::FIELD_GOAL] instanceof FHIRGoal) { @@ -2271,7 +2216,6 @@ public function __construct($data = null) } else { $this->setGoal(new FHIRGoal($data[self::FIELD_GOAL])); } - return; } if (isset($data[self::FIELD_GRAPH_DEFINITION])) { if ($data[self::FIELD_GRAPH_DEFINITION] instanceof FHIRGraphDefinition) { @@ -2279,7 +2223,6 @@ public function __construct($data = null) } else { $this->setGraphDefinition(new FHIRGraphDefinition($data[self::FIELD_GRAPH_DEFINITION])); } - return; } if (isset($data[self::FIELD_GROUP])) { if ($data[self::FIELD_GROUP] instanceof FHIRGroup) { @@ -2287,7 +2230,6 @@ public function __construct($data = null) } else { $this->setGroup(new FHIRGroup($data[self::FIELD_GROUP])); } - return; } if (isset($data[self::FIELD_GUIDANCE_RESPONSE])) { if ($data[self::FIELD_GUIDANCE_RESPONSE] instanceof FHIRGuidanceResponse) { @@ -2295,7 +2237,6 @@ public function __construct($data = null) } else { $this->setGuidanceResponse(new FHIRGuidanceResponse($data[self::FIELD_GUIDANCE_RESPONSE])); } - return; } if (isset($data[self::FIELD_HEALTHCARE_SERVICE])) { if ($data[self::FIELD_HEALTHCARE_SERVICE] instanceof FHIRHealthcareService) { @@ -2303,7 +2244,6 @@ public function __construct($data = null) } else { $this->setHealthcareService(new FHIRHealthcareService($data[self::FIELD_HEALTHCARE_SERVICE])); } - return; } if (isset($data[self::FIELD_IMAGING_STUDY])) { if ($data[self::FIELD_IMAGING_STUDY] instanceof FHIRImagingStudy) { @@ -2311,7 +2251,6 @@ public function __construct($data = null) } else { $this->setImagingStudy(new FHIRImagingStudy($data[self::FIELD_IMAGING_STUDY])); } - return; } if (isset($data[self::FIELD_IMMUNIZATION])) { if ($data[self::FIELD_IMMUNIZATION] instanceof FHIRImmunization) { @@ -2319,7 +2258,6 @@ public function __construct($data = null) } else { $this->setImmunization(new FHIRImmunization($data[self::FIELD_IMMUNIZATION])); } - return; } if (isset($data[self::FIELD_IMMUNIZATION_EVALUATION])) { if ($data[self::FIELD_IMMUNIZATION_EVALUATION] instanceof FHIRImmunizationEvaluation) { @@ -2327,7 +2265,6 @@ public function __construct($data = null) } else { $this->setImmunizationEvaluation(new FHIRImmunizationEvaluation($data[self::FIELD_IMMUNIZATION_EVALUATION])); } - return; } if (isset($data[self::FIELD_IMMUNIZATION_RECOMMENDATION])) { if ($data[self::FIELD_IMMUNIZATION_RECOMMENDATION] instanceof FHIRImmunizationRecommendation) { @@ -2335,7 +2272,6 @@ public function __construct($data = null) } else { $this->setImmunizationRecommendation(new FHIRImmunizationRecommendation($data[self::FIELD_IMMUNIZATION_RECOMMENDATION])); } - return; } if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE])) { if ($data[self::FIELD_IMPLEMENTATION_GUIDE] instanceof FHIRImplementationGuide) { @@ -2343,7 +2279,6 @@ public function __construct($data = null) } else { $this->setImplementationGuide(new FHIRImplementationGuide($data[self::FIELD_IMPLEMENTATION_GUIDE])); } - return; } if (isset($data[self::FIELD_INSURANCE_PLAN])) { if ($data[self::FIELD_INSURANCE_PLAN] instanceof FHIRInsurancePlan) { @@ -2351,7 +2286,6 @@ public function __construct($data = null) } else { $this->setInsurancePlan(new FHIRInsurancePlan($data[self::FIELD_INSURANCE_PLAN])); } - return; } if (isset($data[self::FIELD_INVOICE])) { if ($data[self::FIELD_INVOICE] instanceof FHIRInvoice) { @@ -2359,7 +2293,6 @@ public function __construct($data = null) } else { $this->setInvoice(new FHIRInvoice($data[self::FIELD_INVOICE])); } - return; } if (isset($data[self::FIELD_LIBRARY])) { if ($data[self::FIELD_LIBRARY] instanceof FHIRLibrary) { @@ -2367,7 +2300,6 @@ public function __construct($data = null) } else { $this->setLibrary(new FHIRLibrary($data[self::FIELD_LIBRARY])); } - return; } if (isset($data[self::FIELD_LINKAGE])) { if ($data[self::FIELD_LINKAGE] instanceof FHIRLinkage) { @@ -2375,7 +2307,6 @@ public function __construct($data = null) } else { $this->setLinkage(new FHIRLinkage($data[self::FIELD_LINKAGE])); } - return; } if (isset($data[self::FIELD_LIST])) { if ($data[self::FIELD_LIST] instanceof FHIRList) { @@ -2383,7 +2314,6 @@ public function __construct($data = null) } else { $this->setList(new FHIRList($data[self::FIELD_LIST])); } - return; } if (isset($data[self::FIELD_LOCATION])) { if ($data[self::FIELD_LOCATION] instanceof FHIRLocation) { @@ -2391,7 +2321,6 @@ public function __construct($data = null) } else { $this->setLocation(new FHIRLocation($data[self::FIELD_LOCATION])); } - return; } if (isset($data[self::FIELD_MEASURE])) { if ($data[self::FIELD_MEASURE] instanceof FHIRMeasure) { @@ -2399,7 +2328,6 @@ public function __construct($data = null) } else { $this->setMeasure(new FHIRMeasure($data[self::FIELD_MEASURE])); } - return; } if (isset($data[self::FIELD_MEASURE_REPORT])) { if ($data[self::FIELD_MEASURE_REPORT] instanceof FHIRMeasureReport) { @@ -2407,7 +2335,6 @@ public function __construct($data = null) } else { $this->setMeasureReport(new FHIRMeasureReport($data[self::FIELD_MEASURE_REPORT])); } - return; } if (isset($data[self::FIELD_MEDIA])) { if ($data[self::FIELD_MEDIA] instanceof FHIRMedia) { @@ -2415,7 +2342,6 @@ public function __construct($data = null) } else { $this->setMedia(new FHIRMedia($data[self::FIELD_MEDIA])); } - return; } if (isset($data[self::FIELD_MEDICATION])) { if ($data[self::FIELD_MEDICATION] instanceof FHIRMedication) { @@ -2423,7 +2349,6 @@ public function __construct($data = null) } else { $this->setMedication(new FHIRMedication($data[self::FIELD_MEDICATION])); } - return; } if (isset($data[self::FIELD_MEDICATION_ADMINISTRATION])) { if ($data[self::FIELD_MEDICATION_ADMINISTRATION] instanceof FHIRMedicationAdministration) { @@ -2431,7 +2356,6 @@ public function __construct($data = null) } else { $this->setMedicationAdministration(new FHIRMedicationAdministration($data[self::FIELD_MEDICATION_ADMINISTRATION])); } - return; } if (isset($data[self::FIELD_MEDICATION_DISPENSE])) { if ($data[self::FIELD_MEDICATION_DISPENSE] instanceof FHIRMedicationDispense) { @@ -2439,7 +2363,6 @@ public function __construct($data = null) } else { $this->setMedicationDispense(new FHIRMedicationDispense($data[self::FIELD_MEDICATION_DISPENSE])); } - return; } if (isset($data[self::FIELD_MEDICATION_KNOWLEDGE])) { if ($data[self::FIELD_MEDICATION_KNOWLEDGE] instanceof FHIRMedicationKnowledge) { @@ -2447,7 +2370,6 @@ public function __construct($data = null) } else { $this->setMedicationKnowledge(new FHIRMedicationKnowledge($data[self::FIELD_MEDICATION_KNOWLEDGE])); } - return; } if (isset($data[self::FIELD_MEDICATION_REQUEST])) { if ($data[self::FIELD_MEDICATION_REQUEST] instanceof FHIRMedicationRequest) { @@ -2455,7 +2377,6 @@ public function __construct($data = null) } else { $this->setMedicationRequest(new FHIRMedicationRequest($data[self::FIELD_MEDICATION_REQUEST])); } - return; } if (isset($data[self::FIELD_MEDICATION_STATEMENT])) { if ($data[self::FIELD_MEDICATION_STATEMENT] instanceof FHIRMedicationStatement) { @@ -2463,7 +2384,6 @@ public function __construct($data = null) } else { $this->setMedicationStatement(new FHIRMedicationStatement($data[self::FIELD_MEDICATION_STATEMENT])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT])) { if ($data[self::FIELD_MEDICINAL_PRODUCT] instanceof FHIRMedicinalProduct) { @@ -2471,7 +2391,6 @@ public function __construct($data = null) } else { $this->setMedicinalProduct(new FHIRMedicinalProduct($data[self::FIELD_MEDICINAL_PRODUCT])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT_AUTHORIZATION])) { if ($data[self::FIELD_MEDICINAL_PRODUCT_AUTHORIZATION] instanceof FHIRMedicinalProductAuthorization) { @@ -2479,7 +2398,6 @@ public function __construct($data = null) } else { $this->setMedicinalProductAuthorization(new FHIRMedicinalProductAuthorization($data[self::FIELD_MEDICINAL_PRODUCT_AUTHORIZATION])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT_CONTRAINDICATION])) { if ($data[self::FIELD_MEDICINAL_PRODUCT_CONTRAINDICATION] instanceof FHIRMedicinalProductContraindication) { @@ -2487,7 +2405,6 @@ public function __construct($data = null) } else { $this->setMedicinalProductContraindication(new FHIRMedicinalProductContraindication($data[self::FIELD_MEDICINAL_PRODUCT_CONTRAINDICATION])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT_INDICATION])) { if ($data[self::FIELD_MEDICINAL_PRODUCT_INDICATION] instanceof FHIRMedicinalProductIndication) { @@ -2495,7 +2412,6 @@ public function __construct($data = null) } else { $this->setMedicinalProductIndication(new FHIRMedicinalProductIndication($data[self::FIELD_MEDICINAL_PRODUCT_INDICATION])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT_INGREDIENT])) { if ($data[self::FIELD_MEDICINAL_PRODUCT_INGREDIENT] instanceof FHIRMedicinalProductIngredient) { @@ -2503,7 +2419,6 @@ public function __construct($data = null) } else { $this->setMedicinalProductIngredient(new FHIRMedicinalProductIngredient($data[self::FIELD_MEDICINAL_PRODUCT_INGREDIENT])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT_INTERACTION])) { if ($data[self::FIELD_MEDICINAL_PRODUCT_INTERACTION] instanceof FHIRMedicinalProductInteraction) { @@ -2511,7 +2426,6 @@ public function __construct($data = null) } else { $this->setMedicinalProductInteraction(new FHIRMedicinalProductInteraction($data[self::FIELD_MEDICINAL_PRODUCT_INTERACTION])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT_MANUFACTURED])) { if ($data[self::FIELD_MEDICINAL_PRODUCT_MANUFACTURED] instanceof FHIRMedicinalProductManufactured) { @@ -2519,7 +2433,6 @@ public function __construct($data = null) } else { $this->setMedicinalProductManufactured(new FHIRMedicinalProductManufactured($data[self::FIELD_MEDICINAL_PRODUCT_MANUFACTURED])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT_PACKAGED])) { if ($data[self::FIELD_MEDICINAL_PRODUCT_PACKAGED] instanceof FHIRMedicinalProductPackaged) { @@ -2527,7 +2440,6 @@ public function __construct($data = null) } else { $this->setMedicinalProductPackaged(new FHIRMedicinalProductPackaged($data[self::FIELD_MEDICINAL_PRODUCT_PACKAGED])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT_PHARMACEUTICAL])) { if ($data[self::FIELD_MEDICINAL_PRODUCT_PHARMACEUTICAL] instanceof FHIRMedicinalProductPharmaceutical) { @@ -2535,7 +2447,6 @@ public function __construct($data = null) } else { $this->setMedicinalProductPharmaceutical(new FHIRMedicinalProductPharmaceutical($data[self::FIELD_MEDICINAL_PRODUCT_PHARMACEUTICAL])); } - return; } if (isset($data[self::FIELD_MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT])) { if ($data[self::FIELD_MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT] instanceof FHIRMedicinalProductUndesirableEffect) { @@ -2543,7 +2454,6 @@ public function __construct($data = null) } else { $this->setMedicinalProductUndesirableEffect(new FHIRMedicinalProductUndesirableEffect($data[self::FIELD_MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT])); } - return; } if (isset($data[self::FIELD_MESSAGE_DEFINITION])) { if ($data[self::FIELD_MESSAGE_DEFINITION] instanceof FHIRMessageDefinition) { @@ -2551,7 +2461,6 @@ public function __construct($data = null) } else { $this->setMessageDefinition(new FHIRMessageDefinition($data[self::FIELD_MESSAGE_DEFINITION])); } - return; } if (isset($data[self::FIELD_MESSAGE_HEADER])) { if ($data[self::FIELD_MESSAGE_HEADER] instanceof FHIRMessageHeader) { @@ -2559,7 +2468,6 @@ public function __construct($data = null) } else { $this->setMessageHeader(new FHIRMessageHeader($data[self::FIELD_MESSAGE_HEADER])); } - return; } if (isset($data[self::FIELD_MOLECULAR_SEQUENCE])) { if ($data[self::FIELD_MOLECULAR_SEQUENCE] instanceof FHIRMolecularSequence) { @@ -2567,7 +2475,6 @@ public function __construct($data = null) } else { $this->setMolecularSequence(new FHIRMolecularSequence($data[self::FIELD_MOLECULAR_SEQUENCE])); } - return; } if (isset($data[self::FIELD_NAMING_SYSTEM])) { if ($data[self::FIELD_NAMING_SYSTEM] instanceof FHIRNamingSystem) { @@ -2575,7 +2482,6 @@ public function __construct($data = null) } else { $this->setNamingSystem(new FHIRNamingSystem($data[self::FIELD_NAMING_SYSTEM])); } - return; } if (isset($data[self::FIELD_NUTRITION_ORDER])) { if ($data[self::FIELD_NUTRITION_ORDER] instanceof FHIRNutritionOrder) { @@ -2583,7 +2489,6 @@ public function __construct($data = null) } else { $this->setNutritionOrder(new FHIRNutritionOrder($data[self::FIELD_NUTRITION_ORDER])); } - return; } if (isset($data[self::FIELD_OBSERVATION])) { if ($data[self::FIELD_OBSERVATION] instanceof FHIRObservation) { @@ -2591,7 +2496,6 @@ public function __construct($data = null) } else { $this->setObservation(new FHIRObservation($data[self::FIELD_OBSERVATION])); } - return; } if (isset($data[self::FIELD_OBSERVATION_DEFINITION])) { if ($data[self::FIELD_OBSERVATION_DEFINITION] instanceof FHIRObservationDefinition) { @@ -2599,7 +2503,6 @@ public function __construct($data = null) } else { $this->setObservationDefinition(new FHIRObservationDefinition($data[self::FIELD_OBSERVATION_DEFINITION])); } - return; } if (isset($data[self::FIELD_OPERATION_DEFINITION])) { if ($data[self::FIELD_OPERATION_DEFINITION] instanceof FHIROperationDefinition) { @@ -2607,7 +2510,6 @@ public function __construct($data = null) } else { $this->setOperationDefinition(new FHIROperationDefinition($data[self::FIELD_OPERATION_DEFINITION])); } - return; } if (isset($data[self::FIELD_OPERATION_OUTCOME])) { if ($data[self::FIELD_OPERATION_OUTCOME] instanceof FHIROperationOutcome) { @@ -2615,7 +2517,6 @@ public function __construct($data = null) } else { $this->setOperationOutcome(new FHIROperationOutcome($data[self::FIELD_OPERATION_OUTCOME])); } - return; } if (isset($data[self::FIELD_ORGANIZATION])) { if ($data[self::FIELD_ORGANIZATION] instanceof FHIROrganization) { @@ -2623,7 +2524,6 @@ public function __construct($data = null) } else { $this->setOrganization(new FHIROrganization($data[self::FIELD_ORGANIZATION])); } - return; } if (isset($data[self::FIELD_ORGANIZATION_AFFILIATION])) { if ($data[self::FIELD_ORGANIZATION_AFFILIATION] instanceof FHIROrganizationAffiliation) { @@ -2631,7 +2531,6 @@ public function __construct($data = null) } else { $this->setOrganizationAffiliation(new FHIROrganizationAffiliation($data[self::FIELD_ORGANIZATION_AFFILIATION])); } - return; } if (isset($data[self::FIELD_PARAMETERS])) { if ($data[self::FIELD_PARAMETERS] instanceof FHIRParameters) { @@ -2639,7 +2538,6 @@ public function __construct($data = null) } else { $this->setParameters(new FHIRParameters($data[self::FIELD_PARAMETERS])); } - return; } if (isset($data[self::FIELD_PATIENT])) { if ($data[self::FIELD_PATIENT] instanceof FHIRPatient) { @@ -2647,7 +2545,6 @@ public function __construct($data = null) } else { $this->setPatient(new FHIRPatient($data[self::FIELD_PATIENT])); } - return; } if (isset($data[self::FIELD_PAYMENT_NOTICE])) { if ($data[self::FIELD_PAYMENT_NOTICE] instanceof FHIRPaymentNotice) { @@ -2655,7 +2552,6 @@ public function __construct($data = null) } else { $this->setPaymentNotice(new FHIRPaymentNotice($data[self::FIELD_PAYMENT_NOTICE])); } - return; } if (isset($data[self::FIELD_PAYMENT_RECONCILIATION])) { if ($data[self::FIELD_PAYMENT_RECONCILIATION] instanceof FHIRPaymentReconciliation) { @@ -2663,7 +2559,6 @@ public function __construct($data = null) } else { $this->setPaymentReconciliation(new FHIRPaymentReconciliation($data[self::FIELD_PAYMENT_RECONCILIATION])); } - return; } if (isset($data[self::FIELD_PERSON])) { if ($data[self::FIELD_PERSON] instanceof FHIRPerson) { @@ -2671,7 +2566,6 @@ public function __construct($data = null) } else { $this->setPerson(new FHIRPerson($data[self::FIELD_PERSON])); } - return; } if (isset($data[self::FIELD_PLAN_DEFINITION])) { if ($data[self::FIELD_PLAN_DEFINITION] instanceof FHIRPlanDefinition) { @@ -2679,7 +2573,6 @@ public function __construct($data = null) } else { $this->setPlanDefinition(new FHIRPlanDefinition($data[self::FIELD_PLAN_DEFINITION])); } - return; } if (isset($data[self::FIELD_PRACTITIONER])) { if ($data[self::FIELD_PRACTITIONER] instanceof FHIRPractitioner) { @@ -2687,7 +2580,6 @@ public function __construct($data = null) } else { $this->setPractitioner(new FHIRPractitioner($data[self::FIELD_PRACTITIONER])); } - return; } if (isset($data[self::FIELD_PRACTITIONER_ROLE])) { if ($data[self::FIELD_PRACTITIONER_ROLE] instanceof FHIRPractitionerRole) { @@ -2695,7 +2587,6 @@ public function __construct($data = null) } else { $this->setPractitionerRole(new FHIRPractitionerRole($data[self::FIELD_PRACTITIONER_ROLE])); } - return; } if (isset($data[self::FIELD_PROCEDURE])) { if ($data[self::FIELD_PROCEDURE] instanceof FHIRProcedure) { @@ -2703,7 +2594,6 @@ public function __construct($data = null) } else { $this->setProcedure(new FHIRProcedure($data[self::FIELD_PROCEDURE])); } - return; } if (isset($data[self::FIELD_PROVENANCE])) { if ($data[self::FIELD_PROVENANCE] instanceof FHIRProvenance) { @@ -2711,7 +2601,6 @@ public function __construct($data = null) } else { $this->setProvenance(new FHIRProvenance($data[self::FIELD_PROVENANCE])); } - return; } if (isset($data[self::FIELD_QUESTIONNAIRE])) { if ($data[self::FIELD_QUESTIONNAIRE] instanceof FHIRQuestionnaire) { @@ -2719,7 +2608,6 @@ public function __construct($data = null) } else { $this->setQuestionnaire(new FHIRQuestionnaire($data[self::FIELD_QUESTIONNAIRE])); } - return; } if (isset($data[self::FIELD_QUESTIONNAIRE_RESPONSE])) { if ($data[self::FIELD_QUESTIONNAIRE_RESPONSE] instanceof FHIRQuestionnaireResponse) { @@ -2727,7 +2615,6 @@ public function __construct($data = null) } else { $this->setQuestionnaireResponse(new FHIRQuestionnaireResponse($data[self::FIELD_QUESTIONNAIRE_RESPONSE])); } - return; } if (isset($data[self::FIELD_RELATED_PERSON])) { if ($data[self::FIELD_RELATED_PERSON] instanceof FHIRRelatedPerson) { @@ -2735,7 +2622,6 @@ public function __construct($data = null) } else { $this->setRelatedPerson(new FHIRRelatedPerson($data[self::FIELD_RELATED_PERSON])); } - return; } if (isset($data[self::FIELD_REQUEST_GROUP])) { if ($data[self::FIELD_REQUEST_GROUP] instanceof FHIRRequestGroup) { @@ -2743,7 +2629,6 @@ public function __construct($data = null) } else { $this->setRequestGroup(new FHIRRequestGroup($data[self::FIELD_REQUEST_GROUP])); } - return; } if (isset($data[self::FIELD_RESEARCH_DEFINITION])) { if ($data[self::FIELD_RESEARCH_DEFINITION] instanceof FHIRResearchDefinition) { @@ -2751,7 +2636,6 @@ public function __construct($data = null) } else { $this->setResearchDefinition(new FHIRResearchDefinition($data[self::FIELD_RESEARCH_DEFINITION])); } - return; } if (isset($data[self::FIELD_RESEARCH_ELEMENT_DEFINITION])) { if ($data[self::FIELD_RESEARCH_ELEMENT_DEFINITION] instanceof FHIRResearchElementDefinition) { @@ -2759,7 +2643,6 @@ public function __construct($data = null) } else { $this->setResearchElementDefinition(new FHIRResearchElementDefinition($data[self::FIELD_RESEARCH_ELEMENT_DEFINITION])); } - return; } if (isset($data[self::FIELD_RESEARCH_STUDY])) { if ($data[self::FIELD_RESEARCH_STUDY] instanceof FHIRResearchStudy) { @@ -2767,7 +2650,6 @@ public function __construct($data = null) } else { $this->setResearchStudy(new FHIRResearchStudy($data[self::FIELD_RESEARCH_STUDY])); } - return; } if (isset($data[self::FIELD_RESEARCH_SUBJECT])) { if ($data[self::FIELD_RESEARCH_SUBJECT] instanceof FHIRResearchSubject) { @@ -2775,7 +2657,6 @@ public function __construct($data = null) } else { $this->setResearchSubject(new FHIRResearchSubject($data[self::FIELD_RESEARCH_SUBJECT])); } - return; } if (isset($data[self::FIELD_RISK_ASSESSMENT])) { if ($data[self::FIELD_RISK_ASSESSMENT] instanceof FHIRRiskAssessment) { @@ -2783,7 +2664,6 @@ public function __construct($data = null) } else { $this->setRiskAssessment(new FHIRRiskAssessment($data[self::FIELD_RISK_ASSESSMENT])); } - return; } if (isset($data[self::FIELD_RISK_EVIDENCE_SYNTHESIS])) { if ($data[self::FIELD_RISK_EVIDENCE_SYNTHESIS] instanceof FHIRRiskEvidenceSynthesis) { @@ -2791,7 +2671,6 @@ public function __construct($data = null) } else { $this->setRiskEvidenceSynthesis(new FHIRRiskEvidenceSynthesis($data[self::FIELD_RISK_EVIDENCE_SYNTHESIS])); } - return; } if (isset($data[self::FIELD_SCHEDULE])) { if ($data[self::FIELD_SCHEDULE] instanceof FHIRSchedule) { @@ -2799,7 +2678,6 @@ public function __construct($data = null) } else { $this->setSchedule(new FHIRSchedule($data[self::FIELD_SCHEDULE])); } - return; } if (isset($data[self::FIELD_SEARCH_PARAMETER])) { if ($data[self::FIELD_SEARCH_PARAMETER] instanceof FHIRSearchParameter) { @@ -2807,7 +2685,6 @@ public function __construct($data = null) } else { $this->setSearchParameter(new FHIRSearchParameter($data[self::FIELD_SEARCH_PARAMETER])); } - return; } if (isset($data[self::FIELD_SERVICE_REQUEST])) { if ($data[self::FIELD_SERVICE_REQUEST] instanceof FHIRServiceRequest) { @@ -2815,7 +2692,6 @@ public function __construct($data = null) } else { $this->setServiceRequest(new FHIRServiceRequest($data[self::FIELD_SERVICE_REQUEST])); } - return; } if (isset($data[self::FIELD_SLOT])) { if ($data[self::FIELD_SLOT] instanceof FHIRSlot) { @@ -2823,7 +2699,6 @@ public function __construct($data = null) } else { $this->setSlot(new FHIRSlot($data[self::FIELD_SLOT])); } - return; } if (isset($data[self::FIELD_SPECIMEN])) { if ($data[self::FIELD_SPECIMEN] instanceof FHIRSpecimen) { @@ -2831,7 +2706,6 @@ public function __construct($data = null) } else { $this->setSpecimen(new FHIRSpecimen($data[self::FIELD_SPECIMEN])); } - return; } if (isset($data[self::FIELD_SPECIMEN_DEFINITION])) { if ($data[self::FIELD_SPECIMEN_DEFINITION] instanceof FHIRSpecimenDefinition) { @@ -2839,7 +2713,6 @@ public function __construct($data = null) } else { $this->setSpecimenDefinition(new FHIRSpecimenDefinition($data[self::FIELD_SPECIMEN_DEFINITION])); } - return; } if (isset($data[self::FIELD_STRUCTURE_DEFINITION])) { if ($data[self::FIELD_STRUCTURE_DEFINITION] instanceof FHIRStructureDefinition) { @@ -2847,7 +2720,6 @@ public function __construct($data = null) } else { $this->setStructureDefinition(new FHIRStructureDefinition($data[self::FIELD_STRUCTURE_DEFINITION])); } - return; } if (isset($data[self::FIELD_STRUCTURE_MAP])) { if ($data[self::FIELD_STRUCTURE_MAP] instanceof FHIRStructureMap) { @@ -2855,7 +2727,6 @@ public function __construct($data = null) } else { $this->setStructureMap(new FHIRStructureMap($data[self::FIELD_STRUCTURE_MAP])); } - return; } if (isset($data[self::FIELD_SUBSCRIPTION])) { if ($data[self::FIELD_SUBSCRIPTION] instanceof FHIRSubscription) { @@ -2863,7 +2734,6 @@ public function __construct($data = null) } else { $this->setSubscription(new FHIRSubscription($data[self::FIELD_SUBSCRIPTION])); } - return; } if (isset($data[self::FIELD_SUBSTANCE])) { if ($data[self::FIELD_SUBSTANCE] instanceof FHIRSubstance) { @@ -2871,7 +2741,6 @@ public function __construct($data = null) } else { $this->setSubstance(new FHIRSubstance($data[self::FIELD_SUBSTANCE])); } - return; } if (isset($data[self::FIELD_SUBSTANCE_NUCLEIC_ACID])) { if ($data[self::FIELD_SUBSTANCE_NUCLEIC_ACID] instanceof FHIRSubstanceNucleicAcid) { @@ -2879,7 +2748,6 @@ public function __construct($data = null) } else { $this->setSubstanceNucleicAcid(new FHIRSubstanceNucleicAcid($data[self::FIELD_SUBSTANCE_NUCLEIC_ACID])); } - return; } if (isset($data[self::FIELD_SUBSTANCE_POLYMER])) { if ($data[self::FIELD_SUBSTANCE_POLYMER] instanceof FHIRSubstancePolymer) { @@ -2887,7 +2755,6 @@ public function __construct($data = null) } else { $this->setSubstancePolymer(new FHIRSubstancePolymer($data[self::FIELD_SUBSTANCE_POLYMER])); } - return; } if (isset($data[self::FIELD_SUBSTANCE_PROTEIN])) { if ($data[self::FIELD_SUBSTANCE_PROTEIN] instanceof FHIRSubstanceProtein) { @@ -2895,7 +2762,6 @@ public function __construct($data = null) } else { $this->setSubstanceProtein(new FHIRSubstanceProtein($data[self::FIELD_SUBSTANCE_PROTEIN])); } - return; } if (isset($data[self::FIELD_SUBSTANCE_REFERENCE_INFORMATION])) { if ($data[self::FIELD_SUBSTANCE_REFERENCE_INFORMATION] instanceof FHIRSubstanceReferenceInformation) { @@ -2903,7 +2769,6 @@ public function __construct($data = null) } else { $this->setSubstanceReferenceInformation(new FHIRSubstanceReferenceInformation($data[self::FIELD_SUBSTANCE_REFERENCE_INFORMATION])); } - return; } if (isset($data[self::FIELD_SUBSTANCE_SOURCE_MATERIAL])) { if ($data[self::FIELD_SUBSTANCE_SOURCE_MATERIAL] instanceof FHIRSubstanceSourceMaterial) { @@ -2911,7 +2776,6 @@ public function __construct($data = null) } else { $this->setSubstanceSourceMaterial(new FHIRSubstanceSourceMaterial($data[self::FIELD_SUBSTANCE_SOURCE_MATERIAL])); } - return; } if (isset($data[self::FIELD_SUBSTANCE_SPECIFICATION])) { if ($data[self::FIELD_SUBSTANCE_SPECIFICATION] instanceof FHIRSubstanceSpecification) { @@ -2919,7 +2783,6 @@ public function __construct($data = null) } else { $this->setSubstanceSpecification(new FHIRSubstanceSpecification($data[self::FIELD_SUBSTANCE_SPECIFICATION])); } - return; } if (isset($data[self::FIELD_SUPPLY_DELIVERY])) { if ($data[self::FIELD_SUPPLY_DELIVERY] instanceof FHIRSupplyDelivery) { @@ -2927,7 +2790,6 @@ public function __construct($data = null) } else { $this->setSupplyDelivery(new FHIRSupplyDelivery($data[self::FIELD_SUPPLY_DELIVERY])); } - return; } if (isset($data[self::FIELD_SUPPLY_REQUEST])) { if ($data[self::FIELD_SUPPLY_REQUEST] instanceof FHIRSupplyRequest) { @@ -2935,7 +2797,6 @@ public function __construct($data = null) } else { $this->setSupplyRequest(new FHIRSupplyRequest($data[self::FIELD_SUPPLY_REQUEST])); } - return; } if (isset($data[self::FIELD_TASK])) { if ($data[self::FIELD_TASK] instanceof FHIRTask) { @@ -2943,7 +2804,6 @@ public function __construct($data = null) } else { $this->setTask(new FHIRTask($data[self::FIELD_TASK])); } - return; } if (isset($data[self::FIELD_TERMINOLOGY_CAPABILITIES])) { if ($data[self::FIELD_TERMINOLOGY_CAPABILITIES] instanceof FHIRTerminologyCapabilities) { @@ -2951,7 +2811,6 @@ public function __construct($data = null) } else { $this->setTerminologyCapabilities(new FHIRTerminologyCapabilities($data[self::FIELD_TERMINOLOGY_CAPABILITIES])); } - return; } if (isset($data[self::FIELD_TEST_REPORT])) { if ($data[self::FIELD_TEST_REPORT] instanceof FHIRTestReport) { @@ -2959,7 +2818,6 @@ public function __construct($data = null) } else { $this->setTestReport(new FHIRTestReport($data[self::FIELD_TEST_REPORT])); } - return; } if (isset($data[self::FIELD_TEST_SCRIPT])) { if ($data[self::FIELD_TEST_SCRIPT] instanceof FHIRTestScript) { @@ -2967,7 +2825,6 @@ public function __construct($data = null) } else { $this->setTestScript(new FHIRTestScript($data[self::FIELD_TEST_SCRIPT])); } - return; } if (isset($data[self::FIELD_VALUE_SET])) { if ($data[self::FIELD_VALUE_SET] instanceof FHIRValueSet) { @@ -2975,7 +2832,6 @@ public function __construct($data = null) } else { $this->setValueSet(new FHIRValueSet($data[self::FIELD_VALUE_SET])); } - return; } if (isset($data[self::FIELD_VERIFICATION_RESULT])) { if ($data[self::FIELD_VERIFICATION_RESULT] instanceof FHIRVerificationResult) { @@ -2983,7 +2839,6 @@ public function __construct($data = null) } else { $this->setVerificationResult(new FHIRVerificationResult($data[self::FIELD_VERIFICATION_RESULT])); } - return; } if (isset($data[self::FIELD_VISION_PRESCRIPTION])) { if ($data[self::FIELD_VISION_PRESCRIPTION] instanceof FHIRVisionPrescription) { @@ -2991,7 +2846,6 @@ public function __construct($data = null) } else { $this->setVisionPrescription(new FHIRVisionPrescription($data[self::FIELD_VISION_PRESCRIPTION])); } - return; } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRSampledDataDataTypePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRSampledDataDataTypePrimitive.php index 51d222ee0d..ab092c60b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRSampledDataDataTypePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRSampledDataDataTypePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRStringPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRStringPrimitive.php index 154641c080..afdc692e13 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRStringPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRStringPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRStringPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRTimePrimitive.php index 218257f690..b6a5655dd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRTimePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUnsignedIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUnsignedIntPrimitive.php index 140456337a..482c47c5e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUnsignedIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUnsignedIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUnsignedIntPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUriPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUriPrimitive.php index 265698f95a..98e66e24c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUriPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUriPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUriPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUrlPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUrlPrimitive.php index d1e431e9c0..71fd7c4559 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUrlPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUrlPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUrlPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUuidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUuidPrimitive.php index 1f9176e05f..9cfc6043bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/FHIRUuidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/FHIRUuidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUuidPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRAutoloader.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRAutoloader.php index f214a08e2c..09ca323c6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRAutoloader.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRAutoloader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerInterface.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerInterface.php index f976a82528..0da767e0f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerTrait.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerTrait.php index bfe4409723..cdbfc3891f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerTrait.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRCommentContainerTrait.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -69,7 +69,7 @@ trait PHPFHIRCommentContainerTrait { /** @var array */ - protected $_fhirComments = []; + private $_fhirComments = []; /** * Arbitrary comments of a hopefully useful nature diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRConstants.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRConstants.php index 1af96f9a52..e557d911eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRConstants.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRConstants.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ abstract class PHPFHIRConstants const SOURCE_GENERATION_DATE = 'Fri, Nov 1, 2019 09:29+1100'; // PHPFHIR - const CODE_GENERATION_DATE = 'November 30th, 2019 23:38+0000'; + const CODE_GENERATION_DATE = 'December 7th, 2019 16:37+0000'; // Common const JSON_FIELD_RESOURCE_TYPE = 'resourceType'; diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRContainedTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRContainedTypeInterface.php index b74492399d..b1f0f2cefc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRContainedTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRContainedTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParser.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParser.php index 2ac9d463b9..2bf4d63640 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParser.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParser.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParserConfig.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParserConfig.php index 5ac3828e47..47bf764259 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParserConfig.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRResponseParserConfig.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php index 9de8fab054..f489e322e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBooleanPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBooleanPrimitiveTest.php index 3817624583..25c7a9f2f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBooleanPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRBooleanPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCanonicalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCanonicalPrimitiveTest.php index 392d0b96ff..760183bd23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCanonicalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCanonicalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php index e2b0afdd81..489058aa87 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php index b1cf10d7a8..f76a2aba44 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php index 069f333eb2..5c6db46f8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php index 47f3bcfb93..0c95dfab3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php index decb8dd48b..712a89d991 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php index 54ed5402db..b4913d42f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php index 7215454ab2..2e0fc7702f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php index e96452de29..0acf571616 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php index 6d1d598d7a..0456fecc8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php index f5f4edae0c..757f37801b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php index ce01acef30..1ebf22be3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php index b425252fbb..f98f4d0d5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventActualityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventActualityListTest.php index ca3ae3c068..27f79f9206 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventActualityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventActualityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php index 0affd9d1d0..689439112d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php index 1ff4baf76b..077a55e690 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php index 89dcf71bfc..0ea1729231 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php index d2ee766dd7..142bdaa9e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php index e40886470d..014adbbf75 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php index f1790c630d..520d197a6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php index 5fd630ad98..df56a2fd28 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php index 65c1e4559c..f330c85b99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php index 74fd5ea150..564d99e4ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php index 3b911ffb31..02885fafcf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php index f8048cec6b..80f3452123 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php index bd70adc1c7..6351a691c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php index 8cd50042db..e15bb66242 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryListTest.php index 8069ecacfe..eb9927a81a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusListTest.php index 4cb9cc18a9..ca7d197707 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleListTest.php index 8b0f1681c9..bcf7e5008d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBiologicallyDerivedProductStorageScaleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php index c906d75af4..027f267dac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php index 29f9519b14..71c5460d02 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityKindListTest.php index d965b3c2c6..7c1b4bf0b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php index deda1358d5..cca8cc988f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php index 736491fc71..d20413f1d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php index 1f9d2f0625..1b747629db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeListTest.php index bfeca378cf..cddfd3e4be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCatalogEntryRelationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php index dad56b34f2..6e0d852ae9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClaimProcessingCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClaimProcessingCodesListTest.php index 6e08a97457..d10ccf3da1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClaimProcessingCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClaimProcessingCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php index ce931ac157..8cb5a568b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSearchSupportListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSearchSupportListTest.php index 391ad4b436..d8ed1fc6ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSearchSupportListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSearchSupportListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php index 64abe0edaf..5fb031af23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php index 9b31d4c912..df4b445ae1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php index 51e9b828fb..6cb9273883 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php index 1ae1261c19..7cb69ce756 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php index 463df42f93..acc578255f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php index 5612d84521..acfa2ec7aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php index 2501417864..27d315528f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php index ed8f140fb7..57ca19a5a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php index a7ea7be778..d1dd5a0784 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php index c9eac7aa5a..0921b3e4d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentProvisionTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentProvisionTypeListTest.php index 894c72a1b7..ca20ea3d57 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentProvisionTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentProvisionTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php index b3918a5a70..39944db1b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php index cddef9c670..6d598ca8d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php index 7bb41cf624..8e7aee4fb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php index 4434498130..2da0c5564a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesListTest.php index 58e7639c48..df4357022f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourcePublicationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php index cbd6d34dcf..6ba5cceed3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php index fd48bb3d0d..ab25b069bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php index ec5d0dc4fe..d1beaccc09 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php index 8add01e2d5..4471591d49 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php index eb04af0328..034540889b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php index bfcac1cc57..55a4bf8c03 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php index d31600c6e9..11330fc1b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php index 1ad3db039b..b97f435837 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php index 5ce03c857f..1632fb45b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceNameTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceNameTypeListTest.php index b06e12db1d..d1ed2d307b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceNameTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceNameTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php index c2d077450a..53bce90023 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php index 0404ae714f..c8e9b46e83 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php index cae9904dce..6fe86ebecd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php index 897a9a5733..4a59348528 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php index a26af74287..9a362f235c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php index f3094753c2..bebb1ce352 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityRequestPurposeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityRequestPurposeListTest.php index e07eeaa4aa..af91e25237 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityRequestPurposeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityRequestPurposeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityResponsePurposeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityResponsePurposeListTest.php index 923c1a05bf..a6345f29cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityResponsePurposeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREligibilityResponsePurposeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREnableWhenBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREnableWhenBehaviorListTest.php index a9e81b2d54..0a2b564235 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREnableWhenBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREnableWhenBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php index aa0229f5b3..b5fd50c22f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php index f7caf87dd1..19786218cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php index 6b1794aa5a..3cd07b44a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php index 9738a4b56e..abc0941089 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php index a79bddef09..ad2c73cfa1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php index 3f7711027b..0dc8670523 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php index 3efdf40f82..fd2203475e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREvidenceVariableTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREvidenceVariableTypeListTest.php index d4cc03f26d..fe588b41f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREvidenceVariableTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIREvidenceVariableTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExampleScenarioActorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExampleScenarioActorTypeListTest.php index f6b428f4f8..36fc817994 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExampleScenarioActorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExampleScenarioActorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php index e0e1cfd77f..f858579735 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExposureStateListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExposureStateListTest.php index 280d8c616d..9f2543ec39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExposureStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExposureStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExpressionLanguageListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExpressionLanguageListTest.php index 813dc3e667..6dc44b20a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExpressionLanguageListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExpressionLanguageListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextTypeListTest.php index 06568e31cc..37ede7efd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php index fabbe39b97..21dedf0f94 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php index e2c01e8477..303e340948 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRVersionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRVersionListTest.php index c0b7d09a76..e2b14ddfff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRVersionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRVersionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php index d1be833ce9..c7ffdbdaf0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php index 9f4b597ce8..fcab5dbce9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php index 223058d426..1a4bdd65c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php index 83b04cff5d..9a0f4eb339 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalLifecycleStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalLifecycleStatusListTest.php index 8f83daa112..dd97551af4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalLifecycleStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalLifecycleStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php index 418558464f..2cd095f88a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentUseListTest.php index b588c51224..c2ecc9f45a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupMeasureListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupMeasureListTest.php index 403d60679f..9aecbbae78 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupMeasureListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupMeasureListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php index 715da384b2..10d8cd57f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php index 9be3ee54d4..86b75dd243 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageGenerationListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageGenerationListTest.php index ac9da0629e..76296e5cbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageGenerationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageGenerationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideParameterCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideParameterCodeListTest.php index 2efcfbb100..ad899515f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideParameterCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideParameterCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php index e5908f3124..8ed687c9ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php index 0df61190d0..ba155f56d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php index fd96c61f99..c771a2f984 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImagingStudyStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImagingStudyStatusListTest.php index 7cc6818ca2..a4a7dfb4c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImagingStudyStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImagingStudyStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesListTest.php index 291e4facfd..0ee896e556 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationEvaluationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php index 92e0a79626..2ced68f1d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeListTest.php index f9124deed4..06de3ea25f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoicePriceComponentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoiceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoiceStatusListTest.php index 14960b1e09..c7bf5072c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoiceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRInvoiceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php index 870aa7c9b5..d72ad091b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php index 3d606c27b1..a9b39fef82 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php index 4420024fa8..6262dbc634 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php index 25dad12bfc..00fdf762dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php index 0ea977f893..bbaf1f3e8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php index f88cfeb6b4..6eac762305 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php index bcd1c83afc..d9f63b4bee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php index 462af6dc18..f65cd4e59b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php index 68d99f33e0..a94108f200 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php index 1415ead325..070082aba0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php index 39b064320a..eb7bb4cf0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusCodesListTest.php index fd9b84651a..ca22d9a56f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationrequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationrequestStatusListTest.php index c6802dcafa..41ec569fc2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationrequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationrequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php index 42780bb6af..6b47c58456 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageheaderResponseRequestListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageheaderResponseRequestListTest.php index 952b1412f5..ddbac323da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageheaderResponseRequestListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageheaderResponseRequestListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php index 477e060896..ac61f60f95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php index 0dc11cb6ff..623603252f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php index 9beb38a71b..4a8aa8963e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php index 1a0f4357e0..3262acec6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php index edd10aa989..c2c6751964 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationDataTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationDataTypeListTest.php index d0e4031aca..c087d10517 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationDataTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationDataTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRangeCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRangeCategoryListTest.php index b526a7e049..345685e4e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRangeCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRangeCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php index 5eb7d321b5..1607955012 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php index 867c2a30fc..2cc9a672c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php index e68884bd87..5cf9dcbeef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROrientationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROrientationTypeListTest.php index 2f46d58ce8..157888ac8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROrientationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIROrientationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php index 3f91255791..3bee621387 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php index 7aedddb4f7..c1c7961f84 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php index 5e78e6587c..325556cb3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php index 47140fdd29..5e99ab3e03 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php index f9f8716e31..9ae57097b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php index 2fe94bcd42..c1387a3519 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php index ac5f857a1b..15e7d7409e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php index 530aeb8071..bbce7249f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorListTest.php index d2dca13fdc..723a9cb589 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php index 1b78519478..76440ca05e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php index c0cc7d8045..7228e9e85a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php index 721baa5cfd..82fc05fc9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php index 66b57592ff..ef82ff9521 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php index 6124fddca2..b18bcef7d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php index 2c228ec70c..0645575949 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php index 77810a14d4..dbd36d25ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php index 10c47687c9..901bbbf06f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php index 71aac4eeb9..d444c3c08a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestResourceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestResourceTypeListTest.php index ada2d561b4..e4d09ce695 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestResourceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestResourceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php index d8d4dab54e..7f5655bcec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchElementTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchElementTypeListTest.php index 8ced411685..0273862861 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchElementTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchElementTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php index ee3133b667..2902b6012a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php index 8ec512883a..4d994c31b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php index 455a698476..12357b18c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php index d73a51bf29..7f316d9b31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php index 6c60a79da7..23c0c440a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php index 8a39ad974e..d8707c1f0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSPDXLicenseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSPDXLicenseListTest.php index 075f43e613..fc3827d069 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSPDXLicenseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSPDXLicenseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php index f38c5c5743..78f15a1d7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php index 3ca3e39a31..0255f84d94 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php index c336faedce..21f35d17c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php index 1a362380fb..d649b8e614 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSequenceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSequenceTypeListTest.php index 20806e6a19..3ea87ed2ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSequenceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSequenceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php index b8b57b7842..8bd491a9fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php index fe1e6b064a..8c88b03234 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSortDirectionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSortDirectionListTest.php index ffebd36948..6bb1b8b31f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSortDirectionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSortDirectionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceListTest.php index c140f35f65..63186a9b98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenContainedPreferenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php index 741bdf85dd..6f41c3f296 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStatusListTest.php index eab4a289d9..13b7e58089 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStrandTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStrandTypeListTest.php index e2d57ce512..3b73ea3eb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStrandTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStrandTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php index 0fbbc5e111..3ea6083529 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php index e3a4875e30..73e2b6be61 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php index 3918782626..7ad882e213 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php index da0765ba27..7ddab70615 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php index 387bbb02dc..2da07ac7b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php index 158064e21e..baf6e05be1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php index 30fd821fbf..b6413d43eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php index fc507be55c..a1102fdb95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php index 82a45a2290..0203555324 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php index c88e0b0cf1..0b6f8f324b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php index e12de82e93..8fa3ab02f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php index 9beda7df25..4ad7a3681c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php index 3333279f66..369e0662ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskIntentListTest.php index fdc9270863..059bcf50c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php index f2266053ca..ad644a6477 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php index a57c4de7d8..c35891cd5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php index 9af01ee64a..64d3a70b1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php index ed123247e3..c8f4feb9d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php index 0c17815f09..b5368a1069 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php index 6a1365d869..a20e5f41de 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php index bcbf11de55..49fe08f17a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php index c62708318c..1e679bd6d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php index 0fbd5d0989..9a63edcd3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php index e96562d846..6dec45a6f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php index cbf3200b07..879787d2a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php index a3a965ebb1..25170a876d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVConfidentialityClassificationListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVConfidentialityClassificationListTest.php index 56bc899713..fff27b2307 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVConfidentialityClassificationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVConfidentialityClassificationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVariableTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVariableTypeListTest.php index 6b76d9599d..0dc7efa8cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVariableTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVariableTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php index 3ae03f8495..de1d94f34e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php index 8edda3d4a0..147adc85ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php index 14c8fed947..80f04954b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitiveTest.php index f5b4bb542e..c1ae494e92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRCodePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDatePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDatePrimitiveTest.php index b03e295faf..c1337f8507 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDatePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDatePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDateTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDateTimePrimitiveTest.php index 27d9cd7f97..251dcdf1ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDateTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDateTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDecimalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDecimalPrimitiveTest.php index 9018ed0894..a7f321974f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDecimalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRDecimalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php index db30068fc8..64f9959e8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php index 81647b3a12..95b03ec459 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php index b1a98eadd4..daa372495d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php index d934d7d662..3cf311ed85 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php index 7916d6e8bf..3e903ac867 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php index 9748a6643a..18e5816ce7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php index 27d4ce5768..ad3bbdb649 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php index 7a136ebee9..450382cb15 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php index 12cd984161..774bd664d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTest.php index 84b1057690..ebe4e25ea9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php index 70e6700680..03ca89eb8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php index 81cbf8967b..d35f7e84c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php index 966ea8d5bb..c9245b49a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdverseEventActualityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdverseEventActualityTest.php index 24c8be39d4..1953c60cc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdverseEventActualityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAdverseEventActualityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php index 454946c76f..5de61ae75e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php index e0e42ebc57..1cc9e7b571 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php index 3d10fe4a5e..825e11d6ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php index f13b80750b..65caca3ca0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php index a8530c573a..1986689d74 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php index 2a32493241..b80fffe5e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php index e2bb4b37c0..d747252fc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php index 8e83d59399..0c1b44e859 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php index 69f6d8c510..1f7f4ca46c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php index 187f4bbb61..7c4dcc4c39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php index 114682b235..875ef27213 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php index 397ac5a37a..3bc7247658 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php index 6b96879bc3..6ab0012c18 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php index 6c38f7fe74..a2ad971c4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php index d32b5cac39..ab38c91028 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php index 44d1674517..933f892a78 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php index af2e3c632b..fa32850710 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php index e76b48d914..37e3e53e3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausalityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausalityTest.php index 97c97e3ae1..601e29922a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventCausalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php index 811f678cd9..1a63c73b1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php index 77c11f52b6..ab12008bac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php index 7a3565d8a1..3e66219b7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php index f59377d409..106114c610 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php index 3bb39d9216..888dbac0fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php index 28d13d8405..7a813021bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php index 895f000fca..683ecb70cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php index a578350add..5e3bbf5854 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollectionTest.php index 5d298657dd..cee677986c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulationTest.php index 231b36c310..cb95e848fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductManipulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessingTest.php index b220f2150b..b75c09e697 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductProcessingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorageTest.php index 8a48ee2da6..3c751bec2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBiologicallyDerivedProduct/FHIRBiologicallyDerivedProductStorageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php index 18a9f55a98..2c17070ff0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php index 073ec4e509..45530c184c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php index 564aba201a..126b920e5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php index bcb2a27e91..2b3fe9f278 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php index 40c6ceedc7..c4d164bfeb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php index b0ffd57310..6817f36e08 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php index 6705828ea3..53518efe97 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php index 9756dafc89..972ff39ffb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php index 9084a7eac0..98559bd3a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php index bc152dd99c..eccae6f636 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php index a7864881a0..3bee0a0271 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php index 7dd2413864..97e2d97191 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php index 3101b8caa2..fa0245e6b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php index 8520e590a4..68fe2d9ef6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php index f0e2f27f2f..223b564814 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php index b8cca98ce0..d8b39c1843 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php index 5f471819a4..d18cea0033 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php index 05f7cf6066..04daee5773 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php index a8494e7234..48e05df3ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php index 4467b741e0..6d5f0ffa7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php index 3f9205be18..2ac8bf2d16 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntryTest.php index 74a01031cb..297e1476cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCatalogEntry/FHIRCatalogEntryRelatedEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformerTest.php index ea119948b0..8af6f5fece 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicabilityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicabilityTest.php index d41658947e..8de2eecfdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionApplicabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponentTest.php index 8af58c8b83..e4c82ae621 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPriceComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroupTest.php index 76c1f7eda4..9759036137 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItemDefinition/FHIRChargeItemDefinitionPropertyGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php index a116dc655c..917cfc8794 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php index 662cd7684a..0d21d9837e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php index 9d2e7699d8..525c30d4e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php index 1046de7190..4eebdba7de 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php index 6afd4794ff..6265329500 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php index 801463db06..3ff6f8d48c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php index dd2db0c75d..9dd3205f8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php index 5aa16c8434..e33b26616f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php index 7bfad3e7eb..41793513c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php index 2ce92b2cd2..a08cf29b61 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfoTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfoTest.php index 4d1d075cfc..f50d1937d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfoTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSupportingInfoTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php index 0bb8f0c71a..e29debc3dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php index 53fae38759..76c8cb0446 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php index 1f45e1f839..e52f9fa973 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php index bdbe21e125..2b58037901 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php index 1b082639f2..a7ee6d2764 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php index d4c669e192..873be329be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php index a9886e5a7d..4863b15c33 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php index b2c0de127b..210c341f72 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php index 274076753d..2eb74ffe06 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1Test.php index 6659ca670d..020b4c33d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php index a398c3db33..c9e7b83128 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotalTest.php index a399422cfe..63bc065e19 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseTotalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php index f66c6356f8..c6c1c19a0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php index 823808490d..37e1cf1374 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php index 0e309ec41d..3985bdfdde 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php index 9f29e5ef2e..411297dee3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php index 9245761639..6e086d0df9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php index 25361b1f54..240ea7a9a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php index c9e49ecb20..992c45d376 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php index cc7296f39c..c88e79d4f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php index f3d4951e14..53b2f7c34b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php index c52f8e7fe0..ac25bd8e1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php index fdf1bdd442..fc2457bb27 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php index b8e8139fbe..f3a6f01410 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php index e87be3884a..e5dd669110 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php index d2ed9c7836..108735d2a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php index 83858092ed..e7226748aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php index 8897b008ab..bfca2ea40d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php index c363b70bed..513102e9d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php index c67350afbf..3be5fc6453 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php index 4031a51c54..6dad1bdbe2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php index 819ec91a1c..6ce106563e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php index 8065e577b7..89ce3a47ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php index ff5ec8c8fb..a267fba348 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php index 8c519dc576..fa5d539069 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php index 87f52155e5..e8536c60be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvisionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvisionTest.php index 4312539450..4bba726b70 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvisionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentProvisionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerificationTest.php index 9b086f1988..5ed4ab06ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentVerificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActionTest.php index 49c5f99763..105ff5f70b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswerTest.php index 4942ec9396..994d1aab36 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAnswerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAssetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAssetTest.php index fb07e48cd2..b995f2bc5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAssetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAssetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinitionTest.php index e3d3acd0bf..95f6a7f4c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContentDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContextTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContextTest.php index e634173bac..d85dff42d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php index c4c8fd24b0..02d1f9c7a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php index ad81a9faae..86fef1b418 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOfferTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOfferTest.php index a0b7af469d..7fa3ae7086 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOfferTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractOfferTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractPartyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractPartyTest.php index 95d4c65cab..0fe116bfad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractPartyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractPartyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php index e0e950d43f..baad4a157d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabelTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabelTest.php index 728f94dce3..3cc9b92457 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSecurityLabelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php index ea04418a9c..68727f6c39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubjectTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubjectTest.php index 9c2a7fe333..f7778458bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSubjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php index 9c7606e052..af5bcd90a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php index 4a85cbac90..95e4335f96 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClassTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClassTest.php index 8bc2571bd1..90bf5f3f4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClassTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageClassTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiaryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiaryTest.php index 3398cc78dd..d2962d1777 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageCostToBeneficiaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageExceptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageExceptionTest.php index d92b21cf9f..2f51a437f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageExceptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageExceptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosisTest.php index e92513a6dd..711ade353e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsuranceTest.php index 68adbb3cb0..1641d828f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItemTest.php index 4aa086ad18..1c59ee64d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfoTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfoTest.php index bad97f3cc7..aee5e8e45a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfoTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityRequest/FHIRCoverageEligibilityRequestSupportingInfoTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefitTest.php index 951821809a..2f56d3db49 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseErrorTest.php index 5c7146d196..d0dec7eed1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsuranceTest.php index ec1c5e40e6..dfa351bf75 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItemTest.php index b762ee3340..d44b4297dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverageEligibilityResponse/FHIRCoverageEligibilityResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidenceTest.php index 3d3f6d24f0..53a33ef21d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php index 34f0bb05a8..8b9b75d40b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceNameTest.php index e8e8d66a28..1d8479f407 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceDeviceNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDevicePropertyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDevicePropertyTest.php index e2745d73b1..46c07f938b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDevicePropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDevicePropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecializationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecializationTest.php index f53de5ed61..239a2ebac6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecializationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceSpecializationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrierTest.php index e9cc83bf07..8d7ddc858c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiCarrierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersionTest.php index fac626b540..29da13e077 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapabilityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapabilityTest.php index 3444a94314..42bde3c0cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionCapabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceNameTest.php index 5bf96d16a3..42913cf23d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionDeviceNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterialTest.php index 6e3806a76a..9937c02756 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionMaterialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionPropertyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionPropertyTest.php index d48d0b40b2..e2b2ce7998 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionPropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionPropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecializationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecializationTest.php index 0f267e5d94..0e5f573450 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecializationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionSpecializationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifierTest.php index ed8c83bc25..67bdb2a19b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceDefinition/FHIRDeviceDefinitionUdiDeviceIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php index 43e389901c..d6418450c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameterTest.php index 73b395bec1..c3db982243 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMediaTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMediaTest.php index fba6551cf8..ecd0bcc7d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php index 4b6c56e81c..41918c43d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php index 4594f54856..3e88cb2688 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php index 82bd47f119..5ca2971b10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php index d17ff8851e..0b51efbedc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRateTest.php index d0539fb033..c963ca0561 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosage/FHIRDosageDoseAndRateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosageTest.php index f5fa9dd8b4..149f32eb3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponentTest.php index de06750f0d..1ded187fd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintySubcomponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintyTest.php index 3e794bc60c..533228cf31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisCertaintyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimateTest.php index ccbef5811d..f424099984 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisEffectEstimateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimateTest.php index c8448e83f6..3bddf8862a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisPrecisionEstimateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposureTest.php index e83a05114c..eac8d5afaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisResultsByExposureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSizeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSizeTest.php index 7e241d6ffd..523e12c1bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSizeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREffectEvidenceSynthesis/FHIREffectEvidenceSynthesisSampleSizeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php index c1b9570d18..2092805e6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php index 728db87a80..6cd5349ddf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php index 740ff86136..09074a9347 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php index feed5de4d6..ebf37ec655 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php index 484d4a79e1..808c039d73 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php index adbc4a68ab..5dde67d7c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php index baa3dccbc6..f4caeb4206 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php index 0c0558c474..26c0fa8549 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinitionTest.php index 9765da4d35..29ceed2d4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRElementDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php index e9dda24026..daea7c582e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php index f3ac5f02dc..9500c63d8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php index 6ed0d34c33..cc71092f4f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php index 61d01f4db4..7fd4f7a0ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php index 9b1ac256ad..ae565f701b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php index 9431deb957..be616717ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php index b54a4428b9..9e50da902d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php index a60c5b5c00..37c152a9c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristicTest.php index 4ee0693271..be0ea815ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREvidenceVariable/FHIREvidenceVariableCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActorTest.php index e8d8fb6391..6759c253ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioActorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternativeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternativeTest.php index 151045a50e..69a720d74c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioAlternativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstanceTest.php index 29739e975c..f6a5e48cd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioContainedInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstanceTest.php index 8dda0819ed..f4c4abf105 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperationTest.php index a85d40dcc1..b54ae459da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcessTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcessTest.php index 2c2ab77cd2..1342eaf7c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcessTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioProcessTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStepTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStepTest.php index 84d67aa0b3..34a9e9bbc1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStepTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioStepTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersionTest.php index a7c037c00f..cb2229aa0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExampleScenario/FHIRExampleScenarioVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php index 6b78cf5788..fb2a36adef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php index 470a03d1c9..fda759e57a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php index 062b180253..ccdf39969f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php index 4556052188..9813c44fce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php index 5754944a23..3e1d02bd46 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php index 96494ec9c4..1081519d92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php index 96e24e4491..899f74335d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php index 59d28fdd7a..593723523d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php index 2f4596c7b1..6654d9e3fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php index 5e8853a8d5..5844dfa6f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php index 9e7296a2ec..9b442ba1dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php index 864b2a702e..17cccf9128 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php index 8c67559a58..80c88979da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php index 987baf0f87..65ba6b41d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php index 69c6acca53..d90218010f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php index 399a971997..0073fb0ec8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1Test.php index 1f31c04453..796a941abb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php index ea7bbd1596..21749287c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfoTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfoTest.php index 4e47fbde0c..9aca5a6a23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfoTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSupportingInfoTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotalTest.php index 8a9de6e79f..91073ee53d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitTotalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php index 039179f350..c038039a0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php index e24d7de418..2e73649d66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php index 18ebf6ac3e..e6ffb4877a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php index 53b449c193..bd710967e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php index 7d3d59ca40..8bb5b1dc91 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php index dde338cd31..14b176bc6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php index fca1341257..ec1c4530b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php index 28d079fc8c..00da419bc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibilityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibilityTest.php index 535e85d9db..b4657f5091 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceEligibilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php index 3de4aecd51..99ba3ffcf0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php index beb8f911c2..0813ac8819 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformerTest.php index d85892dbe7..019ea14e57 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php index b13fb345bd..a42d1951df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducationTest.php index a7b90e730a..78b6825d21 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationEducationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformerTest.php index e6c88ba1fc..b2994d611e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolAppliedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolAppliedTest.php index 3c5cf3bdbf..eb00f0cc1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolAppliedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationProtocolAppliedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php index 2c70fe0015..8e0e9fae76 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php index cc418a60d1..2713614844 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php index 6e3c13fdef..83a51e298b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinitionTest.php index ec3b7df26c..fa9110cc8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOnTest.php index d544a768af..1e96d4eb50 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php index 4da0f988b9..4c125f9b0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGroupingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGroupingTest.php index 388f79ce61..fe918e7ff4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGroupingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGroupingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifestTest.php index 1dd3687e33..84db1f5896 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1Test.php index 829ff4d485..70e312ece6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php index a9ca50e4d7..5b2557654e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameterTest.php index 3a09fb8d1d..190b7a7a7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1Test.php index 94fbe8a9d6..e0e0c14c40 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php index 5bfe219b9e..dc2f109bb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplateTest.php index 68848d9b3c..ec6c3f9a5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideTemplateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1Test.php index bd45c2cd71..532754b952 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefit1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefitTest.php index 9b676e7a87..bd96d23218 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContactTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContactTest.php index 7027b06644..d55fadda8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCostTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCostTest.php index c552d8dd8e..ecba85b697 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCostTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCostTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverageTest.php index 74ab7927cf..c26ea2a0d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCostTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCostTest.php index 90b975c547..2588b20918 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCostTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanGeneralCostTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimitTest.php index 39b046f3f5..0330a5285b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanLimitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlanTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlanTest.php index 5c0937675f..a215dbb568 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanPlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCostTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCostTest.php index 8be9818823..c9db95966a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCostTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInsurancePlan/FHIRInsurancePlanSpecificCostTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItemTest.php index a760ab07d4..bec1b325ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceLineItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipantTest.php index 1b64c6603d..c16766374b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoiceParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponentTest.php index b6d0b7b3a1..4b940f9d68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRInvoice/FHIRInvoicePriceComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php index 0b96cb9618..a7abfed417 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php index 1311679e99..5d8afa5b8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperationTest.php index 8cc479754d..199264b5da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationHoursOfOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php index fd25e8ca97..a9ae96e682 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMarketingStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMarketingStatusTest.php index 66728a590f..adcfce9200 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMarketingStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMarketingStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponentTest.php index cde78fdd97..e50ff4009c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php index 8f4c27898b..cbc7ebd7bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php index d6722a0342..21f89cd03a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php index e58d108943..e69c3d19e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php index c14bf2b1d4..84667c5808 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponentTest.php index 6ae86059ad..86ca474df1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php index 38976a1790..35b3c383e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php index b148d07438..ed3d784441 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php index ed1f60bf22..c4793b2df9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php index 57f1ae0e0c..4039183b7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php index 01ee9337f6..4d20410e3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php index 9677469213..f0092cd0da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php index 1001ed25cf..670e244c90 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php index ff32090cf0..d8fbce13db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php index 0465f688fa..8f7697dd3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php index 7b232a7441..91c707dca2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php index 2ba766eb3a..b62724a1a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelinesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelinesTest.php index 774d4b036d..603d77dddf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelinesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeAdministrationGuidelinesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCostTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCostTest.php index d529f0c27e..d8f029460a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCostTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeCostTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosageTest.php index 0a4389694b..a51afcc7de 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristicTest.php index 284a234061..43803ca973 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeDrugCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredientTest.php index 68530a4a0c..834bfa96c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKineticsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKineticsTest.php index 6ce6f14540..3bfc954554 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKineticsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeKineticsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispenseTest.php index 87f18fcc0d..be3fa7f537 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMaxDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassificationTest.php index c8305f7ce6..01a226e15d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMedicineClassificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgramTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgramTest.php index 2211a8b7a2..7ed40f9f65 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgramTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonitoringProgramTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonographTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonographTest.php index 71633453ca..c95403f208 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonographTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeMonographTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackagingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackagingTest.php index 871ae8f6bf..483ea4514c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePackagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristicsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristicsTest.php index ba0d172b7e..a3ee3fee31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristicsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgePatientCharacteristicsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatoryTest.php index 2154a973b1..a4bf9e6f8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRegulatoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledgeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledgeTest.php index 8c6a4c341c..dd5086cbdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeRelatedMedicationKnowledgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeScheduleTest.php index db0a873577..9ab826335a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitutionTest.php index d04df175dd..705ccacf19 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationKnowledge/FHIRMedicationKnowledgeSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php index 168bf0588f..c83e0bfdd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFillTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFillTest.php index bc11c54be8..95e24e3277 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFillTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestInitialFillTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php index 723e64c640..db378a60ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguageTest.php index 07b9db8788..4d4af1fac4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductCountryLanguageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperationTest.php index 3e31f20af3..c8951f434c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductManufacturingBusinessOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePartTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePartTest.php index 21bb2c74df..7aebecf9af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePartTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNamePartTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNameTest.php index 1c14fad789..69a67e961e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignationTest.php index 286d7bf895..103f242558 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProduct/FHIRMedicinalProductSpecialDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorizationTest.php index f1225c50bd..d5d5e6b131 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationJurisdictionalAuthorizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedureTest.php index d4ec111bae..51bf332e52 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductAuthorization/FHIRMedicinalProductAuthorizationProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapyTest.php index 4ade038578..bc664cff5b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductContraindication/FHIRMedicinalProductContraindicationOtherTherapyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapyTest.php index 6bf53f5aac..c660d8bd32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIndication/FHIRMedicinalProductIndicationOtherTherapyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrengthTest.php index 79d4bb66d9..c413632eae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientReferenceStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstanceTest.php index 7beb7d4972..58656552a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSpecifiedSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrengthTest.php index 3d584977fb..77e1b521f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstanceTest.php index 52d69f1ac9..955b0ff4f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductIngredient/FHIRMedicinalProductIngredientSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractantTest.php index a6d0c76cce..454c9ca5ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductInteraction/FHIRMedicinalProductInteractionInteractantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifierTest.php index fbf197d93a..1fc1e7085f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedBatchIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItemTest.php index dd6fa17a9b..93246f62b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPackaged/FHIRMedicinalProductPackagedPackageItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristicsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristicsTest.php index 6c852efdd3..881d61c115 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristicsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalCharacteristicsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministrationTest.php index 6a2bc224f6..cbe1a23369 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalRouteOfAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpeciesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpeciesTest.php index 12cf766ada..f7a2e180ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpeciesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalTargetSpeciesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriodTest.php index 96145692b3..641f73d3f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicinalProductPharmaceutical/FHIRMedicinalProductPharmaceuticalWithdrawalPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php index 6d25249e89..eb3075a6bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php index 2285117f5b..3d23c32973 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php index 7c8129cac1..3442985318 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php index 3a438cb786..144e667d32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php index a6faf34d2e..2b6a46a6dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInnerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInnerTest.php index 529a7d65e4..ce0f6ebe67 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInnerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceInnerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuterTest.php index 61b7c90657..f37ba92124 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceOuterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQualityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQualityTest.php index e4ad78b212..480e444fe9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQualityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceQualityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeqTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeqTest.php index 895b949280..4805e2a45e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeqTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceReferenceSeqTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepositoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepositoryTest.php index a53ee3ade8..f8a2c74037 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepositoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRepositoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRocTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRocTest.php index 359e02a2a2..b61d8739c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRocTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceRocTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariantTest.php index 323aba994a..e53aa1f545 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceStructureVariantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariantTest.php index cc66cdc684..9cfc9c14a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMolecularSequence/FHIRMolecularSequenceVariantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php index 236858c426..e8eeb9191e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php index 0261c2694f..048bbe3618 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php index ec94f57797..38fd26efde 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php index 82925976d0..cec2dfc9e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php index 2edf844554..e29eaf7d68 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php index ad288e58e5..9d834eb6a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php index a1fabf3dff..97dfeb5ed2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php index b0f4d118d4..6461713aed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php index 2fc6bdd7bb..099cde382f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedIntervalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedIntervalTest.php index 36d601ebc6..ec634f5150 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedIntervalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQualifiedIntervalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetailsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetailsTest.php index 32304a9173..c949d8fe10 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetailsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservationDefinition/FHIRObservationDefinitionQuantitativeDetailsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php index 8ffbe41151..44fb4888b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php index d871356c9a..05e03d31ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php index c0bca5180e..09c2ee9026 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFromTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFromTest.php index 183520dab3..e1d5a1f80e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFromTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionReferencedFromTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php index b47efdb1d6..6716d185c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php index 57d0e4f8d6..07e25a1d51 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php index 36bab7d553..642d85775a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php index 578fb11650..a0eb12d69e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php index 4e8bc3d0bc..453906b444 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php index 13cfc1b98f..83f8f36b3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php index 4b87d0b86c..c36fd54555 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php index 96ab527e65..1f90bfcc7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php index babc2547cb..7aa68e6de9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php index 1b83d248c0..1e1cfa65c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php index 0351493bd6..35b26bf9ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php index 993774e83e..6bc300b266 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php index f577e33eba..9be540a396 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php index 8fae26eee3..3696bf4d76 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php index 5fbb8085ae..8af87877d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php index 9116bcc7a0..9e01c8512f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPopulationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPopulationTest.php index 48d2416a3e..cf09812ab2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php index 1b4f748073..e8398d6ad3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php index a6e6f46701..e0b394293b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php index 4ff849e1ea..61ad51b1e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php index 43761a904e..f595ddb612 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php index c9ac5046e2..5d26212a18 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristicTest.php index da873a7d35..7bbc794385 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProdCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProductShelfLifeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProductShelfLifeTest.php index b5b3d8c319..04f9cc5dab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProductShelfLifeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProductShelfLifeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php index c52ed4e95c..e8a6787175 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php index cb500fc451..a8fceb1519 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOptionTest.php index e9886a3a81..0bb2318ce6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireAnswerOptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php index eb43171186..93954b4a86 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitialTest.php index be05001aac..412bf7e23e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireInitialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php index c476324afd..20407e0f99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php index 77f45e5f32..22e71d6b07 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php index 137cecc15f..ec9b5ef8b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunicationTest.php index c23bd5f5bb..3473b461ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRelatedPerson/FHIRRelatedPersonCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php index 2fca4711ea..a3cea60a7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php index 182750a921..09da03c76c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php index 1a28863906..8609a0f15f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristicTest.php index 3becddf1cd..ee8aa86669 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchElementDefinition/FHIRResearchElementDefinitionCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php index c18e62b18d..9048b83eaf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjectiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjectiveTest.php index 987b872c69..85088412ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjectiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyObjectiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php index 7102ccc41a..59dfdf0c92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponentTest.php index e1bad42a27..f8bebf313e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintySubcomponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintyTest.php index 56abb4dc9c..252617ee4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisCertaintyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimateTest.php index 8eacca168e..d9dfa26771 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisPrecisionEstimateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimateTest.php index 9803ec4fa1..eac9d190d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisRiskEstimateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSizeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSizeTest.php index 4efa2df033..de89a1f2e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSizeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskEvidenceSynthesis/FHIRRiskEvidenceSynthesisSampleSizeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php index 825dacefd1..6c318bbb9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php index 67d537770c..4988378892 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php index df7bbfd94d..30e2869097 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php index 80486bd3ad..52baa1ed95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditiveTest.php index ad6615b761..a49e39dde7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionAdditiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainerTest.php index 65579cd2c8..5fb067b918 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandlingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandlingTest.php index c7e2fb6f90..3d3c328749 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandlingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionHandlingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTestedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTestedTest.php index a51437169b..abc014c144 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTestedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimenDefinition/FHIRSpecimenDefinitionTypeTestedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContextTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContextTest.php index 175ffde7ca..70b9460e39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php index ac6556d186..557f2c75ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php index 38998e5c7e..46b714f7c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php index 9c86a23f26..115ead4df2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php index ee87c3ee2a..23d9a0342f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php index 061c663fea..47589386cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php index 6e6a165b52..014eedfaae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php index ef714b71e5..2c8f4bf155 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php index 46faad597a..72c2bbaca8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php index 86f5bceabf..38cfaf4889 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php index 66eb195b5f..eaa4a3f1f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php index d205e6a0a7..985758c2fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php index c818ec222f..1e25793e36 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php index 71dbe9c16d..660d6fade6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php index b03137fc05..fa635c5ef5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRangeTest.php index 1cabd9a0e2..5f4df60d7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmount/FHIRSubstanceAmountReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmountTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmountTest.php index 9b255e02db..591becb622 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceAmountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkageTest.php index 44db9f44e0..fde36331a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidLinkageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunitTest.php index 1b07a7e603..97bdfe59a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSubunitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugarTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugarTest.php index aa90504c95..575bfc2803 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugarTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceNucleicAcid/FHIRSubstanceNucleicAcidSugarTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisationTest.php index bddee23619..c099e4851c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerDegreeOfPolymerisationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSetTest.php index b04f4a8b36..93855e723b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerMonomerSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatTest.php index 9aa73e70c4..6815a319fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnitTest.php index e17872210f..3597a43189 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerRepeatUnitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterialTest.php index a0dd3027b8..04c8fe8b8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStartingMaterialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentationTest.php index 30ae5df9c0..baecf3d373 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstancePolymer/FHIRSubstancePolymerStructuralRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunitTest.php index 04dd1fd340..add2895193 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceProtein/FHIRSubstanceProteinSubunitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassificationTest.php index 46f07fbd54..b0a67931d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationClassificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElementTest.php index 4537c713db..a0ebcac08a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneTest.php index 919a2c1c58..987f521a98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationGeneTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTargetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTargetTest.php index cfdf927e6b..125f88ef7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceReferenceInformation/FHIRSubstanceReferenceInformationTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthorTest.php index 58941e05c6..fec08e6a00 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialAuthorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescriptionTest.php index 2537c85dcc..376464f4ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialFractionDescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybridTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybridTest.php index 12df32c6c9..571955b68b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybridTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialHybridTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneralTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneralTest.php index 88ef46b473..f0ffaed66a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneralTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismGeneralTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismTest.php index bdfdedf15d..547395d2c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialOrganismTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescriptionTest.php index 9005bebf2f..c8ccee4d0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSourceMaterial/FHIRSubstanceSourceMaterialPartDescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCodeTest.php index a918d3fd50..951a81c1e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotopeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotopeTest.php index afdda9830b..0439ac5743 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotopeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationIsotopeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoietyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoietyTest.php index a1ae4622a2..76bfac0978 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoietyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMoietyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeightTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeightTest.php index 8a99f7773b..93fe5024a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeightTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationMolecularWeightTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationNameTest.php index 75931e72a3..dcd10d52e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficialTest.php index 688b6df3c2..4b1b854d0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationOfficialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationPropertyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationPropertyTest.php index 76d428fae1..9eb08bef92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationPropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationPropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationshipTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationshipTest.php index c6ac82af0d..502c31d6ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationshipTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRelationshipTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentationTest.php index 4c89c74bab..775cfd6646 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructureTest.php index d4f4b21d09..aa91b12d95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstanceSpecification/FHIRSubstanceSpecificationStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php index 541a4bec2c..cc3e120cef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameterTest.php index 8e796c0571..f43dd4b500 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php index 6227932043..1b2b5e7f3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php index 34f0c12a56..f5b001e65f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php index a6a067afec..00c9854cdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosureTest.php index 94d7d77746..09eb28cdbd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesClosureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystemTest.php index 5b4d4bebde..f04aad83e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesCodeSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansionTest.php index 3173cbce6b..8844eb24e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilterTest.php index f24830e935..7d8df6266c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementationTest.php index ea313d382c..7fd19ee64a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameterTest.php index 39550bd9ed..e60543386c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftwareTest.php index 1c41a64245..b6677facf4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslationTest.php index 84dc594dc9..6db213628c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesTranslationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCodeTest.php index 7c0d15c2ba..df4923b426 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesValidateCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersionTest.php index af7168ee7d..460acea7de 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTerminologyCapabilities/FHIRTerminologyCapabilitiesVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php index 50e9f45db7..1dd13534e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php index 1ef97facaf..3a25bb5e02 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php index 6c6412a24e..65bcff6341 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php index 063546beb1..475d409507 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php index 751cba2d75..bd8a2e447b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php index f47984666b..0ec41aa485 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php index cdbc92899b..d6e3110e2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php index dbfadca4dd..f1ede497b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php index b713428d45..552c544d77 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php index f805728e73..58613c7990 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php index ebb140782a..993a68d6b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php index c6fac6824d..a00f594985 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php index 6f4e8ec484..9e895975d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php index a5f1400c79..84497c71ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php index 88e0b73e03..1e2165079e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php index b21c3e083d..29de54208d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php index 3137d760da..0191113dfd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php index f7e9628eb1..b8947f15a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php index 2395688911..bb82fc4f93 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php index d4a33d631f..f62672bef7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php index f5f0fc091b..39c5b4423b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php index 33ca2df056..d057b934c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php index da7e5ed6f8..08a9d40714 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php index 26bca9208a..81c04da2b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php index 94ef65e51a..58cb9ce813 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeatTest.php index 36c0dddc47..35aac263a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTiming/FHIRTimingRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTimingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTimingTest.php index 29fddc3289..b8d3cf5fc2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php index 7ce76ef207..fee2147ea1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php index d99002d494..082520175a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php index d8e3b75d1f..3d1fc60410 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php index ce423dc6bc..c8544b9919 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php index ad1689e35d..b5a7236198 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php index 802a1d7b2f..b0338b7815 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php index 015dc32c0c..86a35f8f92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php index bcb065e660..28f7a90961 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestationTest.php index d80bec49af..75d892efd8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultAttestationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySourceTest.php index 42ff7bac15..e58dff6d72 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultPrimarySourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidatorTest.php index eb9fb7b139..eaad7b6e4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVerificationResult/FHIRVerificationResultValidatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecificationTest.php index 44019b69a7..79b4777ddc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionLensSpecificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrismTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrismTest.php index 937a4c6412..c5eb5614f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrismTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionPrismTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php index 5baa5b36f1..d7fd8de565 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php index 2a0849dc9f..af4c2a6c5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php index 26f0b67620..5f677df34a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductCategoryTest.php index 7852b9ed04..fe11818d98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStatusTest.php index 9d67b073d6..fcfbbe3991 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStorageScaleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStorageScaleTest.php index f058822776..cf4a230890 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStorageScaleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBiologicallyDerivedProductStorageScaleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php index 22c7edf3dc..16df0b6297 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php index 83b025bb67..15e9f111f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCanonicalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCanonicalTest.php index cb7063b537..161600cee8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCanonicalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCanonicalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php index 05b1cfb98d..97371501f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityKindTest.php index 84ac8c3684..4d0cae1d37 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php index bf4ce946dd..a9e0e1e157 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php index a87b826690..bfc0afeb95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php index 722cf1b958..af4742504f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCatalogEntryRelationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCatalogEntryRelationTypeTest.php index 3b817b9075..81f2a25682 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCatalogEntryRelationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCatalogEntryRelationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php index 539ab6bba7..b55e356665 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClaimProcessingCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClaimProcessingCodesTest.php index 0ea085df54..bfadae5a13 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClaimProcessingCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClaimProcessingCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php index 2204924005..913c4e5bad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSearchSupportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSearchSupportTest.php index a8d4bc3883..3e0fc6a0f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSearchSupportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSearchSupportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php index f3d5eb6a23..fc69413094 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php index 5fcee644f7..097537f144 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeTest.php index b80a352a46..67cd3798ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php index abd9dc970c..6daa1c1f23 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodingTest.php index 4e432f3199..618f891f92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCodingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php index 5c61e32a4e..06065325c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php index e1fcb2bb5b..6bb020fa3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php index 990de9f645..c949564f03 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php index 5fc8302b2c..f5be8955ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php index d84d640111..3daa3869c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php index 20beecc1ff..4d3bdc98f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php index d23b1a58c1..9b7af94952 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php index 22c8577a15..bb36df5c8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentProvisionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentProvisionTypeTest.php index ccdaac6ea1..6699d21cf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentProvisionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentProvisionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php index ef08b68b0e..c357865c31 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php index f9190af271..c93453e447 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php index 9c3e5be6a6..99b7c8677b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php index 7a4eb4dbdf..dccb876934 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php index 850860aefa..10138c3707 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php index 584771deab..3fe16afb53 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourcePublicationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourcePublicationStatusCodesTest.php index 52bd947a49..804842f0ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourcePublicationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourcePublicationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php index 8ec9a37531..e8453bd6a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTest.php index 4a3bf9e380..5f953287f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php index b745d5d0ab..bf3ab36d7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php index 17ec2f1c8f..904888c376 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php index 31a6e9ccc7..74e6dacd6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSortTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSortTest.php index 8d7338a8f4..77a470557d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSortTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementSortTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php index 4a6c87cf77..54b56ccf4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTest.php index 70241f95a8..1799b44d84 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php index a2397f686b..1f34b2614b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php index 408ba9a769..e5c3e4bd1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php index f945bb233c..3252540efc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php index c193b005eb..d2451fdb2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php index c98053dff8..f0b2a054b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php index 49b7431990..f72c659a66 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php index 05914d5fcf..955fdd3cc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php index 9dd6f4cc81..59db4863fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php index 3b873fab13..b1099e401a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceNameTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceNameTypeTest.php index 7935be76ff..f3263cc9c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceNameTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceNameTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php index d0054878cb..cd0afb4cb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php index fa57b410fc..301758c310 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php index d6edcc9465..030e0fb3ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php index d8f891b129..71ed46b31c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php index 2dc24ba97f..16314598c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php index 0c4e34f951..d9914ed672 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityRequestPurposeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityRequestPurposeTest.php index 11c4941d03..0a8203248c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityRequestPurposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityRequestPurposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityResponsePurposeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityResponsePurposeTest.php index 0945082f56..610ffd4d6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityResponsePurposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREligibilityResponsePurposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREnableWhenBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREnableWhenBehaviorTest.php index 8a5011f65a..5e3e217ed0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREnableWhenBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREnableWhenBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php index 303db4d39b..43676e1a60 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php index e085853ea5..4e542619d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php index b7cab1708c..ba7d614814 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php index 5db431228a..090c3762b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php index 4bb41cfdfa..395fa2cdca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php index d01bc03489..b2cba41dcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php index df203413e3..12c7e9b362 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREvidenceVariableTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREvidenceVariableTypeTest.php index 34102ee5bb..5351371693 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREvidenceVariableTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIREvidenceVariableTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExampleScenarioActorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExampleScenarioActorTypeTest.php index 4fec42249a..2a860ad0e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExampleScenarioActorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExampleScenarioActorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php index d9ebd16044..a46b418fa8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExposureStateTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExposureStateTest.php index c9fb9298c2..0f4bc81b88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExposureStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExposureStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionLanguageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionLanguageTest.php index 8156b3a0b8..3ac06c04e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionLanguageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionLanguageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionTest.php index 34d6c29cf3..c1eda749f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExpressionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionContextTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionContextTypeTest.php index e1914fde53..715518ba6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionContextTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionContextTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php index 25b7dd26f0..1e0d692d15 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php index 95f7025652..34eef7ed6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php index 407d2fd905..f299c5fcc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRVersionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRVersionTest.php index 9edabf1d06..8223bebbf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFHIRVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php index 46e0048a0d..f06939a3fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php index e9ea642cf3..944594df32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php index c4f1c61f21..3e17ef04f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php index e81adb5a3e..78c9be63dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGoalLifecycleStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGoalLifecycleStatusTest.php index 55aab7b543..0066450c8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGoalLifecycleStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGoalLifecycleStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php index dd8c5c42c9..2504bc29c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentUseTest.php index db1e0dda5e..1b1b2499ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupMeasureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupMeasureTest.php index e11df54cd4..0dbcce80dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupMeasureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupMeasureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php index 15f3e931c0..9f0635a0c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php index 6bf34f9e0e..7404049aae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidePageGenerationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidePageGenerationTest.php index 194cdf64a9..aed4b46ea1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidePageGenerationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuidePageGenerationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuideParameterCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuideParameterCodeTest.php index 55fee62ceb..38e803c039 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuideParameterCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRGuideParameterCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php index 84c0fcd283..a7bac929ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php index 320ddc5e84..6e2cc1cf85 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdTest.php index 4e9c5e3fbb..a2c5398b83 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php index 515a6715aa..94c91d71e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php index 569f58bc97..bce420eb32 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php index d3304f63e3..693f03ef1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImagingStudyStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImagingStudyStatusTest.php index e8b4171202..d472367cf6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImagingStudyStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImagingStudyStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationEvaluationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationEvaluationStatusCodesTest.php index 8c5bc3bd19..1843a7934c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationEvaluationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationEvaluationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php index d7842b10ec..73d727be25 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInstantTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInstantTest.php index a2e9fea865..c8110f6bc2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInstantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInstantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php index 30c1846d0a..5783e7a506 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoicePriceComponentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoicePriceComponentTypeTest.php index cec15a5ec8..2bbbb17e43 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoicePriceComponentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoicePriceComponentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoiceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoiceStatusTest.php index 6399067515..1001364d2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoiceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRInvoiceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php index 92724ef800..0dd8b5c302 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php index bbdfd62239..9a138b6488 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php index ef1b028a9a..79b840b194 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php index 472508a8a3..c289ba5d41 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListModeTest.php index 913fc65f12..9691b6aa64 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php index cba183ab5d..6041e223b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php index ab11972ed8..0cb2a3f2ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php index 327647509f..3be957598a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php index 92711b51da..b49d2c2a73 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php index 450bb7297c..aaea259264 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php index 81f791c618..5402015701 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php index aa0741e5d0..54478aff40 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationStatusCodesTest.php index 261b4c8522..a9e691dd52 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationrequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationrequestStatusTest.php index e090128056..0fce24dcce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationrequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMedicationrequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php index e9e8f6aab1..ae62bbaa0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageheaderResponseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageheaderResponseRequestTest.php index 4de00db29a..aaaaf81861 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageheaderResponseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMessageheaderResponseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMetaTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMetaTest.php index 52a6e92607..ced741370a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMetaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMetaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMoneyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMoneyTest.php index 3340bfd09a..0d4d8fd538 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMoneyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRMoneyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php index bde151d714..d14b828ef9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php index 3c9e9f323f..14f1e0ae71 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php index b6e9f24270..c3d9eb87ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php index 4a592aec93..ae4c12e43c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php index b3b4cfcdc1..937d8c3a0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php index 4025d2e2e9..402393087e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationDataTypeTest.php index af69c0a120..29614f3796 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationRangeCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationRangeCategoryTest.php index 5d07cb759d..d4255d7f8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationRangeCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationRangeCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php index 6053fa8c1c..c6f1b8446b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROidTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROidTest.php index d741852332..4c08c40f25 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php index 72c84e0727..5f808a1fa8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php index 57cd1475ef..d71495c277 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROrientationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROrientationTypeTest.php index 6c66e59177..880fc8e594 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROrientationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIROrientationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php index c7b1671aba..3d9af5d350 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php index de893ca46f..7cd7afbf71 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php index 006efce5ae..3a36179bea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php index 25e09ccf71..5c23e51104 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php index c7a984ff8c..c1a6385815 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php index a17b9ae96f..1229267999 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php index d07452f8de..13ea9c323d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php index 2a36590cd5..459b51f5f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php index 68757363c5..7aa168d80d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php index ba60399306..c18c1179b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php index 553e8e5d80..bf1d9ca536 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php index 4479313b6b..ed0d1655c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php index fa95cce0b6..c07b6f2013 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php index 5c8dc9b9ad..eb49a7b9c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php index 014baec760..9a900fc6cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php index 1ea5106a01..73c7485ec5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemOperatorTest.php index bf6b5e93c3..819de0c979 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php index d9fcc51102..3307838c2f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php index 3c1c3b06ac..77d75d7774 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRangeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRangeTest.php index f951a2347f..07caccec93 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRatioTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRatioTest.php index 3076d58799..5c29f3fcd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRatioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRatioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php index 10cb2113b4..231893b689 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php index 7c3f3aa794..3bfd411e20 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php index 1d182fc176..7ae094b451 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php index c4cd075d6c..0b5e312670 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php index 721541cfaa..1c74369197 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php index f0d147f09f..51d2bbe050 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php index 57eee49a52..d68094ca37 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php index 63f669127f..7037888e75 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php index cbfb49e479..23bb092e98 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestResourceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestResourceTypeTest.php index 23cea94fc7..9254a5811a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestResourceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestResourceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php index 6c3449fc12..0b7bf911e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchElementTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchElementTypeTest.php index f72a617e7f..5317ba1ce2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchElementTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchElementTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php index 2a6c346cf8..4394ec40d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php index 35bd0cdd9e..1a9026189a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php index 11b45e697b..ebf15014a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php index d675b818ec..23de1413b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php index 58977316e5..7c5ad9f8cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php index f168036e4b..39e7420b35 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSPDXLicenseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSPDXLicenseTest.php index cd715a3a44..855780f3d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSPDXLicenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSPDXLicenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php index f031714d03..d468139472 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php index 67b8a0a698..c7f9688bec 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php index 08f144269c..a740fd991d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php index 2b3c891059..64321c292f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php index 9ae62a7edb..612ea9948b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php index d5d86f3da0..70538e8388 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSequenceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSequenceTypeTest.php index db16813877..a9351a9450 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSequenceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSequenceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php index 45d83aa996..d8183f6ec5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php index 5121f5a524..37558f8b8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php index 446de8d9f8..a5cf53baa3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSortDirectionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSortDirectionTest.php index f08fcfa247..9179b398ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSortDirectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSortDirectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenContainedPreferenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenContainedPreferenceTest.php index cc8715d025..9eb0edef9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenContainedPreferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenContainedPreferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php index 90b33fd485..a7dbc72235 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStatusTest.php index bef6dda627..ffb01130b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStrandTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStrandTypeTest.php index f28e2c44bd..bdb0207487 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStrandTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStrandTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStringTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStringTest.php index 5490b03fe0..dc9949a7ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStringTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStringTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php index 6bec37f9c4..f1bb0763f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php index c585ab3e70..9ce8919176 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php index 28895e1bc2..236d3207b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php index be903336ff..12d0d4c060 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php index 36e6501e0e..ce8e9a63d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php index f5ed69c9e5..09f6fce537 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php index 214623c11e..6283e6b12c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php index 0c098bc4ee..530b20543d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php index d32bfb94c8..9b67185c8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php index 30263053cf..f8c1c9ae15 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php index 970c146d49..9ab9597197 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php index 4e0384af58..3dbb7378f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php index fcde610701..2bb5187594 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskIntentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskIntentTest.php index 0c2d178dbf..b5ed2f2dd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php index b19be20fe6..b8139a4ad1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php index 06a4979f5d..15cd8f053f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php index e8d0b70897..72dbbc4bc3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php index d43a05fda8..27ec880a64 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php index 27c6633c90..03c2194bf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php index 787889a012..fc2b334eea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTimeTest.php index 4dc0697f78..22a3b694ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php index 4b54e20361..8dfafec979 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php index 1b941db640..6f1b60a256 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php index 60947753c6..3a3864b14b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php index aa01d6202f..467ab244a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php index 4368b979fe..6b3bd2f7e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php index ce2143e231..b556432e99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php index 49afaf465a..d9fff018da 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUriTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUriTest.php index ec21621aaf..f4e7c1ac67 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUriTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUriTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUrlTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUrlTest.php index 9a9d8d5dae..f8fdf208f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUrlTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUrlTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php index 4f275ad474..9aab7374a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUseTest.php index c9dd89867c..8cba8b981e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUuidTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUuidTest.php index a0ce95ec15..e6d3efeeda 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUuidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRUuidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVConfidentialityClassificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVConfidentialityClassificationTest.php index 59c17da332..772967c22b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVConfidentialityClassificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVConfidentialityClassificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVariableTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVariableTypeTest.php index d843ac0939..21cae0986a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVariableTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVariableTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php index 9ca394acc5..edbdb50a63 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php index 4277c89b75..3fb47e4752 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php index 032036161c..6933554f87 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElementTest.php index 561c726f8e..c6abf9a739 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIdPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIdPrimitiveTest.php index b48125fd8d..ae4d545225 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIdPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIdPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRInstantPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRInstantPrimitiveTest.php index c1efef38fd..4d2991a4df 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRInstantPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRInstantPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIntegerPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIntegerPrimitiveTest.php index c4952920f3..b474dbede2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIntegerPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRIntegerPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php index 4f197e316d..386b83c1ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIROidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIROidPrimitiveTest.php index 5b12be8a14..d282bd62ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIROidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIROidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php index 73808137bf..5b93310536 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php index 0536f22462..7da60abcd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBundleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBundleTest.php index f56e76e518..09143e51fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBundleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRBundleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php index b7516712b3..2eb3c789b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Account/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Account/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAccount($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Account" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAccount\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php index 09b0b0589e..8ef82a5d4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ActivityDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ActivityDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRActivityDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ActivityDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRActivityDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php index 5b4157d758..fe142e6c88 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/AdverseEvent/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/AdverseEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAdverseEvent($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AdverseEvent" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAdverseEvent\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php index babf5b6424..b91af3cb04 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/AllergyIntolerance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/AllergyIntolerance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAllergyIntolerance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AllergyIntolerance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAllergyIntolerance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php index 0c85fe7c47..0193b0e717 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/AppointmentResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/AppointmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAppointmentResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AppointmentResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAppointmentResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php index 3529efdb00..fcfbb79c17 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Appointment/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Appointment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAppointment($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Appointment" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAppointment\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php index c16b66dc32..ef6c4a5601 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/AuditEvent/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/AuditEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAuditEvent($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AuditEvent" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAuditEvent\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php index e9a3995ce2..55284a472b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Basic/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Basic/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRBasic($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Basic" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRBasic\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProductTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProductTest.php index feafb0bcb5..28b72eea3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProductTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBiologicallyDerivedProductTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/BiologicallyDerivedProduct/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/BiologicallyDerivedProduct/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRBiologicallyDerivedProduct($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "BiologicallyDerivedProduct" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRBiologicallyDerivedProduct\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodyStructureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodyStructureTest.php index 764deeb23e..40fdf7a455 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodyStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodyStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/BodyStructure/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/BodyStructure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRBodyStructure($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "BodyStructure" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRBodyStructure\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php index 63a6dc342d..a950abe1ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/CapabilityStatement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/CapabilityStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCapabilityStatement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CapabilityStatement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCapabilityStatement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php index 50496b5cc7..5ac2ac2be1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/CarePlan/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/CarePlan/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCarePlan($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CarePlan" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCarePlan\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php index 01c3009b65..5326828fda 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/CareTeam/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/CareTeam/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCareTeam($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CareTeam" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCareTeam\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCatalogEntryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCatalogEntryTest.php index b4900fb2f3..cdcce6b4e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCatalogEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCatalogEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/CatalogEntry/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/CatalogEntry/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCatalogEntry($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CatalogEntry" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCatalogEntry\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinitionTest.php index f6832d9d4c..38fe69c437 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ChargeItemDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ChargeItemDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRChargeItemDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ChargeItemDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRChargeItemDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php index 4d92311843..3b3c04026c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ChargeItem/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ChargeItem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRChargeItem($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ChargeItem" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRChargeItem\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php index 9f3f0fa7cd..249be0687f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ClaimResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ClaimResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRClaimResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ClaimResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRClaimResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php index 6ced3c2f43..8c3e9a82e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Claim/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Claim/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRClaim($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Claim" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRClaim\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php index 537c9d7cbc..6acbd66892 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ClinicalImpression/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ClinicalImpression/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRClinicalImpression($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ClinicalImpression" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRClinicalImpression\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php index b110479b6a..bb4fd7739e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/CodeSystem/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/CodeSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCodeSystem($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CodeSystem" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCodeSystem\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php index 5daf3becf2..844454bbfa 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/CommunicationRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/CommunicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCommunicationRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CommunicationRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCommunicationRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php index 3a0783bc80..94a3fb2d8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Communication/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Communication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCommunication($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Communication" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCommunication\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php index a519d65e9c..63cca349e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/CompartmentDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/CompartmentDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCompartmentDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CompartmentDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCompartmentDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php index a3c13c56e7..1a4674fd99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Composition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Composition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRComposition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Composition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRComposition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php index 11a4d4a409..5f71efb7eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ConceptMap/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ConceptMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRConceptMap($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ConceptMap" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRConceptMap\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php index d72192ecba..4825487164 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Condition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Condition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCondition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Condition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCondition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php index 920eb5b5a2..964ccca842 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Consent/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Consent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRConsent($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Consent" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRConsent\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php index 46e873f725..9176e5b28d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Contract/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Contract/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRContract($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Contract" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRContract\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequestTest.php index dd4e99a354..9f6405d30b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/CoverageEligibilityRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/CoverageEligibilityRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCoverageEligibilityRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CoverageEligibilityRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCoverageEligibilityRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponseTest.php index ce6b08778f..4666ccc1b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageEligibilityResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/CoverageEligibilityResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/CoverageEligibilityResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCoverageEligibilityResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CoverageEligibilityResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCoverageEligibilityResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php index 616ce1a72c..e409cd7e64 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Coverage/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Coverage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCoverage($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Coverage" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCoverage\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php index f9f56a71f0..977f8aae4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/DetectedIssue/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/DetectedIssue/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDetectedIssue($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DetectedIssue" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDetectedIssue\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceDefinitionTest.php index 31972913c4..e38cd7ffd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/DeviceDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/DeviceDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php index a83bdf562b..4b4afe14d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/DeviceMetric/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/DeviceMetric/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceMetric($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceMetric" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceMetric\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php index b26f2fa2fe..4fe680e657 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/DeviceRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/DeviceRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php index d3be5c06c5..825848cf99 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Device/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Device/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDevice($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Device" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDevice\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php index 1da46cd19d..0323c5a940 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/DeviceUseStatement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/DeviceUseStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceUseStatement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceUseStatement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceUseStatement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php index 15878460cc..43bc00ddb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/DiagnosticReport/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/DiagnosticReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDiagnosticReport($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DiagnosticReport" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDiagnosticReport\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php index dce217ba40..13b923ca95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/DocumentManifest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/DocumentManifest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDocumentManifest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DocumentManifest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDocumentManifest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php index aa9d130ef5..c34472caff 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/DocumentReference/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/DocumentReference/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDocumentReference($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DocumentReference" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDocumentReference\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesisTest.php index e17ee2cf75..db99323aa6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREffectEvidenceSynthesisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/EffectEvidenceSynthesis/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/EffectEvidenceSynthesis/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREffectEvidenceSynthesis($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EffectEvidenceSynthesis" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREffectEvidenceSynthesis\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php index 3ee7da102c..76e13fb280 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Encounter/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Encounter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREncounter($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Encounter" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREncounter\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php index a60b7af0ef..69917b32f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Endpoint/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Endpoint/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREndpoint($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Endpoint" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREndpoint\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php index d724b0b36c..52bf801dbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/EnrollmentRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/EnrollmentRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREnrollmentRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EnrollmentRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREnrollmentRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php index a766ef8cc5..4e925ab764 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/EnrollmentResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/EnrollmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREnrollmentResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EnrollmentResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREnrollmentResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php index f0292fcf63..0e611f2e4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/EpisodeOfCare/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/EpisodeOfCare/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREpisodeOfCare($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EpisodeOfCare" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREpisodeOfCare\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREventDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREventDefinitionTest.php index c30ab346ca..d951a57608 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREventDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREventDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/EventDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/EventDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREventDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EventDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREventDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceTest.php index fe144f8d92..fd3f9f30db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Evidence/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Evidence/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREvidence($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Evidence" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREvidence\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceVariableTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceVariableTest.php index 6f894b3de1..2c002ce7c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceVariableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREvidenceVariableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/EvidenceVariable/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/EvidenceVariable/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREvidenceVariable($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EvidenceVariable" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREvidenceVariable\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExampleScenarioTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExampleScenarioTest.php index 60b86f0313..367cd6900b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExampleScenarioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExampleScenarioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ExampleScenario/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ExampleScenario/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRExampleScenario($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ExampleScenario" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRExampleScenario\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php index d93620fb7b..bf7d31c93d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ExplanationOfBenefit/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ExplanationOfBenefit/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRExplanationOfBenefit($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ExplanationOfBenefit" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRExplanationOfBenefit\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php index 7074da4a86..fd08a44f09 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/FamilyMemberHistory/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/FamilyMemberHistory/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRFamilyMemberHistory($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "FamilyMemberHistory" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRFamilyMemberHistory\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php index f496d8a335..af4ffc1abc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Flag/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Flag/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRFlag($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Flag" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRFlag\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php index 10c65fc94e..98f5f9eabc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Goal/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Goal/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGoal($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Goal" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGoal\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php index 8e5a6f67c6..201a3d0859 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/GraphDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/GraphDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGraphDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "GraphDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGraphDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php index f54cb72165..90a6d15dc2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Group/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Group/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGroup($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Group" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGroup\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php index 778f710eb8..3b650d3cdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/GuidanceResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/GuidanceResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGuidanceResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "GuidanceResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGuidanceResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php index 474460ac0c..9889700bf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/HealthcareService/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/HealthcareService/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRHealthcareService($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "HealthcareService" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRHealthcareService\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php index 80e8c05ed1..6f20d6a9bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ImagingStudy/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ImagingStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImagingStudy($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImagingStudy" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImagingStudy\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluationTest.php index 2eedd8031e..10e68d0123 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationEvaluationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ImmunizationEvaluation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ImmunizationEvaluation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImmunizationEvaluation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImmunizationEvaluation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImmunizationEvaluation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php index 11fa0ef391..13a05d41eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ImmunizationRecommendation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ImmunizationRecommendation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImmunizationRecommendation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImmunizationRecommendation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImmunizationRecommendation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php index 9cee6b4454..db9b4357e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Immunization/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Immunization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImmunization($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Immunization" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImmunization\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php index b4c7da2b0a..78ae84bf7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ImplementationGuide/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ImplementationGuide/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImplementationGuide($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImplementationGuide" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImplementationGuide\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInsurancePlanTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInsurancePlanTest.php index 3d2ce308f6..047c2a576c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInsurancePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInsurancePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/InsurancePlan/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/InsurancePlan/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRInsurancePlan($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "InsurancePlan" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRInsurancePlan\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInvoiceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInvoiceTest.php index 0a1bb5d175..6a63d9c08b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInvoiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRInvoiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Invoice/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Invoice/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRInvoice($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Invoice" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRInvoice\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php index 5811509cb8..a240eb0f80 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Library/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Library/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRLibrary($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Library" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRLibrary\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php index 8258d928bb..85a17222c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Linkage/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Linkage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRLinkage($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Linkage" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRLinkage\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php index af526148a7..32a26a8f27 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/List/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/List/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRList($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "List" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRList\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php index a5dcfda1cc..e0768800c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Location/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Location/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRLocation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Location" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRLocation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php index 0c27fad419..42d4329d8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MeasureReport/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MeasureReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMeasureReport($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MeasureReport" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMeasureReport\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php index b0307d2447..3732093062 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Measure/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Measure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMeasure($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Measure" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMeasure\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php index a0c55176fe..f040f2fc11 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Media/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Media/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedia($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Media" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedia\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php index 3d1507eb2c..365a92e74e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicationAdministration/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicationAdministration/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationAdministration($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationAdministration" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationAdministration\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php index 34107af558..5d7853e2ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicationDispense/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicationDispense/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationDispense($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationDispense" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationDispense\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledgeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledgeTest.php index 92285f3d2a..e01b765de9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationKnowledgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicationKnowledge/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicationKnowledge/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationKnowledge($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationKnowledge" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationKnowledge\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php index 7b9dad6d32..e00eab1811 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicationRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php index 74491448a9..db7ab52fa6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicationStatement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicationStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationStatement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationStatement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationStatement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php index 81a1a38d6c..660021b52c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Medication/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Medication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedication($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Medication" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedication\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorizationTest.php index 16d65598f4..9035008fb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductAuthorizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductAuthorization/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductAuthorization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProductAuthorization($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProductAuthorization" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProductAuthorization\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindicationTest.php index 3d52635860..44f72799dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductContraindicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductContraindication/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductContraindication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProductContraindication($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProductContraindication" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProductContraindication\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndicationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndicationTest.php index e37d74dc72..03f37fddd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIndicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductIndication/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductIndication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProductIndication($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProductIndication" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProductIndication\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredientTest.php index aa03d592fd..b8fe61a38f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductIngredient/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductIngredient/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProductIngredient($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProductIngredient" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProductIngredient\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteractionTest.php index 1620bee8eb..24481a26db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductInteraction/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductInteraction/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProductInteraction($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProductInteraction" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProductInteraction\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufacturedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufacturedTest.php index f5e3d15ae6..323b0fdb07 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufacturedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductManufacturedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductManufactured/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductManufactured/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProductManufactured($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProductManufactured" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProductManufactured\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackagedTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackagedTest.php index e3d38dfa5e..8be070c6c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackagedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPackagedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductPackaged/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductPackaged/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProductPackaged($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProductPackaged" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProductPackaged\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceuticalTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceuticalTest.php index f3a74d7664..2dbd9ead92 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceuticalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductPharmaceuticalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductPharmaceutical/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductPharmaceutical/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProductPharmaceutical($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProductPharmaceutical" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProductPharmaceutical\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductTest.php index 0492bd2e31..3656b0bff2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProduct/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProduct/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProduct($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProduct" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProduct\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffectTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffectTest.php index 8f2da187dd..87362d4d51 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicinalProductUndesirableEffectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductUndesirableEffect/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MedicinalProductUndesirableEffect/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicinalProductUndesirableEffect($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicinalProductUndesirableEffect" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicinalProductUndesirableEffect\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php index 0c6e48be69..67ed8f9130 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MessageDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MessageDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMessageDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MessageDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMessageDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php index 3fb3db2df1..8186c6f15e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MessageHeader/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MessageHeader/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMessageHeader($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MessageHeader" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMessageHeader\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMolecularSequenceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMolecularSequenceTest.php index eeff278c8e..4daabb75d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMolecularSequenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMolecularSequenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/MolecularSequence/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/MolecularSequence/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMolecularSequence($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MolecularSequence" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMolecularSequence\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php index 46978139e2..a93df3f6fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/NamingSystem/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/NamingSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRNamingSystem($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "NamingSystem" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRNamingSystem\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php index d70604904d..701a1ae305 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/NutritionOrder/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/NutritionOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRNutritionOrder($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "NutritionOrder" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRNutritionOrder\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationDefinitionTest.php index bae3484760..ca76c0486e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ObservationDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ObservationDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRObservationDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ObservationDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRObservationDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php index 968c3a29d9..71d9c2f2a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Observation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Observation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRObservation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Observation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRObservation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php index 2540ea82e4..0c747434ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/OperationDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/OperationDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROperationDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "OperationDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROperationDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php index c1e9a40b68..2778a79c95 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/OperationOutcome/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/OperationOutcome/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROperationOutcome($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "OperationOutcome" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROperationOutcome\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliationTest.php index 9833430436..adad4c74fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationAffiliationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/OrganizationAffiliation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/OrganizationAffiliation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROrganizationAffiliation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "OrganizationAffiliation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROrganizationAffiliation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php index 7b8f596c31..5ceed9b699 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Organization/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Organization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROrganization($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Organization" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROrganization\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php index b4a2c07c96..ec73dc650f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Patient/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Patient/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPatient($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Patient" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPatient\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php index e85f8eeb7f..a837bb61fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/PaymentNotice/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/PaymentNotice/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPaymentNotice($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PaymentNotice" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPaymentNotice\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php index 3dcb3e45f7..adfbcf121f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/PaymentReconciliation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/PaymentReconciliation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPaymentReconciliation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PaymentReconciliation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPaymentReconciliation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php index c26cff23a4..d158a57231 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Person/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Person/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPerson($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Person" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPerson\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php index 40d41b7a44..6c9192d97f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/PlanDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/PlanDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPlanDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PlanDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPlanDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php index e61af478c9..afd848e3ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/PractitionerRole/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/PractitionerRole/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPractitionerRole($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PractitionerRole" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPractitionerRole\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php index bfb942f04a..4d29fd13b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Practitioner/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Practitioner/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPractitioner($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Practitioner" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPractitioner\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php index a21cd3ac48..af31bc045d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Procedure/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Procedure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProcedure($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Procedure" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProcedure\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php index 9c04eefcf5..19870369c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Provenance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Provenance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProvenance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Provenance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProvenance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php index 521123f782..65340ae8ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/QuestionnaireResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/QuestionnaireResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRQuestionnaireResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "QuestionnaireResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRQuestionnaireResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php index c5607572fb..53bbf4f4ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Questionnaire/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Questionnaire/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRQuestionnaire($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Questionnaire" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRQuestionnaire\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php index 2f1c005c5b..e2e686c3db 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/RelatedPerson/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/RelatedPerson/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRRelatedPerson($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "RelatedPerson" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRRelatedPerson\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php index 8fdb6dfef4..b1c9eab9a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/RequestGroup/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/RequestGroup/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRRequestGroup($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "RequestGroup" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRRequestGroup\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchDefinitionTest.php index 9c37c1ca43..2dd3eb1e6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ResearchDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ResearchDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRResearchDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ResearchDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRResearchDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinitionTest.php index 1491c82050..bdd45d90ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchElementDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ResearchElementDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ResearchElementDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRResearchElementDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ResearchElementDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRResearchElementDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php index 9f788772a0..9d73201723 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ResearchStudy/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ResearchStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRResearchStudy($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ResearchStudy" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRResearchStudy\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php index ce0dc8d45b..1058f812a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ResearchSubject/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ResearchSubject/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRResearchSubject($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ResearchSubject" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRResearchSubject\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php index 4e03e7fc2a..491a4bb6cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/RiskAssessment/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/RiskAssessment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRRiskAssessment($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "RiskAssessment" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRRiskAssessment\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesisTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesisTest.php index c8d514c74c..1936570646 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskEvidenceSynthesisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/RiskEvidenceSynthesis/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/RiskEvidenceSynthesis/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRRiskEvidenceSynthesis($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "RiskEvidenceSynthesis" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRRiskEvidenceSynthesis\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php index f4fc6d7556..5784c97e09 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Schedule/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Schedule/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSchedule($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Schedule" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSchedule\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php index 43be118fe1..6dcb94a8c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SearchParameter/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SearchParameter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSearchParameter($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SearchParameter" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSearchParameter\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceRequestTest.php index 29277c4866..0423f4594e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ServiceRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ServiceRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRServiceRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ServiceRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRServiceRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php index 80a8c86bdd..77d53d5830 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Slot/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Slot/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSlot($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Slot" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSlot\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinitionTest.php index 7d7d6f2b0f..3de023c45c 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SpecimenDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SpecimenDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSpecimenDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SpecimenDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSpecimenDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php index eca665939d..1117cf06e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Specimen/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Specimen/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSpecimen($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Specimen" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSpecimen\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php index dc8852a836..5a823d2fb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/StructureDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/StructureDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRStructureDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "StructureDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRStructureDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php index 9807aa1d75..f9f4e18e39 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/StructureMap/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/StructureMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRStructureMap($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "StructureMap" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRStructureMap\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php index ab4f8c66cd..4244a7ab36 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Subscription/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Subscription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubscription($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Subscription" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubscription\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcidTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcidTest.php index dbd3de96dc..0a5b0cb19b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceNucleicAcidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceNucleicAcid/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceNucleicAcid/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubstanceNucleicAcid($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SubstanceNucleicAcid" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubstanceNucleicAcid\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstancePolymerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstancePolymerTest.php index 099b8f90b5..7f688cbded 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstancePolymerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstancePolymerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SubstancePolymer/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SubstancePolymer/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubstancePolymer($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SubstancePolymer" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubstancePolymer\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceProteinTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceProteinTest.php index d9683850cc..6bf5d07f24 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceProteinTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceProteinTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceProtein/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceProtein/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubstanceProtein($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SubstanceProtein" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubstanceProtein\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformationTest.php index 540e15a4f5..489db6fe6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceReferenceInformationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceReferenceInformation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceReferenceInformation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubstanceReferenceInformation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SubstanceReferenceInformation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubstanceReferenceInformation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterialTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterialTest.php index 6c74e03ee6..a482347c47 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSourceMaterialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceSourceMaterial/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceSourceMaterial/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubstanceSourceMaterial($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SubstanceSourceMaterial" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubstanceSourceMaterial\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecificationTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecificationTest.php index 8a295506f5..344b2f8214 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceSpecificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceSpecification/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SubstanceSpecification/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubstanceSpecification($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SubstanceSpecification" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubstanceSpecification\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php index 9968f78df9..52f7e9e93b 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Substance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Substance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubstance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Substance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubstance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php index 6eca3f8b81..7d704164b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SupplyDelivery/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SupplyDelivery/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSupplyDelivery($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SupplyDelivery" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSupplyDelivery\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php index c1b0ac32b4..390fee642f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/SupplyRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/SupplyRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSupplyRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SupplyRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSupplyRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php index c66d4d822c..38b1cefa0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/Task/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/Task/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRTask($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Task" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRTask\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilitiesTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilitiesTest.php index ddfb5e27b3..df07fced08 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilitiesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTerminologyCapabilitiesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/TerminologyCapabilities/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/TerminologyCapabilities/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRTerminologyCapabilities($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "TerminologyCapabilities" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRTerminologyCapabilities\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php index 2dbfd51a8b..c4c48dd00e 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/TestReport/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/TestReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRTestReport($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "TestReport" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRTestReport\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php index e24130d603..5cad41e126 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/TestScript/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/TestScript/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRTestScript($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "TestScript" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRTestScript\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php index c95986a2d6..79ab5d8b69 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/ValueSet/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/ValueSet/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRValueSet($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ValueSet" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRValueSet\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVerificationResultTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVerificationResultTest.php index 3ac9c902e8..affb0659cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVerificationResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVerificationResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/VerificationResult/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/VerificationResult/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRVerificationResult($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "VerificationResult" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRVerificationResult\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php index 45015bcd4d..4b3954aa13 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseR4/VisionPrescription/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseR4/VisionPrescription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRVisionPrescription($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "VisionPrescription" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRVisionPrescription\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php index b1849dcf94..c58ce0375d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRParametersTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRParametersTest.php index a17bca2fa5..308248c4be 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRParametersTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResource/FHIRParametersTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceContainerTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceContainerTest.php index c7761179ea..be30b6eca7 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceTest.php index d91b03795d..b430b2eeb9 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php index aed7f9b46c..0c281dcd29 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRStringPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRStringPrimitiveTest.php index 3f446a4557..6837b75d50 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRStringPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRStringPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRTimePrimitiveTest.php index 0589860a38..45751d6128 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php index 2b4d039b41..a033d4073f 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUriPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUriPrimitiveTest.php index 6539f55f96..e15f9950af 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUriPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUriPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUrlPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUrlPrimitiveTest.php index d4dcb042d3..1b4b5fc192 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUrlPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUrlPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUuidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUuidPrimitiveTest.php index a49acabc35..3f2aa81655 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUuidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/FHIRUuidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRConstantsTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRConstantsTest.php index 14c4d06e22..d711fb8fd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRConstantsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRConstantsTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRTypeMapTest.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRTypeMapTest.php index bb21f38735..05a736c40d 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRTypeMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTests/PHPFHIRTypeMapTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeInterface.php index 7976e4fa01..052e63aa54 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeMap.php b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeMap.php index 05a57842ad..707236ac54 100644 --- a/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeMap.php +++ b/src/DCarbone/PHPFHIRGenerated/R4/PHPFHIRTypeMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:38+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBase64BinaryPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBase64BinaryPrimitive.php index ae135f25e3..a6a6025348 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBase64BinaryPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBase64BinaryPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -182,8 +182,8 @@ public function _writeToFile($fileHandle) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBooleanPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBooleanPrimitive.php index ea64e0e0d0..c98335624a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBooleanPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRBooleanPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|boolean @@ -168,8 +168,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive.php index 5976239732..d41c0423e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRCodePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -173,8 +173,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAccountStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAccountStatusList.php index e3e523939f..b9be10ccfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAccountStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAccountStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAccountStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACCOUNT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AccountStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php index fa2bc1cd2d..12c7377b8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionCardinalityBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionCardinalityBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_CARDINALITY_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionCardinalityBehavior-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionConditionKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionConditionKindList.php index efa8fdc878..958706b80e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionConditionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionConditionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionConditionKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_CONDITION_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionConditionKind-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php index 3a0fc7020c..0950a2da28 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionGroupingBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionGroupingBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_GROUPING_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionGroupingBehavior-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionListList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionListList.php index 8b1368badc..87b0e24f1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionListList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionListList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionListList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_LIST_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionList-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionParticipantTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionParticipantTypeList.php index 29e4f8c9fe..916ae1d94f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionParticipantTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionParticipantTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionParticipantTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_PARTICIPANT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionParticipantType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php index 55d37d245d..e4ce4533a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionPrecheckBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionPrecheckBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_PRECHECK_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionPrecheckBehavior-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php index e159901efe..01fa64b2bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionRelationshipTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionRelationshipType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php index cd51054706..e27d89d861 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionRequiredBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionRequiredBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_REQUIRED_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionRequiredBehavior-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php index a010b15006..3e7e0d88b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRActionSelectionBehaviorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRActionSelectionBehaviorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_SELECTION_BEHAVIOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ActionSelectionBehavior-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressTypeList.php index e0d68de139..a237c52814 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAddressTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AddressType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressUseList.php index 5fc3078992..8a06ad1792 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAddressUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAddressUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AddressUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdministrativeGenderList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdministrativeGenderList.php index 4f39eea9b4..1841cd3c36 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdministrativeGenderList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdministrativeGenderList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAdministrativeGenderList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADMINISTRATIVE_GENDER_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AdministrativeGender-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCategoryList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCategoryList.php index e8001fc450..6dd77bd947 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAdverseEventCategoryList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AdverseEventCategory-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCausalityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCausalityList.php index deb4b69200..65e8b2f5bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCausalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAdverseEventCausalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAdverseEventCausalityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_CAUSALITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AdverseEventCausality-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAggregationModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAggregationModeList.php index c41dbf2573..8c9d22fb4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAggregationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAggregationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAggregationModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AggregationMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php index 7bd8109602..ff37585169 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceCategoryList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceCategory-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusList.php index 7ea5a20849..8076d21096 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceClinicalStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CLINICAL_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceClinicalStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php index dedd026a6f..11329c38e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceCriticalityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CRITICALITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceCriticality-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php index 6855faea3b..2069ac6b09 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceSeverityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceSeverity-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php index 7ccde19f24..c490a66bdb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusList.php index 42455001d2..e742a12738 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAllergyIntoleranceVerificationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_VERIFICATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AllergyIntoleranceVerificationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAppointmentStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAppointmentStatusList.php index e981f0aae7..56a421fa9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAppointmentStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAppointmentStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAppointmentStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_APPOINTMENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AppointmentStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php index 7ae75dfc0c..c9bd823c57 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionDirectionTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAssertionDirectionTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_DIRECTION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AssertionDirectionType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php index 5e8dddfb18..e9e049845e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionOperatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAssertionOperatorTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_OPERATOR_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AssertionOperatorType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php index 6515090ef5..6b4a6eb1b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAssertionResponseTypesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAssertionResponseTypesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_RESPONSE_TYPES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AssertionResponseTypes-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventActionList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventActionList.php index 3393664831..11d3c38276 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAuditEventActionList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_ACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AuditEventAction-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php index 96333585f4..9db4de7214 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAuditEventAgentNetworkTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_AGENT_NETWORK_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AuditEventAgentNetworkType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php index ce9f203465..a437e01bba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRAuditEventOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRAuditEventOutcomeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_OUTCOME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type AuditEventOutcome-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBindingStrengthList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBindingStrengthList.php index cb6bc2188e..8b2fb0ab98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBindingStrengthList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBindingStrengthList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRBindingStrengthList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINDING_STRENGTH_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BindingStrength-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBundleTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBundleTypeList.php index 9fd8cd6da3..1475034b81 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBundleTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRBundleTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRBundleTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BUNDLE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type BundleType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php index dd0e99307f..6c221b40de 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCapabilityStatementKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCapabilityStatementKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CapabilityStatementKind-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php index 4e5de7c66f..f8e519fa9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanActivityStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCarePlanActivityStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanActivityStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanIntentList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanIntentList.php index 6f09464f2a..60c16b3ba5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCarePlanIntentList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_INTENT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanIntent-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanStatusList.php index 86edd8bd63..6b28ac1082 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCarePlanStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCarePlanStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CarePlanStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCareTeamStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCareTeamStatusList.php index 35f5d070c0..6c28f8c5af 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCareTeamStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCareTeamStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCareTeamStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_TEAM_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CareTeamStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRChargeItemStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRChargeItemStatusList.php index 8f59d6fdda..bea69e1ead 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRChargeItemStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRChargeItemStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRChargeItemStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ChargeItemStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php index 5ad0e9c48d..3f9e5c705c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRClinicalImpressionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRClinicalImpressionStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ClinicalImpressionStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php index e5fd604106..c3614a76d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemContentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCodeSystemContentModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_CONTENT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CodeSystemContentMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php index 37f509dbff..8734fd247e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCodeSystemHierarchyMeaningList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_HIERARCHY_MEANING_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CodeSystemHierarchyMeaning-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompartmentTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompartmentTypeList.php index b297132ea2..cfb219989c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompartmentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompartmentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCompartmentTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPARTMENT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompartmentType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php index 04e052f807..94cd141785 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionAttestationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCompositionAttestationModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompositionAttestationMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionStatusList.php index 2a14df5eb4..685490db45 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRCompositionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRCompositionStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type CompositionStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php index 7333b2c44c..bd827e18df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapEquivalenceList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConceptMapEquivalenceList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConceptMapEquivalence-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php index e9685dba25..7c3508777d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConceptMapGroupUnmappedModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_GROUP_UNMAPPED_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConceptMapGroupUnmappedMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesList.php index 733928bf9c..6b83b4bd1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConditionClinicalStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_CLINICAL_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionClinicalStatusCodes-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionVerificationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionVerificationStatusList.php index 0c934a0174..4c817f1b30 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionVerificationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionVerificationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConditionVerificationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_VERIFICATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionVerificationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php index 84c9e60690..ea1a5a6366 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalDeleteStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConditionalDeleteStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_DELETE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionalDeleteStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalReadStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalReadStatusList.php index 0201973c97..e5381d0d99 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalReadStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConditionalReadStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConditionalReadStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_READ_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConditionalReadStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConfidentialityClassificationList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConfidentialityClassificationList.php index 398514ea91..907a19e9a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConfidentialityClassificationList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConfidentialityClassificationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConfidentialityClassificationList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFIDENTIALITY_CLASSIFICATION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConfidentialityClassification-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentDataMeaningList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentDataMeaningList.php index 2234a5c085..7096af2a88 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentDataMeaningList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentDataMeaningList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConsentDataMeaningList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_DATA_MEANING_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConsentDataMeaning-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentExceptTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentExceptTypeList.php index ce7f0b8afd..d2d9f85390 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentExceptTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentExceptTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConsentExceptTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_EXCEPT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConsentExceptType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentStateList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentStateList.php index 51999c3ed9..43d51d6841 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConsentStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConsentStateList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_STATE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConsentState-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConstraintSeverityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConstraintSeverityList.php index a7bf355f87..37749f07ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConstraintSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRConstraintSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRConstraintSeverityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ConstraintSeverity-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointSystemList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointSystemList.php index 34406c8386..afae958015 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointSystemList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointSystemList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContactPointSystemList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_SYSTEM_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContactPointSystem-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointUseList.php index 3241789359..12e06006fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContactPointUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContactPointUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContactPointUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContentTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContentTypeList.php index c90c9f5aa5..66ea8a660b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContentTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContentTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContentTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTENT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContentType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php index 57fe205431..c5c709a737 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContractResourceStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContractResourceStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRACT_RESOURCE_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContractResourceStatusCodes-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContributorTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContributorTypeList.php index 44f5316a08..08b515cd60 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContributorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRContributorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRContributorTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ContributorType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDataElementStringencyList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDataElementStringencyList.php index 89f718d217..02ceeb67ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDataElementStringencyList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDataElementStringencyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDataElementStringencyList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_STRINGENCY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DataElementStringency-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDaysOfWeekList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDaysOfWeekList.php index 46522edc9a..2c45e179d6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDaysOfWeekList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDaysOfWeekList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDaysOfWeekList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DAYS_OF_WEEK_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DaysOfWeek-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php index a744ddb60e..a0b13c5cd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDetectedIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDetectedIssueSeverityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DetectedIssueSeverity-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php index f52a332aad..e43388ea52 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricCalibrationStateList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_STATE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricCalibrationState-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php index bd27a2f702..172dd405d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricCalibrationTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricCalibrationType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php index ef514c2729..6a9c139ab7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricCategoryList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricCategory-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricColorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricColorList.php index 12edd8953b..3a414fe024 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricColorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricColorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricColorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_COLOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricColor-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php index ac2ea83e2d..4c37991cd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceMetricOperationalStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_OPERATIONAL_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceMetricOperationalStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php index 501987b0f6..8b0c7083cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDeviceUseStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDeviceUseStatementStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DeviceUseStatementStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php index 4566b33e64..5c2892cb58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiagnosticReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDiagnosticReportStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiagnosticReportStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDigitalMediaTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDigitalMediaTypeList.php index 561b2bb72a..28c7fed74f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDigitalMediaTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDigitalMediaTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDigitalMediaTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIGITAL_MEDIA_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DigitalMediaType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php index 20911e83b7..7ad0267f72 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDiscriminatorTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDiscriminatorTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DISCRIMINATOR_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DiscriminatorType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentModeList.php index 985d49de4d..0aae50fe82 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDocumentModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php index dffcb10759..5b93aa2d5a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentReferenceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDocumentReferenceStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentReferenceStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php index b68e7fcc26..dcb4baa687 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRDocumentRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRDocumentRelationshipTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type DocumentRelationshipType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterLocationStatusList.php index 05135f1928..9b158e79e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREncounterLocationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_LOCATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EncounterLocationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterStatusList.php index 343ce4b86d..7d02d79da5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREncounterStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREncounterStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EncounterStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREndpointStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREndpointStatusList.php index b8a8dbd25b..801ea1ce21 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREndpointStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREndpointStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREndpointStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENDPOINT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EndpointStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php index 7812f25b41..f72be0542d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREpisodeOfCareStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREpisodeOfCareStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EpisodeOfCareStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventCapabilityModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventCapabilityModeList.php index a453093275..f3d29ae1cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventCapabilityModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventCapabilityModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREventCapabilityModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_CAPABILITY_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EventCapabilityMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventStatusList.php index 01499c6572..f87f72aa8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREventStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EventStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventTimingList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventTimingList.php index 689b1f4c0b..521f01d65d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventTimingList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIREventTimingList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIREventTimingList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_TIMING_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type EventTiming-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php index 1084ca88ab..f1c468bf91 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRExplanationOfBenefitStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExplanationOfBenefitStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExtensionContextList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExtensionContextList.php index 5a4a7097f5..2090f64a92 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExtensionContextList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRExtensionContextList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRExtensionContextList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ExtensionContext-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRAllTypesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRAllTypesList.php index 4d41943b4e..deab90aa8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRAllTypesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRAllTypesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFHIRAllTypesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRALL_TYPES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FHIRAllTypes-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDefinedTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDefinedTypeList.php index 3d007cdbe9..445339bd7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDefinedTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDefinedTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFHIRDefinedTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRDEFINED_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FHIRDefinedType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php index e76ba09744..14000dff32 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRDeviceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFHIRDeviceStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRDEVICE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FHIRDeviceStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php index b100b6cb9e..3bc824f5c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFHIRSubstanceStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFHIRSubstanceStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRSUBSTANCE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FHIRSubstanceStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php index 7e33a005ba..602cfd8b10 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFamilyHistoryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFamilyHistoryStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FamilyHistoryStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFilterOperatorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFilterOperatorList.php index df7dc5a426..d3f773e48c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFilterOperatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFilterOperatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFilterOperatorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FilterOperator-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php index a5927e338c..8756b26f1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFinancialResourceStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FINANCIAL_RESOURCE_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FinancialResourceStatusCodes-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFlagStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFlagStatusList.php index 32d064757a..a7a2e851d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFlagStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRFlagStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRFlagStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FLAG_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type FlagStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGoalStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGoalStatusList.php index 435f07a8d6..e23f70301d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGoalStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGoalStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGoalStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GOAL_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GoalStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php index bf59ed9c68..15151340ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGraphCompartmentRuleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGraphCompartmentRuleList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GRAPH_COMPARTMENT_RULE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GraphCompartmentRule-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGroupTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGroupTypeList.php index f2499de2fe..da69ed0c7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGroupTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGroupTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGroupTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GroupType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php index f887c85671..0a8dd107b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidanceResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGuidanceResponseStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GuidanceResponseStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuideDependencyTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuideDependencyTypeList.php index 7a34376c09..6f66cc7662 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuideDependencyTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuideDependencyTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGuideDependencyTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_DEPENDENCY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GuideDependencyType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidePageKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidePageKindList.php index 15f360c741..ce385ea14a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidePageKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRGuidePageKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRGuidePageKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_PAGE_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type GuidePageKind-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRHTTPVerbList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRHTTPVerbList.php index 40428523ba..9924dc702a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRHTTPVerbList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRHTTPVerbList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRHTTPVerbList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_HTTPVERB_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type HTTPVerb-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentifierUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentifierUseList.php index d2bd3ef12e..caf255d4b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentifierUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentifierUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIdentifierUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IdentifierUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php index 0c00d1602f..ede1ab2deb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIdentityAssuranceLevelList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIdentityAssuranceLevelList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTITY_ASSURANCE_LEVEL_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IdentityAssuranceLevel-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php index c08d096c50..0df2d8b075 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRImmunizationStatusCodesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRImmunizationStatusCodesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_STATUS_CODES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ImmunizationStatusCodes-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRInstanceAvailabilityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRInstanceAvailabilityList.php index f7a2c3a26a..fbfede3e81 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRInstanceAvailabilityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRInstanceAvailabilityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRInstanceAvailabilityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANCE_AVAILABILITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type InstanceAvailability-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueSeverityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueSeverityList.php index f0bf1bd108..9e870653cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueSeverityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueSeverityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIssueSeverityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IssueSeverity-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueTypeList.php index c3d3fa4705..c3c5246ed9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRIssueTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRIssueTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type IssueType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkTypeList.php index a11939d48c..9e7386ab7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLinkTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINK_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LinkType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkageTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkageTypeList.php index 43db95580c..72a782f947 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLinkageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLinkageTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINKAGE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LinkageType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListModeList.php index cd15fa0486..8beb97dfbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRListModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ListMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListStatusList.php index 3de691acf4..2cb8c73417 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRListStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRListStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ListStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationModeList.php index ac639e00d1..f8c44e1875 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLocationModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LocationMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationStatusList.php index 4c0aa0c9f1..d2f3f0af8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRLocationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRLocationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type LocationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasmntPrincipleList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasmntPrincipleList.php index 55a9cebb75..14b62414d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasmntPrincipleList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasmntPrincipleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMeasmntPrincipleList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASMNT_PRINCIPLE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MeasmntPrinciple-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportStatusList.php index 6d373bcf2d..c747e5b369 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMeasureReportStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MeasureReportStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportTypeList.php index 3c4e960672..761a773a2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMeasureReportTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMeasureReportTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MeasureReportType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationAdministrationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationAdministrationStatusList.php index 3e93220add..bcea3d14a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationAdministrationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationAdministrationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationAdministrationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationAdministrationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationDispenseStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationDispenseStatusList.php index 9051282852..9fc7619729 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationDispenseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationDispenseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationDispenseStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationDispenseStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php index 4de4b53e22..f1081436f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationRequestIntentList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_INTENT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationRequestIntent-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestPriorityList.php index 2dcfbc94f9..dd8fb3d8f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationRequestPriorityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_PRIORITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationRequestPriority-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestStatusList.php index 64ef63679f..069f0748b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationRequestStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationRequestStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementStatusList.php index 2e17f298d8..f2ece9c282 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationStatementStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationStatementStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementTakenList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementTakenList.php index c540fd58e0..959480e43f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementTakenList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatementTakenList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationStatementTakenList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_TAKEN_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationStatementTaken-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatusList.php index 79196e7d6e..e6ce764d1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMedicationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMedicationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MedicationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php index a049271db3..ff0fe51a64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRMessageSignificanceCategoryList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRMessageSignificanceCategoryList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type MessageSignificanceCategory-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNameUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNameUseList.php index 0b3c17b44d..adc1f9d9f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNameUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNameUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNameUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAME_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NameUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php index cc8f7dd201..d9d089079a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNamingSystemIdentifierTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_IDENTIFIER_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NamingSystemIdentifierType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemTypeList.php index ec3af31bb0..e5fba07736 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNamingSystemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNamingSystemTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NamingSystemType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNarrativeStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNarrativeStatusList.php index c70a39daa1..23b11288cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNarrativeStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNarrativeStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNarrativeStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NarrativeStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNoteTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNoteTypeList.php index d260dfec1c..dddd30663e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNoteTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNoteTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNoteTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NOTE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NoteType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNutritionOrderStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNutritionOrderStatusList.php index 393ec94441..b0c9156402 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNutritionOrderStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRNutritionOrderStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRNutritionOrderStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type NutritionOrderStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationRelationshipTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationRelationshipTypeList.php index 0482dec7ba..b4d4654182 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationRelationshipTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationRelationshipTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRObservationRelationshipTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELATIONSHIP_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationRelationshipType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationStatusList.php index 44c6ca0e2c..00183c06e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRObservationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRObservationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ObservationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationKindList.php index 895daf21e2..fb8ec88763 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIROperationKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type OperationKind-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationParameterUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationParameterUseList.php index ae886149bf..b5e36106ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationParameterUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIROperationParameterUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIROperationParameterUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_PARAMETER_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type OperationParameterUse-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipantRequiredList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipantRequiredList.php index 30579bef6d..133b6a5efb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipantRequiredList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipantRequiredList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRParticipantRequiredList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPANT_REQUIRED_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ParticipantRequired-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipationStatusList.php index e7ff22df47..d0d3da436f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRParticipationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRParticipationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ParticipationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyRepresentationList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyRepresentationList.php index e7ffdba8af..3d70701df5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyRepresentationList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyRepresentationList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRPropertyRepresentationList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type PropertyRepresentation-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyTypeList.php index 57d716637e..bfb1d13fa9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPropertyTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRPropertyTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type PropertyType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php index e7344ad0bc..39842c6f6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRProvenanceEntityRoleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRProvenanceEntityRoleList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ProvenanceEntityRole-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPublicationStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPublicationStatusList.php index 70f78e7a10..f849c995f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPublicationStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRPublicationStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRPublicationStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PUBLICATION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type PublicationStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQualityTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQualityTypeList.php index 2ceb87ccf1..f9b9f20f6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQualityTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQualityTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQualityTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUALITY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type qualityType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuantityComparatorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuantityComparatorList.php index f6c0382904..e20992642c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuantityComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuantityComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuantityComparatorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuantityComparator-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php index ed2d0aee62..73fc411498 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireItemTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuestionnaireItemTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_ITEM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuestionnaireItemType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php index 6ef0a3c42d..54d2338f3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRQuestionnaireResponseStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type QuestionnaireResponseStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php index e142ebb4d4..9e1d2e2ff0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceHandlingPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRReferenceHandlingPolicyList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERENCE_HANDLING_POLICY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ReferenceHandlingPolicy-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php index b8ee7da0b1..edef9ec9d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRReferenceVersionRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRReferenceVersionRulesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERENCE_VERSION_RULES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ReferenceVersionRules-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php index cef5b87027..9235236a68 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRelatedArtifactTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRelatedArtifactTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RelatedArtifactType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php index 79389ca711..176e372d6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRemittanceOutcomeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRemittanceOutcomeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REMITTANCE_OUTCOME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RemittanceOutcome-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRepositoryTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRepositoryTypeList.php index 78119451c7..0658574a57 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRepositoryTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRepositoryTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRepositoryTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REPOSITORY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type repositoryType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestIntentList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestIntentList.php index 6301c112bd..cdf66e8989 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestIntentList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestIntentList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRequestIntentList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_INTENT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RequestIntent-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestPriorityList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestPriorityList.php index e71f8fe651..f15ab20a46 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestPriorityList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestPriorityList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRequestPriorityList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_PRIORITY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RequestPriority-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestStatusList.php index 53a019e64a..c2dad4861c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRequestStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RequestStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchStudyStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchStudyStatusList.php index 825813ce0f..60f58b5a55 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchStudyStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchStudyStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResearchStudyStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResearchStudyStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php index 71b4dcd663..aa6f6fff12 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResearchSubjectStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResearchSubjectStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResearchSubjectStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceTypeList.php index a5a6c6c36c..2ed3f08f57 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResourceTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResourceType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php index 6d4e127951..e5933719f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResourceVersionPolicyList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResourceVersionPolicyList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_VERSION_POLICY_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResourceVersionPolicy-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResponseTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResponseTypeList.php index 9a6c740aef..bc8e08ef52 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResponseTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRResponseTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRResponseTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type ResponseType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php index af7e94ddb0..86745fdb73 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRRestfulCapabilityModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRRestfulCapabilityModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_CAPABILITY_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type RestfulCapabilityMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchComparatorList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchComparatorList.php index 2a1cc7f3a1..6e718e2bca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchComparatorList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchComparatorList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchComparatorList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_COMPARATOR_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchComparator-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchEntryModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchEntryModeList.php index 57fbf668e4..cf6cb2feb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchEntryModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchEntryModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchEntryModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_ENTRY_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchEntryMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchModifierCodeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchModifierCodeList.php index f2593f628e..6d877c0275 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchModifierCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchModifierCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchModifierCodeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_MODIFIER_CODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchModifierCode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchParamTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchParamTypeList.php index 36285806dc..8d5ae372b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchParamTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSearchParamTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSearchParamTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SearchParamType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlicingRulesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlicingRulesList.php index e0574a7587..f14ba5a04a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlicingRulesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlicingRulesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSlicingRulesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLICING_RULES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SlicingRules-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlotStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlotStatusList.php index e4a1074491..e3f9c42bae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlotStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSlotStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSlotStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLOT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SlotStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSpecimenStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSpecimenStatusList.php index 4b43d6d32d..29ceab57b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSpecimenStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSpecimenStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSpecimenStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPECIMEN_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SpecimenStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php index 7bc4d3387a..c94f29d7e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureDefinitionKindList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureDefinitionKindList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_KIND_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureDefinitionKind-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php index 81b685f36b..643533c614 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapContextTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapContextTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_CONTEXT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapContextType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php index 4c344ac48f..4bd7baa67f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapGroupTypeModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_GROUP_TYPE_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapGroupTypeMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapInputModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapInputModeList.php index 431b9c8ce4..9901ca4ffc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapInputModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapInputModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapInputModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_INPUT_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapInputMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapModelModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapModelModeList.php index 00ac96fc37..e50e6eddd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapModelModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapModelModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapModelModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_MODEL_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapModelMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php index 4b0d29a3ea..a5ac6a42bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapSourceListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapSourceListModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_SOURCE_LIST_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapSourceListMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php index 7b6a32d618..d3921b494f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTargetListModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapTargetListModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TARGET_LIST_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapTargetListMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTransformList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTransformList.php index 95d9b819ef..72624c1635 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTransformList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRStructureMapTransformList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRStructureMapTransformList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TRANSFORM_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type StructureMapTransform-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php index 24eb1bac36..7bb509c41a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionChannelTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSubscriptionChannelTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_CHANNEL_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SubscriptionChannelType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionStatusList.php index 0e5a5685c7..98051f4a08 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSubscriptionStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSubscriptionStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SubscriptionStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php index 8c19390221..1cb87c725e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyDeliveryStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSupplyDeliveryStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SupplyDeliveryStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php index f5a5626334..dac1844d7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSupplyRequestStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSupplyRequestStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SupplyRequestStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php index 06ebed26ba..cb2327f199 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSystemRestfulInteractionList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SYSTEM_RESTFUL_INTERACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SystemRestfulInteraction-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemVersionProcessingModeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemVersionProcessingModeList.php index 95ff1d8fb8..7102ef1f14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemVersionProcessingModeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRSystemVersionProcessingModeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRSystemVersionProcessingModeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SYSTEM_VERSION_PROCESSING_MODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type SystemVersionProcessingMode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTaskStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTaskStatusList.php index d06de9bc3b..ebfe6b8d40 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTaskStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTaskStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTaskStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TASK_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TaskStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportActionResultList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportActionResultList.php index f014d0d9b2..4c0eed800a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportActionResultList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportActionResultList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestReportActionResultList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_ACTION_RESULT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestReportActionResult-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php index 8cfb4ca3ec..eeea5bc0ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportParticipantTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestReportParticipantTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_PARTICIPANT_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestReportParticipantType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportResultList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportResultList.php index ab0bbcbbf8..9de3971fea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportResultList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportResultList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestReportResultList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_RESULT_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestReportResult-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportStatusList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportStatusList.php index 49a69b648c..c39081cd74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportStatusList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestReportStatusList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestReportStatusList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_STATUS_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestReportStatus-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php index 522e3e36fe..7f5f590a78 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTestScriptRequestMethodCodeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_REQUEST_METHOD_CODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TestScriptRequestMethodCode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTriggerTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTriggerTypeList.php index a1b2c5cf27..6148da3936 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTriggerTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTriggerTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTriggerTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TRIGGER_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TriggerType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php index 1d1c72de47..61e2771b3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeDerivationRuleList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTypeDerivationRuleList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_DERIVATION_RULE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TypeDerivationRule-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php index adef21cecf..fb614ba20c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRTypeRestfulInteractionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRTypeRestfulInteractionList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_RESTFUL_INTERACTION_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type TypeRestfulInteraction-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUDIEntryTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUDIEntryTypeList.php index cf569cffc6..0c069133b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUDIEntryTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUDIEntryTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUDIEntryTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UDIENTRY_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type UDIEntryType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnitsOfTimeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnitsOfTimeList.php index 1c3b1a076e..755a088145 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnitsOfTimeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnitsOfTimeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUnitsOfTimeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type UnitsOfTime-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnknownContentCodeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnknownContentCodeList.php index 1976b87b57..e59c5c5eaf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnknownContentCodeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUnknownContentCodeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUnknownContentCodeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNKNOWN_CONTENT_CODE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type UnknownContentCode-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUseList.php index 20c23439dd..aef8410a18 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRUseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRUseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_USE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Use-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionBaseList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionBaseList.php index 48223b1f42..fa0891c2ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionBaseList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionBaseList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRVisionBaseList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_BASE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type VisionBase-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionEyesList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionEyesList.php index 98dc077477..5e684a3f17 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionEyesList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRVisionEyesList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRVisionEyesList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_EYES_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type VisionEyes-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRXPathUsageTypeList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRXPathUsageTypeList.php index 39e257c579..242dd33cdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRXPathUsageTypeList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRCodePrimitive/FHIRXPathUsageTypeList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,7 +76,7 @@ class FHIRXPathUsageTypeList extends FHIRCodePrimitive const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_XPATH_USAGE_TYPE_HYPHEN_LIST; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type XPathUsageType-list @@ -122,8 +122,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDatePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDatePrimitive.php index e93072833d..4f7181ae72 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDatePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDatePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRDatePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -201,8 +201,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDateTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDateTimePrimitive.php index 83f5258d92..6a0de4291b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDateTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDateTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRDateTimePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -202,8 +202,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDecimalPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDecimalPrimitive.php index 99657c85fe..b0d81bb5d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDecimalPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRDecimalPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRDecimalPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|double @@ -172,8 +172,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement.php index 653cbdcc61..131ab13fad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRElement implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInterf const FIELD_EXTENSION = 'extension'; const FIELD_ID = 'id'; - const FIELD_ID_EXT = '_id'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Optional Extension Element - found in all resources. @@ -304,8 +303,8 @@ public function setId($id = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** @@ -400,11 +399,18 @@ public function jsonSerialize() $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } if ([] !== ($vs = $this->getExtension())) { - $a[self::FIELD_EXTENSION] = $vs; + $a[self::FIELD_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXTENSION][] = $v; + } } if (null !== ($v = $this->getId())) { $a[self::FIELD_ID] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAccountStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAccountStatus.php index b48c66cc4b..68bca2c23b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAccountStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAccountStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAccountStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACCOUNT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAccountStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionCardinalityBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionCardinalityBehavior.php index 82ec259778..449e828105 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionCardinalityBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionCardinalityBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRActionCardinalityBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_CARDINALITY_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRActionCardinalityBehaviorList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionConditionKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionConditionKind.php index 4ec9cd9a87..0cb10fb2ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionConditionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionConditionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionConditionKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_CONDITION_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRActionConditionKindList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionGroupingBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionGroupingBehavior.php index 19bae0247b..d19b2e14f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionGroupingBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionGroupingBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionGroupingBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_GROUPING_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRActionGroupingBehaviorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionList.php index 2dfb022e91..bb938d722f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionList extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_LIST; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRActionListList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionParticipantType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionParticipantType.php index 68c012b87c..c4b639e3cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionParticipantType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionParticipantType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionParticipantType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_PARTICIPANT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRActionParticipantTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionPrecheckBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionPrecheckBehavior.php index e4e2399eca..99646e5a64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionPrecheckBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionPrecheckBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionPrecheckBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_PRECHECK_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRActionPrecheckBehaviorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRelationshipType.php index 0ab6a0bf4a..cf90ba02cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRActionRelationshipTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRequiredBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRequiredBehavior.php index 3b7e91d96a..fe85e7e239 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRequiredBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionRequiredBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionRequiredBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_REQUIRED_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRActionRequiredBehaviorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionSelectionBehavior.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionSelectionBehavior.php index 48f7bc6a91..f326bd6e18 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionSelectionBehavior.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRActionSelectionBehavior.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRActionSelectionBehavior extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ACTION_SELECTION_BEHAVIOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRActionSelectionBehaviorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddress.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddress.php index d880da8bde..78ff948c47 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddress.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddress.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRAddress extends FHIRElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -238,81 +238,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CITY])) { - $ext = (isset($data[self::FIELD_CITY_EXT]) && is_array($data[self::FIELD_CITY_EXT])) - ? $data[self::FIELD_CITY_EXT] - : null; - if ($data[self::FIELD_CITY] instanceof FHIRString) { - $this->setCity($data[self::FIELD_CITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CITY])) { - $this->setCity(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CITY]] + $ext)); - } else if (is_array($data[self::FIELD_CITY])) { - $this->setCity(new FHIRString(array_merge($ext, $data[self::FIELD_CITY]))); - } + if (isset($data[self::FIELD_CITY]) || isset($data[self::FIELD_CITY_EXT])) { + if (isset($data[self::FIELD_CITY])) { + $value = $data[self::FIELD_CITY]; } else { - $this->setCity(new FHIRString($data[self::FIELD_CITY])); + $value = null; } - } - if (isset($data[self::FIELD_COUNTRY])) { - $ext = (isset($data[self::FIELD_COUNTRY_EXT]) && is_array($data[self::FIELD_COUNTRY_EXT])) - ? $data[self::FIELD_COUNTRY_EXT] - : null; - if ($data[self::FIELD_COUNTRY] instanceof FHIRString) { - $this->setCountry($data[self::FIELD_COUNTRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNTRY])) { - $this->setCountry(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COUNTRY]] + $ext)); - } else if (is_array($data[self::FIELD_COUNTRY])) { - $this->setCountry(new FHIRString(array_merge($ext, $data[self::FIELD_COUNTRY]))); - } + if (isset($data[self::FIELD_CITY_EXT]) && is_array($data[self::FIELD_CITY_EXT])) { + $ext = $data[self::FIELD_CITY_EXT]; } else { - $this->setCountry(new FHIRString($data[self::FIELD_COUNTRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCity($value); + } else if (is_array($value)) { + $this->setCity(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCity(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCity(new FHIRString($ext)); } } - if (isset($data[self::FIELD_DISTRICT])) { - $ext = (isset($data[self::FIELD_DISTRICT_EXT]) && is_array($data[self::FIELD_DISTRICT_EXT])) - ? $data[self::FIELD_DISTRICT_EXT] - : null; - if ($data[self::FIELD_DISTRICT] instanceof FHIRString) { - $this->setDistrict($data[self::FIELD_DISTRICT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISTRICT])) { - $this->setDistrict(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISTRICT]] + $ext)); - } else if (is_array($data[self::FIELD_DISTRICT])) { - $this->setDistrict(new FHIRString(array_merge($ext, $data[self::FIELD_DISTRICT]))); + if (isset($data[self::FIELD_COUNTRY]) || isset($data[self::FIELD_COUNTRY_EXT])) { + if (isset($data[self::FIELD_COUNTRY])) { + $value = $data[self::FIELD_COUNTRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNTRY_EXT]) && is_array($data[self::FIELD_COUNTRY_EXT])) { + $ext = $data[self::FIELD_COUNTRY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCountry($value); + } else if (is_array($value)) { + $this->setCountry(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCountry(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCountry(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DISTRICT]) || isset($data[self::FIELD_DISTRICT_EXT])) { + if (isset($data[self::FIELD_DISTRICT])) { + $value = $data[self::FIELD_DISTRICT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISTRICT_EXT]) && is_array($data[self::FIELD_DISTRICT_EXT])) { + $ext = $data[self::FIELD_DISTRICT_EXT]; } else { - $this->setDistrict(new FHIRString($data[self::FIELD_DISTRICT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDistrict($value); + } else if (is_array($value)) { + $this->setDistrict(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDistrict(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDistrict(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LINE])) { - $ext = (isset($data[self::FIELD_LINE_EXT]) && is_array($data[self::FIELD_LINE_EXT])) - ? $data[self::FIELD_LINE_EXT] - : null; - if (is_array($data[self::FIELD_LINE])) { - foreach($data[self::FIELD_LINE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLine($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLine(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINE]) || isset($data[self::FIELD_LINE_EXT])) { + if (isset($data[self::FIELD_LINE])) { + $value = $data[self::FIELD_LINE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINE_EXT]) && is_array($data[self::FIELD_LINE_EXT])) { + $ext = $data[self::FIELD_LINE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLine($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLine($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLine(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLine(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLine(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLine(new FHIRString($iext)); } - } elseif ($data[self::FIELD_LINE] instanceof FHIRString) { - $this->addLine($data[self::FIELD_LINE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINE])) { - $this->addLine(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINE]] + $ext)); - } else { - $this->addLine(new FHIRString($data[self::FIELD_LINE])); } } if (isset($data[self::FIELD_PERIOD])) { @@ -322,84 +352,119 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_POSTAL_CODE])) { - $ext = (isset($data[self::FIELD_POSTAL_CODE_EXT]) && is_array($data[self::FIELD_POSTAL_CODE_EXT])) - ? $data[self::FIELD_POSTAL_CODE_EXT] - : null; - if ($data[self::FIELD_POSTAL_CODE] instanceof FHIRString) { - $this->setPostalCode($data[self::FIELD_POSTAL_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POSTAL_CODE])) { - $this->setPostalCode(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_POSTAL_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_POSTAL_CODE])) { - $this->setPostalCode(new FHIRString(array_merge($ext, $data[self::FIELD_POSTAL_CODE]))); - } + if (isset($data[self::FIELD_POSTAL_CODE]) || isset($data[self::FIELD_POSTAL_CODE_EXT])) { + if (isset($data[self::FIELD_POSTAL_CODE])) { + $value = $data[self::FIELD_POSTAL_CODE]; } else { - $this->setPostalCode(new FHIRString($data[self::FIELD_POSTAL_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_STATE])) { - $ext = (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) - ? $data[self::FIELD_STATE_EXT] - : null; - if ($data[self::FIELD_STATE] instanceof FHIRString) { - $this->setState($data[self::FIELD_STATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATE])) { - $this->setState(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATE])) { - $this->setState(new FHIRString(array_merge($ext, $data[self::FIELD_STATE]))); - } + if (isset($data[self::FIELD_POSTAL_CODE_EXT]) && is_array($data[self::FIELD_POSTAL_CODE_EXT])) { + $ext = $data[self::FIELD_POSTAL_CODE_EXT]; } else { - $this->setState(new FHIRString($data[self::FIELD_STATE])); + $ext = []; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPostalCode($value); + } else if (is_array($value)) { + $this->setPostalCode(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPostalCode(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + } else if ([] !== $ext) { + $this->setPostalCode(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAddressType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAddressType([FHIRAddressType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAddressType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_STATE]) || isset($data[self::FIELD_STATE_EXT])) { + if (isset($data[self::FIELD_STATE])) { + $value = $data[self::FIELD_STATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) { + $ext = $data[self::FIELD_STATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setState($value); + } else if (is_array($value)) { + $this->setState(new FHIRString(array_merge($ext, $value))); + } else { + $this->setState(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setState(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setType(new FHIRAddressType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRAddressUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRAddressUse([FHIRAddressUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRAddressUse(array_merge($ext, $data[self::FIELD_USE]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAddressType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAddressType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAddressType([FHIRAddressType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRAddressType($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRAddressUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAddressUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRAddressUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRAddressUse([FHIRAddressUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRAddressUse($ext)); } } } @@ -814,8 +879,8 @@ public function setUse(FHIRAddressUse $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -998,78 +1063,105 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCity())) { $a[self::FIELD_CITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CITY_EXT] = $enc; } } if (null !== ($v = $this->getCountry())) { $a[self::FIELD_COUNTRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COUNTRY_EXT] = $enc; } } if (null !== ($v = $this->getDistrict())) { $a[self::FIELD_DISTRICT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISTRICT_EXT] = $enc; } } if ([] !== ($vs = $this->getLine())) { $a[self::FIELD_LINE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINE_EXT] = $encs; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if (null !== ($v = $this->getPostalCode())) { $a[self::FIELD_POSTAL_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_POSTAL_CODE_EXT] = $enc; } } if (null !== ($v = $this->getState())) { $a[self::FIELD_STATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATE_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAddressType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAddressType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAddressUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAddressUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressType.php index 92de1a16f1..f45b8b603d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAddressType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAddressTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressUse.php index 9761679e65..8c21bc60f2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAddressUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAddressUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADDRESS_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAddressUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdministrativeGender.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdministrativeGender.php index 5dbea1a3bd..b84770d658 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdministrativeGender.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdministrativeGender.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRAdministrativeGender extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADMINISTRATIVE_GENDER; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAdministrativeGenderList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCategory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCategory.php index 2d20335090..d49bfa1506 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAdverseEventCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAdverseEventCategoryList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCausality.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCausality.php index 1d664808e6..49d0ef397b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCausality.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAdverseEventCausality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAdverseEventCausality extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ADVERSE_EVENT_CAUSALITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAdverseEventCausalityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAggregationMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAggregationMode.php index 7a227aab8f..9149c8dd49 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAggregationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAggregationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAggregationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGGREGATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAggregationModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCategory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCategory.php index c16e3e072c..0c0e264638 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAllergyIntoleranceCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAllergyIntoleranceCategoryList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceClinicalStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceClinicalStatus.php index 8df0ace54d..bd5e1e4bbe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceClinicalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceClinicalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAllergyIntoleranceClinicalStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CLINICAL_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAllergyIntoleranceClinicalStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCriticality.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCriticality.php index fed2583071..f6f0918ae4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCriticality.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceCriticality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAllergyIntoleranceCriticality extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_CRITICALITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAllergyIntoleranceCriticalityList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceSeverity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceSeverity.php index ea21411bf5..1a80de6bac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAllergyIntoleranceSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAllergyIntoleranceSeverityList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceType.php index 955bd27231..5803091799 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAllergyIntoleranceType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAllergyIntoleranceTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceVerificationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceVerificationStatus.php index 13e4c0b58a..0b17a573d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceVerificationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAllergyIntoleranceVerificationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRAllergyIntoleranceVerificationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ALLERGY_INTOLERANCE_VERIFICATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAllergyIntoleranceVerificationStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAnnotation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAnnotation.php index d811e49012..653f7900bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAnnotation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAnnotation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRAnnotation extends FHIRElement const FIELD_TIME_EXT = '_time'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -166,52 +166,73 @@ public function __construct($data = null) $this->setAuthorReference(new FHIRReference($data[self::FIELD_AUTHOR_REFERENCE])); } } - if (isset($data[self::FIELD_AUTHOR_STRING])) { - $ext = (isset($data[self::FIELD_AUTHOR_STRING_EXT]) && is_array($data[self::FIELD_AUTHOR_STRING_EXT])) - ? $data[self::FIELD_AUTHOR_STRING_EXT] - : null; - if ($data[self::FIELD_AUTHOR_STRING] instanceof FHIRString) { - $this->setAuthorString($data[self::FIELD_AUTHOR_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHOR_STRING])) { - $this->setAuthorString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AUTHOR_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHOR_STRING])) { - $this->setAuthorString(new FHIRString(array_merge($ext, $data[self::FIELD_AUTHOR_STRING]))); - } + if (isset($data[self::FIELD_AUTHOR_STRING]) || isset($data[self::FIELD_AUTHOR_STRING_EXT])) { + if (isset($data[self::FIELD_AUTHOR_STRING])) { + $value = $data[self::FIELD_AUTHOR_STRING]; } else { - $this->setAuthorString(new FHIRString($data[self::FIELD_AUTHOR_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_AUTHOR_STRING_EXT]) && is_array($data[self::FIELD_AUTHOR_STRING_EXT])) { + $ext = $data[self::FIELD_AUTHOR_STRING_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAuthorString($value); + } else if (is_array($value)) { + $this->setAuthorString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAuthorString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthorString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRDateTime) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME]))); + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; } else { - $this->setTime(new FHIRDateTime($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTime(new FHIRDateTime($ext)); } } } @@ -391,8 +412,8 @@ public function setTime($time = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -511,25 +532,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthorString())) { $a[self::FIELD_AUTHOR_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AUTHOR_STRING_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAppointmentStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAppointmentStatus.php index f10a2520fb..def88358df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAppointmentStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAppointmentStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAppointmentStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_APPOINTMENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAppointmentStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionDirectionType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionDirectionType.php index 510dc378a6..cd5d3d4205 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionDirectionType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionDirectionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAssertionDirectionType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_DIRECTION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAssertionDirectionTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionOperatorType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionOperatorType.php index fb0409f461..bb109912f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionOperatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionOperatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAssertionOperatorType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_OPERATOR_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAssertionOperatorTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionResponseTypes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionResponseTypes.php index 3617bf016b..b327a8516f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionResponseTypes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAssertionResponseTypes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAssertionResponseTypes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ASSERTION_RESPONSE_TYPES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAssertionResponseTypesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAttachment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAttachment.php index 60a17a89c5..4f6c4f06c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAttachment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAttachment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRAttachment extends FHIRElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -218,132 +218,188 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); - } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_CREATION])) { - $ext = (isset($data[self::FIELD_CREATION_EXT]) && is_array($data[self::FIELD_CREATION_EXT])) - ? $data[self::FIELD_CREATION_EXT] - : null; - if ($data[self::FIELD_CREATION] instanceof FHIRDateTime) { - $this->setCreation($data[self::FIELD_CREATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATION])) { - $this->setCreation(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATION]] + $ext)); - } else if (is_array($data[self::FIELD_CREATION])) { - $this->setCreation(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_CREATION]) || isset($data[self::FIELD_CREATION_EXT])) { + if (isset($data[self::FIELD_CREATION])) { + $value = $data[self::FIELD_CREATION]; } else { - $this->setCreation(new FHIRDateTime($data[self::FIELD_CREATION])); - } - } - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRBase64Binary) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DATA]))); + $value = null; + } + if (isset($data[self::FIELD_CREATION_EXT]) && is_array($data[self::FIELD_CREATION_EXT])) { + $ext = $data[self::FIELD_CREATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreation($value); + } else if (is_array($value)) { + $this->setCreation(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreation(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreation(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; } else { - $this->setData(new FHIRBase64Binary($data[self::FIELD_DATA])); - } - } - if (isset($data[self::FIELD_HASH])) { - $ext = (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) - ? $data[self::FIELD_HASH_EXT] - : null; - if ($data[self::FIELD_HASH] instanceof FHIRBase64Binary) { - $this->setHash($data[self::FIELD_HASH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HASH])) { - $this->setHash(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_HASH]] + $ext)); - } else if (is_array($data[self::FIELD_HASH])) { - $this->setHash(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_HASH]))); + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setData(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setData(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_HASH]) || isset($data[self::FIELD_HASH_EXT])) { + if (isset($data[self::FIELD_HASH])) { + $value = $data[self::FIELD_HASH]; } else { - $this->setHash(new FHIRBase64Binary($data[self::FIELD_HASH])); - } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + $value = null; + } + if (isset($data[self::FIELD_HASH_EXT]) && is_array($data[self::FIELD_HASH_EXT])) { + $ext = $data[self::FIELD_HASH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setHash($value); + } else if (is_array($value)) { + $this->setHash(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setHash(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHash(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); - } - } - if (isset($data[self::FIELD_SIZE])) { - $ext = (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) - ? $data[self::FIELD_SIZE_EXT] - : null; - if ($data[self::FIELD_SIZE] instanceof FHIRUnsignedInt) { - $this->setSize($data[self::FIELD_SIZE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_SIZE]] + $ext)); - } else if (is_array($data[self::FIELD_SIZE])) { - $this->setSize(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_SIZE]))); + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_SIZE]) || isset($data[self::FIELD_SIZE_EXT])) { + if (isset($data[self::FIELD_SIZE])) { + $value = $data[self::FIELD_SIZE]; } else { - $this->setSize(new FHIRUnsignedInt($data[self::FIELD_SIZE])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_SIZE_EXT]) && is_array($data[self::FIELD_SIZE_EXT])) { + $ext = $data[self::FIELD_SIZE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setSize($value); + } else if (is_array($value)) { + $this->setSize(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setSize(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSize(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -697,8 +753,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -878,60 +934,79 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getCreation())) { $a[self::FIELD_CREATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATION_EXT] = $enc; } } if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } if (null !== ($v = $this->getHash())) { $a[self::FIELD_HASH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_HASH_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getSize())) { $a[self::FIELD_SIZE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_SIZE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAction.php index 8da32801a0..738b8e76fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAuditEventAction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_ACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAuditEventActionList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAgentNetworkType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAgentNetworkType.php index a99fb15079..4fbae17047 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAgentNetworkType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventAgentNetworkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAuditEventAgentNetworkType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_AGENT_NETWORK_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAuditEventAgentNetworkTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventOutcome.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventOutcome.php index 2f6334b9b7..68887131dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRAuditEventOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRAuditEventOutcome extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AUDIT_EVENT_OUTCOME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRAuditEventOutcomeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement.php index 00ed9aedc9..cbafcf7469 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRBackboneElement extends FHIRElement const FIELD_MODIFIER_EXTENSION = 'modifierExtension'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Optional Extension Element - found in all resources. @@ -246,8 +246,8 @@ public function setModifierExtension(array $modifierExtension = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -327,7 +327,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getModifierExtension())) { - $a[self::FIELD_MODIFIER_EXTENSION] = $vs; + $a[self::FIELD_MODIFIER_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER_EXTENSION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php index b6087d8ec5..6941bd3d10 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRAccountCoverage extends FHIRBackboneElement const FIELD_PRIORITY_EXT = '_priority'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -140,20 +140,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRPositiveInt) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRPositiveInt($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRPositiveInt($ext)); } } } @@ -257,8 +264,8 @@ public function setPriority($priority = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -349,11 +356,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php index 663309a6c3..10c362203d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRAccountGuarantor extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -143,20 +143,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ON_HOLD])) { - $ext = (isset($data[self::FIELD_ON_HOLD_EXT]) && is_array($data[self::FIELD_ON_HOLD_EXT])) - ? $data[self::FIELD_ON_HOLD_EXT] - : null; - if ($data[self::FIELD_ON_HOLD] instanceof FHIRBoolean) { - $this->setOnHold($data[self::FIELD_ON_HOLD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ON_HOLD])) { - $this->setOnHold(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ON_HOLD]] + $ext)); - } else if (is_array($data[self::FIELD_ON_HOLD])) { - $this->setOnHold(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ON_HOLD]))); - } + if (isset($data[self::FIELD_ON_HOLD]) || isset($data[self::FIELD_ON_HOLD_EXT])) { + if (isset($data[self::FIELD_ON_HOLD])) { + $value = $data[self::FIELD_ON_HOLD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ON_HOLD_EXT]) && is_array($data[self::FIELD_ON_HOLD_EXT])) { + $ext = $data[self::FIELD_ON_HOLD_EXT]; } else { - $this->setOnHold(new FHIRBoolean($data[self::FIELD_ON_HOLD])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOnHold($value); + } else if (is_array($value)) { + $this->setOnHold(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOnHold(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnHold(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PARTY])) { @@ -298,8 +305,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -393,8 +400,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getOnHold())) { $a[self::FIELD_ON_HOLD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ON_HOLD_EXT] = $enc; } } @@ -404,6 +413,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php index fbf13b8687..41c23f0829 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRActivityDefinitionDynamicValue extends FHIRBackboneElement const FIELD_PATH_EXT = '_path'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -158,68 +158,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $ext = []; } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRString) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; } else { - $this->setLanguage(new FHIRString($data[self::FIELD_LANGUAGE])); + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } } @@ -405,8 +433,8 @@ public function setPath($path = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -530,32 +558,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php index 4cfc408dfa..7005f89fe9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRActivityDefinitionParticipant extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -137,20 +137,27 @@ public function __construct($data = null) $this->setRole(new FHIRCodeableConcept($data[self::FIELD_ROLE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRActionParticipantType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRActionParticipantType([FHIRActionParticipantType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRActionParticipantType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRActionParticipantType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionParticipantType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRActionParticipantType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRActionParticipantType([FHIRActionParticipantType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRActionParticipantType($ext)); } } } @@ -240,8 +247,8 @@ public function setType(FHIRActionParticipantType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -324,11 +331,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionParticipantType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionParticipantType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php index d2a464dcc1..5d9d0c2112 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRAdverseEventSuspectEntity extends FHIRBackboneElement const FIELD_INSTANCE = 'instance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * TODO @@ -199,20 +199,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CAUSALITY])) { - $ext = (isset($data[self::FIELD_CAUSALITY_EXT]) && is_array($data[self::FIELD_CAUSALITY_EXT])) - ? $data[self::FIELD_CAUSALITY_EXT] - : null; - if ($data[self::FIELD_CAUSALITY] instanceof FHIRAdverseEventCausality) { - $this->setCausality($data[self::FIELD_CAUSALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CAUSALITY])) { - $this->setCausality(new FHIRAdverseEventCausality([FHIRAdverseEventCausality::FIELD_VALUE => $data[self::FIELD_CAUSALITY]] + $ext)); - } else if (is_array($data[self::FIELD_CAUSALITY])) { - $this->setCausality(new FHIRAdverseEventCausality(array_merge($ext, $data[self::FIELD_CAUSALITY]))); - } + if (isset($data[self::FIELD_CAUSALITY]) || isset($data[self::FIELD_CAUSALITY_EXT])) { + if (isset($data[self::FIELD_CAUSALITY])) { + $value = $data[self::FIELD_CAUSALITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CAUSALITY_EXT]) && is_array($data[self::FIELD_CAUSALITY_EXT])) { + $ext = $data[self::FIELD_CAUSALITY_EXT]; } else { - $this->setCausality(new FHIRAdverseEventCausality($data[self::FIELD_CAUSALITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdverseEventCausality) { + $this->setCausality($value); + } else if (is_array($value)) { + $this->setCausality(new FHIRAdverseEventCausality(array_merge($ext, $value))); + } else { + $this->setCausality(new FHIRAdverseEventCausality([FHIRAdverseEventCausality::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCausality(new FHIRAdverseEventCausality($ext)); } } if (isset($data[self::FIELD_CAUSALITY_ASSESSMENT])) { @@ -236,20 +243,27 @@ public function __construct($data = null) $this->setCausalityMethod(new FHIRCodeableConcept($data[self::FIELD_CAUSALITY_METHOD])); } } - if (isset($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS])) { - $ext = (isset($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS_EXT]) && is_array($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS_EXT])) - ? $data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS_EXT] - : null; - if ($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS] instanceof FHIRString) { - $this->setCausalityProductRelatedness($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS])) { - $this->setCausalityProductRelatedness(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS]] + $ext)); - } else if (is_array($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS])) { - $this->setCausalityProductRelatedness(new FHIRString(array_merge($ext, $data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS]))); - } + if (isset($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS]) || isset($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS_EXT])) { + if (isset($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS])) { + $value = $data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS]; } else { - $this->setCausalityProductRelatedness(new FHIRString($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS])); + $value = null; + } + if (isset($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS_EXT]) && is_array($data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS_EXT])) { + $ext = $data[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCausalityProductRelatedness($value); + } else if (is_array($value)) { + $this->setCausalityProductRelatedness(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCausalityProductRelatedness(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCausalityProductRelatedness(new FHIRString($ext)); } } if (isset($data[self::FIELD_CAUSALITY_RESULT])) { @@ -519,8 +533,8 @@ public function setInstance(FHIRReference $instance = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -638,8 +652,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCausality())) { $a[self::FIELD_CAUSALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdverseEventCausality::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdverseEventCausality::FIELD_VALUE]); $a[self::FIELD_CAUSALITY_EXT] = $enc; } } @@ -654,8 +670,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getCausalityProductRelatedness())) { $a[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CAUSALITY_PRODUCT_RELATEDNESS_EXT] = $enc; } } @@ -665,6 +683,9 @@ public function jsonSerialize() if (null !== ($v = $this->getInstance())) { $a[self::FIELD_INSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php index 5e148a0635..9e0a2b8b60 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRAllergyIntoleranceReaction extends FHIRBackboneElement const FIELD_SUBSTANCE = 'substance'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -215,20 +215,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_EXPOSURE_ROUTE])) { @@ -274,36 +281,50 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_ONSET])) { - $ext = (isset($data[self::FIELD_ONSET_EXT]) && is_array($data[self::FIELD_ONSET_EXT])) - ? $data[self::FIELD_ONSET_EXT] - : null; - if ($data[self::FIELD_ONSET] instanceof FHIRDateTime) { - $this->setOnset($data[self::FIELD_ONSET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET])) { - $this->setOnset(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ONSET]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET])) { - $this->setOnset(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ONSET]))); - } + if (isset($data[self::FIELD_ONSET]) || isset($data[self::FIELD_ONSET_EXT])) { + if (isset($data[self::FIELD_ONSET])) { + $value = $data[self::FIELD_ONSET]; } else { - $this->setOnset(new FHIRDateTime($data[self::FIELD_ONSET])); + $value = null; } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRAllergyIntoleranceSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRAllergyIntoleranceSeverity([FHIRAllergyIntoleranceSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRAllergyIntoleranceSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + if (isset($data[self::FIELD_ONSET_EXT]) && is_array($data[self::FIELD_ONSET_EXT])) { + $ext = $data[self::FIELD_ONSET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOnset($value); + } else if (is_array($value)) { + $this->setOnset(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOnset(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOnset(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; } else { - $this->setSeverity(new FHIRAllergyIntoleranceSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRAllergyIntoleranceSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRAllergyIntoleranceSeverity([FHIRAllergyIntoleranceSeverity::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRAllergyIntoleranceSeverity($ext)); } } if (isset($data[self::FIELD_SUBSTANCE])) { @@ -653,8 +674,8 @@ public function setSubstance(FHIRCodeableConcept $substance = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -794,8 +815,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -803,28 +826,47 @@ public function jsonSerialize() $a[self::FIELD_EXPOSURE_ROUTE] = $v; } if ([] !== ($vs = $this->getManifestation())) { - $a[self::FIELD_MANIFESTATION] = $vs; + $a[self::FIELD_MANIFESTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANIFESTATION][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOnset())) { $a[self::FIELD_ONSET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ONSET_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getSubstance())) { $a[self::FIELD_SUBSTANCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php index a653caf2e2..2ed6296d04 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRAppointmentParticipant extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -167,36 +167,50 @@ public function __construct($data = null) $this->setActor(new FHIRReference($data[self::FIELD_ACTOR])); } } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRParticipantRequired) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRParticipantRequired([FHIRParticipantRequired::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRParticipantRequired(array_merge($ext, $data[self::FIELD_REQUIRED]))); - } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; } else { - $this->setRequired(new FHIRParticipantRequired($data[self::FIELD_REQUIRED])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRParticipationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRParticipationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRParticipantRequired) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRParticipantRequired(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRParticipantRequired([FHIRParticipantRequired::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRParticipantRequired($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRParticipationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRParticipationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRParticipationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRParticipationStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -395,8 +409,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -498,20 +512,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRParticipantRequired::FIELD_VALUE, $enc)))) { + unset($enc[FHIRParticipantRequired::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRParticipationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRParticipationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php index b6224a601e..9060e9d2e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRAuditEventAgent extends FHIRBackboneElement const FIELD_USER_ID = 'userId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -258,20 +258,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALT_ID])) { - $ext = (isset($data[self::FIELD_ALT_ID_EXT]) && is_array($data[self::FIELD_ALT_ID_EXT])) - ? $data[self::FIELD_ALT_ID_EXT] - : null; - if ($data[self::FIELD_ALT_ID] instanceof FHIRString) { - $this->setAltId($data[self::FIELD_ALT_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALT_ID])) { - $this->setAltId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALT_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ALT_ID])) { - $this->setAltId(new FHIRString(array_merge($ext, $data[self::FIELD_ALT_ID]))); - } + if (isset($data[self::FIELD_ALT_ID]) || isset($data[self::FIELD_ALT_ID_EXT])) { + if (isset($data[self::FIELD_ALT_ID])) { + $value = $data[self::FIELD_ALT_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALT_ID_EXT]) && is_array($data[self::FIELD_ALT_ID_EXT])) { + $ext = $data[self::FIELD_ALT_ID_EXT]; } else { - $this->setAltId(new FHIRString($data[self::FIELD_ALT_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAltId($value); + } else if (is_array($value)) { + $this->setAltId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAltId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAltId(new FHIRString($ext)); } } if (isset($data[self::FIELD_LOCATION])) { @@ -288,20 +295,27 @@ public function __construct($data = null) $this->setMedia(new FHIRCoding($data[self::FIELD_MEDIA])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NETWORK])) { @@ -311,33 +325,42 @@ public function __construct($data = null) $this->setNetwork(new FHIRAuditEventNetwork($data[self::FIELD_NETWORK])); } } - if (isset($data[self::FIELD_POLICY])) { - $ext = (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) - ? $data[self::FIELD_POLICY_EXT] - : null; - if (is_array($data[self::FIELD_POLICY])) { - foreach($data[self::FIELD_POLICY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addPolicy($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPolicy(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_POLICY]) || isset($data[self::FIELD_POLICY_EXT])) { + if (isset($data[self::FIELD_POLICY])) { + $value = $data[self::FIELD_POLICY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) { + $ext = $data[self::FIELD_POLICY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addPolicy($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addPolicy($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPolicy(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPolicy(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addPolicy(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPolicy(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_POLICY] instanceof FHIRUri) { - $this->addPolicy($data[self::FIELD_POLICY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_POLICY])) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_POLICY]] + $ext)); - } else { - $this->addPolicy(new FHIRUri($data[self::FIELD_POLICY])); } } if (isset($data[self::FIELD_PURPOSE_OF_USE])) { @@ -365,20 +388,27 @@ public function __construct($data = null) $this->setReference(new FHIRReference($data[self::FIELD_REFERENCE])); } } - if (isset($data[self::FIELD_REQUESTOR])) { - $ext = (isset($data[self::FIELD_REQUESTOR_EXT]) && is_array($data[self::FIELD_REQUESTOR_EXT])) - ? $data[self::FIELD_REQUESTOR_EXT] - : null; - if ($data[self::FIELD_REQUESTOR] instanceof FHIRBoolean) { - $this->setRequestor($data[self::FIELD_REQUESTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUESTOR])) { - $this->setRequestor(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUESTOR]] + $ext)); - } else if (is_array($data[self::FIELD_REQUESTOR])) { - $this->setRequestor(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUESTOR]))); - } + if (isset($data[self::FIELD_REQUESTOR]) || isset($data[self::FIELD_REQUESTOR_EXT])) { + if (isset($data[self::FIELD_REQUESTOR])) { + $value = $data[self::FIELD_REQUESTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUESTOR_EXT]) && is_array($data[self::FIELD_REQUESTOR_EXT])) { + $ext = $data[self::FIELD_REQUESTOR_EXT]; } else { - $this->setRequestor(new FHIRBoolean($data[self::FIELD_REQUESTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequestor($value); + } else if (is_array($value)) { + $this->setRequestor(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequestor(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequestor(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -902,8 +932,8 @@ public function setUserId(FHIRIdentifier $userId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1082,8 +1112,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAltId())) { $a[self::FIELD_ALT_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALT_ID_EXT] = $enc; } } @@ -1095,8 +1127,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1105,38 +1139,63 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPolicy())) { $a[self::FIELD_POLICY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_POLICY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_POLICY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_POLICY_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_POLICY_EXT] = $encs; + } } if ([] !== ($vs = $this->getPurposeOfUse())) { - $a[self::FIELD_PURPOSE_OF_USE] = $vs; + $a[self::FIELD_PURPOSE_OF_USE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PURPOSE_OF_USE][] = $v; + } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } if (null !== ($v = $this->getRequestor())) { $a[self::FIELD_REQUESTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUESTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } } if (null !== ($v = $this->getUserId())) { $a[self::FIELD_USER_ID] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php index 795a818e18..cbb86e66f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRAuditEventDetail extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRBase64Binary) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRBase64Binary($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRBase64Binary($ext)); } } } @@ -267,8 +281,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -365,18 +379,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php index c2a5295d06..a8d2350aa6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRAuditEventEntity extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -234,20 +234,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -282,36 +289,50 @@ public function __construct($data = null) $this->setLifecycle(new FHIRCoding($data[self::FIELD_LIFECYCLE])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_QUERY])) { - $ext = (isset($data[self::FIELD_QUERY_EXT]) && is_array($data[self::FIELD_QUERY_EXT])) - ? $data[self::FIELD_QUERY_EXT] - : null; - if ($data[self::FIELD_QUERY] instanceof FHIRBase64Binary) { - $this->setQuery($data[self::FIELD_QUERY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUERY])) { - $this->setQuery(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_QUERY]] + $ext)); - } else if (is_array($data[self::FIELD_QUERY])) { - $this->setQuery(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_QUERY]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_QUERY]) || isset($data[self::FIELD_QUERY_EXT])) { + if (isset($data[self::FIELD_QUERY])) { + $value = $data[self::FIELD_QUERY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUERY_EXT]) && is_array($data[self::FIELD_QUERY_EXT])) { + $ext = $data[self::FIELD_QUERY_EXT]; } else { - $this->setQuery(new FHIRBase64Binary($data[self::FIELD_QUERY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setQuery($value); + } else if (is_array($value)) { + $this->setQuery(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setQuery(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQuery(new FHIRBase64Binary($ext)); } } if (isset($data[self::FIELD_REFERENCE])) { @@ -760,8 +781,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -927,13 +948,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; @@ -943,15 +972,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getQuery())) { $a[self::FIELD_QUERY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_QUERY_EXT] = $enc; } } @@ -962,11 +995,20 @@ public function jsonSerialize() $a[self::FIELD_ROLE] = $v; } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php index ef5a4005da..2490743527 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetwork.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRAuditEventNetwork extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDRESS])) { - $ext = (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) - ? $data[self::FIELD_ADDRESS_EXT] - : null; - if ($data[self::FIELD_ADDRESS] instanceof FHIRString) { - $this->setAddress($data[self::FIELD_ADDRESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADDRESS]] + $ext)); - } else if (is_array($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRString(array_merge($ext, $data[self::FIELD_ADDRESS]))); - } + if (isset($data[self::FIELD_ADDRESS]) || isset($data[self::FIELD_ADDRESS_EXT])) { + if (isset($data[self::FIELD_ADDRESS])) { + $value = $data[self::FIELD_ADDRESS]; } else { - $this->setAddress(new FHIRString($data[self::FIELD_ADDRESS])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAuditEventAgentNetworkType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAuditEventAgentNetworkType([FHIRAuditEventAgentNetworkType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAuditEventAgentNetworkType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) { + $ext = $data[self::FIELD_ADDRESS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAddress($value); + } else if (is_array($value)) { + $this->setAddress(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAddress(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAddress(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRAuditEventAgentNetworkType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAuditEventAgentNetworkType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAuditEventAgentNetworkType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAuditEventAgentNetworkType([FHIRAuditEventAgentNetworkType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRAuditEventAgentNetworkType($ext)); } } } @@ -262,8 +276,8 @@ public function setType(FHIRAuditEventAgentNetworkType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -351,18 +365,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAddress())) { $a[self::FIELD_ADDRESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADDRESS_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAuditEventAgentNetworkType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAuditEventAgentNetworkType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php index a17798915c..68020f5b35 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRAuditEventSource extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -152,20 +152,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_SITE])) { - $ext = (isset($data[self::FIELD_SITE_EXT]) && is_array($data[self::FIELD_SITE_EXT])) - ? $data[self::FIELD_SITE_EXT] - : null; - if ($data[self::FIELD_SITE] instanceof FHIRString) { - $this->setSite($data[self::FIELD_SITE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SITE])) { - $this->setSite(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SITE]] + $ext)); - } else if (is_array($data[self::FIELD_SITE])) { - $this->setSite(new FHIRString(array_merge($ext, $data[self::FIELD_SITE]))); - } + if (isset($data[self::FIELD_SITE]) || isset($data[self::FIELD_SITE_EXT])) { + if (isset($data[self::FIELD_SITE])) { + $value = $data[self::FIELD_SITE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SITE_EXT]) && is_array($data[self::FIELD_SITE_EXT])) { + $ext = $data[self::FIELD_SITE_EXT]; } else { - $this->setSite(new FHIRString($data[self::FIELD_SITE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSite($value); + } else if (is_array($value)) { + $this->setSite(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSite(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSite(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -339,8 +346,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -444,13 +451,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getSite())) { $a[self::FIELD_SITE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SITE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php index 1d8770ca0e..c06938dbb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRBundleEntry extends FHIRBackboneElement const FIELD_SEARCH = 'search'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -173,20 +173,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FULL_URL])) { - $ext = (isset($data[self::FIELD_FULL_URL_EXT]) && is_array($data[self::FIELD_FULL_URL_EXT])) - ? $data[self::FIELD_FULL_URL_EXT] - : null; - if ($data[self::FIELD_FULL_URL] instanceof FHIRUri) { - $this->setFullUrl($data[self::FIELD_FULL_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FULL_URL])) { - $this->setFullUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_FULL_URL]] + $ext)); - } else if (is_array($data[self::FIELD_FULL_URL])) { - $this->setFullUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_FULL_URL]))); - } + if (isset($data[self::FIELD_FULL_URL]) || isset($data[self::FIELD_FULL_URL_EXT])) { + if (isset($data[self::FIELD_FULL_URL])) { + $value = $data[self::FIELD_FULL_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FULL_URL_EXT]) && is_array($data[self::FIELD_FULL_URL_EXT])) { + $ext = $data[self::FIELD_FULL_URL_EXT]; } else { - $this->setFullUrl(new FHIRUri($data[self::FIELD_FULL_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setFullUrl($value); + } else if (is_array($value)) { + $this->setFullUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setFullUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFullUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_LINK])) { @@ -483,8 +490,8 @@ public function setSearch(FHIRBundleSearch $search = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -609,13 +616,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFullUrl())) { $a[self::FIELD_FULL_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_FULL_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -629,6 +644,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSearch())) { $a[self::FIELD_SEARCH] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php index 64539fb2e5..bfa7bd9754 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRBundleLink extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_RELATION])) { - $ext = (isset($data[self::FIELD_RELATION_EXT]) && is_array($data[self::FIELD_RELATION_EXT])) - ? $data[self::FIELD_RELATION_EXT] - : null; - if ($data[self::FIELD_RELATION] instanceof FHIRString) { - $this->setRelation($data[self::FIELD_RELATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATION])) { - $this->setRelation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RELATION]] + $ext)); - } else if (is_array($data[self::FIELD_RELATION])) { - $this->setRelation(new FHIRString(array_merge($ext, $data[self::FIELD_RELATION]))); - } + if (isset($data[self::FIELD_RELATION]) || isset($data[self::FIELD_RELATION_EXT])) { + if (isset($data[self::FIELD_RELATION])) { + $value = $data[self::FIELD_RELATION]; } else { - $this->setRelation(new FHIRString($data[self::FIELD_RELATION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_RELATION_EXT]) && is_array($data[self::FIELD_RELATION_EXT])) { + $ext = $data[self::FIELD_RELATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRelation($value); + } else if (is_array($value)) { + $this->setRelation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRelation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRelation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -268,8 +282,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -365,18 +379,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getRelation())) { $a[self::FIELD_RELATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RELATION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php index ec70012a4e..f516423312 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRBundleRequest extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -193,100 +193,142 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_IF_MATCH])) { - $ext = (isset($data[self::FIELD_IF_MATCH_EXT]) && is_array($data[self::FIELD_IF_MATCH_EXT])) - ? $data[self::FIELD_IF_MATCH_EXT] - : null; - if ($data[self::FIELD_IF_MATCH] instanceof FHIRString) { - $this->setIfMatch($data[self::FIELD_IF_MATCH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_MATCH])) { - $this->setIfMatch(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IF_MATCH]] + $ext)); - } else if (is_array($data[self::FIELD_IF_MATCH])) { - $this->setIfMatch(new FHIRString(array_merge($ext, $data[self::FIELD_IF_MATCH]))); - } + if (isset($data[self::FIELD_IF_MATCH]) || isset($data[self::FIELD_IF_MATCH_EXT])) { + if (isset($data[self::FIELD_IF_MATCH])) { + $value = $data[self::FIELD_IF_MATCH]; } else { - $this->setIfMatch(new FHIRString($data[self::FIELD_IF_MATCH])); + $value = null; } - } - if (isset($data[self::FIELD_IF_MODIFIED_SINCE])) { - $ext = (isset($data[self::FIELD_IF_MODIFIED_SINCE_EXT]) && is_array($data[self::FIELD_IF_MODIFIED_SINCE_EXT])) - ? $data[self::FIELD_IF_MODIFIED_SINCE_EXT] - : null; - if ($data[self::FIELD_IF_MODIFIED_SINCE] instanceof FHIRInstant) { - $this->setIfModifiedSince($data[self::FIELD_IF_MODIFIED_SINCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_MODIFIED_SINCE])) { - $this->setIfModifiedSince(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_IF_MODIFIED_SINCE]] + $ext)); - } else if (is_array($data[self::FIELD_IF_MODIFIED_SINCE])) { - $this->setIfModifiedSince(new FHIRInstant(array_merge($ext, $data[self::FIELD_IF_MODIFIED_SINCE]))); - } + if (isset($data[self::FIELD_IF_MATCH_EXT]) && is_array($data[self::FIELD_IF_MATCH_EXT])) { + $ext = $data[self::FIELD_IF_MATCH_EXT]; } else { - $this->setIfModifiedSince(new FHIRInstant($data[self::FIELD_IF_MODIFIED_SINCE])); + $ext = []; } - } - if (isset($data[self::FIELD_IF_NONE_EXIST])) { - $ext = (isset($data[self::FIELD_IF_NONE_EXIST_EXT]) && is_array($data[self::FIELD_IF_NONE_EXIST_EXT])) - ? $data[self::FIELD_IF_NONE_EXIST_EXT] - : null; - if ($data[self::FIELD_IF_NONE_EXIST] instanceof FHIRString) { - $this->setIfNoneExist($data[self::FIELD_IF_NONE_EXIST]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_NONE_EXIST])) { - $this->setIfNoneExist(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IF_NONE_EXIST]] + $ext)); - } else if (is_array($data[self::FIELD_IF_NONE_EXIST])) { - $this->setIfNoneExist(new FHIRString(array_merge($ext, $data[self::FIELD_IF_NONE_EXIST]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIfMatch($value); + } else if (is_array($value)) { + $this->setIfMatch(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIfMatch(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setIfNoneExist(new FHIRString($data[self::FIELD_IF_NONE_EXIST])); + } else if ([] !== $ext) { + $this->setIfMatch(new FHIRString($ext)); } } - if (isset($data[self::FIELD_IF_NONE_MATCH])) { - $ext = (isset($data[self::FIELD_IF_NONE_MATCH_EXT]) && is_array($data[self::FIELD_IF_NONE_MATCH_EXT])) - ? $data[self::FIELD_IF_NONE_MATCH_EXT] - : null; - if ($data[self::FIELD_IF_NONE_MATCH] instanceof FHIRString) { - $this->setIfNoneMatch($data[self::FIELD_IF_NONE_MATCH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IF_NONE_MATCH])) { - $this->setIfNoneMatch(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IF_NONE_MATCH]] + $ext)); - } else if (is_array($data[self::FIELD_IF_NONE_MATCH])) { - $this->setIfNoneMatch(new FHIRString(array_merge($ext, $data[self::FIELD_IF_NONE_MATCH]))); - } + if (isset($data[self::FIELD_IF_MODIFIED_SINCE]) || isset($data[self::FIELD_IF_MODIFIED_SINCE_EXT])) { + if (isset($data[self::FIELD_IF_MODIFIED_SINCE])) { + $value = $data[self::FIELD_IF_MODIFIED_SINCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IF_MODIFIED_SINCE_EXT]) && is_array($data[self::FIELD_IF_MODIFIED_SINCE_EXT])) { + $ext = $data[self::FIELD_IF_MODIFIED_SINCE_EXT]; } else { - $this->setIfNoneMatch(new FHIRString($data[self::FIELD_IF_NONE_MATCH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIfModifiedSince($value); + } else if (is_array($value)) { + $this->setIfModifiedSince(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIfModifiedSince(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIfModifiedSince(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_METHOD])) { - $ext = (isset($data[self::FIELD_METHOD_EXT]) && is_array($data[self::FIELD_METHOD_EXT])) - ? $data[self::FIELD_METHOD_EXT] - : null; - if ($data[self::FIELD_METHOD] instanceof FHIRHTTPVerb) { - $this->setMethod($data[self::FIELD_METHOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_METHOD])) { - $this->setMethod(new FHIRHTTPVerb([FHIRHTTPVerb::FIELD_VALUE => $data[self::FIELD_METHOD]] + $ext)); - } else if (is_array($data[self::FIELD_METHOD])) { - $this->setMethod(new FHIRHTTPVerb(array_merge($ext, $data[self::FIELD_METHOD]))); + if (isset($data[self::FIELD_IF_NONE_EXIST]) || isset($data[self::FIELD_IF_NONE_EXIST_EXT])) { + if (isset($data[self::FIELD_IF_NONE_EXIST])) { + $value = $data[self::FIELD_IF_NONE_EXIST]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IF_NONE_EXIST_EXT]) && is_array($data[self::FIELD_IF_NONE_EXIST_EXT])) { + $ext = $data[self::FIELD_IF_NONE_EXIST_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIfNoneExist($value); + } else if (is_array($value)) { + $this->setIfNoneExist(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIfNoneExist(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIfNoneExist(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IF_NONE_MATCH]) || isset($data[self::FIELD_IF_NONE_MATCH_EXT])) { + if (isset($data[self::FIELD_IF_NONE_MATCH])) { + $value = $data[self::FIELD_IF_NONE_MATCH]; } else { - $this->setMethod(new FHIRHTTPVerb($data[self::FIELD_METHOD])); + $value = null; + } + if (isset($data[self::FIELD_IF_NONE_MATCH_EXT]) && is_array($data[self::FIELD_IF_NONE_MATCH_EXT])) { + $ext = $data[self::FIELD_IF_NONE_MATCH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setIfNoneMatch($value); + } else if (is_array($value)) { + $this->setIfNoneMatch(new FHIRString(array_merge($ext, $value))); + } else { + $this->setIfNoneMatch(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIfNoneMatch(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_METHOD]) || isset($data[self::FIELD_METHOD_EXT])) { + if (isset($data[self::FIELD_METHOD])) { + $value = $data[self::FIELD_METHOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_METHOD_EXT]) && is_array($data[self::FIELD_METHOD_EXT])) { + $ext = $data[self::FIELD_METHOD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRHTTPVerb) { + $this->setMethod($value); + } else if (is_array($value)) { + $this->setMethod(new FHIRHTTPVerb(array_merge($ext, $value))); + } else { + $this->setMethod(new FHIRHTTPVerb([FHIRHTTPVerb::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMethod(new FHIRHTTPVerb($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -554,8 +596,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -699,46 +741,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIfMatch())) { $a[self::FIELD_IF_MATCH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IF_MATCH_EXT] = $enc; } } if (null !== ($v = $this->getIfModifiedSince())) { $a[self::FIELD_IF_MODIFIED_SINCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_IF_MODIFIED_SINCE_EXT] = $enc; } } if (null !== ($v = $this->getIfNoneExist())) { $a[self::FIELD_IF_NONE_EXIST] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IF_NONE_EXIST_EXT] = $enc; } } if (null !== ($v = $this->getIfNoneMatch())) { $a[self::FIELD_IF_NONE_MATCH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IF_NONE_MATCH_EXT] = $enc; } } if (null !== ($v = $this->getMethod())) { $a[self::FIELD_METHOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRHTTPVerb::FIELD_VALUE, $enc)))) { + unset($enc[FHIRHTTPVerb::FIELD_VALUE]); $a[self::FIELD_METHOD_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php index 851fb662f6..6ae8722b16 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBundleResponse extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -174,52 +174,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ETAG])) { - $ext = (isset($data[self::FIELD_ETAG_EXT]) && is_array($data[self::FIELD_ETAG_EXT])) - ? $data[self::FIELD_ETAG_EXT] - : null; - if ($data[self::FIELD_ETAG] instanceof FHIRString) { - $this->setEtag($data[self::FIELD_ETAG]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ETAG])) { - $this->setEtag(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ETAG]] + $ext)); - } else if (is_array($data[self::FIELD_ETAG])) { - $this->setEtag(new FHIRString(array_merge($ext, $data[self::FIELD_ETAG]))); - } + if (isset($data[self::FIELD_ETAG]) || isset($data[self::FIELD_ETAG_EXT])) { + if (isset($data[self::FIELD_ETAG])) { + $value = $data[self::FIELD_ETAG]; } else { - $this->setEtag(new FHIRString($data[self::FIELD_ETAG])); + $value = null; } - } - if (isset($data[self::FIELD_LAST_MODIFIED])) { - $ext = (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) - ? $data[self::FIELD_LAST_MODIFIED_EXT] - : null; - if ($data[self::FIELD_LAST_MODIFIED] instanceof FHIRInstant) { - $this->setLastModified($data[self::FIELD_LAST_MODIFIED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_LAST_MODIFIED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRInstant(array_merge($ext, $data[self::FIELD_LAST_MODIFIED]))); - } + if (isset($data[self::FIELD_ETAG_EXT]) && is_array($data[self::FIELD_ETAG_EXT])) { + $ext = $data[self::FIELD_ETAG_EXT]; } else { - $this->setLastModified(new FHIRInstant($data[self::FIELD_LAST_MODIFIED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setEtag($value); + } else if (is_array($value)) { + $this->setEtag(new FHIRString(array_merge($ext, $value))); + } else { + $this->setEtag(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEtag(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LOCATION])) { - $ext = (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) - ? $data[self::FIELD_LOCATION_EXT] - : null; - if ($data[self::FIELD_LOCATION] instanceof FHIRUri) { - $this->setLocation($data[self::FIELD_LOCATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOCATION])) { - $this->setLocation(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_LOCATION]] + $ext)); - } else if (is_array($data[self::FIELD_LOCATION])) { - $this->setLocation(new FHIRUri(array_merge($ext, $data[self::FIELD_LOCATION]))); + if (isset($data[self::FIELD_LAST_MODIFIED]) || isset($data[self::FIELD_LAST_MODIFIED_EXT])) { + if (isset($data[self::FIELD_LAST_MODIFIED])) { + $value = $data[self::FIELD_LAST_MODIFIED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) { + $ext = $data[self::FIELD_LAST_MODIFIED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setLastModified($value); + } else if (is_array($value)) { + $this->setLastModified(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setLastModified(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastModified(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_LOCATION]) || isset($data[self::FIELD_LOCATION_EXT])) { + if (isset($data[self::FIELD_LOCATION])) { + $value = $data[self::FIELD_LOCATION]; } else { - $this->setLocation(new FHIRUri($data[self::FIELD_LOCATION])); + $value = null; + } + if (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) { + $ext = $data[self::FIELD_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setLocation($value); + } else if (is_array($value)) { + $this->setLocation(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setLocation(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLocation(new FHIRUri($ext)); } } if (isset($data[self::FIELD_OUTCOME])) { @@ -248,20 +269,27 @@ public function __construct($data = null) )); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRString) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRString(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRString($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRString(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRString($ext)); } } } @@ -479,8 +507,8 @@ public function setStatus($status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -616,22 +644,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEtag())) { $a[self::FIELD_ETAG] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ETAG_EXT] = $enc; } } if (null !== ($v = $this->getLastModified())) { $a[self::FIELD_LAST_MODIFIED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_LAST_MODIFIED_EXT] = $enc; } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_LOCATION_EXT] = $enc; } } @@ -640,11 +674,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php index 59f6bbb052..c90669c489 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRBundleSearch extends FHIRBackboneElement const FIELD_SCORE_EXT = '_score'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Why an entry is in the result set - whether it's included as a match or because @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRSearchEntryMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRSearchEntryMode([FHIRSearchEntryMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRSearchEntryMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRSearchEntryMode($data[self::FIELD_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_SCORE])) { - $ext = (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) - ? $data[self::FIELD_SCORE_EXT] - : null; - if ($data[self::FIELD_SCORE] instanceof FHIRDecimal) { - $this->setScore($data[self::FIELD_SCORE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_SCORE]] + $ext)); - } else if (is_array($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal(array_merge($ext, $data[self::FIELD_SCORE]))); + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchEntryMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRSearchEntryMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRSearchEntryMode([FHIRSearchEntryMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRSearchEntryMode($ext)); + } + } + if (isset($data[self::FIELD_SCORE]) || isset($data[self::FIELD_SCORE_EXT])) { + if (isset($data[self::FIELD_SCORE])) { + $value = $data[self::FIELD_SCORE]; } else { - $this->setScore(new FHIRDecimal($data[self::FIELD_SCORE])); + $value = null; + } + if (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) { + $ext = $data[self::FIELD_SCORE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setScore($value); + } else if (is_array($value)) { + $this->setScore(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScore(new FHIRDecimal($ext)); } } } @@ -263,8 +277,8 @@ public function setScore($score = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -352,18 +366,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchEntryMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchEntryMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getScore())) { $a[self::FIELD_SCORE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_SCORE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificate.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificate.php index 76ffdec84a..eb211821d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificate.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCapabilityStatementCertificate extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BLOB])) { - $ext = (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) - ? $data[self::FIELD_BLOB_EXT] - : null; - if ($data[self::FIELD_BLOB] instanceof FHIRBase64Binary) { - $this->setBlob($data[self::FIELD_BLOB]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_BLOB]] + $ext)); - } else if (is_array($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_BLOB]))); - } + if (isset($data[self::FIELD_BLOB]) || isset($data[self::FIELD_BLOB_EXT])) { + if (isset($data[self::FIELD_BLOB])) { + $value = $data[self::FIELD_BLOB]; } else { - $this->setBlob(new FHIRBase64Binary($data[self::FIELD_BLOB])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) { + $ext = $data[self::FIELD_BLOB_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setBlob($value); + } else if (is_array($value)) { + $this->setBlob(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBlob(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -270,8 +284,8 @@ public function setType($type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -367,18 +381,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBlob())) { $a[self::FIELD_BLOB] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_BLOB_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php index 158e0a2df4..c007507354 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocument.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRCapabilityStatementDocument extends FHIRBackboneElement const FIELD_PROFILE = 'profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -147,36 +147,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRDocumentMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRDocumentMode([FHIRDocumentMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRDocumentMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRDocumentMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRDocumentMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRDocumentMode([FHIRDocumentMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRDocumentMode($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -315,8 +329,8 @@ public function setProfile(FHIRReference $profile = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -410,21 +424,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php index 38e2035185..a9586c0c0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRCapabilityStatementEndpoint extends FHIRBackboneElement const FIELD_PROTOCOL = 'protocol'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -133,20 +133,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDRESS])) { - $ext = (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) - ? $data[self::FIELD_ADDRESS_EXT] - : null; - if ($data[self::FIELD_ADDRESS] instanceof FHIRUri) { - $this->setAddress($data[self::FIELD_ADDRESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ADDRESS]] + $ext)); - } else if (is_array($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUri(array_merge($ext, $data[self::FIELD_ADDRESS]))); - } + if (isset($data[self::FIELD_ADDRESS]) || isset($data[self::FIELD_ADDRESS_EXT])) { + if (isset($data[self::FIELD_ADDRESS])) { + $value = $data[self::FIELD_ADDRESS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) { + $ext = $data[self::FIELD_ADDRESS_EXT]; } else { - $this->setAddress(new FHIRUri($data[self::FIELD_ADDRESS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setAddress($value); + } else if (is_array($value)) { + $this->setAddress(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setAddress(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAddress(new FHIRUri($ext)); } } if (isset($data[self::FIELD_PROTOCOL])) { @@ -255,8 +262,8 @@ public function setProtocol(FHIRCoding $protocol = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -344,14 +351,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAddress())) { $a[self::FIELD_ADDRESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ADDRESS_EXT] = $enc; } } if (null !== ($v = $this->getProtocol())) { $a[self::FIELD_PROTOCOL] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEvent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEvent.php index 391d4b258e..2ccfc40658 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRCapabilityStatementEvent extends FHIRBackboneElement const FIELD_RESPONSE = 'response'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The impact of the content of a message. @@ -198,20 +198,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRMessageSignificanceCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; } else { - $this->setCategory(new FHIRMessageSignificanceCategory($data[self::FIELD_CATEGORY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMessageSignificanceCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCategory(new FHIRMessageSignificanceCategory($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -221,52 +228,73 @@ public function __construct($data = null) $this->setCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_FOCUS])) { - $ext = (isset($data[self::FIELD_FOCUS_EXT]) && is_array($data[self::FIELD_FOCUS_EXT])) - ? $data[self::FIELD_FOCUS_EXT] - : null; - if ($data[self::FIELD_FOCUS] instanceof FHIRResourceType) { - $this->setFocus($data[self::FIELD_FOCUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCUS])) { - $this->setFocus(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_FOCUS]] + $ext)); - } else if (is_array($data[self::FIELD_FOCUS])) { - $this->setFocus(new FHIRResourceType(array_merge($ext, $data[self::FIELD_FOCUS]))); - } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setFocus(new FHIRResourceType($data[self::FIELD_FOCUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIREventCapabilityMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIREventCapabilityMode([FHIREventCapabilityMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIREventCapabilityMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (isset($data[self::FIELD_FOCUS]) || isset($data[self::FIELD_FOCUS_EXT])) { + if (isset($data[self::FIELD_FOCUS])) { + $value = $data[self::FIELD_FOCUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FOCUS_EXT]) && is_array($data[self::FIELD_FOCUS_EXT])) { + $ext = $data[self::FIELD_FOCUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->setFocus($value); + } else if (is_array($value)) { + $this->setFocus(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->setFocus(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFocus(new FHIRResourceType($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIREventCapabilityMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventCapabilityMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIREventCapabilityMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIREventCapabilityMode([FHIREventCapabilityMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIREventCapabilityMode($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -528,8 +556,8 @@ public function setResponse(FHIRReference $response = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -647,8 +675,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMessageSignificanceCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMessageSignificanceCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } @@ -657,22 +687,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getFocus())) { $a[self::FIELD_FOCUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceType::FIELD_VALUE]); $a[self::FIELD_FOCUS_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventCapabilityMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventCapabilityMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } @@ -682,6 +718,9 @@ public function jsonSerialize() if (null !== ($v = $this->getResponse())) { $a[self::FIELD_RESPONSE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php index f7df666c10..cfa9e7ed56 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCapabilityStatementImplementation extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -273,8 +287,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -370,18 +384,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php index 4889cfe9c4..b5d5be5208 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCapabilityStatementInteraction extends FHIRBackboneElement const FIELD_DOCUMENTATION_EXT = '_documentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Operations supported by REST at the type or instance level. @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRTypeRestfulInteraction) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRTypeRestfulInteraction([FHIRTypeRestfulInteraction::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRTypeRestfulInteraction(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRTypeRestfulInteraction($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTypeRestfulInteraction) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRTypeRestfulInteraction(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRTypeRestfulInteraction([FHIRTypeRestfulInteraction::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRTypeRestfulInteraction($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } } @@ -262,8 +276,8 @@ public function setDocumentation($documentation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -351,18 +365,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTypeRestfulInteraction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTypeRestfulInteraction::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php index f63f74fb2b..910aa503eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCapabilityStatementInteraction1 extends FHIRBackboneElement const FIELD_DOCUMENTATION_EXT = '_documentation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Operations supported by REST at the system level. @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRSystemRestfulInteraction) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRSystemRestfulInteraction([FHIRSystemRestfulInteraction::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRSystemRestfulInteraction(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRSystemRestfulInteraction($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSystemRestfulInteraction) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRSystemRestfulInteraction(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRSystemRestfulInteraction([FHIRSystemRestfulInteraction::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRSystemRestfulInteraction($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } } @@ -262,8 +276,8 @@ public function setDocumentation($documentation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -351,18 +365,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSystemRestfulInteraction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSystemRestfulInteraction::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php index 2ea78f4dd1..1d66c7e246 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessaging.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRCapabilityStatementMessaging extends FHIRBackboneElement const FIELD_SUPPORTED_MESSAGE = 'supportedMessage'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -172,20 +172,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENDPOINT])) { @@ -224,20 +231,27 @@ public function __construct($data = null) $this->addEvent(new FHIRCapabilityStatementEvent($data[self::FIELD_EVENT])); } } - if (isset($data[self::FIELD_RELIABLE_CACHE])) { - $ext = (isset($data[self::FIELD_RELIABLE_CACHE_EXT]) && is_array($data[self::FIELD_RELIABLE_CACHE_EXT])) - ? $data[self::FIELD_RELIABLE_CACHE_EXT] - : null; - if ($data[self::FIELD_RELIABLE_CACHE] instanceof FHIRUnsignedInt) { - $this->setReliableCache($data[self::FIELD_RELIABLE_CACHE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELIABLE_CACHE])) { - $this->setReliableCache(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_RELIABLE_CACHE]] + $ext)); - } else if (is_array($data[self::FIELD_RELIABLE_CACHE])) { - $this->setReliableCache(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_RELIABLE_CACHE]))); - } + if (isset($data[self::FIELD_RELIABLE_CACHE]) || isset($data[self::FIELD_RELIABLE_CACHE_EXT])) { + if (isset($data[self::FIELD_RELIABLE_CACHE])) { + $value = $data[self::FIELD_RELIABLE_CACHE]; } else { - $this->setReliableCache(new FHIRUnsignedInt($data[self::FIELD_RELIABLE_CACHE])); + $value = null; + } + if (isset($data[self::FIELD_RELIABLE_CACHE_EXT]) && is_array($data[self::FIELD_RELIABLE_CACHE_EXT])) { + $ext = $data[self::FIELD_RELIABLE_CACHE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setReliableCache($value); + } else if (is_array($value)) { + $this->setReliableCache(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setReliableCache(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReliableCache(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_SUPPORTED_MESSAGE])) { @@ -538,8 +552,8 @@ public function setSupportedMessage(array $supportedMessage = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -674,26 +688,51 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getReliableCache())) { $a[self::FIELD_RELIABLE_CACHE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_RELIABLE_CACHE_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportedMessage())) { - $a[self::FIELD_SUPPORTED_MESSAGE] = $vs; + $a[self::FIELD_SUPPORTED_MESSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTED_MESSAGE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php index a0ee89df9b..47dbf636df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRCapabilityStatementOperation extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -140,20 +140,27 @@ public function __construct($data = null) $this->setDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -255,8 +262,8 @@ public function setName($name = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -347,11 +354,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php index 25c557c1af..ac2f148462 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRCapabilityStatementResource extends FHIRBackboneElement const FIELD_VERSIONING_EXT = '_versioning'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -320,84 +320,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONDITIONAL_CREATE])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_CREATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_CREATE_EXT])) - ? $data[self::FIELD_CONDITIONAL_CREATE_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_CREATE] instanceof FHIRBoolean) { - $this->setConditionalCreate($data[self::FIELD_CONDITIONAL_CREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_CREATE])) { - $this->setConditionalCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_CREATE]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_CREATE])) { - $this->setConditionalCreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CONDITIONAL_CREATE]))); - } + if (isset($data[self::FIELD_CONDITIONAL_CREATE]) || isset($data[self::FIELD_CONDITIONAL_CREATE_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_CREATE])) { + $value = $data[self::FIELD_CONDITIONAL_CREATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_CREATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_CREATE_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_CREATE_EXT]; } else { - $this->setConditionalCreate(new FHIRBoolean($data[self::FIELD_CONDITIONAL_CREATE])); - } - } - if (isset($data[self::FIELD_CONDITIONAL_DELETE])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_DELETE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_DELETE_EXT])) - ? $data[self::FIELD_CONDITIONAL_DELETE_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_DELETE] instanceof FHIRConditionalDeleteStatus) { - $this->setConditionalDelete($data[self::FIELD_CONDITIONAL_DELETE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_DELETE])) { - $this->setConditionalDelete(new FHIRConditionalDeleteStatus([FHIRConditionalDeleteStatus::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_DELETE]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_DELETE])) { - $this->setConditionalDelete(new FHIRConditionalDeleteStatus(array_merge($ext, $data[self::FIELD_CONDITIONAL_DELETE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setConditionalCreate($value); + } else if (is_array($value)) { + $this->setConditionalCreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setConditionalCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConditionalCreate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_CONDITIONAL_DELETE]) || isset($data[self::FIELD_CONDITIONAL_DELETE_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_DELETE])) { + $value = $data[self::FIELD_CONDITIONAL_DELETE]; } else { - $this->setConditionalDelete(new FHIRConditionalDeleteStatus($data[self::FIELD_CONDITIONAL_DELETE])); - } - } - if (isset($data[self::FIELD_CONDITIONAL_READ])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_READ_EXT]) && is_array($data[self::FIELD_CONDITIONAL_READ_EXT])) - ? $data[self::FIELD_CONDITIONAL_READ_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_READ] instanceof FHIRConditionalReadStatus) { - $this->setConditionalRead($data[self::FIELD_CONDITIONAL_READ]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_READ])) { - $this->setConditionalRead(new FHIRConditionalReadStatus([FHIRConditionalReadStatus::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_READ]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_READ])) { - $this->setConditionalRead(new FHIRConditionalReadStatus(array_merge($ext, $data[self::FIELD_CONDITIONAL_READ]))); + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_DELETE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_DELETE_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_DELETE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionalDeleteStatus) { + $this->setConditionalDelete($value); + } else if (is_array($value)) { + $this->setConditionalDelete(new FHIRConditionalDeleteStatus(array_merge($ext, $value))); + } else { + $this->setConditionalDelete(new FHIRConditionalDeleteStatus([FHIRConditionalDeleteStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConditionalDelete(new FHIRConditionalDeleteStatus($ext)); + } + } + if (isset($data[self::FIELD_CONDITIONAL_READ]) || isset($data[self::FIELD_CONDITIONAL_READ_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_READ])) { + $value = $data[self::FIELD_CONDITIONAL_READ]; } else { - $this->setConditionalRead(new FHIRConditionalReadStatus($data[self::FIELD_CONDITIONAL_READ])); - } - } - if (isset($data[self::FIELD_CONDITIONAL_UPDATE])) { - $ext = (isset($data[self::FIELD_CONDITIONAL_UPDATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_UPDATE_EXT])) - ? $data[self::FIELD_CONDITIONAL_UPDATE_EXT] - : null; - if ($data[self::FIELD_CONDITIONAL_UPDATE] instanceof FHIRBoolean) { - $this->setConditionalUpdate($data[self::FIELD_CONDITIONAL_UPDATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITIONAL_UPDATE])) { - $this->setConditionalUpdate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CONDITIONAL_UPDATE]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITIONAL_UPDATE])) { - $this->setConditionalUpdate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CONDITIONAL_UPDATE]))); + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_READ_EXT]) && is_array($data[self::FIELD_CONDITIONAL_READ_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_READ_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionalReadStatus) { + $this->setConditionalRead($value); + } else if (is_array($value)) { + $this->setConditionalRead(new FHIRConditionalReadStatus(array_merge($ext, $value))); + } else { + $this->setConditionalRead(new FHIRConditionalReadStatus([FHIRConditionalReadStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConditionalRead(new FHIRConditionalReadStatus($ext)); + } + } + if (isset($data[self::FIELD_CONDITIONAL_UPDATE]) || isset($data[self::FIELD_CONDITIONAL_UPDATE_EXT])) { + if (isset($data[self::FIELD_CONDITIONAL_UPDATE])) { + $value = $data[self::FIELD_CONDITIONAL_UPDATE]; } else { - $this->setConditionalUpdate(new FHIRBoolean($data[self::FIELD_CONDITIONAL_UPDATE])); - } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRMarkdown) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + $value = null; + } + if (isset($data[self::FIELD_CONDITIONAL_UPDATE_EXT]) && is_array($data[self::FIELD_CONDITIONAL_UPDATE_EXT])) { + $ext = $data[self::FIELD_CONDITIONAL_UPDATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setConditionalUpdate($value); + } else if (is_array($value)) { + $this->setConditionalUpdate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setConditionalUpdate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setConditionalUpdate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRMarkdown($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_INTERACTION])) { @@ -425,78 +460,103 @@ public function __construct($data = null) $this->setProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_READ_HISTORY])) { - $ext = (isset($data[self::FIELD_READ_HISTORY_EXT]) && is_array($data[self::FIELD_READ_HISTORY_EXT])) - ? $data[self::FIELD_READ_HISTORY_EXT] - : null; - if ($data[self::FIELD_READ_HISTORY] instanceof FHIRBoolean) { - $this->setReadHistory($data[self::FIELD_READ_HISTORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READ_HISTORY])) { - $this->setReadHistory(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_READ_HISTORY]] + $ext)); - } else if (is_array($data[self::FIELD_READ_HISTORY])) { - $this->setReadHistory(new FHIRBoolean(array_merge($ext, $data[self::FIELD_READ_HISTORY]))); - } + if (isset($data[self::FIELD_READ_HISTORY]) || isset($data[self::FIELD_READ_HISTORY_EXT])) { + if (isset($data[self::FIELD_READ_HISTORY])) { + $value = $data[self::FIELD_READ_HISTORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_READ_HISTORY_EXT]) && is_array($data[self::FIELD_READ_HISTORY_EXT])) { + $ext = $data[self::FIELD_READ_HISTORY_EXT]; } else { - $this->setReadHistory(new FHIRBoolean($data[self::FIELD_READ_HISTORY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReadHistory($value); + } else if (is_array($value)) { + $this->setReadHistory(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReadHistory(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReadHistory(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_REFERENCE_POLICY])) { - $ext = (isset($data[self::FIELD_REFERENCE_POLICY_EXT]) && is_array($data[self::FIELD_REFERENCE_POLICY_EXT])) - ? $data[self::FIELD_REFERENCE_POLICY_EXT] - : null; - if (is_array($data[self::FIELD_REFERENCE_POLICY])) { - foreach($data[self::FIELD_REFERENCE_POLICY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRReferenceHandlingPolicy) { - $this->addReferencePolicy($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy([FHIRReferenceHandlingPolicy::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_REFERENCE_POLICY]) || isset($data[self::FIELD_REFERENCE_POLICY_EXT])) { + if (isset($data[self::FIELD_REFERENCE_POLICY])) { + $value = $data[self::FIELD_REFERENCE_POLICY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_POLICY_EXT]) && is_array($data[self::FIELD_REFERENCE_POLICY_EXT])) { + $ext = $data[self::FIELD_REFERENCE_POLICY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRReferenceHandlingPolicy) { + $this->addReferencePolicy($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRReferenceHandlingPolicy) { + $this->addReferencePolicy($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy(array_merge($v, $iext))); + } else { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy([FHIRReferenceHandlingPolicy::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy($v)); } + } elseif (is_array($value)) { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy(array_merge($ext, $value))); + } else { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy([FHIRReferenceHandlingPolicy::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addReferencePolicy(new FHIRReferenceHandlingPolicy($iext)); } - } elseif ($data[self::FIELD_REFERENCE_POLICY] instanceof FHIRReferenceHandlingPolicy) { - $this->addReferencePolicy($data[self::FIELD_REFERENCE_POLICY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REFERENCE_POLICY])) { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy([FHIRReferenceHandlingPolicy::FIELD_VALUE => $data[self::FIELD_REFERENCE_POLICY]] + $ext)); - } else { - $this->addReferencePolicy(new FHIRReferenceHandlingPolicy($data[self::FIELD_REFERENCE_POLICY])); } } - if (isset($data[self::FIELD_SEARCH_INCLUDE])) { - $ext = (isset($data[self::FIELD_SEARCH_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_INCLUDE_EXT])) - ? $data[self::FIELD_SEARCH_INCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_SEARCH_INCLUDE])) { - foreach($data[self::FIELD_SEARCH_INCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSearchInclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSearchInclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEARCH_INCLUDE]) || isset($data[self::FIELD_SEARCH_INCLUDE_EXT])) { + if (isset($data[self::FIELD_SEARCH_INCLUDE])) { + $value = $data[self::FIELD_SEARCH_INCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_INCLUDE_EXT])) { + $ext = $data[self::FIELD_SEARCH_INCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSearchInclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSearchInclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSearchInclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSearchInclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSearchInclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSearchInclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_SEARCH_INCLUDE] instanceof FHIRString) { - $this->addSearchInclude($data[self::FIELD_SEARCH_INCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEARCH_INCLUDE])) { - $this->addSearchInclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEARCH_INCLUDE]] + $ext)); - } else { - $this->addSearchInclude(new FHIRString($data[self::FIELD_SEARCH_INCLUDE])); } } if (isset($data[self::FIELD_SEARCH_PARAM])) { @@ -517,81 +577,111 @@ public function __construct($data = null) $this->addSearchParam(new FHIRCapabilityStatementSearchParam($data[self::FIELD_SEARCH_PARAM])); } } - if (isset($data[self::FIELD_SEARCH_REV_INCLUDE])) { - $ext = (isset($data[self::FIELD_SEARCH_REV_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_REV_INCLUDE_EXT])) - ? $data[self::FIELD_SEARCH_REV_INCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_SEARCH_REV_INCLUDE])) { - foreach($data[self::FIELD_SEARCH_REV_INCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSearchRevInclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSearchRevInclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEARCH_REV_INCLUDE]) || isset($data[self::FIELD_SEARCH_REV_INCLUDE_EXT])) { + if (isset($data[self::FIELD_SEARCH_REV_INCLUDE])) { + $value = $data[self::FIELD_SEARCH_REV_INCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_REV_INCLUDE_EXT]) && is_array($data[self::FIELD_SEARCH_REV_INCLUDE_EXT])) { + $ext = $data[self::FIELD_SEARCH_REV_INCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSearchRevInclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSearchRevInclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSearchRevInclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSearchRevInclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSearchRevInclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_SEARCH_REV_INCLUDE] instanceof FHIRString) { - $this->addSearchRevInclude($data[self::FIELD_SEARCH_REV_INCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEARCH_REV_INCLUDE])) { - $this->addSearchRevInclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEARCH_REV_INCLUDE]] + $ext)); - } else { - $this->addSearchRevInclude(new FHIRString($data[self::FIELD_SEARCH_REV_INCLUDE])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRResourceType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRResourceType(array_merge($ext, $data[self::FIELD_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSearchRevInclude(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRResourceType($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_UPDATE_CREATE])) { - $ext = (isset($data[self::FIELD_UPDATE_CREATE_EXT]) && is_array($data[self::FIELD_UPDATE_CREATE_EXT])) - ? $data[self::FIELD_UPDATE_CREATE_EXT] - : null; - if ($data[self::FIELD_UPDATE_CREATE] instanceof FHIRBoolean) { - $this->setUpdateCreate($data[self::FIELD_UPDATE_CREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UPDATE_CREATE])) { - $this->setUpdateCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_UPDATE_CREATE]] + $ext)); - } else if (is_array($data[self::FIELD_UPDATE_CREATE])) { - $this->setUpdateCreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_UPDATE_CREATE]))); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRResourceType($ext)); + } + } + if (isset($data[self::FIELD_UPDATE_CREATE]) || isset($data[self::FIELD_UPDATE_CREATE_EXT])) { + if (isset($data[self::FIELD_UPDATE_CREATE])) { + $value = $data[self::FIELD_UPDATE_CREATE]; } else { - $this->setUpdateCreate(new FHIRBoolean($data[self::FIELD_UPDATE_CREATE])); - } - } - if (isset($data[self::FIELD_VERSIONING])) { - $ext = (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) - ? $data[self::FIELD_VERSIONING_EXT] - : null; - if ($data[self::FIELD_VERSIONING] instanceof FHIRResourceVersionPolicy) { - $this->setVersioning($data[self::FIELD_VERSIONING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRResourceVersionPolicy([FHIRResourceVersionPolicy::FIELD_VALUE => $data[self::FIELD_VERSIONING]] + $ext)); - } else if (is_array($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRResourceVersionPolicy(array_merge($ext, $data[self::FIELD_VERSIONING]))); + $value = null; + } + if (isset($data[self::FIELD_UPDATE_CREATE_EXT]) && is_array($data[self::FIELD_UPDATE_CREATE_EXT])) { + $ext = $data[self::FIELD_UPDATE_CREATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setUpdateCreate($value); + } else if (is_array($value)) { + $this->setUpdateCreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setUpdateCreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUpdateCreate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VERSIONING]) || isset($data[self::FIELD_VERSIONING_EXT])) { + if (isset($data[self::FIELD_VERSIONING])) { + $value = $data[self::FIELD_VERSIONING]; } else { - $this->setVersioning(new FHIRResourceVersionPolicy($data[self::FIELD_VERSIONING])); + $value = null; + } + if (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) { + $ext = $data[self::FIELD_VERSIONING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceVersionPolicy) { + $this->setVersioning($value); + } else if (is_array($value)) { + $this->setVersioning(new FHIRResourceVersionPolicy(array_merge($ext, $value))); + } else { + $this->setVersioning(new FHIRResourceVersionPolicy([FHIRResourceVersionPolicy::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersioning(new FHIRResourceVersionPolicy($ext)); } } } @@ -1280,8 +1370,8 @@ public function setVersioning(FHIRResourceVersionPolicy $versioning = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1514,121 +1604,178 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getConditionalCreate())) { $a[self::FIELD_CONDITIONAL_CREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_CREATE_EXT] = $enc; } } if (null !== ($v = $this->getConditionalDelete())) { $a[self::FIELD_CONDITIONAL_DELETE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionalDeleteStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionalDeleteStatus::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_DELETE_EXT] = $enc; } } if (null !== ($v = $this->getConditionalRead())) { $a[self::FIELD_CONDITIONAL_READ] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionalReadStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionalReadStatus::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_READ_EXT] = $enc; } } if (null !== ($v = $this->getConditionalUpdate())) { $a[self::FIELD_CONDITIONAL_UPDATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CONDITIONAL_UPDATE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getInteraction())) { - $a[self::FIELD_INTERACTION] = $vs; + $a[self::FIELD_INTERACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERACTION][] = $v; + } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } if (null !== ($v = $this->getReadHistory())) { $a[self::FIELD_READ_HISTORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_READ_HISTORY_EXT] = $enc; } } if ([] !== ($vs = $this->getReferencePolicy())) { $a[self::FIELD_REFERENCE_POLICY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REFERENCE_POLICY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REFERENCE_POLICY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRReferenceHandlingPolicy::FIELD_VALUE]) || array_key_exists(FHIRReferenceHandlingPolicy::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REFERENCE_POLICY_EXT][] = null; + unset($enc[FHIRReferenceHandlingPolicy::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REFERENCE_POLICY_EXT] = $encs; + } } if ([] !== ($vs = $this->getSearchInclude())) { $a[self::FIELD_SEARCH_INCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEARCH_INCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEARCH_INCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEARCH_INCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEARCH_INCLUDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSearchParam())) { - $a[self::FIELD_SEARCH_PARAM] = $vs; + $a[self::FIELD_SEARCH_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SEARCH_PARAM][] = $v; + } } if ([] !== ($vs = $this->getSearchRevInclude())) { $a[self::FIELD_SEARCH_REV_INCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEARCH_REV_INCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEARCH_REV_INCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEARCH_REV_INCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEARCH_REV_INCLUDE_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUpdateCreate())) { $a[self::FIELD_UPDATE_CREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_UPDATE_CREATE_EXT] = $enc; } } if (null !== ($v = $this->getVersioning())) { $a[self::FIELD_VERSIONING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceVersionPolicy::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceVersionPolicy::FIELD_VALUE]); $a[self::FIELD_VERSIONING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php index 183a8c295c..0a8fb029d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRCapabilityStatementRest extends FHIRBackboneElement const FIELD_SECURITY = 'security'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -215,49 +215,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMPARTMENT])) { - $ext = (isset($data[self::FIELD_COMPARTMENT_EXT]) && is_array($data[self::FIELD_COMPARTMENT_EXT])) - ? $data[self::FIELD_COMPARTMENT_EXT] - : null; - if (is_array($data[self::FIELD_COMPARTMENT])) { - foreach($data[self::FIELD_COMPARTMENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addCompartment($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCompartment(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCompartment(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMPARTMENT]) || isset($data[self::FIELD_COMPARTMENT_EXT])) { + if (isset($data[self::FIELD_COMPARTMENT])) { + $value = $data[self::FIELD_COMPARTMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARTMENT_EXT]) && is_array($data[self::FIELD_COMPARTMENT_EXT])) { + $ext = $data[self::FIELD_COMPARTMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addCompartment($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addCompartment($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCompartment(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addCompartment(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCompartment(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addCompartment(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addCompartment(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_COMPARTMENT] instanceof FHIRUri) { - $this->addCompartment($data[self::FIELD_COMPARTMENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COMPARTMENT])) { - $this->addCompartment(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_COMPARTMENT]] + $ext)); - } else { - $this->addCompartment(new FHIRUri($data[self::FIELD_COMPARTMENT])); - } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCompartment(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } if (isset($data[self::FIELD_INTERACTION])) { @@ -278,20 +294,27 @@ public function __construct($data = null) $this->addInteraction(new FHIRCapabilityStatementInteraction1($data[self::FIELD_INTERACTION])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRRestfulCapabilityMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRRestfulCapabilityMode([FHIRRestfulCapabilityMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRRestfulCapabilityMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRRestfulCapabilityMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRestfulCapabilityMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRRestfulCapabilityMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRRestfulCapabilityMode([FHIRRestfulCapabilityMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRRestfulCapabilityMode($ext)); } } if (isset($data[self::FIELD_OPERATION])) { @@ -793,8 +816,8 @@ public function setSecurity(FHIRCapabilityStatementSecurity $security = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -953,48 +976,87 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCompartment())) { $a[self::FIELD_COMPARTMENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COMPARTMENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COMPARTMENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COMPARTMENT_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COMPARTMENT_EXT] = $encs; + } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getInteraction())) { - $a[self::FIELD_INTERACTION] = $vs; + $a[self::FIELD_INTERACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERACTION][] = $v; + } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRestfulCapabilityMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRestfulCapabilityMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if ([] !== ($vs = $this->getOperation())) { - $a[self::FIELD_OPERATION] = $vs; + $a[self::FIELD_OPERATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPERATION][] = $v; + } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } } if ([] !== ($vs = $this->getSearchParam())) { - $a[self::FIELD_SEARCH_PARAM] = $vs; + $a[self::FIELD_SEARCH_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SEARCH_PARAM][] = $v; + } } if (null !== ($v = $this->getSecurity())) { $a[self::FIELD_SECURITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php index 8cf6605268..3d31a3c995 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRCapabilityStatementSearchParam extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -161,68 +161,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRUri) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; } else { - $this->setDefinition(new FHIRUri($data[self::FIELD_DEFINITION])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSearchParamType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRSearchParamType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchParamType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSearchParamType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRSearchParamType($ext)); } } } @@ -400,8 +428,8 @@ public function setType(FHIRSearchParamType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -517,32 +545,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchParamType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchParamType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php index 7ab595be37..fa452588cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRCapabilityStatementSecurity extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A Capability Statement documents a set of capabilities (behaviors) of a FHIR @@ -176,36 +176,50 @@ public function __construct($data = null) $this->addCertificate(new FHIRCapabilityStatementCertificate($data[self::FIELD_CERTIFICATE])); } } - if (isset($data[self::FIELD_CORS])) { - $ext = (isset($data[self::FIELD_CORS_EXT]) && is_array($data[self::FIELD_CORS_EXT])) - ? $data[self::FIELD_CORS_EXT] - : null; - if ($data[self::FIELD_CORS] instanceof FHIRBoolean) { - $this->setCors($data[self::FIELD_CORS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CORS])) { - $this->setCors(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CORS]] + $ext)); - } else if (is_array($data[self::FIELD_CORS])) { - $this->setCors(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CORS]))); - } + if (isset($data[self::FIELD_CORS]) || isset($data[self::FIELD_CORS_EXT])) { + if (isset($data[self::FIELD_CORS])) { + $value = $data[self::FIELD_CORS]; } else { - $this->setCors(new FHIRBoolean($data[self::FIELD_CORS])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CORS_EXT]) && is_array($data[self::FIELD_CORS_EXT])) { + $ext = $data[self::FIELD_CORS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCors($value); + } else if (is_array($value)) { + $this->setCors(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCors(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCors(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -444,8 +458,8 @@ public function setService(array $service = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -566,24 +580,43 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCertificate())) { - $a[self::FIELD_CERTIFICATE] = $vs; + $a[self::FIELD_CERTIFICATE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CERTIFICATE][] = $v; + } } if (null !== ($v = $this->getCors())) { $a[self::FIELD_CORS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CORS_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getService())) { - $a[self::FIELD_SERVICE] = $vs; + $a[self::FIELD_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php index 106a4d777b..ece1dde5b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftware.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRCapabilityStatementSoftware extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -148,52 +148,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_RELEASE_DATE])) { - $ext = (isset($data[self::FIELD_RELEASE_DATE_EXT]) && is_array($data[self::FIELD_RELEASE_DATE_EXT])) - ? $data[self::FIELD_RELEASE_DATE_EXT] - : null; - if ($data[self::FIELD_RELEASE_DATE] instanceof FHIRDateTime) { - $this->setReleaseDate($data[self::FIELD_RELEASE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELEASE_DATE])) { - $this->setReleaseDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RELEASE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_RELEASE_DATE])) { - $this->setReleaseDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RELEASE_DATE]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setReleaseDate(new FHIRDateTime($data[self::FIELD_RELEASE_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_RELEASE_DATE]) || isset($data[self::FIELD_RELEASE_DATE_EXT])) { + if (isset($data[self::FIELD_RELEASE_DATE])) { + $value = $data[self::FIELD_RELEASE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELEASE_DATE_EXT]) && is_array($data[self::FIELD_RELEASE_DATE_EXT])) { + $ext = $data[self::FIELD_RELEASE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReleaseDate($value); + } else if (is_array($value)) { + $this->setReleaseDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReleaseDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReleaseDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -343,8 +364,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -454,25 +475,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getReleaseDate())) { $a[self::FIELD_RELEASE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RELEASE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php index c54a974f69..874456c2c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRCapabilityStatementSupportedMessage extends FHIRBackboneElement const FIELD_MODE_EXT = '_mode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -138,20 +138,27 @@ public function __construct($data = null) $this->setDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIREventCapabilityMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIREventCapabilityMode([FHIREventCapabilityMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIREventCapabilityMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIREventCapabilityMode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventCapabilityMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIREventCapabilityMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIREventCapabilityMode([FHIREventCapabilityMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIREventCapabilityMode($ext)); } } } @@ -241,8 +248,8 @@ public function setMode(FHIREventCapabilityMode $mode = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -325,11 +332,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventCapabilityMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventCapabilityMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php index 5f98748c9e..56d6aef9ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRCarePlanActivity extends FHIRBackboneElement const FIELD_REFERENCE = 'reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the intention of how one or more practitioners intend to deliver care @@ -528,8 +528,8 @@ public function setReference(FHIRReference $reference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -650,17 +650,38 @@ public function jsonSerialize() $a[self::FIELD_DETAIL] = $v; } if ([] !== ($vs = $this->getOutcomeCodeableConcept())) { - $a[self::FIELD_OUTCOME_CODEABLE_CONCEPT] = $vs; + $a[self::FIELD_OUTCOME_CODEABLE_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME_CODEABLE_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getOutcomeReference())) { - $a[self::FIELD_OUTCOME_REFERENCE] = $vs; + $a[self::FIELD_OUTCOME_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getProgress())) { - $a[self::FIELD_PROGRESS] = $vs; + $a[self::FIELD_PROGRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRESS][] = $v; + } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php index 264854f9f9..7bc69b74ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRCarePlanDetail extends FHIRBackboneElement const FIELD_STATUS_REASON_EXT = '_statusReason'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -398,20 +398,27 @@ public function __construct($data = null) $this->setDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_GOAL])) { @@ -471,20 +478,27 @@ public function __construct($data = null) $this->setProductReference(new FHIRReference($data[self::FIELD_PRODUCT_REFERENCE])); } } - if (isset($data[self::FIELD_PROHIBITED])) { - $ext = (isset($data[self::FIELD_PROHIBITED_EXT]) && is_array($data[self::FIELD_PROHIBITED_EXT])) - ? $data[self::FIELD_PROHIBITED_EXT] - : null; - if ($data[self::FIELD_PROHIBITED] instanceof FHIRBoolean) { - $this->setProhibited($data[self::FIELD_PROHIBITED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROHIBITED])) { - $this->setProhibited(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PROHIBITED]] + $ext)); - } else if (is_array($data[self::FIELD_PROHIBITED])) { - $this->setProhibited(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PROHIBITED]))); - } + if (isset($data[self::FIELD_PROHIBITED]) || isset($data[self::FIELD_PROHIBITED_EXT])) { + if (isset($data[self::FIELD_PROHIBITED])) { + $value = $data[self::FIELD_PROHIBITED]; } else { - $this->setProhibited(new FHIRBoolean($data[self::FIELD_PROHIBITED])); + $value = null; + } + if (isset($data[self::FIELD_PROHIBITED_EXT]) && is_array($data[self::FIELD_PROHIBITED_EXT])) { + $ext = $data[self::FIELD_PROHIBITED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setProhibited($value); + } else if (is_array($value)) { + $this->setProhibited(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setProhibited(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProhibited(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -537,20 +551,27 @@ public function __construct($data = null) $this->setScheduledPeriod(new FHIRPeriod($data[self::FIELD_SCHEDULED_PERIOD])); } } - if (isset($data[self::FIELD_SCHEDULED_STRING])) { - $ext = (isset($data[self::FIELD_SCHEDULED_STRING_EXT]) && is_array($data[self::FIELD_SCHEDULED_STRING_EXT])) - ? $data[self::FIELD_SCHEDULED_STRING_EXT] - : null; - if ($data[self::FIELD_SCHEDULED_STRING] instanceof FHIRString) { - $this->setScheduledString($data[self::FIELD_SCHEDULED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCHEDULED_STRING])) { - $this->setScheduledString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SCHEDULED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_SCHEDULED_STRING])) { - $this->setScheduledString(new FHIRString(array_merge($ext, $data[self::FIELD_SCHEDULED_STRING]))); - } + if (isset($data[self::FIELD_SCHEDULED_STRING]) || isset($data[self::FIELD_SCHEDULED_STRING_EXT])) { + if (isset($data[self::FIELD_SCHEDULED_STRING])) { + $value = $data[self::FIELD_SCHEDULED_STRING]; } else { - $this->setScheduledString(new FHIRString($data[self::FIELD_SCHEDULED_STRING])); + $value = null; + } + if (isset($data[self::FIELD_SCHEDULED_STRING_EXT]) && is_array($data[self::FIELD_SCHEDULED_STRING_EXT])) { + $ext = $data[self::FIELD_SCHEDULED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setScheduledString($value); + } else if (is_array($value)) { + $this->setScheduledString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setScheduledString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScheduledString(new FHIRString($ext)); } } if (isset($data[self::FIELD_SCHEDULED_TIMING])) { @@ -560,36 +581,50 @@ public function __construct($data = null) $this->setScheduledTiming(new FHIRTiming($data[self::FIELD_SCHEDULED_TIMING])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCarePlanActivityStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanActivityStatus([FHIRCarePlanActivityStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanActivityStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCarePlanActivityStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS_REASON])) { - $ext = (isset($data[self::FIELD_STATUS_REASON_EXT]) && is_array($data[self::FIELD_STATUS_REASON_EXT])) - ? $data[self::FIELD_STATUS_REASON_EXT] - : null; - if ($data[self::FIELD_STATUS_REASON] instanceof FHIRString) { - $this->setStatusReason($data[self::FIELD_STATUS_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_REASON])) { - $this->setStatusReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATUS_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_REASON])) { - $this->setStatusReason(new FHIRString(array_merge($ext, $data[self::FIELD_STATUS_REASON]))); + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanActivityStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCarePlanActivityStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCarePlanActivityStatus([FHIRCarePlanActivityStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCarePlanActivityStatus($ext)); + } + } + if (isset($data[self::FIELD_STATUS_REASON]) || isset($data[self::FIELD_STATUS_REASON_EXT])) { + if (isset($data[self::FIELD_STATUS_REASON])) { + $value = $data[self::FIELD_STATUS_REASON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_REASON_EXT]) && is_array($data[self::FIELD_STATUS_REASON_EXT])) { + $ext = $data[self::FIELD_STATUS_REASON_EXT]; } else { - $this->setStatusReason(new FHIRString($data[self::FIELD_STATUS_REASON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setStatusReason($value); + } else if (is_array($value)) { + $this->setStatusReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setStatusReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatusReason(new FHIRString($ext)); } } } @@ -1379,8 +1414,8 @@ public function setStatusReason($statusReason = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1634,19 +1669,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getGoal())) { - $a[self::FIELD_GOAL] = $vs; + $a[self::FIELD_GOAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GOAL][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getProductCodeableConcept())) { $a[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $v; @@ -1656,8 +1705,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getProhibited())) { $a[self::FIELD_PROHIBITED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PROHIBITED_EXT] = $enc; } } @@ -1665,18 +1716,32 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getScheduledPeriod())) { $a[self::FIELD_SCHEDULED_PERIOD] = $v; } if (null !== ($v = $this->getScheduledString())) { $a[self::FIELD_SCHEDULED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SCHEDULED_STRING_EXT] = $enc; } } @@ -1685,18 +1750,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanActivityStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanActivityStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStatusReason())) { $a[self::FIELD_STATUS_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATUS_REASON_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php index 59d257bb7b..cb64942eb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCareTeamParticipant extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -341,8 +341,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -444,6 +444,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipant.php index d1287d75f1..4032f19ab3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRChargeItemParticipant extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -239,8 +239,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php index aa645bc10b..899bcaaa81 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccident.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRClaimAccident extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -162,20 +162,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -366,8 +373,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -467,8 +474,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -481,6 +490,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php index f7dae49349..3dfc5801ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRClaimCareTeam extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -186,20 +186,27 @@ public function __construct($data = null) $this->setQualification(new FHIRCodeableConcept($data[self::FIELD_QUALIFICATION])); } } - if (isset($data[self::FIELD_RESPONSIBLE])) { - $ext = (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) - ? $data[self::FIELD_RESPONSIBLE_EXT] - : null; - if ($data[self::FIELD_RESPONSIBLE] instanceof FHIRBoolean) { - $this->setResponsible($data[self::FIELD_RESPONSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_RESPONSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRBoolean(array_merge($ext, $data[self::FIELD_RESPONSIBLE]))); - } + if (isset($data[self::FIELD_RESPONSIBLE]) || isset($data[self::FIELD_RESPONSIBLE_EXT])) { + if (isset($data[self::FIELD_RESPONSIBLE])) { + $value = $data[self::FIELD_RESPONSIBLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) { + $ext = $data[self::FIELD_RESPONSIBLE_EXT]; } else { - $this->setResponsible(new FHIRBoolean($data[self::FIELD_RESPONSIBLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setResponsible($value); + } else if (is_array($value)) { + $this->setResponsible(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setResponsible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResponsible(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -209,20 +216,27 @@ public function __construct($data = null) $this->setRole(new FHIRCodeableConcept($data[self::FIELD_ROLE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -424,8 +438,8 @@ public function setSequence($sequence = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -545,8 +559,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getResponsible())) { $a[self::FIELD_RESPONSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_RESPONSIBLE_EXT] = $enc; } } @@ -555,11 +571,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php index c63390ec2a..d51bc9bbfd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRClaimDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -282,20 +282,27 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -355,20 +362,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -972,8 +986,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1160,19 +1174,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -1182,8 +1210,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -1191,14 +1221,29 @@ public function jsonSerialize() $a[self::FIELD_SERVICE] = $v; } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php index def0fee0f2..ddedf2ff64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRClaimDiagnosis extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -193,20 +193,27 @@ public function __construct($data = null) $this->setPackageCode(new FHIRCodeableConcept($data[self::FIELD_PACKAGE_CODE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -450,8 +457,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -573,13 +580,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformation.php index 6f7cce77ba..e4b80591ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRClaimInformation extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -269,36 +269,50 @@ public function __construct($data = null) $this->setReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; } - } - if (isset($data[self::FIELD_TIMING_DATE])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) - ? $data[self::FIELD_TIMING_DATE_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE] instanceof FHIRDate) { - $this->setTimingDate($data[self::FIELD_TIMING_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_TIMING_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate(array_merge($ext, $data[self::FIELD_TIMING_DATE]))); + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_TIMING_DATE]) || isset($data[self::FIELD_TIMING_DATE_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE])) { + $value = $data[self::FIELD_TIMING_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_EXT]; } else { - $this->setTimingDate(new FHIRDate($data[self::FIELD_TIMING_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setTimingDate($value); + } else if (is_array($value)) { + $this->setTimingDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -329,20 +343,27 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -724,8 +745,8 @@ public function setValueString($valueString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -886,15 +907,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getTimingDate())) { $a[self::FIELD_TIMING_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_EXT] = $enc; } } @@ -912,11 +937,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php index b2e23cab0d..51f7de9b62 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRClaimInsurance extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -185,20 +185,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $ext = (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) - ? $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT] - : null; - if ($data[self::FIELD_BUSINESS_ARRANGEMENT] instanceof FHIRString) { - $this->setBusinessArrangement($data[self::FIELD_BUSINESS_ARRANGEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BUSINESS_ARRANGEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString(array_merge($ext, $data[self::FIELD_BUSINESS_ARRANGEMENT]))); - } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT]) || isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { + $value = $data[self::FIELD_BUSINESS_ARRANGEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + $ext = $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]; } else { - $this->setBusinessArrangement(new FHIRString($data[self::FIELD_BUSINESS_ARRANGEMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBusinessArrangement($value); + } else if (is_array($value)) { + $this->setBusinessArrangement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBusinessArrangement(new FHIRString($ext)); } } if (isset($data[self::FIELD_CLAIM_RESPONSE])) { @@ -215,65 +222,88 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_FOCAL])) { - $ext = (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) - ? $data[self::FIELD_FOCAL_EXT] - : null; - if ($data[self::FIELD_FOCAL] instanceof FHIRBoolean) { - $this->setFocal($data[self::FIELD_FOCAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FOCAL]] + $ext)); - } else if (is_array($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FOCAL]))); - } + if (isset($data[self::FIELD_FOCAL]) || isset($data[self::FIELD_FOCAL_EXT])) { + if (isset($data[self::FIELD_FOCAL])) { + $value = $data[self::FIELD_FOCAL]; } else { - $this->setFocal(new FHIRBoolean($data[self::FIELD_FOCAL])); + $value = null; + } + if (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) { + $ext = $data[self::FIELD_FOCAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFocal($value); + } else if (is_array($value)) { + $this->setFocal(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFocal(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - foreach($data[self::FIELD_PRE_AUTH_REF] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPreAuthRef($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPreAuthRef(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPreAuthRef($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPreAuthRef($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPreAuthRef(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPreAuthRef(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPreAuthRef(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->addPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else { - $this->addPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -545,8 +575,8 @@ public function setSequence($sequence = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -681,8 +711,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBusinessArrangement())) { $a[self::FIELD_BUSINESS_ARRANGEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BUSINESS_ARRANGEMENT_EXT] = $enc; } } @@ -694,33 +726,48 @@ public function jsonSerialize() } if (null !== ($v = $this->getFocal())) { $a[self::FIELD_FOCAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FOCAL_EXT] = $enc; } } if ([] !== ($vs = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PRE_AUTH_REF][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PRE_AUTH_REF_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PRE_AUTH_REF_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PRE_AUTH_REF_EXT] = $encs; + } } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php index d4975a17a1..8fe1a06250 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRClaimItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -446,33 +446,42 @@ public function __construct($data = null) $this->setBodySite(new FHIRCodeableConcept($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_CARE_TEAM_LINK_ID])) { - $ext = (isset($data[self::FIELD_CARE_TEAM_LINK_ID_EXT]) && is_array($data[self::FIELD_CARE_TEAM_LINK_ID_EXT])) - ? $data[self::FIELD_CARE_TEAM_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_CARE_TEAM_LINK_ID])) { - foreach($data[self::FIELD_CARE_TEAM_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addCareTeamLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCareTeamLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCareTeamLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CARE_TEAM_LINK_ID]) || isset($data[self::FIELD_CARE_TEAM_LINK_ID_EXT])) { + if (isset($data[self::FIELD_CARE_TEAM_LINK_ID])) { + $value = $data[self::FIELD_CARE_TEAM_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARE_TEAM_LINK_ID_EXT]) && is_array($data[self::FIELD_CARE_TEAM_LINK_ID_EXT])) { + $ext = $data[self::FIELD_CARE_TEAM_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addCareTeamLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addCareTeamLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCareTeamLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addCareTeamLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCareTeamLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addCareTeamLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addCareTeamLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCareTeamLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_CARE_TEAM_LINK_ID] instanceof FHIRPositiveInt) { - $this->addCareTeamLinkId($data[self::FIELD_CARE_TEAM_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CARE_TEAM_LINK_ID])) { - $this->addCareTeamLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_CARE_TEAM_LINK_ID]] + $ext)); - } else { - $this->addCareTeamLinkId(new FHIRPositiveInt($data[self::FIELD_CARE_TEAM_LINK_ID])); } } if (isset($data[self::FIELD_CATEGORY])) { @@ -500,33 +509,42 @@ public function __construct($data = null) $this->addDetail(new FHIRClaimDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID])) { - $ext = (isset($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT])) - ? $data[self::FIELD_DIAGNOSIS_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_DIAGNOSIS_LINK_ID])) { - foreach($data[self::FIELD_DIAGNOSIS_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addDiagnosisLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDiagnosisLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID]) || isset($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT])) { + if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID])) { + $value = $data[self::FIELD_DIAGNOSIS_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT])) { + $ext = $data[self::FIELD_DIAGNOSIS_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addDiagnosisLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addDiagnosisLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDiagnosisLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDiagnosisLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addDiagnosisLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDiagnosisLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_DIAGNOSIS_LINK_ID] instanceof FHIRPositiveInt) { - $this->addDiagnosisLinkId($data[self::FIELD_DIAGNOSIS_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DIAGNOSIS_LINK_ID])) { - $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DIAGNOSIS_LINK_ID]] + $ext)); - } else { - $this->addDiagnosisLinkId(new FHIRPositiveInt($data[self::FIELD_DIAGNOSIS_LINK_ID])); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -547,49 +565,65 @@ public function __construct($data = null) $this->addEncounter(new FHIRReference($data[self::FIELD_ENCOUNTER])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_INFORMATION_LINK_ID])) { - $ext = (isset($data[self::FIELD_INFORMATION_LINK_ID_EXT]) && is_array($data[self::FIELD_INFORMATION_LINK_ID_EXT])) - ? $data[self::FIELD_INFORMATION_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_INFORMATION_LINK_ID])) { - foreach($data[self::FIELD_INFORMATION_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addInformationLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInformationLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInformationLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INFORMATION_LINK_ID]) || isset($data[self::FIELD_INFORMATION_LINK_ID_EXT])) { + if (isset($data[self::FIELD_INFORMATION_LINK_ID])) { + $value = $data[self::FIELD_INFORMATION_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INFORMATION_LINK_ID_EXT]) && is_array($data[self::FIELD_INFORMATION_LINK_ID_EXT])) { + $ext = $data[self::FIELD_INFORMATION_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addInformationLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addInformationLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInformationLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addInformationLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInformationLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addInformationLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addInformationLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInformationLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_INFORMATION_LINK_ID] instanceof FHIRPositiveInt) { - $this->addInformationLinkId($data[self::FIELD_INFORMATION_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INFORMATION_LINK_ID])) { - $this->addInformationLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_INFORMATION_LINK_ID]] + $ext)); - } else { - $this->addInformationLinkId(new FHIRPositiveInt($data[self::FIELD_INFORMATION_LINK_ID])); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -638,33 +672,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_PROCEDURE_LINK_ID])) { - $ext = (isset($data[self::FIELD_PROCEDURE_LINK_ID_EXT]) && is_array($data[self::FIELD_PROCEDURE_LINK_ID_EXT])) - ? $data[self::FIELD_PROCEDURE_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_PROCEDURE_LINK_ID])) { - foreach($data[self::FIELD_PROCEDURE_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addProcedureLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProcedureLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProcedureLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROCEDURE_LINK_ID]) || isset($data[self::FIELD_PROCEDURE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_PROCEDURE_LINK_ID])) { + $value = $data[self::FIELD_PROCEDURE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROCEDURE_LINK_ID_EXT]) && is_array($data[self::FIELD_PROCEDURE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_PROCEDURE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addProcedureLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addProcedureLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProcedureLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addProcedureLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProcedureLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addProcedureLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addProcedureLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProcedureLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_PROCEDURE_LINK_ID] instanceof FHIRPositiveInt) { - $this->addProcedureLinkId($data[self::FIELD_PROCEDURE_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROCEDURE_LINK_ID])) { - $this->addProcedureLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PROCEDURE_LINK_ID]] + $ext)); - } else { - $this->addProcedureLinkId(new FHIRPositiveInt($data[self::FIELD_PROCEDURE_LINK_ID])); } } if (isset($data[self::FIELD_PROGRAM_CODE])) { @@ -699,20 +742,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -722,20 +772,27 @@ public function __construct($data = null) $this->setService(new FHIRCodeableConcept($data[self::FIELD_SERVICE])); } } - if (isset($data[self::FIELD_SERVICED_DATE])) { - $ext = (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) - ? $data[self::FIELD_SERVICED_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICED_DATE] instanceof FHIRDate) { - $this->setServicedDate($data[self::FIELD_SERVICED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICED_DATE]))); - } + if (isset($data[self::FIELD_SERVICED_DATE]) || isset($data[self::FIELD_SERVICED_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICED_DATE])) { + $value = $data[self::FIELD_SERVICED_DATE]; } else { - $this->setServicedDate(new FHIRDate($data[self::FIELD_SERVICED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServicedDate($value); + } else if (is_array($value)) { + $this->setServicedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServicedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SERVICED_PERIOD])) { @@ -1921,8 +1978,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2231,64 +2288,102 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getCareTeamLinkId())) { $a[self::FIELD_CARE_TEAM_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CARE_TEAM_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CARE_TEAM_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CARE_TEAM_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CARE_TEAM_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getDiagnosisLinkId())) { $a[self::FIELD_DIAGNOSIS_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DIAGNOSIS_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DIAGNOSIS_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DIAGNOSIS_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DIAGNOSIS_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getEncounter())) { - $a[self::FIELD_ENCOUNTER] = $vs; + $a[self::FIELD_ENCOUNTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENCOUNTER][] = $v; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getInformationLinkId())) { $a[self::FIELD_INFORMATION_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INFORMATION_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INFORMATION_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INFORMATION_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INFORMATION_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getLocationAddress())) { $a[self::FIELD_LOCATION_ADDRESS] = $v; @@ -2300,28 +2395,48 @@ public function jsonSerialize() $a[self::FIELD_LOCATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getProcedureLinkId())) { $a[self::FIELD_PROCEDURE_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROCEDURE_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROCEDURE_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROCEDURE_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROCEDURE_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -2331,8 +2446,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -2341,8 +2458,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getServicedDate())) { $a[self::FIELD_SERVICED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICED_DATE_EXT] = $enc; } } @@ -2350,14 +2469,29 @@ public function jsonSerialize() $a[self::FIELD_SERVICED_PERIOD] = $v; } if ([] !== ($vs = $this->getSubSite())) { - $a[self::FIELD_SUB_SITE] = $vs; + $a[self::FIELD_SUB_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_SITE][] = $v; + } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php index 7de89a3a72..c7b914d1df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRClaimPayee extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -283,8 +283,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -377,6 +377,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php index a2d906e6ce..f2318eafa3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRClaimProcedure extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -161,20 +161,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { @@ -191,20 +198,27 @@ public function __construct($data = null) $this->setProcedureReference(new FHIRReference($data[self::FIELD_PROCEDURE_REFERENCE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -378,8 +392,8 @@ public function setSequence($sequence = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -487,8 +501,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -500,11 +516,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php index 9bf3a398ad..1ea0b014e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRClaimRelated extends FHIRBackboneElement const FIELD_RELATIONSHIP = 'relationship'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -292,8 +292,8 @@ public function setRelationship(FHIRCodeableConcept $relationship = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,6 +386,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php index 92257a64db..c068506c3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRClaimSubDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -268,20 +268,27 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -341,20 +348,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -881,8 +895,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1056,19 +1070,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -1078,8 +1106,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -1087,11 +1117,20 @@ public function jsonSerialize() $a[self::FIELD_SERVICE] = $v; } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php index 2b84fd3456..90fa2286eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRClaimResponseAddItem extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -289,33 +289,42 @@ public function __construct($data = null) $this->addModifier(new FHIRCodeableConcept($data[self::FIELD_MODIFIER])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_REVENUE])) { @@ -325,33 +334,42 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - foreach($data[self::FIELD_SEQUENCE_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addSequenceLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSequenceLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addSequenceLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addSequenceLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSequenceLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSequenceLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSequenceLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->addSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else { - $this->addSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); } } if (isset($data[self::FIELD_SERVICE])) { @@ -815,8 +833,8 @@ public function setService(FHIRCodeableConcept $service = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -972,56 +990,93 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getFee())) { $a[self::FIELD_FEE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getRevenue())) { $a[self::FIELD_REVENUE] = $v; } if ([] !== ($vs = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEQUENCE_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEQUENCE_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEQUENCE_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getService())) { $a[self::FIELD_SERVICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php index ecd7d836fe..098c4c739e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRClaimResponseAdjudication extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -180,20 +180,27 @@ public function __construct($data = null) $this->setReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -359,8 +366,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -470,11 +477,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php index f59938760c..b413f97e27 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseDetail extends FHIRBackboneElement const FIELD_SUB_DETAIL = 'subDetail'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -170,49 +170,65 @@ public function __construct($data = null) $this->addAdjudication(new FHIRClaimResponseAdjudication($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; } else { - $this->setSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SUB_DETAIL])) { @@ -468,8 +484,8 @@ public function setSubDetail(array $subDetail = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -589,32 +605,57 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php index 2513d729d6..284b88bf91 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRClaimResponseDetail1 extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -247,33 +247,42 @@ public function __construct($data = null) $this->addModifier(new FHIRCodeableConcept($data[self::FIELD_MODIFIER])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_REVENUE])) { @@ -627,8 +636,8 @@ public function setService(FHIRCodeableConcept $service = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -758,7 +767,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -767,22 +782,36 @@ public function jsonSerialize() $a[self::FIELD_FEE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getRevenue())) { $a[self::FIELD_REVENUE] = $v; @@ -790,6 +819,9 @@ public function jsonSerialize() if (null !== ($v = $this->getService())) { $a[self::FIELD_SERVICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php index 4c038e3ad3..5f02f272df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRClaimResponseError extends FHIRBackboneElement const FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT = '_subdetailSequenceLinkId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -170,52 +170,73 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setDetailSequenceLinkId($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { - $this->setDetailSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { - $this->setDetailSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID]; } else { - $this->setDetailSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID])); + $value = null; } - } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT]; } else { - $this->setSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDetailSequenceLinkId($value); + } else if (is_array($value)) { + $this->setDetailSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDetailSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetailSequenceLinkId(new FHIRPositiveInt($ext)); } } - if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSubdetailSequenceLinkId($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { - $this->setSubdetailSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { - $this->setSubdetailSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]))); + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT]; } else { - $this->setSubdetailSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSubdetailSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSubdetailSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSubdetailSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubdetailSequenceLinkId(new FHIRPositiveInt($ext)); } } } @@ -403,8 +424,8 @@ public function setSubdetailSequenceLinkId($subdetailSequenceLinkId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -523,25 +544,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getDetailSequenceLinkId())) { $a[self::FIELD_DETAIL_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DETAIL_SEQUENCE_LINK_ID_EXT] = $enc; } } if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } if (null !== ($v = $this->getSubdetailSequenceLinkId())) { $a[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SUBDETAIL_SEQUENCE_LINK_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php index 744818f3c5..308802f138 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRClaimResponseInsurance extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -184,20 +184,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $ext = (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) - ? $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT] - : null; - if ($data[self::FIELD_BUSINESS_ARRANGEMENT] instanceof FHIRString) { - $this->setBusinessArrangement($data[self::FIELD_BUSINESS_ARRANGEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BUSINESS_ARRANGEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString(array_merge($ext, $data[self::FIELD_BUSINESS_ARRANGEMENT]))); - } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT]) || isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { + $value = $data[self::FIELD_BUSINESS_ARRANGEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + $ext = $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]; } else { - $this->setBusinessArrangement(new FHIRString($data[self::FIELD_BUSINESS_ARRANGEMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBusinessArrangement($value); + } else if (is_array($value)) { + $this->setBusinessArrangement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBusinessArrangement(new FHIRString($ext)); } } if (isset($data[self::FIELD_CLAIM_RESPONSE])) { @@ -214,65 +221,88 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_FOCAL])) { - $ext = (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) - ? $data[self::FIELD_FOCAL_EXT] - : null; - if ($data[self::FIELD_FOCAL] instanceof FHIRBoolean) { - $this->setFocal($data[self::FIELD_FOCAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FOCAL]] + $ext)); - } else if (is_array($data[self::FIELD_FOCAL])) { - $this->setFocal(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FOCAL]))); - } + if (isset($data[self::FIELD_FOCAL]) || isset($data[self::FIELD_FOCAL_EXT])) { + if (isset($data[self::FIELD_FOCAL])) { + $value = $data[self::FIELD_FOCAL]; } else { - $this->setFocal(new FHIRBoolean($data[self::FIELD_FOCAL])); + $value = null; + } + if (isset($data[self::FIELD_FOCAL_EXT]) && is_array($data[self::FIELD_FOCAL_EXT])) { + $ext = $data[self::FIELD_FOCAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFocal($value); + } else if (is_array($value)) { + $this->setFocal(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFocal(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFocal(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - foreach($data[self::FIELD_PRE_AUTH_REF] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPreAuthRef($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPreAuthRef(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPreAuthRef($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPreAuthRef($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPreAuthRef(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPreAuthRef(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPreAuthRef(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->addPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else { - $this->addPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -542,8 +572,8 @@ public function setSequence($sequence = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -678,8 +708,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBusinessArrangement())) { $a[self::FIELD_BUSINESS_ARRANGEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BUSINESS_ARRANGEMENT_EXT] = $enc; } } @@ -691,33 +723,48 @@ public function jsonSerialize() } if (null !== ($v = $this->getFocal())) { $a[self::FIELD_FOCAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FOCAL_EXT] = $enc; } } if ([] !== ($vs = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PRE_AUTH_REF][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PRE_AUTH_REF_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PRE_AUTH_REF_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PRE_AUTH_REF_EXT] = $encs; + } } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php index e5105f7f71..308ba3d456 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRClaimResponseItem extends FHIRBackboneElement const FIELD_SEQUENCE_LINK_ID_EXT = '_sequenceLinkId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -188,49 +188,65 @@ public function __construct($data = null) $this->addDetail(new FHIRClaimResponseDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; } else { - $this->setSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRPositiveInt($ext)); } } } @@ -468,8 +484,8 @@ public function setSequenceLinkId($sequenceLinkId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -589,33 +605,58 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php index c28dbc8f0d..5c65d37b68 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePayment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRClaimResponsePayment extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -205,20 +205,27 @@ public function __construct($data = null) $this->setAmount(new FHIRMoney($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -458,8 +465,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -580,8 +587,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -591,6 +600,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php index 125c40c722..432ef9a123 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRClaimResponseProcessNote extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -169,36 +169,50 @@ public function __construct($data = null) $this->setLanguage(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRPositiveInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setNumber(new FHIRPositiveInt($data[self::FIELD_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumber(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -383,8 +397,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -495,21 +509,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php index ab1b9435d9..b4e630b918 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRClaimResponseSubDetail extends FHIRBackboneElement const FIELD_SEQUENCE_LINK_ID_EXT = '_sequenceLinkId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -159,49 +159,65 @@ public function __construct($data = null) $this->addAdjudication(new FHIRClaimResponseAdjudication($data[self::FIELD_ADJUDICATION])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; } else { - $this->setSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRPositiveInt($ext)); } } } @@ -386,8 +402,8 @@ public function setSequenceLinkId($sequenceLinkId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -494,30 +510,49 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php index 788bdf533a..d42c1b5cc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRClinicalImpressionFinding extends FHIRBackboneElement const FIELD_ITEM_REFERENCE = 'itemReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -151,20 +151,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BASIS])) { - $ext = (isset($data[self::FIELD_BASIS_EXT]) && is_array($data[self::FIELD_BASIS_EXT])) - ? $data[self::FIELD_BASIS_EXT] - : null; - if ($data[self::FIELD_BASIS] instanceof FHIRString) { - $this->setBasis($data[self::FIELD_BASIS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASIS])) { - $this->setBasis(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BASIS]] + $ext)); - } else if (is_array($data[self::FIELD_BASIS])) { - $this->setBasis(new FHIRString(array_merge($ext, $data[self::FIELD_BASIS]))); - } + if (isset($data[self::FIELD_BASIS]) || isset($data[self::FIELD_BASIS_EXT])) { + if (isset($data[self::FIELD_BASIS])) { + $value = $data[self::FIELD_BASIS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BASIS_EXT]) && is_array($data[self::FIELD_BASIS_EXT])) { + $ext = $data[self::FIELD_BASIS_EXT]; } else { - $this->setBasis(new FHIRString($data[self::FIELD_BASIS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBasis($value); + } else if (is_array($value)) { + $this->setBasis(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBasis(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBasis(new FHIRString($ext)); } } if (isset($data[self::FIELD_ITEM_CODEABLE_CONCEPT])) { @@ -312,8 +319,8 @@ public function setItemReference(FHIRReference $itemReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -407,8 +414,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBasis())) { $a[self::FIELD_BASIS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BASIS_EXT] = $enc; } } @@ -418,6 +427,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItemReference())) { $a[self::FIELD_ITEM_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php index a4d0c7dcc4..e48b14781a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRClinicalImpressionInvestigation extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -284,8 +284,8 @@ public function setItem(array $item = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -374,7 +374,16 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php index eb05fd5c32..e642773c88 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCodeSystemConcept extends FHIRBackboneElement const FIELD_PROPERTY = 'property'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -186,20 +186,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONCEPT])) { @@ -220,20 +227,27 @@ public function __construct($data = null) $this->addConcept(new FHIRCodeSystemConcept($data[self::FIELD_CONCEPT])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRString) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRString(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRString($data[self::FIELD_DEFINITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRString($ext)); } } if (isset($data[self::FIELD_DESIGNATION])) { @@ -254,20 +268,27 @@ public function __construct($data = null) $this->addDesignation(new FHIRCodeSystemDesignation($data[self::FIELD_DESIGNATION])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROPERTY])) { @@ -609,8 +630,8 @@ public function setProperty(array $property = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -759,33 +780,60 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if ([] !== ($vs = $this->getProperty())) { - $a[self::FIELD_PROPERTY] = $vs; + $a[self::FIELD_PROPERTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROPERTY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php index 97b0d13a00..9a8f7b1c7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCodeSystemDesignation extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -145,20 +145,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); - } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_USE])) { @@ -168,20 +175,27 @@ public function __construct($data = null) $this->setUse(new FHIRCoding($data[self::FIELD_USE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -319,8 +333,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -423,8 +437,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } @@ -433,11 +449,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php index 715136525e..01d05069bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCodeSystemFilter extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -162,81 +162,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_OPERATOR])) { - $ext = (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) - ? $data[self::FIELD_OPERATOR_EXT] - : null; - if (is_array($data[self::FIELD_OPERATOR])) { - foreach($data[self::FIELD_OPERATOR] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRFilterOperator) { - $this->addOperator($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addOperator(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addOperator(new FHIRFilterOperator(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_OPERATOR]) || isset($data[self::FIELD_OPERATOR_EXT])) { + if (isset($data[self::FIELD_OPERATOR])) { + $value = $data[self::FIELD_OPERATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) { + $ext = $data[self::FIELD_OPERATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFilterOperator) { + $this->addOperator($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRFilterOperator) { + $this->addOperator($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addOperator(new FHIRFilterOperator(array_merge($v, $iext))); + } else { + $this->addOperator(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addOperator(new FHIRFilterOperator($v)); } + } elseif (is_array($value)) { + $this->addOperator(new FHIRFilterOperator(array_merge($ext, $value))); + } else { + $this->addOperator(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addOperator(new FHIRFilterOperator($iext)); } - } elseif ($data[self::FIELD_OPERATOR] instanceof FHIRFilterOperator) { - $this->addOperator($data[self::FIELD_OPERATOR]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_OPERATOR])) { - $this->addOperator(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $data[self::FIELD_OPERATOR]] + $ext)); - } else { - $this->addOperator(new FHIRFilterOperator($data[self::FIELD_OPERATOR])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -435,8 +465,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -560,40 +590,57 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getOperator())) { $a[self::FIELD_OPERATOR] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_OPERATOR][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_OPERATOR_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRFilterOperator::FIELD_VALUE]) || array_key_exists(FHIRFilterOperator::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_OPERATOR_EXT][] = null; + unset($enc[FHIRFilterOperator::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_OPERATOR_EXT] = $encs; + } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php index cc20992b32..ac57e1e859 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRCodeSystemProperty extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -164,68 +164,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRPropertyType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRPropertyType([FHIRPropertyType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRPropertyType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setType(new FHIRPropertyType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPropertyType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRPropertyType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRPropertyType([FHIRPropertyType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRPropertyType($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -409,8 +437,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -526,32 +554,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPropertyType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPropertyType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php index 61f5808e65..fcb62ff0d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRCodeSystemProperty1 extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -203,52 +203,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODING])) { @@ -258,52 +279,73 @@ public function __construct($data = null) $this->setValueCoding(new FHIRCoding($data[self::FIELD_VALUE_CODING])); } } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -599,8 +641,8 @@ public function setValueString($valueString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -758,22 +800,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -782,25 +830,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php index b863eeac14..9d070bf957 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCommunicationPayload extends FHIRBackboneElement const FIELD_CONTENT_STRING_EXT = '_contentString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -161,20 +161,27 @@ public function __construct($data = null) $this->setContentReference(new FHIRReference($data[self::FIELD_CONTENT_REFERENCE])); } } - if (isset($data[self::FIELD_CONTENT_STRING])) { - $ext = (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) - ? $data[self::FIELD_CONTENT_STRING_EXT] - : null; - if ($data[self::FIELD_CONTENT_STRING] instanceof FHIRString) { - $this->setContentString($data[self::FIELD_CONTENT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTENT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString(array_merge($ext, $data[self::FIELD_CONTENT_STRING]))); - } + if (isset($data[self::FIELD_CONTENT_STRING]) || isset($data[self::FIELD_CONTENT_STRING_EXT])) { + if (isset($data[self::FIELD_CONTENT_STRING])) { + $value = $data[self::FIELD_CONTENT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) { + $ext = $data[self::FIELD_CONTENT_STRING_EXT]; } else { - $this->setContentString(new FHIRString($data[self::FIELD_CONTENT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setContentString($value); + } else if (is_array($value)) { + $this->setContentString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentString(new FHIRString($ext)); } } } @@ -308,8 +315,8 @@ public function setContentString($contentString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -409,11 +416,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getContentString())) { $a[self::FIELD_CONTENT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONTENT_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php index a413e4efec..a277861056 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRCommunicationRequestPayload extends FHIRBackboneElement const FIELD_CONTENT_STRING_EXT = '_contentString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -161,20 +161,27 @@ public function __construct($data = null) $this->setContentReference(new FHIRReference($data[self::FIELD_CONTENT_REFERENCE])); } } - if (isset($data[self::FIELD_CONTENT_STRING])) { - $ext = (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) - ? $data[self::FIELD_CONTENT_STRING_EXT] - : null; - if ($data[self::FIELD_CONTENT_STRING] instanceof FHIRString) { - $this->setContentString($data[self::FIELD_CONTENT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTENT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_STRING])) { - $this->setContentString(new FHIRString(array_merge($ext, $data[self::FIELD_CONTENT_STRING]))); - } + if (isset($data[self::FIELD_CONTENT_STRING]) || isset($data[self::FIELD_CONTENT_STRING_EXT])) { + if (isset($data[self::FIELD_CONTENT_STRING])) { + $value = $data[self::FIELD_CONTENT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_STRING_EXT]) && is_array($data[self::FIELD_CONTENT_STRING_EXT])) { + $ext = $data[self::FIELD_CONTENT_STRING_EXT]; } else { - $this->setContentString(new FHIRString($data[self::FIELD_CONTENT_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setContentString($value); + } else if (is_array($value)) { + $this->setContentString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setContentString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentString(new FHIRString($ext)); } } } @@ -308,8 +315,8 @@ public function setContentString($contentString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -409,11 +416,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getContentString())) { $a[self::FIELD_CONTENT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONTENT_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequester.php index b2ac1ff391..b820fd353d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRCommunicationRequestRequester extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -230,8 +230,8 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -315,6 +315,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php index fab4f4a020..a16e90b5b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRCompartmentDefinitionResource extends FHIRBackboneElement const FIELD_PARAM_EXT = '_param'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of activity the definition is describing @@ -144,65 +144,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRResourceType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResourceType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRResourceType($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRResourceType($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PARAM])) { - $ext = (isset($data[self::FIELD_PARAM_EXT]) && is_array($data[self::FIELD_PARAM_EXT])) - ? $data[self::FIELD_PARAM_EXT] - : null; - if (is_array($data[self::FIELD_PARAM])) { - foreach($data[self::FIELD_PARAM] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addParam($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addParam(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addParam(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PARAM]) || isset($data[self::FIELD_PARAM_EXT])) { + if (isset($data[self::FIELD_PARAM])) { + $value = $data[self::FIELD_PARAM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARAM_EXT]) && is_array($data[self::FIELD_PARAM_EXT])) { + $ext = $data[self::FIELD_PARAM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addParam($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addParam($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addParam(new FHIRString(array_merge($v, $iext))); + } else { + $this->addParam(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addParam(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addParam(new FHIRString(array_merge($ext, $value))); + } else { + $this->addParam(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addParam(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PARAM] instanceof FHIRString) { - $this->addParam($data[self::FIELD_PARAM]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PARAM])) { - $this->addParam(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARAM]] + $ext)); - } else { - $this->addParam(new FHIRString($data[self::FIELD_PARAM])); } } } @@ -368,8 +391,8 @@ public function setParam(array $param = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -470,32 +493,47 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getParam())) { $a[self::FIELD_PARAM] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PARAM][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PARAM_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PARAM_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PARAM_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php index 6a84417ffd..7f8a17f7f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRCompositionAttester extends FHIRBackboneElement const FIELD_TIME_EXT = '_time'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The way in which a person authenticated a composition. @@ -154,33 +154,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if (is_array($data[self::FIELD_MODE])) { - foreach($data[self::FIELD_MODE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCompositionAttestationMode) { - $this->addMode($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addMode(new FHIRCompositionAttestationMode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionAttestationMode) { + $this->addMode($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCompositionAttestationMode) { + $this->addMode($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addMode(new FHIRCompositionAttestationMode(array_merge($v, $iext))); + } else { + $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addMode(new FHIRCompositionAttestationMode($v)); } + } elseif (is_array($value)) { + $this->addMode(new FHIRCompositionAttestationMode(array_merge($ext, $value))); + } else { + $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addMode(new FHIRCompositionAttestationMode($iext)); } - } elseif ($data[self::FIELD_MODE] instanceof FHIRCompositionAttestationMode) { - $this->addMode($data[self::FIELD_MODE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MODE])) { - $this->addMode(new FHIRCompositionAttestationMode([FHIRCompositionAttestationMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else { - $this->addMode(new FHIRCompositionAttestationMode($data[self::FIELD_MODE])); } } if (isset($data[self::FIELD_PARTY])) { @@ -190,20 +199,27 @@ public function __construct($data = null) $this->setParty(new FHIRReference($data[self::FIELD_PARTY])); } } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRDateTime) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME]))); - } + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; } else { - $this->setTime(new FHIRDateTime($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTime(new FHIRDateTime($ext)); } } } @@ -360,8 +376,8 @@ public function setTime($time = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -462,29 +478,42 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getMode())) { $a[self::FIELD_MODE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MODE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MODE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCompositionAttestationMode::FIELD_VALUE]) || array_key_exists(FHIRCompositionAttestationMode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MODE_EXT][] = null; + unset($enc[FHIRCompositionAttestationMode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MODE_EXT] = $encs; + } } if (null !== ($v = $this->getParty())) { $a[self::FIELD_PARTY] = $v; } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php index be4ddf72e7..47eb87fda6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRCompositionEvent extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -384,8 +384,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -484,14 +484,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php index 054bc311f7..257e5102a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCompositionRelatesTo extends FHIRBackboneElement const FIELD_TARGET_REFERENCE = 'targetReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The type of relationship between documents. @@ -147,20 +147,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRDocumentRelationshipType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRDocumentRelationshipType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentRelationshipType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRDocumentRelationshipType($ext)); } } if (isset($data[self::FIELD_TARGET_IDENTIFIER])) { @@ -294,8 +301,8 @@ public function setTargetReference(FHIRReference $targetReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -381,8 +388,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentRelationshipType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } @@ -392,6 +401,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTargetReference())) { $a[self::FIELD_TARGET_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php index d54fc0bd79..fe22728d79 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRCompositionSection extends FHIRBackboneElement const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -257,20 +257,27 @@ public function __construct($data = null) $this->addEntry(new FHIRReference($data[self::FIELD_ENTRY])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRListMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIRListMode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRListMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRListMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRListMode($ext)); } } if (isset($data[self::FIELD_ORDERED_BY])) { @@ -305,20 +312,27 @@ public function __construct($data = null) $this->setText(new FHIRNarrative($data[self::FIELD_TEXT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -682,8 +696,8 @@ public function setTitle($title = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -826,12 +840,20 @@ public function jsonSerialize() $a[self::FIELD_EMPTY_REASON] = $v; } if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRListMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRListMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } @@ -839,18 +861,29 @@ public function jsonSerialize() $a[self::FIELD_ORDERED_BY] = $v; } if ([] !== ($vs = $this->getSection())) { - $a[self::FIELD_SECTION] = $vs; + $a[self::FIELD_SECTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECTION][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v; } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php index e418732e6a..cc99de1492 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOn.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRConceptMapDependsOn extends FHIRBackboneElement const FIELD_SYSTEM_EXT = '_system'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -162,68 +162,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRString) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRString(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRString($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; } - } - if (isset($data[self::FIELD_PROPERTY])) { - $ext = (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) - ? $data[self::FIELD_PROPERTY_EXT] - : null; - if ($data[self::FIELD_PROPERTY] instanceof FHIRUri) { - $this->setProperty($data[self::FIELD_PROPERTY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROPERTY]] + $ext)); - } else if (is_array($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRUri(array_merge($ext, $data[self::FIELD_PROPERTY]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setProperty(new FHIRUri($data[self::FIELD_PROPERTY])); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (isset($data[self::FIELD_PROPERTY]) || isset($data[self::FIELD_PROPERTY_EXT])) { + if (isset($data[self::FIELD_PROPERTY])) { + $value = $data[self::FIELD_PROPERTY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) { + $ext = $data[self::FIELD_PROPERTY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setProperty($value); + } else if (is_array($value)) { + $this->setProperty(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setProperty(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProperty(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } } @@ -415,8 +443,8 @@ public function setSystem($system = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -540,32 +568,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getProperty())) { $a[self::FIELD_PROPERTY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PROPERTY_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php index f9f893a35c..bb81bc4e49 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRConceptMapElement extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -144,36 +144,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -354,8 +368,8 @@ public function setTarget(array $target = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -464,20 +478,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php index ef9fb56edf..477104bfdf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRConceptMapGroup extends FHIRBackboneElement const FIELD_UNMAPPED = 'unmapped'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A statement of relationships from one set of concepts to one or more other @@ -206,68 +206,96 @@ public function __construct($data = null) $this->addElement(new FHIRConceptMapElement($data[self::FIELD_ELEMENT])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); + $value = null; } - } - if (isset($data[self::FIELD_SOURCE_VERSION])) { - $ext = (isset($data[self::FIELD_SOURCE_VERSION_EXT]) && is_array($data[self::FIELD_SOURCE_VERSION_EXT])) - ? $data[self::FIELD_SOURCE_VERSION_EXT] - : null; - if ($data[self::FIELD_SOURCE_VERSION] instanceof FHIRString) { - $this->setSourceVersion($data[self::FIELD_SOURCE_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_VERSION])) { - $this->setSourceVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOURCE_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_VERSION])) { - $this->setSourceVersion(new FHIRString(array_merge($ext, $data[self::FIELD_SOURCE_VERSION]))); - } + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; } else { - $this->setSourceVersion(new FHIRString($data[self::FIELD_SOURCE_VERSION])); + $ext = []; } - } - if (isset($data[self::FIELD_TARGET])) { - $ext = (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) - ? $data[self::FIELD_TARGET_EXT] - : null; - if ($data[self::FIELD_TARGET] instanceof FHIRUri) { - $this->setTarget($data[self::FIELD_TARGET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET])) { - $this->setTarget(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_TARGET]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET])) { - $this->setTarget(new FHIRUri(array_merge($ext, $data[self::FIELD_TARGET]))); + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_VERSION]) || isset($data[self::FIELD_SOURCE_VERSION_EXT])) { + if (isset($data[self::FIELD_SOURCE_VERSION])) { + $value = $data[self::FIELD_SOURCE_VERSION]; } else { - $this->setTarget(new FHIRUri($data[self::FIELD_TARGET])); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_VERSION_EXT]) && is_array($data[self::FIELD_SOURCE_VERSION_EXT])) { + $ext = $data[self::FIELD_SOURCE_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSourceVersion($value); + } else if (is_array($value)) { + $this->setSourceVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSourceVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSourceVersion(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TARGET_VERSION])) { - $ext = (isset($data[self::FIELD_TARGET_VERSION_EXT]) && is_array($data[self::FIELD_TARGET_VERSION_EXT])) - ? $data[self::FIELD_TARGET_VERSION_EXT] - : null; - if ($data[self::FIELD_TARGET_VERSION] instanceof FHIRString) { - $this->setTargetVersion($data[self::FIELD_TARGET_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_VERSION])) { - $this->setTargetVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TARGET_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_VERSION])) { - $this->setTargetVersion(new FHIRString(array_merge($ext, $data[self::FIELD_TARGET_VERSION]))); + if (isset($data[self::FIELD_TARGET]) || isset($data[self::FIELD_TARGET_EXT])) { + if (isset($data[self::FIELD_TARGET])) { + $value = $data[self::FIELD_TARGET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) { + $ext = $data[self::FIELD_TARGET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setTarget($value); + } else if (is_array($value)) { + $this->setTarget(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setTarget(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTarget(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_TARGET_VERSION]) || isset($data[self::FIELD_TARGET_VERSION_EXT])) { + if (isset($data[self::FIELD_TARGET_VERSION])) { + $value = $data[self::FIELD_TARGET_VERSION]; } else { - $this->setTargetVersion(new FHIRString($data[self::FIELD_TARGET_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_TARGET_VERSION_EXT]) && is_array($data[self::FIELD_TARGET_VERSION_EXT])) { + $ext = $data[self::FIELD_TARGET_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTargetVersion($value); + } else if (is_array($value)) { + $this->setTargetVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTargetVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTargetVersion(new FHIRString($ext)); } } if (isset($data[self::FIELD_UNMAPPED])) { @@ -548,8 +576,8 @@ public function setUnmapped(FHIRConceptMapUnmapped $unmapped = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -691,39 +719,56 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getSourceVersion())) { $a[self::FIELD_SOURCE_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOURCE_VERSION_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_TARGET_EXT] = $enc; } } if (null !== ($v = $this->getTargetVersion())) { $a[self::FIELD_TARGET_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TARGET_VERSION_EXT] = $enc; } } if (null !== ($v = $this->getUnmapped())) { $a[self::FIELD_UNMAPPED] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php index cbaf0c5e81..ed82335a18 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRConceptMapTarget extends FHIRBackboneElement const FIELD_PRODUCT = 'product'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -188,36 +188,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_DEPENDS_ON])) { @@ -238,36 +252,50 @@ public function __construct($data = null) $this->addDependsOn(new FHIRConceptMapDependsOn($data[self::FIELD_DEPENDS_ON])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_EQUIVALENCE])) { - $ext = (isset($data[self::FIELD_EQUIVALENCE_EXT]) && is_array($data[self::FIELD_EQUIVALENCE_EXT])) - ? $data[self::FIELD_EQUIVALENCE_EXT] - : null; - if ($data[self::FIELD_EQUIVALENCE] instanceof FHIRConceptMapEquivalence) { - $this->setEquivalence($data[self::FIELD_EQUIVALENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EQUIVALENCE])) { - $this->setEquivalence(new FHIRConceptMapEquivalence([FHIRConceptMapEquivalence::FIELD_VALUE => $data[self::FIELD_EQUIVALENCE]] + $ext)); - } else if (is_array($data[self::FIELD_EQUIVALENCE])) { - $this->setEquivalence(new FHIRConceptMapEquivalence(array_merge($ext, $data[self::FIELD_EQUIVALENCE]))); + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EQUIVALENCE]) || isset($data[self::FIELD_EQUIVALENCE_EXT])) { + if (isset($data[self::FIELD_EQUIVALENCE])) { + $value = $data[self::FIELD_EQUIVALENCE]; } else { - $this->setEquivalence(new FHIRConceptMapEquivalence($data[self::FIELD_EQUIVALENCE])); + $value = null; + } + if (isset($data[self::FIELD_EQUIVALENCE_EXT]) && is_array($data[self::FIELD_EQUIVALENCE_EXT])) { + $ext = $data[self::FIELD_EQUIVALENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConceptMapEquivalence) { + $this->setEquivalence($value); + } else if (is_array($value)) { + $this->setEquivalence(new FHIRConceptMapEquivalence(array_merge($ext, $value))); + } else { + $this->setEquivalence(new FHIRConceptMapEquivalence([FHIRConceptMapEquivalence::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEquivalence(new FHIRConceptMapEquivalence($ext)); } } if (isset($data[self::FIELD_PRODUCT])) { @@ -586,8 +614,8 @@ public function setProduct(array $product = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -729,37 +757,60 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getDependsOn())) { - $a[self::FIELD_DEPENDS_ON] = $vs; + $a[self::FIELD_DEPENDS_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEPENDS_ON][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getEquivalence())) { $a[self::FIELD_EQUIVALENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConceptMapEquivalence::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConceptMapEquivalence::FIELD_VALUE]); $a[self::FIELD_EQUIVALENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getProduct())) { - $a[self::FIELD_PRODUCT] = $vs; + $a[self::FIELD_PRODUCT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRODUCT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php index 9bb5c50c83..482f0e8518 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmapped.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRConceptMapUnmapped extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -165,68 +165,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRConceptMapGroupUnmappedMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRConceptMapGroupUnmappedMode([FHIRConceptMapGroupUnmappedMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRConceptMapGroupUnmappedMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setMode(new FHIRConceptMapGroupUnmappedMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConceptMapGroupUnmappedMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRConceptMapGroupUnmappedMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRConceptMapGroupUnmappedMode([FHIRConceptMapGroupUnmappedMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRConceptMapGroupUnmappedMode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -412,8 +440,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -529,32 +557,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConceptMapGroupUnmappedMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConceptMapGroupUnmappedMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php index 0c697784cc..3024440452 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRConditionEvidence extends FHIRBackboneElement const FIELD_DETAIL = 'detail'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -308,8 +308,8 @@ public function setDetail(array $detail = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -402,10 +402,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php index d6c6c35dd1..826668c6ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRConditionStage extends FHIRBackboneElement const FIELD_SUMMARY = 'summary'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -277,8 +277,8 @@ public function setSummary(FHIRCodeableConcept $summary = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -364,11 +364,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAssessment())) { - $a[self::FIELD_ASSESSMENT] = $vs; + $a[self::FIELD_ASSESSMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ASSESSMENT][] = $v; + } } if (null !== ($v = $this->getSummary())) { $a[self::FIELD_SUMMARY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php index 8ad575bafb..82719a27ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRConsentActor extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -243,8 +243,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -328,6 +328,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1.php index ce3ac014c5..f7585ace0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRConsentActor1 extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -243,8 +243,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -328,6 +328,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php index dd74e2972d..d0b38ac46b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConsentData extends FHIRBackboneElement const FIELD_REFERENCE = 'reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How a resource reference is interpreted when testing consent restrictions @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MEANING])) { - $ext = (isset($data[self::FIELD_MEANING_EXT]) && is_array($data[self::FIELD_MEANING_EXT])) - ? $data[self::FIELD_MEANING_EXT] - : null; - if ($data[self::FIELD_MEANING] instanceof FHIRConsentDataMeaning) { - $this->setMeaning($data[self::FIELD_MEANING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEANING])) { - $this->setMeaning(new FHIRConsentDataMeaning([FHIRConsentDataMeaning::FIELD_VALUE => $data[self::FIELD_MEANING]] + $ext)); - } else if (is_array($data[self::FIELD_MEANING])) { - $this->setMeaning(new FHIRConsentDataMeaning(array_merge($ext, $data[self::FIELD_MEANING]))); - } + if (isset($data[self::FIELD_MEANING]) || isset($data[self::FIELD_MEANING_EXT])) { + if (isset($data[self::FIELD_MEANING])) { + $value = $data[self::FIELD_MEANING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MEANING_EXT]) && is_array($data[self::FIELD_MEANING_EXT])) { + $ext = $data[self::FIELD_MEANING_EXT]; } else { - $this->setMeaning(new FHIRConsentDataMeaning($data[self::FIELD_MEANING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConsentDataMeaning) { + $this->setMeaning($value); + } else if (is_array($value)) { + $this->setMeaning(new FHIRConsentDataMeaning(array_merge($ext, $value))); + } else { + $this->setMeaning(new FHIRConsentDataMeaning([FHIRConsentDataMeaning::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeaning(new FHIRConsentDataMeaning($ext)); } } if (isset($data[self::FIELD_REFERENCE])) { @@ -241,8 +248,8 @@ public function setReference(FHIRReference $reference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -322,14 +329,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMeaning())) { $a[self::FIELD_MEANING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConsentDataMeaning::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConsentDataMeaning::FIELD_VALUE]); $a[self::FIELD_MEANING_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1.php index c0b8433cda..2351e27240 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConsentData1 extends FHIRBackboneElement const FIELD_REFERENCE = 'reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How a resource reference is interpreted when testing consent restrictions @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MEANING])) { - $ext = (isset($data[self::FIELD_MEANING_EXT]) && is_array($data[self::FIELD_MEANING_EXT])) - ? $data[self::FIELD_MEANING_EXT] - : null; - if ($data[self::FIELD_MEANING] instanceof FHIRConsentDataMeaning) { - $this->setMeaning($data[self::FIELD_MEANING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEANING])) { - $this->setMeaning(new FHIRConsentDataMeaning([FHIRConsentDataMeaning::FIELD_VALUE => $data[self::FIELD_MEANING]] + $ext)); - } else if (is_array($data[self::FIELD_MEANING])) { - $this->setMeaning(new FHIRConsentDataMeaning(array_merge($ext, $data[self::FIELD_MEANING]))); - } + if (isset($data[self::FIELD_MEANING]) || isset($data[self::FIELD_MEANING_EXT])) { + if (isset($data[self::FIELD_MEANING])) { + $value = $data[self::FIELD_MEANING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MEANING_EXT]) && is_array($data[self::FIELD_MEANING_EXT])) { + $ext = $data[self::FIELD_MEANING_EXT]; } else { - $this->setMeaning(new FHIRConsentDataMeaning($data[self::FIELD_MEANING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConsentDataMeaning) { + $this->setMeaning($value); + } else if (is_array($value)) { + $this->setMeaning(new FHIRConsentDataMeaning(array_merge($ext, $value))); + } else { + $this->setMeaning(new FHIRConsentDataMeaning([FHIRConsentDataMeaning::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeaning(new FHIRConsentDataMeaning($ext)); } } if (isset($data[self::FIELD_REFERENCE])) { @@ -241,8 +248,8 @@ public function setReference(FHIRReference $reference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -322,14 +329,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMeaning())) { $a[self::FIELD_MEANING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConsentDataMeaning::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConsentDataMeaning::FIELD_VALUE]); $a[self::FIELD_MEANING_EXT] = $enc; } } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExcept.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExcept.php index d089d62d77..a30858b111 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExcept.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRConsentExcept extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -378,20 +378,27 @@ public function __construct($data = null) $this->addSecurityLabel(new FHIRCoding($data[self::FIELD_SECURITY_LABEL])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRConsentExceptType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRConsentExceptType([FHIRConsentExceptType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRConsentExceptType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRConsentExceptType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConsentExceptType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRConsentExceptType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRConsentExceptType([FHIRConsentExceptType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRConsentExceptType($ext)); } } } @@ -929,8 +936,8 @@ public function setType(FHIRConsentExceptType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1106,19 +1113,49 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if ([] !== ($vs = $this->getActor())) { - $a[self::FIELD_ACTOR] = $vs; + $a[self::FIELD_ACTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTOR][] = $v; + } } if ([] !== ($vs = $this->getClass())) { - $a[self::FIELD_CLASS] = $vs; + $a[self::FIELD_CLASS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CLASS][] = $v; + } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getData())) { - $a[self::FIELD_DATA] = $vs; + $a[self::FIELD_DATA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA][] = $v; + } } if (null !== ($v = $this->getDataPeriod())) { $a[self::FIELD_DATA_PERIOD] = $v; @@ -1127,18 +1164,35 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPurpose())) { - $a[self::FIELD_PURPOSE] = $vs; + $a[self::FIELD_PURPOSE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PURPOSE][] = $v; + } } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConsentExceptType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConsentExceptType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php index 2bdb9c1497..75cee857f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRConsentPolicy extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -133,36 +133,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORITY])) { - $ext = (isset($data[self::FIELD_AUTHORITY_EXT]) && is_array($data[self::FIELD_AUTHORITY_EXT])) - ? $data[self::FIELD_AUTHORITY_EXT] - : null; - if ($data[self::FIELD_AUTHORITY] instanceof FHIRUri) { - $this->setAuthority($data[self::FIELD_AUTHORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORITY])) { - $this->setAuthority(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_AUTHORITY]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORITY])) { - $this->setAuthority(new FHIRUri(array_merge($ext, $data[self::FIELD_AUTHORITY]))); - } + if (isset($data[self::FIELD_AUTHORITY]) || isset($data[self::FIELD_AUTHORITY_EXT])) { + if (isset($data[self::FIELD_AUTHORITY])) { + $value = $data[self::FIELD_AUTHORITY]; } else { - $this->setAuthority(new FHIRUri($data[self::FIELD_AUTHORITY])); + $value = null; } - } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_AUTHORITY_EXT]) && is_array($data[self::FIELD_AUTHORITY_EXT])) { + $ext = $data[self::FIELD_AUTHORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setAuthority($value); + } else if (is_array($value)) { + $this->setAuthority(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setAuthority(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAuthority(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -272,8 +286,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -369,18 +383,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthority())) { $a[self::FIELD_AUTHORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_AUTHORITY_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent.php index 9c124e5469..4b9bdc489c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractAgent extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -271,8 +271,8 @@ public function setRole(array $role = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -361,7 +361,16 @@ public function jsonSerialize() $a[self::FIELD_ACTOR] = $v; } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1.php index 0448ceb287..2274b7962e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractAgent1 extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -275,8 +275,8 @@ public function setRole(array $role = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -365,7 +365,16 @@ public function jsonSerialize() $a[self::FIELD_ACTOR] = $v; } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php index be1793a9fe..36d12f5416 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendly.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractFriendly extends FHIRBackboneElement const FIELD_CONTENT_REFERENCE = 'contentReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -236,8 +236,8 @@ public function setContentReference(FHIRReference $contentReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php index 90e558912a..078d44756a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractLegal extends FHIRBackboneElement const FIELD_CONTENT_REFERENCE = 'contentReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -230,8 +230,8 @@ public function setContentReference(FHIRReference $contentReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -315,6 +315,9 @@ public function jsonSerialize() if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php index c1e7d5560d..3da2c70d02 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContractRule extends FHIRBackboneElement const FIELD_CONTENT_REFERENCE = 'contentReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -236,8 +236,8 @@ public function setContentReference(FHIRReference $contentReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php index bf7a7477ba..f9e08a2d57 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSigner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRContractSigner extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -333,8 +333,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -429,11 +429,20 @@ public function jsonSerialize() $a[self::FIELD_PARTY] = $v; } if ([] !== ($vs = $this->getSignature())) { - $a[self::FIELD_SIGNATURE] = $vs; + $a[self::FIELD_SIGNATURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SIGNATURE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php index 557c710fdb..1c53fcaea9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTerm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRContractTerm extends FHIRBackboneElement const FIELD_VALUED_ITEM = 'valuedItem'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -362,20 +362,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRDateTime) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRDateTime($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SECURITY_LABEL])) { @@ -403,20 +410,27 @@ public function __construct($data = null) $this->setSubType(new FHIRCodeableConcept($data[self::FIELD_SUB_TYPE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1094,8 +1108,8 @@ public function setValuedItem(array $valuedItem = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1305,51 +1319,100 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if ([] !== ($vs = $this->getActionReason())) { - $a[self::FIELD_ACTION_REASON] = $vs; + $a[self::FIELD_ACTION_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION_REASON][] = $v; + } } if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if (null !== ($v = $this->getApplies())) { $a[self::FIELD_APPLIES] = $v; } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getSubType())) { $a[self::FIELD_SUB_TYPE] = $v; } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getValuedItem())) { - $a[self::FIELD_VALUED_ITEM] = $vs; + $a[self::FIELD_VALUED_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUED_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php index 5d83835c68..b43252b261 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRContractValuedItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -239,20 +239,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EFFECTIVE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveTime($data[self::FIELD_EFFECTIVE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_TIME]) || isset($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_TIME_EXT]; } else { - $this->setEffectiveTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveTime($value); + } else if (is_array($value)) { + $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { @@ -269,20 +276,27 @@ public function __construct($data = null) $this->setEntityReference(new FHIRReference($data[self::FIELD_ENTITY_REFERENCE])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -299,20 +313,27 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_POINTS])) { - $ext = (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) - ? $data[self::FIELD_POINTS_EXT] - : null; - if ($data[self::FIELD_POINTS] instanceof FHIRDecimal) { - $this->setPoints($data[self::FIELD_POINTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POINTS]] + $ext)); - } else if (is_array($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POINTS]))); - } + if (isset($data[self::FIELD_POINTS]) || isset($data[self::FIELD_POINTS_EXT])) { + if (isset($data[self::FIELD_POINTS])) { + $value = $data[self::FIELD_POINTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) { + $ext = $data[self::FIELD_POINTS_EXT]; } else { - $this->setPoints(new FHIRDecimal($data[self::FIELD_POINTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPoints($value); + } else if (is_array($value)) { + $this->setPoints(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPoints(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -686,8 +707,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -833,8 +854,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEffectiveTime())) { $a[self::FIELD_EFFECTIVE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_TIME_EXT] = $enc; } } @@ -846,8 +869,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } @@ -859,8 +884,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPoints())) { $a[self::FIELD_POINTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POINTS_EXT] = $enc; } } @@ -870,6 +897,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php index 5d56844f40..1a86ccf501 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRContractValuedItem1 extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -241,20 +241,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EFFECTIVE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveTime($data[self::FIELD_EFFECTIVE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_TIME])) { - $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_TIME]) || isset($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_TIME_EXT]; } else { - $this->setEffectiveTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveTime($value); + } else if (is_array($value)) { + $this->setEffectiveTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENTITY_CODEABLE_CONCEPT])) { @@ -271,20 +278,27 @@ public function __construct($data = null) $this->setEntityReference(new FHIRReference($data[self::FIELD_ENTITY_REFERENCE])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -301,20 +315,27 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_POINTS])) { - $ext = (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) - ? $data[self::FIELD_POINTS_EXT] - : null; - if ($data[self::FIELD_POINTS] instanceof FHIRDecimal) { - $this->setPoints($data[self::FIELD_POINTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POINTS]] + $ext)); - } else if (is_array($data[self::FIELD_POINTS])) { - $this->setPoints(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POINTS]))); - } + if (isset($data[self::FIELD_POINTS]) || isset($data[self::FIELD_POINTS_EXT])) { + if (isset($data[self::FIELD_POINTS])) { + $value = $data[self::FIELD_POINTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POINTS_EXT]) && is_array($data[self::FIELD_POINTS_EXT])) { + $ext = $data[self::FIELD_POINTS_EXT]; } else { - $this->setPoints(new FHIRDecimal($data[self::FIELD_POINTS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPoints($value); + } else if (is_array($value)) { + $this->setPoints(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPoints(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPoints(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -692,8 +713,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -839,8 +860,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEffectiveTime())) { $a[self::FIELD_EFFECTIVE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_TIME_EXT] = $enc; } } @@ -852,8 +875,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } @@ -865,8 +890,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPoints())) { $a[self::FIELD_POINTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POINTS_EXT] = $enc; } } @@ -876,6 +903,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGrouping.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGrouping.php index d254d49324..16864dcd6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGrouping.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGrouping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRCoverageGrouping extends FHIRBackboneElement const FIELD_SUB_PLAN_DISPLAY_EXT = '_subPlanDisplay'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -271,196 +271,280 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CLASS])) { - $ext = (isset($data[self::FIELD_CLASS_EXT]) && is_array($data[self::FIELD_CLASS_EXT])) - ? $data[self::FIELD_CLASS_EXT] - : null; - if ($data[self::FIELD_CLASS] instanceof FHIRString) { - $this->setClass($data[self::FIELD_CLASS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLASS])) { - $this->setClass(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CLASS]] + $ext)); - } else if (is_array($data[self::FIELD_CLASS])) { - $this->setClass(new FHIRString(array_merge($ext, $data[self::FIELD_CLASS]))); - } + if (isset($data[self::FIELD_CLASS]) || isset($data[self::FIELD_CLASS_EXT])) { + if (isset($data[self::FIELD_CLASS])) { + $value = $data[self::FIELD_CLASS]; } else { - $this->setClass(new FHIRString($data[self::FIELD_CLASS])); + $value = null; } - } - if (isset($data[self::FIELD_CLASS_DISPLAY])) { - $ext = (isset($data[self::FIELD_CLASS_DISPLAY_EXT]) && is_array($data[self::FIELD_CLASS_DISPLAY_EXT])) - ? $data[self::FIELD_CLASS_DISPLAY_EXT] - : null; - if ($data[self::FIELD_CLASS_DISPLAY] instanceof FHIRString) { - $this->setClassDisplay($data[self::FIELD_CLASS_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLASS_DISPLAY])) { - $this->setClassDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CLASS_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_CLASS_DISPLAY])) { - $this->setClassDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_CLASS_DISPLAY]))); - } + if (isset($data[self::FIELD_CLASS_EXT]) && is_array($data[self::FIELD_CLASS_EXT])) { + $ext = $data[self::FIELD_CLASS_EXT]; } else { - $this->setClassDisplay(new FHIRString($data[self::FIELD_CLASS_DISPLAY])); + $ext = []; } - } - if (isset($data[self::FIELD_GROUP])) { - $ext = (isset($data[self::FIELD_GROUP_EXT]) && is_array($data[self::FIELD_GROUP_EXT])) - ? $data[self::FIELD_GROUP_EXT] - : null; - if ($data[self::FIELD_GROUP] instanceof FHIRString) { - $this->setGroup($data[self::FIELD_GROUP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUP])) { - $this->setGroup(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GROUP]] + $ext)); - } else if (is_array($data[self::FIELD_GROUP])) { - $this->setGroup(new FHIRString(array_merge($ext, $data[self::FIELD_GROUP]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setClass($value); + } else if (is_array($value)) { + $this->setClass(new FHIRString(array_merge($ext, $value))); + } else { + $this->setClass(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setGroup(new FHIRString($data[self::FIELD_GROUP])); + } else if ([] !== $ext) { + $this->setClass(new FHIRString($ext)); } } - if (isset($data[self::FIELD_GROUP_DISPLAY])) { - $ext = (isset($data[self::FIELD_GROUP_DISPLAY_EXT]) && is_array($data[self::FIELD_GROUP_DISPLAY_EXT])) - ? $data[self::FIELD_GROUP_DISPLAY_EXT] - : null; - if ($data[self::FIELD_GROUP_DISPLAY] instanceof FHIRString) { - $this->setGroupDisplay($data[self::FIELD_GROUP_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUP_DISPLAY])) { - $this->setGroupDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GROUP_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_GROUP_DISPLAY])) { - $this->setGroupDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_GROUP_DISPLAY]))); - } + if (isset($data[self::FIELD_CLASS_DISPLAY]) || isset($data[self::FIELD_CLASS_DISPLAY_EXT])) { + if (isset($data[self::FIELD_CLASS_DISPLAY])) { + $value = $data[self::FIELD_CLASS_DISPLAY]; } else { - $this->setGroupDisplay(new FHIRString($data[self::FIELD_GROUP_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_PLAN])) { - $ext = (isset($data[self::FIELD_PLAN_EXT]) && is_array($data[self::FIELD_PLAN_EXT])) - ? $data[self::FIELD_PLAN_EXT] - : null; - if ($data[self::FIELD_PLAN] instanceof FHIRString) { - $this->setPlan($data[self::FIELD_PLAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PLAN])) { - $this->setPlan(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PLAN]] + $ext)); - } else if (is_array($data[self::FIELD_PLAN])) { - $this->setPlan(new FHIRString(array_merge($ext, $data[self::FIELD_PLAN]))); - } + if (isset($data[self::FIELD_CLASS_DISPLAY_EXT]) && is_array($data[self::FIELD_CLASS_DISPLAY_EXT])) { + $ext = $data[self::FIELD_CLASS_DISPLAY_EXT]; } else { - $this->setPlan(new FHIRString($data[self::FIELD_PLAN])); + $ext = []; } - } - if (isset($data[self::FIELD_PLAN_DISPLAY])) { - $ext = (isset($data[self::FIELD_PLAN_DISPLAY_EXT]) && is_array($data[self::FIELD_PLAN_DISPLAY_EXT])) - ? $data[self::FIELD_PLAN_DISPLAY_EXT] - : null; - if ($data[self::FIELD_PLAN_DISPLAY] instanceof FHIRString) { - $this->setPlanDisplay($data[self::FIELD_PLAN_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PLAN_DISPLAY])) { - $this->setPlanDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PLAN_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_PLAN_DISPLAY])) { - $this->setPlanDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_PLAN_DISPLAY]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setClassDisplay($value); + } else if (is_array($value)) { + $this->setClassDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setClassDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setPlanDisplay(new FHIRString($data[self::FIELD_PLAN_DISPLAY])); + } else if ([] !== $ext) { + $this->setClassDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SUB_CLASS])) { - $ext = (isset($data[self::FIELD_SUB_CLASS_EXT]) && is_array($data[self::FIELD_SUB_CLASS_EXT])) - ? $data[self::FIELD_SUB_CLASS_EXT] - : null; - if ($data[self::FIELD_SUB_CLASS] instanceof FHIRString) { - $this->setSubClass($data[self::FIELD_SUB_CLASS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUB_CLASS])) { - $this->setSubClass(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUB_CLASS]] + $ext)); - } else if (is_array($data[self::FIELD_SUB_CLASS])) { - $this->setSubClass(new FHIRString(array_merge($ext, $data[self::FIELD_SUB_CLASS]))); - } + if (isset($data[self::FIELD_GROUP]) || isset($data[self::FIELD_GROUP_EXT])) { + if (isset($data[self::FIELD_GROUP])) { + $value = $data[self::FIELD_GROUP]; } else { - $this->setSubClass(new FHIRString($data[self::FIELD_SUB_CLASS])); + $value = null; } - } - if (isset($data[self::FIELD_SUB_CLASS_DISPLAY])) { - $ext = (isset($data[self::FIELD_SUB_CLASS_DISPLAY_EXT]) && is_array($data[self::FIELD_SUB_CLASS_DISPLAY_EXT])) - ? $data[self::FIELD_SUB_CLASS_DISPLAY_EXT] - : null; - if ($data[self::FIELD_SUB_CLASS_DISPLAY] instanceof FHIRString) { - $this->setSubClassDisplay($data[self::FIELD_SUB_CLASS_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUB_CLASS_DISPLAY])) { - $this->setSubClassDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUB_CLASS_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_SUB_CLASS_DISPLAY])) { - $this->setSubClassDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_SUB_CLASS_DISPLAY]))); + if (isset($data[self::FIELD_GROUP_EXT]) && is_array($data[self::FIELD_GROUP_EXT])) { + $ext = $data[self::FIELD_GROUP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setGroup($value); + } else if (is_array($value)) { + $this->setGroup(new FHIRString(array_merge($ext, $value))); + } else { + $this->setGroup(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setGroup(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_GROUP_DISPLAY]) || isset($data[self::FIELD_GROUP_DISPLAY_EXT])) { + if (isset($data[self::FIELD_GROUP_DISPLAY])) { + $value = $data[self::FIELD_GROUP_DISPLAY]; } else { - $this->setSubClassDisplay(new FHIRString($data[self::FIELD_SUB_CLASS_DISPLAY])); + $value = null; + } + if (isset($data[self::FIELD_GROUP_DISPLAY_EXT]) && is_array($data[self::FIELD_GROUP_DISPLAY_EXT])) { + $ext = $data[self::FIELD_GROUP_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setGroupDisplay($value); + } else if (is_array($value)) { + $this->setGroupDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setGroupDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGroupDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SUB_GROUP])) { - $ext = (isset($data[self::FIELD_SUB_GROUP_EXT]) && is_array($data[self::FIELD_SUB_GROUP_EXT])) - ? $data[self::FIELD_SUB_GROUP_EXT] - : null; - if ($data[self::FIELD_SUB_GROUP] instanceof FHIRString) { - $this->setSubGroup($data[self::FIELD_SUB_GROUP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUB_GROUP])) { - $this->setSubGroup(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUB_GROUP]] + $ext)); - } else if (is_array($data[self::FIELD_SUB_GROUP])) { - $this->setSubGroup(new FHIRString(array_merge($ext, $data[self::FIELD_SUB_GROUP]))); + if (isset($data[self::FIELD_PLAN]) || isset($data[self::FIELD_PLAN_EXT])) { + if (isset($data[self::FIELD_PLAN])) { + $value = $data[self::FIELD_PLAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PLAN_EXT]) && is_array($data[self::FIELD_PLAN_EXT])) { + $ext = $data[self::FIELD_PLAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPlan($value); + } else if (is_array($value)) { + $this->setPlan(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPlan(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPlan(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PLAN_DISPLAY]) || isset($data[self::FIELD_PLAN_DISPLAY_EXT])) { + if (isset($data[self::FIELD_PLAN_DISPLAY])) { + $value = $data[self::FIELD_PLAN_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PLAN_DISPLAY_EXT]) && is_array($data[self::FIELD_PLAN_DISPLAY_EXT])) { + $ext = $data[self::FIELD_PLAN_DISPLAY_EXT]; } else { - $this->setSubGroup(new FHIRString($data[self::FIELD_SUB_GROUP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPlanDisplay($value); + } else if (is_array($value)) { + $this->setPlanDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPlanDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPlanDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SUB_GROUP_DISPLAY])) { - $ext = (isset($data[self::FIELD_SUB_GROUP_DISPLAY_EXT]) && is_array($data[self::FIELD_SUB_GROUP_DISPLAY_EXT])) - ? $data[self::FIELD_SUB_GROUP_DISPLAY_EXT] - : null; - if ($data[self::FIELD_SUB_GROUP_DISPLAY] instanceof FHIRString) { - $this->setSubGroupDisplay($data[self::FIELD_SUB_GROUP_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUB_GROUP_DISPLAY])) { - $this->setSubGroupDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUB_GROUP_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_SUB_GROUP_DISPLAY])) { - $this->setSubGroupDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_SUB_GROUP_DISPLAY]))); + if (isset($data[self::FIELD_SUB_CLASS]) || isset($data[self::FIELD_SUB_CLASS_EXT])) { + if (isset($data[self::FIELD_SUB_CLASS])) { + $value = $data[self::FIELD_SUB_CLASS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUB_CLASS_EXT]) && is_array($data[self::FIELD_SUB_CLASS_EXT])) { + $ext = $data[self::FIELD_SUB_CLASS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubClass($value); + } else if (is_array($value)) { + $this->setSubClass(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubClass(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubClass(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SUB_CLASS_DISPLAY]) || isset($data[self::FIELD_SUB_CLASS_DISPLAY_EXT])) { + if (isset($data[self::FIELD_SUB_CLASS_DISPLAY])) { + $value = $data[self::FIELD_SUB_CLASS_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUB_CLASS_DISPLAY_EXT]) && is_array($data[self::FIELD_SUB_CLASS_DISPLAY_EXT])) { + $ext = $data[self::FIELD_SUB_CLASS_DISPLAY_EXT]; } else { - $this->setSubGroupDisplay(new FHIRString($data[self::FIELD_SUB_GROUP_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubClassDisplay($value); + } else if (is_array($value)) { + $this->setSubClassDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubClassDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubClassDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SUB_PLAN])) { - $ext = (isset($data[self::FIELD_SUB_PLAN_EXT]) && is_array($data[self::FIELD_SUB_PLAN_EXT])) - ? $data[self::FIELD_SUB_PLAN_EXT] - : null; - if ($data[self::FIELD_SUB_PLAN] instanceof FHIRString) { - $this->setSubPlan($data[self::FIELD_SUB_PLAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUB_PLAN])) { - $this->setSubPlan(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUB_PLAN]] + $ext)); - } else if (is_array($data[self::FIELD_SUB_PLAN])) { - $this->setSubPlan(new FHIRString(array_merge($ext, $data[self::FIELD_SUB_PLAN]))); + if (isset($data[self::FIELD_SUB_GROUP]) || isset($data[self::FIELD_SUB_GROUP_EXT])) { + if (isset($data[self::FIELD_SUB_GROUP])) { + $value = $data[self::FIELD_SUB_GROUP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUB_GROUP_EXT]) && is_array($data[self::FIELD_SUB_GROUP_EXT])) { + $ext = $data[self::FIELD_SUB_GROUP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubGroup($value); + } else if (is_array($value)) { + $this->setSubGroup(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubGroup(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubGroup(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SUB_GROUP_DISPLAY]) || isset($data[self::FIELD_SUB_GROUP_DISPLAY_EXT])) { + if (isset($data[self::FIELD_SUB_GROUP_DISPLAY])) { + $value = $data[self::FIELD_SUB_GROUP_DISPLAY]; } else { - $this->setSubPlan(new FHIRString($data[self::FIELD_SUB_PLAN])); + $value = null; + } + if (isset($data[self::FIELD_SUB_GROUP_DISPLAY_EXT]) && is_array($data[self::FIELD_SUB_GROUP_DISPLAY_EXT])) { + $ext = $data[self::FIELD_SUB_GROUP_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubGroupDisplay($value); + } else if (is_array($value)) { + $this->setSubGroupDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubGroupDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubGroupDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SUB_PLAN_DISPLAY])) { - $ext = (isset($data[self::FIELD_SUB_PLAN_DISPLAY_EXT]) && is_array($data[self::FIELD_SUB_PLAN_DISPLAY_EXT])) - ? $data[self::FIELD_SUB_PLAN_DISPLAY_EXT] - : null; - if ($data[self::FIELD_SUB_PLAN_DISPLAY] instanceof FHIRString) { - $this->setSubPlanDisplay($data[self::FIELD_SUB_PLAN_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUB_PLAN_DISPLAY])) { - $this->setSubPlanDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUB_PLAN_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_SUB_PLAN_DISPLAY])) { - $this->setSubPlanDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_SUB_PLAN_DISPLAY]))); + if (isset($data[self::FIELD_SUB_PLAN]) || isset($data[self::FIELD_SUB_PLAN_EXT])) { + if (isset($data[self::FIELD_SUB_PLAN])) { + $value = $data[self::FIELD_SUB_PLAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUB_PLAN_EXT]) && is_array($data[self::FIELD_SUB_PLAN_EXT])) { + $ext = $data[self::FIELD_SUB_PLAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubPlan($value); + } else if (is_array($value)) { + $this->setSubPlan(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubPlan(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSubPlan(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SUB_PLAN_DISPLAY]) || isset($data[self::FIELD_SUB_PLAN_DISPLAY_EXT])) { + if (isset($data[self::FIELD_SUB_PLAN_DISPLAY])) { + $value = $data[self::FIELD_SUB_PLAN_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUB_PLAN_DISPLAY_EXT]) && is_array($data[self::FIELD_SUB_PLAN_DISPLAY_EXT])) { + $ext = $data[self::FIELD_SUB_PLAN_DISPLAY_EXT]; } else { - $this->setSubPlanDisplay(new FHIRString($data[self::FIELD_SUB_PLAN_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubPlanDisplay($value); + } else if (is_array($value)) { + $this->setSubPlanDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubPlanDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubPlanDisplay(new FHIRString($ext)); } } } @@ -968,8 +1052,8 @@ public function setSubPlanDisplay($subPlanDisplay = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1205,88 +1289,115 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CLASS_EXT] = $enc; } } if (null !== ($v = $this->getClassDisplay())) { $a[self::FIELD_CLASS_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CLASS_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getGroup())) { $a[self::FIELD_GROUP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_GROUP_EXT] = $enc; } } if (null !== ($v = $this->getGroupDisplay())) { $a[self::FIELD_GROUP_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_GROUP_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getPlan())) { $a[self::FIELD_PLAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PLAN_EXT] = $enc; } } if (null !== ($v = $this->getPlanDisplay())) { $a[self::FIELD_PLAN_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PLAN_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getSubClass())) { $a[self::FIELD_SUB_CLASS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUB_CLASS_EXT] = $enc; } } if (null !== ($v = $this->getSubClassDisplay())) { $a[self::FIELD_SUB_CLASS_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUB_CLASS_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getSubGroup())) { $a[self::FIELD_SUB_GROUP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUB_GROUP_EXT] = $enc; } } if (null !== ($v = $this->getSubGroupDisplay())) { $a[self::FIELD_SUB_GROUP_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUB_GROUP_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getSubPlan())) { $a[self::FIELD_SUB_PLAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUB_PLAN_EXT] = $enc; } } if (null !== ($v = $this->getSubPlanDisplay())) { $a[self::FIELD_SUB_PLAN_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUB_PLAN_DISPLAY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php index f665aa2e40..23547432bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRDataElementMapping extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -164,68 +164,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -419,8 +447,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -544,32 +572,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php index 3f11b9ecf8..20524fecff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDetectedIssueMitigation extends FHIRBackboneElement const FIELD_DATE_EXT = '_date'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -164,20 +164,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } } @@ -317,8 +324,8 @@ public function setDate($date = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -418,11 +425,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdi.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdi.php index b1bc231e47..8a0caa8297 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdi.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdi.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRDeviceUdi extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -215,116 +215,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CARRIER_AIDC])) { - $ext = (isset($data[self::FIELD_CARRIER_AIDC_EXT]) && is_array($data[self::FIELD_CARRIER_AIDC_EXT])) - ? $data[self::FIELD_CARRIER_AIDC_EXT] - : null; - if ($data[self::FIELD_CARRIER_AIDC] instanceof FHIRBase64Binary) { - $this->setCarrierAIDC($data[self::FIELD_CARRIER_AIDC]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CARRIER_AIDC])) { - $this->setCarrierAIDC(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_CARRIER_AIDC]] + $ext)); - } else if (is_array($data[self::FIELD_CARRIER_AIDC])) { - $this->setCarrierAIDC(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_CARRIER_AIDC]))); - } + if (isset($data[self::FIELD_CARRIER_AIDC]) || isset($data[self::FIELD_CARRIER_AIDC_EXT])) { + if (isset($data[self::FIELD_CARRIER_AIDC])) { + $value = $data[self::FIELD_CARRIER_AIDC]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARRIER_AIDC_EXT]) && is_array($data[self::FIELD_CARRIER_AIDC_EXT])) { + $ext = $data[self::FIELD_CARRIER_AIDC_EXT]; } else { - $this->setCarrierAIDC(new FHIRBase64Binary($data[self::FIELD_CARRIER_AIDC])); - } - } - if (isset($data[self::FIELD_CARRIER_HRF])) { - $ext = (isset($data[self::FIELD_CARRIER_HRF_EXT]) && is_array($data[self::FIELD_CARRIER_HRF_EXT])) - ? $data[self::FIELD_CARRIER_HRF_EXT] - : null; - if ($data[self::FIELD_CARRIER_HRF] instanceof FHIRString) { - $this->setCarrierHRF($data[self::FIELD_CARRIER_HRF]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CARRIER_HRF])) { - $this->setCarrierHRF(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CARRIER_HRF]] + $ext)); - } else if (is_array($data[self::FIELD_CARRIER_HRF])) { - $this->setCarrierHRF(new FHIRString(array_merge($ext, $data[self::FIELD_CARRIER_HRF]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setCarrierAIDC($value); + } else if (is_array($value)) { + $this->setCarrierAIDC(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setCarrierAIDC(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCarrierAIDC(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_CARRIER_HRF]) || isset($data[self::FIELD_CARRIER_HRF_EXT])) { + if (isset($data[self::FIELD_CARRIER_HRF])) { + $value = $data[self::FIELD_CARRIER_HRF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARRIER_HRF_EXT]) && is_array($data[self::FIELD_CARRIER_HRF_EXT])) { + $ext = $data[self::FIELD_CARRIER_HRF_EXT]; } else { - $this->setCarrierHRF(new FHIRString($data[self::FIELD_CARRIER_HRF])); - } - } - if (isset($data[self::FIELD_DEVICE_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_DEVICE_IDENTIFIER_EXT]) && is_array($data[self::FIELD_DEVICE_IDENTIFIER_EXT])) - ? $data[self::FIELD_DEVICE_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_DEVICE_IDENTIFIER] instanceof FHIRString) { - $this->setDeviceIdentifier($data[self::FIELD_DEVICE_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEVICE_IDENTIFIER])) { - $this->setDeviceIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEVICE_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_DEVICE_IDENTIFIER])) { - $this->setDeviceIdentifier(new FHIRString(array_merge($ext, $data[self::FIELD_DEVICE_IDENTIFIER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCarrierHRF($value); + } else if (is_array($value)) { + $this->setCarrierHRF(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCarrierHRF(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCarrierHRF(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DEVICE_IDENTIFIER]) || isset($data[self::FIELD_DEVICE_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_DEVICE_IDENTIFIER])) { + $value = $data[self::FIELD_DEVICE_IDENTIFIER]; } else { - $this->setDeviceIdentifier(new FHIRString($data[self::FIELD_DEVICE_IDENTIFIER])); - } - } - if (isset($data[self::FIELD_ENTRY_TYPE])) { - $ext = (isset($data[self::FIELD_ENTRY_TYPE_EXT]) && is_array($data[self::FIELD_ENTRY_TYPE_EXT])) - ? $data[self::FIELD_ENTRY_TYPE_EXT] - : null; - if ($data[self::FIELD_ENTRY_TYPE] instanceof FHIRUDIEntryType) { - $this->setEntryType($data[self::FIELD_ENTRY_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENTRY_TYPE])) { - $this->setEntryType(new FHIRUDIEntryType([FHIRUDIEntryType::FIELD_VALUE => $data[self::FIELD_ENTRY_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_ENTRY_TYPE])) { - $this->setEntryType(new FHIRUDIEntryType(array_merge($ext, $data[self::FIELD_ENTRY_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_DEVICE_IDENTIFIER_EXT]) && is_array($data[self::FIELD_DEVICE_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_DEVICE_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeviceIdentifier($value); + } else if (is_array($value)) { + $this->setDeviceIdentifier(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeviceIdentifier(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeviceIdentifier(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ENTRY_TYPE]) || isset($data[self::FIELD_ENTRY_TYPE_EXT])) { + if (isset($data[self::FIELD_ENTRY_TYPE])) { + $value = $data[self::FIELD_ENTRY_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ENTRY_TYPE_EXT]) && is_array($data[self::FIELD_ENTRY_TYPE_EXT])) { + $ext = $data[self::FIELD_ENTRY_TYPE_EXT]; } else { - $this->setEntryType(new FHIRUDIEntryType($data[self::FIELD_ENTRY_TYPE])); - } - } - if (isset($data[self::FIELD_ISSUER])) { - $ext = (isset($data[self::FIELD_ISSUER_EXT]) && is_array($data[self::FIELD_ISSUER_EXT])) - ? $data[self::FIELD_ISSUER_EXT] - : null; - if ($data[self::FIELD_ISSUER] instanceof FHIRUri) { - $this->setIssuer($data[self::FIELD_ISSUER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUER])) { - $this->setIssuer(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ISSUER]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUER])) { - $this->setIssuer(new FHIRUri(array_merge($ext, $data[self::FIELD_ISSUER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUDIEntryType) { + $this->setEntryType($value); + } else if (is_array($value)) { + $this->setEntryType(new FHIRUDIEntryType(array_merge($ext, $value))); + } else { + $this->setEntryType(new FHIRUDIEntryType([FHIRUDIEntryType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEntryType(new FHIRUDIEntryType($ext)); + } + } + if (isset($data[self::FIELD_ISSUER]) || isset($data[self::FIELD_ISSUER_EXT])) { + if (isset($data[self::FIELD_ISSUER])) { + $value = $data[self::FIELD_ISSUER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUER_EXT]) && is_array($data[self::FIELD_ISSUER_EXT])) { + $ext = $data[self::FIELD_ISSUER_EXT]; } else { - $this->setIssuer(new FHIRUri($data[self::FIELD_ISSUER])); - } - } - if (isset($data[self::FIELD_JURISDICTION])) { - $ext = (isset($data[self::FIELD_JURISDICTION_EXT]) && is_array($data[self::FIELD_JURISDICTION_EXT])) - ? $data[self::FIELD_JURISDICTION_EXT] - : null; - if ($data[self::FIELD_JURISDICTION] instanceof FHIRUri) { - $this->setJurisdiction($data[self::FIELD_JURISDICTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_JURISDICTION])) { - $this->setJurisdiction(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_JURISDICTION]] + $ext)); - } else if (is_array($data[self::FIELD_JURISDICTION])) { - $this->setJurisdiction(new FHIRUri(array_merge($ext, $data[self::FIELD_JURISDICTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setIssuer($value); + } else if (is_array($value)) { + $this->setIssuer(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setIssuer(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIssuer(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_JURISDICTION]) || isset($data[self::FIELD_JURISDICTION_EXT])) { + if (isset($data[self::FIELD_JURISDICTION])) { + $value = $data[self::FIELD_JURISDICTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_JURISDICTION_EXT]) && is_array($data[self::FIELD_JURISDICTION_EXT])) { + $ext = $data[self::FIELD_JURISDICTION_EXT]; } else { - $this->setJurisdiction(new FHIRUri($data[self::FIELD_JURISDICTION])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setJurisdiction($value); + } else if (is_array($value)) { + $this->setJurisdiction(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setJurisdiction(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setJurisdiction(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -636,8 +685,8 @@ public function setName($name = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -795,53 +844,70 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCarrierAIDC())) { $a[self::FIELD_CARRIER_AIDC] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_CARRIER_AIDC_EXT] = $enc; } } if (null !== ($v = $this->getCarrierHRF())) { $a[self::FIELD_CARRIER_HRF] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CARRIER_HRF_EXT] = $enc; } } if (null !== ($v = $this->getDeviceIdentifier())) { $a[self::FIELD_DEVICE_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEVICE_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getEntryType())) { $a[self::FIELD_ENTRY_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUDIEntryType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUDIEntryType::FIELD_VALUE]); $a[self::FIELD_ENTRY_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getIssuer())) { $a[self::FIELD_ISSUER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ISSUER_EXT] = $enc; } } if (null !== ($v = $this->getJurisdiction())) { $a[self::FIELD_JURISDICTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_JURISDICTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php index b253343b42..2e17b6671b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDeviceComponentProductionSpecification extends FHIRBackboneElement const FIELD_SPEC_TYPE = 'specType'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -154,20 +154,27 @@ public function __construct($data = null) $this->setComponentId(new FHIRIdentifier($data[self::FIELD_COMPONENT_ID])); } } - if (isset($data[self::FIELD_PRODUCTION_SPEC])) { - $ext = (isset($data[self::FIELD_PRODUCTION_SPEC_EXT]) && is_array($data[self::FIELD_PRODUCTION_SPEC_EXT])) - ? $data[self::FIELD_PRODUCTION_SPEC_EXT] - : null; - if ($data[self::FIELD_PRODUCTION_SPEC] instanceof FHIRString) { - $this->setProductionSpec($data[self::FIELD_PRODUCTION_SPEC]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRODUCTION_SPEC])) { - $this->setProductionSpec(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRODUCTION_SPEC]] + $ext)); - } else if (is_array($data[self::FIELD_PRODUCTION_SPEC])) { - $this->setProductionSpec(new FHIRString(array_merge($ext, $data[self::FIELD_PRODUCTION_SPEC]))); - } + if (isset($data[self::FIELD_PRODUCTION_SPEC]) || isset($data[self::FIELD_PRODUCTION_SPEC_EXT])) { + if (isset($data[self::FIELD_PRODUCTION_SPEC])) { + $value = $data[self::FIELD_PRODUCTION_SPEC]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRODUCTION_SPEC_EXT]) && is_array($data[self::FIELD_PRODUCTION_SPEC_EXT])) { + $ext = $data[self::FIELD_PRODUCTION_SPEC_EXT]; } else { - $this->setProductionSpec(new FHIRString($data[self::FIELD_PRODUCTION_SPEC])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setProductionSpec($value); + } else if (is_array($value)) { + $this->setProductionSpec(new FHIRString(array_merge($ext, $value))); + } else { + $this->setProductionSpec(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProductionSpec(new FHIRString($ext)); } } if (isset($data[self::FIELD_SPEC_TYPE])) { @@ -310,8 +317,8 @@ public function setSpecType(FHIRCodeableConcept $specType = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -408,14 +415,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getProductionSpec())) { $a[self::FIELD_PRODUCTION_SPEC] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PRODUCTION_SPEC_EXT] = $enc; } } if (null !== ($v = $this->getSpecType())) { $a[self::FIELD_SPEC_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php index 0f86b60ad9..389e1fc5f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDeviceMetricCalibration extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the state of a metric calibration. @@ -144,52 +144,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_STATE])) { - $ext = (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) - ? $data[self::FIELD_STATE_EXT] - : null; - if ($data[self::FIELD_STATE] instanceof FHIRDeviceMetricCalibrationState) { - $this->setState($data[self::FIELD_STATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATE])) { - $this->setState(new FHIRDeviceMetricCalibrationState([FHIRDeviceMetricCalibrationState::FIELD_VALUE => $data[self::FIELD_STATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATE])) { - $this->setState(new FHIRDeviceMetricCalibrationState(array_merge($ext, $data[self::FIELD_STATE]))); - } + if (isset($data[self::FIELD_STATE]) || isset($data[self::FIELD_STATE_EXT])) { + if (isset($data[self::FIELD_STATE])) { + $value = $data[self::FIELD_STATE]; } else { - $this->setState(new FHIRDeviceMetricCalibrationState($data[self::FIELD_STATE])); + $value = null; } - } - if (isset($data[self::FIELD_TIME])) { - $ext = (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) - ? $data[self::FIELD_TIME_EXT] - : null; - if ($data[self::FIELD_TIME] instanceof FHIRInstant) { - $this->setTime($data[self::FIELD_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME])) { - $this->setTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME])) { - $this->setTime(new FHIRInstant(array_merge($ext, $data[self::FIELD_TIME]))); - } + if (isset($data[self::FIELD_STATE_EXT]) && is_array($data[self::FIELD_STATE_EXT])) { + $ext = $data[self::FIELD_STATE_EXT]; } else { - $this->setTime(new FHIRInstant($data[self::FIELD_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricCalibrationState) { + $this->setState($value); + } else if (is_array($value)) { + $this->setState(new FHIRDeviceMetricCalibrationState(array_merge($ext, $value))); + } else { + $this->setState(new FHIRDeviceMetricCalibrationState([FHIRDeviceMetricCalibrationState::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setState(new FHIRDeviceMetricCalibrationState($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRDeviceMetricCalibrationType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceMetricCalibrationType([FHIRDeviceMetricCalibrationType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDeviceMetricCalibrationType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TIME]) || isset($data[self::FIELD_TIME_EXT])) { + if (isset($data[self::FIELD_TIME])) { + $value = $data[self::FIELD_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_EXT]) && is_array($data[self::FIELD_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setTime($value); + } else if (is_array($value)) { + $this->setTime(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setTime(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTime(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRDeviceMetricCalibrationType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricCalibrationType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRDeviceMetricCalibrationType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRDeviceMetricCalibrationType([FHIRDeviceMetricCalibrationType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRDeviceMetricCalibrationType($ext)); } } } @@ -317,8 +338,8 @@ public function setType(FHIRDeviceMetricCalibrationType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -412,25 +433,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getState())) { $a[self::FIELD_STATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricCalibrationState::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricCalibrationState::FIELD_VALUE]); $a[self::FIELD_STATE_EXT] = $enc; } } if (null !== ($v = $this->getTime())) { $a[self::FIELD_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_TIME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricCalibrationType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricCalibrationType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequester.php index 7251144230..0e5c3d88c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDeviceRequestRequester extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -229,8 +229,8 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -314,6 +314,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php index 6c85111256..e9967ba3b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRDiagnosticReportImage extends FHIRBackboneElement const FIELD_LINK = 'link'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -135,20 +135,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_LINK])) { @@ -257,8 +264,8 @@ public function setLink(FHIRReference $link = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -346,14 +353,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getLink())) { $a[self::FIELD_LINK] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformer.php index e3ad1ee4fa..c6e5155e3c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDiagnosticReportPerformer extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -245,8 +245,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -330,6 +330,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php index 6806357b36..f2bc6f4e82 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRDocumentManifestContent extends FHIRBackboneElement const FIELD_P_REFERENCE = 'pReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -242,8 +242,8 @@ public function setPReference(FHIRReference $pReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -327,6 +327,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPReference())) { $a[self::FIELD_P_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php index 7fa0bf2d34..8109de9ab0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRDocumentManifestRelated extends FHIRBackboneElement const FIELD_REF = 'ref'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -236,8 +236,8 @@ public function setRef(FHIRReference $ref = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,6 +321,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRef())) { $a[self::FIELD_REF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php index 571612f2e4..aaa17ded38 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentReferenceContent extends FHIRBackboneElement const FIELD_FORMAT = 'format'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -235,8 +235,8 @@ public function setFormat(FHIRCoding $format = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -320,6 +320,9 @@ public function jsonSerialize() if (null !== ($v = $this->getFormat())) { $a[self::FIELD_FORMAT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php index f8891f473d..97469a9578 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRDocumentReferenceContext extends FHIRBackboneElement const FIELD_SOURCE_PATIENT_INFO = 'sourcePatientInfo'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -575,8 +575,8 @@ public function setSourcePatientInfo(FHIRReference $sourcePatientInfo = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -702,7 +702,13 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getFacilityType())) { $a[self::FIELD_FACILITY_TYPE] = $v; @@ -714,11 +720,20 @@ public function jsonSerialize() $a[self::FIELD_PRACTICE_SETTING] = $v; } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getSourcePatientInfo())) { $a[self::FIELD_SOURCE_PATIENT_INFO] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php index d172c68f97..fc91423d84 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRDocumentReferenceRelated extends FHIRBackboneElement const FIELD_REF = 'ref'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -235,8 +235,8 @@ public function setRef(FHIRReference $ref = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -320,6 +320,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRef())) { $a[self::FIELD_REF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php index cb20e29268..4e4e6bfb23 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesTo.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRDocumentReferenceRelatesTo extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The type of relationship between documents. @@ -128,20 +128,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRDocumentRelationshipType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRDocumentRelationshipType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentRelationshipType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRDocumentRelationshipType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRDocumentRelationshipType([FHIRDocumentRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRDocumentRelationshipType($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -236,8 +243,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -317,14 +324,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentRelationshipType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalance.php index b8d04e9269..53ee6d851c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIREligibilityResponseBenefitBalance extends FHIRBackboneElement const FIELD_UNIT = 'unit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -230,36 +230,50 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXCLUDED])) { - $ext = (isset($data[self::FIELD_EXCLUDED_EXT]) && is_array($data[self::FIELD_EXCLUDED_EXT])) - ? $data[self::FIELD_EXCLUDED_EXT] - : null; - if ($data[self::FIELD_EXCLUDED] instanceof FHIRBoolean) { - $this->setExcluded($data[self::FIELD_EXCLUDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDED])) { - $this->setExcluded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDED]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDED])) { - $this->setExcluded(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDED]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXCLUDED]) || isset($data[self::FIELD_EXCLUDED_EXT])) { + if (isset($data[self::FIELD_EXCLUDED])) { + $value = $data[self::FIELD_EXCLUDED]; } else { - $this->setExcluded(new FHIRBoolean($data[self::FIELD_EXCLUDED])); + $value = null; + } + if (isset($data[self::FIELD_EXCLUDED_EXT]) && is_array($data[self::FIELD_EXCLUDED_EXT])) { + $ext = $data[self::FIELD_EXCLUDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExcluded($value); + } else if (is_array($value)) { + $this->setExcluded(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExcluded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExcluded(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FINANCIAL])) { @@ -280,20 +294,27 @@ public function __construct($data = null) $this->addFinancial(new FHIREligibilityResponseFinancial($data[self::FIELD_FINANCIAL])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NETWORK])) { @@ -682,8 +703,8 @@ public function setUnit(FHIRCodeableConcept $unit = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -839,25 +860,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExcluded())) { $a[self::FIELD_EXCLUDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDED_EXT] = $enc; } } if ([] !== ($vs = $this->getFinancial())) { - $a[self::FIELD_FINANCIAL] = $vs; + $a[self::FIELD_FINANCIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FINANCIAL][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -873,6 +906,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseError.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseError.php index fb246fcc6c..1c6470bb31 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseError.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseError.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIREligibilityResponseError extends FHIRBackboneElement const FIELD_CODE = 'code'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -186,8 +186,8 @@ public function setCode(FHIRCodeableConcept $code = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -262,6 +262,9 @@ public function jsonSerialize() if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancial.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancial.php index e8cb8a061c..f84dee90fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancial.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIREligibilityResponseFinancial extends FHIRBackboneElement const FIELD_USED_UNSIGNED_INT_EXT = '_usedUnsignedInt'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -190,36 +190,50 @@ public function __construct($data = null) $this->setAllowedMoney(new FHIRMoney($data[self::FIELD_ALLOWED_MONEY])); } } - if (isset($data[self::FIELD_ALLOWED_STRING])) { - $ext = (isset($data[self::FIELD_ALLOWED_STRING_EXT]) && is_array($data[self::FIELD_ALLOWED_STRING_EXT])) - ? $data[self::FIELD_ALLOWED_STRING_EXT] - : null; - if ($data[self::FIELD_ALLOWED_STRING] instanceof FHIRString) { - $this->setAllowedString($data[self::FIELD_ALLOWED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED_STRING])) { - $this->setAllowedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALLOWED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED_STRING])) { - $this->setAllowedString(new FHIRString(array_merge($ext, $data[self::FIELD_ALLOWED_STRING]))); - } + if (isset($data[self::FIELD_ALLOWED_STRING]) || isset($data[self::FIELD_ALLOWED_STRING_EXT])) { + if (isset($data[self::FIELD_ALLOWED_STRING])) { + $value = $data[self::FIELD_ALLOWED_STRING]; } else { - $this->setAllowedString(new FHIRString($data[self::FIELD_ALLOWED_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_ALLOWED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setAllowedUnsignedInt($data[self::FIELD_ALLOWED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_ALLOWED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_ALLOWED_UNSIGNED_INT]))); + if (isset($data[self::FIELD_ALLOWED_STRING_EXT]) && is_array($data[self::FIELD_ALLOWED_STRING_EXT])) { + $ext = $data[self::FIELD_ALLOWED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAllowedString($value); + } else if (is_array($value)) { + $this->setAllowedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAllowedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAllowedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT]) || isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $value = $data[self::FIELD_ALLOWED_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]; } else { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_ALLOWED_UNSIGNED_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setAllowedUnsignedInt($value); + } else if (is_array($value)) { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -236,20 +250,27 @@ public function __construct($data = null) $this->setUsedMoney(new FHIRMoney($data[self::FIELD_USED_MONEY])); } } - if (isset($data[self::FIELD_USED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_USED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_USED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_USED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_USED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setUsedUnsignedInt($data[self::FIELD_USED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USED_UNSIGNED_INT])) { - $this->setUsedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_USED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_USED_UNSIGNED_INT])) { - $this->setUsedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_USED_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_USED_UNSIGNED_INT]) || isset($data[self::FIELD_USED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_USED_UNSIGNED_INT])) { + $value = $data[self::FIELD_USED_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_USED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_USED_UNSIGNED_INT_EXT]; } else { - $this->setUsedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_USED_UNSIGNED_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setUsedUnsignedInt($value); + } else if (is_array($value)) { + $this->setUsedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setUsedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsedUnsignedInt(new FHIRUnsignedInt($ext)); } } } @@ -485,8 +506,8 @@ public function setUsedUnsignedInt($usedUnsignedInt = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -617,15 +638,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAllowedString())) { $a[self::FIELD_ALLOWED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALLOWED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getAllowedUnsignedInt())) { $a[self::FIELD_ALLOWED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_ALLOWED_UNSIGNED_INT_EXT] = $enc; } } @@ -637,11 +662,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getUsedUnsignedInt())) { $a[self::FIELD_USED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_USED_UNSIGNED_INT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsurance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsurance.php index 71e2c5f765..22b1ac4314 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIREligibilityResponseInsurance extends FHIRBackboneElement const FIELD_COVERAGE = 'coverage'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides eligibility and plan details from the processing of an @@ -311,8 +311,8 @@ public function setCoverage(FHIRReference $coverage = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -404,7 +404,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBenefitBalance())) { - $a[self::FIELD_BENEFIT_BALANCE] = $vs; + $a[self::FIELD_BENEFIT_BALANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BENEFIT_BALANCE][] = $v; + } } if (null !== ($v = $this->getContract())) { $a[self::FIELD_CONTRACT] = $v; @@ -412,6 +418,9 @@ public function jsonSerialize() if (null !== ($v = $this->getCoverage())) { $a[self::FIELD_COVERAGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php index 9fccedf70e..c53a7d1447 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIREncounterClassHistory extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -230,8 +230,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -315,6 +315,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php index dbf3588708..765e40f522 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIREncounterDiagnosis extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -155,20 +155,27 @@ public function __construct($data = null) $this->setCondition(new FHIRReference($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_RANK])) { - $ext = (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) - ? $data[self::FIELD_RANK_EXT] - : null; - if ($data[self::FIELD_RANK] instanceof FHIRPositiveInt) { - $this->setRank($data[self::FIELD_RANK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_RANK]] + $ext)); - } else if (is_array($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_RANK]))); - } + if (isset($data[self::FIELD_RANK]) || isset($data[self::FIELD_RANK_EXT])) { + if (isset($data[self::FIELD_RANK])) { + $value = $data[self::FIELD_RANK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) { + $ext = $data[self::FIELD_RANK_EXT]; } else { - $this->setRank(new FHIRPositiveInt($data[self::FIELD_RANK])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setRank($value); + } else if (is_array($value)) { + $this->setRank(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRank(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -313,8 +320,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -411,14 +418,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRank())) { $a[self::FIELD_RANK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_RANK_EXT] = $enc; } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php index 8b51951c5f..3c323e5b74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIREncounterHospitalization extends FHIRBackboneElement const FIELD_SPECIAL_COURTESY = 'specialCourtesy'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -710,8 +710,8 @@ public function setSpecialCourtesy(array $specialCourtesy = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -859,7 +859,13 @@ public function jsonSerialize() $a[self::FIELD_DESTINATION] = $v; } if ([] !== ($vs = $this->getDietPreference())) { - $a[self::FIELD_DIET_PREFERENCE] = $vs; + $a[self::FIELD_DIET_PREFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIET_PREFERENCE][] = $v; + } } if (null !== ($v = $this->getDischargeDisposition())) { $a[self::FIELD_DISCHARGE_DISPOSITION] = $v; @@ -874,10 +880,25 @@ public function jsonSerialize() $a[self::FIELD_RE_ADMISSION] = $v; } if ([] !== ($vs = $this->getSpecialArrangement())) { - $a[self::FIELD_SPECIAL_ARRANGEMENT] = $vs; + $a[self::FIELD_SPECIAL_ARRANGEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_ARRANGEMENT][] = $v; + } } if ([] !== ($vs = $this->getSpecialCourtesy())) { - $a[self::FIELD_SPECIAL_COURTESY] = $vs; + $a[self::FIELD_SPECIAL_COURTESY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIAL_COURTESY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php index 4107be27f2..8cb72a2cc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIREncounterLocation extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -158,20 +158,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterLocationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterLocationStatus([FHIREncounterLocationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterLocationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREncounterLocationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterLocationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterLocationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterLocationStatus([FHIREncounterLocationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterLocationStatus($ext)); } } } @@ -293,8 +300,8 @@ public function setStatus(FHIREncounterLocationStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,11 +393,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterLocationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterLocationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php index da18ad9830..8f15ce6879 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIREncounterParticipant extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -324,8 +324,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -423,7 +423,16 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php index dbb21e3cec..96eaef7134 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIREncounterStatusHistory extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -136,20 +136,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterStatus([FHIREncounterStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREncounterStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterStatus([FHIREncounterStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterStatus($ext)); } } } @@ -237,8 +244,8 @@ public function setStatus(FHIREncounterStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,11 +328,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php index 36316950d4..f5ee816dba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIREpisodeOfCareDiagnosis extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -154,20 +154,27 @@ public function __construct($data = null) $this->setCondition(new FHIRReference($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_RANK])) { - $ext = (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) - ? $data[self::FIELD_RANK_EXT] - : null; - if ($data[self::FIELD_RANK] instanceof FHIRPositiveInt) { - $this->setRank($data[self::FIELD_RANK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_RANK]] + $ext)); - } else if (is_array($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_RANK]))); - } + if (isset($data[self::FIELD_RANK]) || isset($data[self::FIELD_RANK_EXT])) { + if (isset($data[self::FIELD_RANK])) { + $value = $data[self::FIELD_RANK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) { + $ext = $data[self::FIELD_RANK_EXT]; } else { - $this->setRank(new FHIRPositiveInt($data[self::FIELD_RANK])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setRank($value); + } else if (is_array($value)) { + $this->setRank(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRank(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -308,8 +315,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -406,14 +413,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRank())) { $a[self::FIELD_RANK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_RANK_EXT] = $enc; } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php index fab2092c65..99d5c1e517 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIREpisodeOfCareStatusHistory extends FHIRBackboneElement const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -137,20 +137,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREpisodeOfCareStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREpisodeOfCareStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREpisodeOfCareStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREpisodeOfCareStatus($ext)); } } } @@ -238,8 +245,8 @@ public function setStatus(FHIREpisodeOfCareStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -322,11 +329,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREpisodeOfCareStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREpisodeOfCareStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation.php index 4ad3368409..8af628885b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRExpansionProfileDesignation extends FHIRBackboneElement const FIELD_INCLUDE = 'include'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Resource to define constraints on the Expansion of a FHIR ValueSet. @@ -215,8 +215,8 @@ public function setInclude(FHIRExpansionProfileInclude $include = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -300,6 +300,9 @@ public function jsonSerialize() if (null !== ($v = $this->getInclude())) { $a[self::FIELD_INCLUDE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1.php index 5816c98066..8e28760d1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRExpansionProfileDesignation1 extends FHIRBackboneElement const FIELD_USE = 'use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); - } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_USE])) { @@ -250,8 +257,8 @@ public function setUse(FHIRCoding $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -339,14 +346,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2.php index ffe203c0b6..23f5458cb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRExpansionProfileDesignation2 extends FHIRBackboneElement const FIELD_USE = 'use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); - } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_USE])) { @@ -250,8 +257,8 @@ public function setUse(FHIRCoding $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -339,14 +346,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExclude.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExclude.php index 0a8d825e84..d02f930458 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExclude.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRExpansionProfileExclude extends FHIRBackboneElement const FIELD_DESIGNATION = 'designation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Resource to define constraints on the Expansion of a FHIR ValueSet. @@ -207,8 +207,8 @@ public function setDesignation(array $designation = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -288,7 +288,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystem.php index f1acf7c3f2..fe802d7044 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRExpansionProfileExcludedSystem extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -268,8 +282,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -365,18 +379,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersion.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersion.php index ea7219c106..c2514f9fa2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersion.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRExpansionProfileFixedVersion extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How to manage the intersection between a fixed version in a value set, and a @@ -146,52 +146,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRSystemVersionProcessingMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRSystemVersionProcessingMode([FHIRSystemVersionProcessingMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRSystemVersionProcessingMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRSystemVersionProcessingMode($data[self::FIELD_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSystemVersionProcessingMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRSystemVersionProcessingMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRSystemVersionProcessingMode([FHIRSystemVersionProcessingMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRSystemVersionProcessingMode($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -331,8 +352,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -434,25 +455,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSystemVersionProcessingMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSystemVersionProcessingMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileInclude.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileInclude.php index 29540919e2..28b9c76326 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRExpansionProfileInclude extends FHIRBackboneElement const FIELD_DESIGNATION = 'designation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Resource to define constraints on the Expansion of a FHIR ValueSet. @@ -207,8 +207,8 @@ public function setDesignation(array $designation = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -288,7 +288,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php index a0c0b651e4..2ea2dda547 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccident.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRExplanationOfBenefitAccident extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -163,20 +163,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -367,8 +374,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -468,8 +475,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -482,6 +491,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php index 2b02e325f8..73cb77e0ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRExplanationOfBenefitAddItem extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -295,33 +295,42 @@ public function __construct($data = null) $this->addModifier(new FHIRCodeableConcept($data[self::FIELD_MODIFIER])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_REVENUE])) { @@ -331,33 +340,42 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - foreach($data[self::FIELD_SEQUENCE_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addSequenceLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSequenceLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addSequenceLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addSequenceLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSequenceLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSequenceLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addSequenceLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSequenceLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRPositiveInt) { - $this->addSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->addSequenceLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else { - $this->addSequenceLinkId(new FHIRPositiveInt($data[self::FIELD_SEQUENCE_LINK_ID])); } } if (isset($data[self::FIELD_SERVICE])) { @@ -833,8 +851,8 @@ public function setService(FHIRCodeableConcept $service = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -990,56 +1008,93 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getFee())) { $a[self::FIELD_FEE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getRevenue())) { $a[self::FIELD_REVENUE] = $v; } if ([] !== ($vs = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SEQUENCE_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SEQUENCE_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SEQUENCE_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getService())) { $a[self::FIELD_SERVICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php index f40c9e94a6..46baa484f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRExplanationOfBenefitAdjudication extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -181,20 +181,27 @@ public function __construct($data = null) $this->setReason(new FHIRCodeableConcept($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -360,8 +367,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -471,11 +478,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php index 4763cf6944..bc2e1a3f72 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRExplanationOfBenefitBenefitBalance extends FHIRBackboneElement const FIELD_UNIT = 'unit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -232,36 +232,50 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXCLUDED])) { - $ext = (isset($data[self::FIELD_EXCLUDED_EXT]) && is_array($data[self::FIELD_EXCLUDED_EXT])) - ? $data[self::FIELD_EXCLUDED_EXT] - : null; - if ($data[self::FIELD_EXCLUDED] instanceof FHIRBoolean) { - $this->setExcluded($data[self::FIELD_EXCLUDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDED])) { - $this->setExcluded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDED]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDED])) { - $this->setExcluded(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDED]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXCLUDED]) || isset($data[self::FIELD_EXCLUDED_EXT])) { + if (isset($data[self::FIELD_EXCLUDED])) { + $value = $data[self::FIELD_EXCLUDED]; } else { - $this->setExcluded(new FHIRBoolean($data[self::FIELD_EXCLUDED])); + $value = null; + } + if (isset($data[self::FIELD_EXCLUDED_EXT]) && is_array($data[self::FIELD_EXCLUDED_EXT])) { + $ext = $data[self::FIELD_EXCLUDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExcluded($value); + } else if (is_array($value)) { + $this->setExcluded(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExcluded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExcluded(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FINANCIAL])) { @@ -282,20 +296,27 @@ public function __construct($data = null) $this->addFinancial(new FHIRExplanationOfBenefitFinancial($data[self::FIELD_FINANCIAL])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NETWORK])) { @@ -687,8 +708,8 @@ public function setUnit(FHIRCodeableConcept $unit = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -844,25 +865,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExcluded())) { $a[self::FIELD_EXCLUDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDED_EXT] = $enc; } } if ([] !== ($vs = $this->getFinancial())) { - $a[self::FIELD_FINANCIAL] = $vs; + $a[self::FIELD_FINANCIAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FINANCIAL][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -878,6 +911,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php index 06a9b39f57..e5fb10ae8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRExplanationOfBenefitCareTeam extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -187,20 +187,27 @@ public function __construct($data = null) $this->setQualification(new FHIRCodeableConcept($data[self::FIELD_QUALIFICATION])); } } - if (isset($data[self::FIELD_RESPONSIBLE])) { - $ext = (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) - ? $data[self::FIELD_RESPONSIBLE_EXT] - : null; - if ($data[self::FIELD_RESPONSIBLE] instanceof FHIRBoolean) { - $this->setResponsible($data[self::FIELD_RESPONSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_RESPONSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRBoolean(array_merge($ext, $data[self::FIELD_RESPONSIBLE]))); - } + if (isset($data[self::FIELD_RESPONSIBLE]) || isset($data[self::FIELD_RESPONSIBLE_EXT])) { + if (isset($data[self::FIELD_RESPONSIBLE])) { + $value = $data[self::FIELD_RESPONSIBLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) { + $ext = $data[self::FIELD_RESPONSIBLE_EXT]; } else { - $this->setResponsible(new FHIRBoolean($data[self::FIELD_RESPONSIBLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setResponsible($value); + } else if (is_array($value)) { + $this->setResponsible(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setResponsible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResponsible(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ROLE])) { @@ -210,20 +217,27 @@ public function __construct($data = null) $this->setRole(new FHIRCodeableConcept($data[self::FIELD_ROLE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -425,8 +439,8 @@ public function setSequence($sequence = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -546,8 +560,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getResponsible())) { $a[self::FIELD_RESPONSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_RESPONSIBLE_EXT] = $enc; } } @@ -556,11 +572,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php index a78d2bfe7d..e55ee86cf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRExplanationOfBenefitDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -340,20 +340,27 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -381,33 +388,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PROGRAM_CODE])) { @@ -442,20 +458,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -1221,8 +1244,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1437,41 +1460,69 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -1481,8 +1532,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -1490,17 +1543,32 @@ public function jsonSerialize() $a[self::FIELD_SERVICE] = $v; } if ([] !== ($vs = $this->getSubDetail())) { - $a[self::FIELD_SUB_DETAIL] = $vs; + $a[self::FIELD_SUB_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_DETAIL][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php index f1c9076b25..5c158d8f64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRExplanationOfBenefitDetail1 extends FHIRBackboneElement const FIELD_SERVICE = 'service'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -250,33 +250,42 @@ public function __construct($data = null) $this->addModifier(new FHIRCodeableConcept($data[self::FIELD_MODIFIER])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_REVENUE])) { @@ -635,8 +644,8 @@ public function setService(FHIRCodeableConcept $service = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -766,7 +775,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -775,22 +790,36 @@ public function jsonSerialize() $a[self::FIELD_FEE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if (null !== ($v = $this->getRevenue())) { $a[self::FIELD_REVENUE] = $v; @@ -798,6 +827,9 @@ public function jsonSerialize() if (null !== ($v = $this->getService())) { $a[self::FIELD_SERVICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php index cb844890f5..15bdbeb81f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosis.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRExplanationOfBenefitDiagnosis extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -194,20 +194,27 @@ public function __construct($data = null) $this->setPackageCode(new FHIRCodeableConcept($data[self::FIELD_PACKAGE_CODE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -451,8 +458,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -574,13 +581,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php index c8ef515c65..d80e35cef0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancial.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRExplanationOfBenefitFinancial extends FHIRBackboneElement const FIELD_USED_UNSIGNED_INT_EXT = '_usedUnsignedInt'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -191,36 +191,50 @@ public function __construct($data = null) $this->setAllowedMoney(new FHIRMoney($data[self::FIELD_ALLOWED_MONEY])); } } - if (isset($data[self::FIELD_ALLOWED_STRING])) { - $ext = (isset($data[self::FIELD_ALLOWED_STRING_EXT]) && is_array($data[self::FIELD_ALLOWED_STRING_EXT])) - ? $data[self::FIELD_ALLOWED_STRING_EXT] - : null; - if ($data[self::FIELD_ALLOWED_STRING] instanceof FHIRString) { - $this->setAllowedString($data[self::FIELD_ALLOWED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED_STRING])) { - $this->setAllowedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALLOWED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED_STRING])) { - $this->setAllowedString(new FHIRString(array_merge($ext, $data[self::FIELD_ALLOWED_STRING]))); - } + if (isset($data[self::FIELD_ALLOWED_STRING]) || isset($data[self::FIELD_ALLOWED_STRING_EXT])) { + if (isset($data[self::FIELD_ALLOWED_STRING])) { + $value = $data[self::FIELD_ALLOWED_STRING]; } else { - $this->setAllowedString(new FHIRString($data[self::FIELD_ALLOWED_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_ALLOWED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setAllowedUnsignedInt($data[self::FIELD_ALLOWED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_ALLOWED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_ALLOWED_UNSIGNED_INT]))); + if (isset($data[self::FIELD_ALLOWED_STRING_EXT]) && is_array($data[self::FIELD_ALLOWED_STRING_EXT])) { + $ext = $data[self::FIELD_ALLOWED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAllowedString($value); + } else if (is_array($value)) { + $this->setAllowedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAllowedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAllowedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT]) || isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT])) { + $value = $data[self::FIELD_ALLOWED_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_ALLOWED_UNSIGNED_INT_EXT]; } else { - $this->setAllowedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_ALLOWED_UNSIGNED_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setAllowedUnsignedInt($value); + } else if (is_array($value)) { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllowedUnsignedInt(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -237,20 +251,27 @@ public function __construct($data = null) $this->setUsedMoney(new FHIRMoney($data[self::FIELD_USED_MONEY])); } } - if (isset($data[self::FIELD_USED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_USED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_USED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_USED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_USED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setUsedUnsignedInt($data[self::FIELD_USED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USED_UNSIGNED_INT])) { - $this->setUsedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_USED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_USED_UNSIGNED_INT])) { - $this->setUsedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_USED_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_USED_UNSIGNED_INT]) || isset($data[self::FIELD_USED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_USED_UNSIGNED_INT])) { + $value = $data[self::FIELD_USED_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_USED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_USED_UNSIGNED_INT_EXT]; } else { - $this->setUsedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_USED_UNSIGNED_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setUsedUnsignedInt($value); + } else if (is_array($value)) { + $this->setUsedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setUsedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsedUnsignedInt(new FHIRUnsignedInt($ext)); } } } @@ -486,8 +507,8 @@ public function setUsedUnsignedInt($usedUnsignedInt = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -618,15 +639,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAllowedString())) { $a[self::FIELD_ALLOWED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALLOWED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getAllowedUnsignedInt())) { $a[self::FIELD_ALLOWED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_ALLOWED_UNSIGNED_INT_EXT] = $enc; } } @@ -638,11 +663,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getUsedUnsignedInt())) { $a[self::FIELD_USED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_USED_UNSIGNED_INT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformation.php index e4e89cd563..ba601f08f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRExplanationOfBenefitInformation extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -270,36 +270,50 @@ public function __construct($data = null) $this->setReason(new FHIRCoding($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; } - } - if (isset($data[self::FIELD_TIMING_DATE])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) - ? $data[self::FIELD_TIMING_DATE_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE] instanceof FHIRDate) { - $this->setTimingDate($data[self::FIELD_TIMING_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_TIMING_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE])) { - $this->setTimingDate(new FHIRDate(array_merge($ext, $data[self::FIELD_TIMING_DATE]))); + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_TIMING_DATE]) || isset($data[self::FIELD_TIMING_DATE_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE])) { + $value = $data[self::FIELD_TIMING_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_EXT]) && is_array($data[self::FIELD_TIMING_DATE_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_EXT]; } else { - $this->setTimingDate(new FHIRDate($data[self::FIELD_TIMING_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setTimingDate($value); + } else if (is_array($value)) { + $this->setTimingDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -330,20 +344,27 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -723,8 +744,8 @@ public function setValueString($valueString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -885,15 +906,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getTimingDate())) { $a[self::FIELD_TIMING_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_EXT] = $enc; } } @@ -911,11 +936,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php index 23b119f2c1..6a1b185114 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsurance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRExplanationOfBenefitInsurance extends FHIRBackboneElement const FIELD_PRE_AUTH_REF_EXT = '_preAuthRef'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -138,33 +138,42 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_PRE_AUTH_REF])) { - $ext = (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) - ? $data[self::FIELD_PRE_AUTH_REF_EXT] - : null; - if (is_array($data[self::FIELD_PRE_AUTH_REF])) { - foreach($data[self::FIELD_PRE_AUTH_REF] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPreAuthRef($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPreAuthRef(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PRE_AUTH_REF]) || isset($data[self::FIELD_PRE_AUTH_REF_EXT])) { + if (isset($data[self::FIELD_PRE_AUTH_REF])) { + $value = $data[self::FIELD_PRE_AUTH_REF]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRE_AUTH_REF_EXT]) && is_array($data[self::FIELD_PRE_AUTH_REF_EXT])) { + $ext = $data[self::FIELD_PRE_AUTH_REF_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPreAuthRef($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPreAuthRef($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPreAuthRef(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPreAuthRef(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPreAuthRef(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPreAuthRef(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PRE_AUTH_REF] instanceof FHIRString) { - $this->addPreAuthRef($data[self::FIELD_PRE_AUTH_REF]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PRE_AUTH_REF])) { - $this->addPreAuthRef(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRE_AUTH_REF]] + $ext)); - } else { - $this->addPreAuthRef(new FHIRString($data[self::FIELD_PRE_AUTH_REF])); } } } @@ -288,8 +297,8 @@ public function setPreAuthRef(array $preAuthRef = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -379,18 +388,29 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPreAuthRef())) { $a[self::FIELD_PRE_AUTH_REF] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PRE_AUTH_REF][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PRE_AUTH_REF_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PRE_AUTH_REF_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PRE_AUTH_REF_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php index c887d55ebb..7a1baa20f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRExplanationOfBenefitItem extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -490,33 +490,42 @@ public function __construct($data = null) $this->setBodySite(new FHIRCodeableConcept($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_CARE_TEAM_LINK_ID])) { - $ext = (isset($data[self::FIELD_CARE_TEAM_LINK_ID_EXT]) && is_array($data[self::FIELD_CARE_TEAM_LINK_ID_EXT])) - ? $data[self::FIELD_CARE_TEAM_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_CARE_TEAM_LINK_ID])) { - foreach($data[self::FIELD_CARE_TEAM_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addCareTeamLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCareTeamLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCareTeamLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CARE_TEAM_LINK_ID]) || isset($data[self::FIELD_CARE_TEAM_LINK_ID_EXT])) { + if (isset($data[self::FIELD_CARE_TEAM_LINK_ID])) { + $value = $data[self::FIELD_CARE_TEAM_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARE_TEAM_LINK_ID_EXT]) && is_array($data[self::FIELD_CARE_TEAM_LINK_ID_EXT])) { + $ext = $data[self::FIELD_CARE_TEAM_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addCareTeamLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addCareTeamLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCareTeamLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addCareTeamLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCareTeamLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addCareTeamLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addCareTeamLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCareTeamLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_CARE_TEAM_LINK_ID] instanceof FHIRPositiveInt) { - $this->addCareTeamLinkId($data[self::FIELD_CARE_TEAM_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CARE_TEAM_LINK_ID])) { - $this->addCareTeamLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_CARE_TEAM_LINK_ID]] + $ext)); - } else { - $this->addCareTeamLinkId(new FHIRPositiveInt($data[self::FIELD_CARE_TEAM_LINK_ID])); } } if (isset($data[self::FIELD_CATEGORY])) { @@ -544,33 +553,42 @@ public function __construct($data = null) $this->addDetail(new FHIRExplanationOfBenefitDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID])) { - $ext = (isset($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT])) - ? $data[self::FIELD_DIAGNOSIS_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_DIAGNOSIS_LINK_ID])) { - foreach($data[self::FIELD_DIAGNOSIS_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addDiagnosisLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDiagnosisLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID]) || isset($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT])) { + if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID])) { + $value = $data[self::FIELD_DIAGNOSIS_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT]) && is_array($data[self::FIELD_DIAGNOSIS_LINK_ID_EXT])) { + $ext = $data[self::FIELD_DIAGNOSIS_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addDiagnosisLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addDiagnosisLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDiagnosisLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDiagnosisLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addDiagnosisLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDiagnosisLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_DIAGNOSIS_LINK_ID] instanceof FHIRPositiveInt) { - $this->addDiagnosisLinkId($data[self::FIELD_DIAGNOSIS_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DIAGNOSIS_LINK_ID])) { - $this->addDiagnosisLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DIAGNOSIS_LINK_ID]] + $ext)); - } else { - $this->addDiagnosisLinkId(new FHIRPositiveInt($data[self::FIELD_DIAGNOSIS_LINK_ID])); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -591,49 +609,65 @@ public function __construct($data = null) $this->addEncounter(new FHIRReference($data[self::FIELD_ENCOUNTER])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_INFORMATION_LINK_ID])) { - $ext = (isset($data[self::FIELD_INFORMATION_LINK_ID_EXT]) && is_array($data[self::FIELD_INFORMATION_LINK_ID_EXT])) - ? $data[self::FIELD_INFORMATION_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_INFORMATION_LINK_ID])) { - foreach($data[self::FIELD_INFORMATION_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addInformationLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInformationLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInformationLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INFORMATION_LINK_ID]) || isset($data[self::FIELD_INFORMATION_LINK_ID_EXT])) { + if (isset($data[self::FIELD_INFORMATION_LINK_ID])) { + $value = $data[self::FIELD_INFORMATION_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INFORMATION_LINK_ID_EXT]) && is_array($data[self::FIELD_INFORMATION_LINK_ID_EXT])) { + $ext = $data[self::FIELD_INFORMATION_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addInformationLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addInformationLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInformationLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addInformationLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInformationLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addInformationLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addInformationLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInformationLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_INFORMATION_LINK_ID] instanceof FHIRPositiveInt) { - $this->addInformationLinkId($data[self::FIELD_INFORMATION_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INFORMATION_LINK_ID])) { - $this->addInformationLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_INFORMATION_LINK_ID]] + $ext)); - } else { - $this->addInformationLinkId(new FHIRPositiveInt($data[self::FIELD_INFORMATION_LINK_ID])); } } if (isset($data[self::FIELD_LOCATION_ADDRESS])) { @@ -682,62 +716,80 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } - if (isset($data[self::FIELD_PROCEDURE_LINK_ID])) { - $ext = (isset($data[self::FIELD_PROCEDURE_LINK_ID_EXT]) && is_array($data[self::FIELD_PROCEDURE_LINK_ID_EXT])) - ? $data[self::FIELD_PROCEDURE_LINK_ID_EXT] - : null; - if (is_array($data[self::FIELD_PROCEDURE_LINK_ID])) { - foreach($data[self::FIELD_PROCEDURE_LINK_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addProcedureLinkId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProcedureLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProcedureLinkId(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROCEDURE_LINK_ID]) || isset($data[self::FIELD_PROCEDURE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_PROCEDURE_LINK_ID])) { + $value = $data[self::FIELD_PROCEDURE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROCEDURE_LINK_ID_EXT]) && is_array($data[self::FIELD_PROCEDURE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_PROCEDURE_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addProcedureLinkId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addProcedureLinkId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProcedureLinkId(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addProcedureLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProcedureLinkId(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addProcedureLinkId(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addProcedureLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProcedureLinkId(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_PROCEDURE_LINK_ID] instanceof FHIRPositiveInt) { - $this->addProcedureLinkId($data[self::FIELD_PROCEDURE_LINK_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROCEDURE_LINK_ID])) { - $this->addProcedureLinkId(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PROCEDURE_LINK_ID]] + $ext)); - } else { - $this->addProcedureLinkId(new FHIRPositiveInt($data[self::FIELD_PROCEDURE_LINK_ID])); } } if (isset($data[self::FIELD_PROGRAM_CODE])) { @@ -772,20 +824,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -795,20 +854,27 @@ public function __construct($data = null) $this->setService(new FHIRCodeableConcept($data[self::FIELD_SERVICE])); } } - if (isset($data[self::FIELD_SERVICED_DATE])) { - $ext = (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) - ? $data[self::FIELD_SERVICED_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICED_DATE] instanceof FHIRDate) { - $this->setServicedDate($data[self::FIELD_SERVICED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICED_DATE]))); - } + if (isset($data[self::FIELD_SERVICED_DATE]) || isset($data[self::FIELD_SERVICED_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICED_DATE])) { + $value = $data[self::FIELD_SERVICED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICED_DATE_EXT]; } else { - $this->setServicedDate(new FHIRDate($data[self::FIELD_SERVICED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServicedDate($value); + } else if (is_array($value)) { + $this->setServicedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServicedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SERVICED_PERIOD])) { @@ -2115,8 +2181,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2447,71 +2513,115 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getBodySite())) { $a[self::FIELD_BODY_SITE] = $v; } if ([] !== ($vs = $this->getCareTeamLinkId())) { $a[self::FIELD_CARE_TEAM_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CARE_TEAM_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CARE_TEAM_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CARE_TEAM_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CARE_TEAM_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if ([] !== ($vs = $this->getDiagnosisLinkId())) { $a[self::FIELD_DIAGNOSIS_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DIAGNOSIS_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DIAGNOSIS_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DIAGNOSIS_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DIAGNOSIS_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getEncounter())) { - $a[self::FIELD_ENCOUNTER] = $vs; + $a[self::FIELD_ENCOUNTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENCOUNTER][] = $v; + } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getInformationLinkId())) { $a[self::FIELD_INFORMATION_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INFORMATION_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INFORMATION_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INFORMATION_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INFORMATION_LINK_ID_EXT] = $encs; + } } if (null !== ($v = $this->getLocationAddress())) { $a[self::FIELD_LOCATION_ADDRESS] = $v; @@ -2523,43 +2633,71 @@ public function jsonSerialize() $a[self::FIELD_LOCATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if ([] !== ($vs = $this->getProcedureLinkId())) { $a[self::FIELD_PROCEDURE_LINK_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROCEDURE_LINK_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROCEDURE_LINK_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROCEDURE_LINK_ID_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROCEDURE_LINK_ID_EXT] = $encs; + } } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -2569,8 +2707,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -2579,8 +2719,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getServicedDate())) { $a[self::FIELD_SERVICED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICED_DATE_EXT] = $enc; } } @@ -2588,14 +2730,29 @@ public function jsonSerialize() $a[self::FIELD_SERVICED_PERIOD] = $v; } if ([] !== ($vs = $this->getSubSite())) { - $a[self::FIELD_SUB_SITE] = $vs; + $a[self::FIELD_SUB_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_SITE][] = $v; + } } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php index a76cc971a7..8baaab629a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayee.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRExplanationOfBenefitPayee extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -286,8 +286,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -380,6 +380,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php index fec585844d..476e5afa4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRExplanationOfBenefitPayment extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -206,20 +206,27 @@ public function __construct($data = null) $this->setAmount(new FHIRMoney($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -459,8 +466,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -581,8 +588,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -592,6 +601,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php index 7027d5878d..5043a31770 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRExplanationOfBenefitProcedure extends FHIRBackboneElement const FIELD_SEQUENCE_EXT = '_sequence'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -162,20 +162,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_PROCEDURE_CODEABLE_CONCEPT])) { @@ -192,20 +199,27 @@ public function __construct($data = null) $this->setProcedureReference(new FHIRReference($data[self::FIELD_PROCEDURE_REFERENCE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } } @@ -379,8 +393,8 @@ public function setSequence($sequence = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -488,8 +502,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -501,11 +517,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php index 83c7e844eb..634615611d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRExplanationOfBenefitProcessNote extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -170,36 +170,50 @@ public function __construct($data = null) $this->setLanguage(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRPositiveInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setNumber(new FHIRPositiveInt($data[self::FIELD_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumber(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -384,8 +398,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -496,21 +510,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php index 0053ec92f9..10ebb4e7fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRExplanationOfBenefitRelated extends FHIRBackboneElement const FIELD_RELATIONSHIP = 'relationship'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -293,8 +293,8 @@ public function setRelationship(FHIRCodeableConcept $relationship = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -387,6 +387,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php index 4a466ccd93..5429c43577 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRExplanationOfBenefitSubDetail extends FHIRBackboneElement const FIELD_UNIT_PRICE = 'unitPrice'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -325,20 +325,27 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); - } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_MODIFIER])) { @@ -366,33 +373,42 @@ public function __construct($data = null) $this->setNet(new FHIRMoney($data[self::FIELD_NET])); } } - if (isset($data[self::FIELD_NOTE_NUMBER])) { - $ext = (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) - ? $data[self::FIELD_NOTE_NUMBER_EXT] - : null; - if (is_array($data[self::FIELD_NOTE_NUMBER])) { - foreach($data[self::FIELD_NOTE_NUMBER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPositiveInt) { - $this->addNoteNumber($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_NOTE_NUMBER]) || isset($data[self::FIELD_NOTE_NUMBER_EXT])) { + if (isset($data[self::FIELD_NOTE_NUMBER])) { + $value = $data[self::FIELD_NOTE_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOTE_NUMBER_EXT]) && is_array($data[self::FIELD_NOTE_NUMBER_EXT])) { + $ext = $data[self::FIELD_NOTE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->addNoteNumber($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPositiveInt) { + $this->addNoteNumber($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($v, $iext))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addNoteNumber(new FHIRPositiveInt($v)); } + } elseif (is_array($value)) { + $this->addNoteNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addNoteNumber(new FHIRPositiveInt($iext)); } - } elseif ($data[self::FIELD_NOTE_NUMBER] instanceof FHIRPositiveInt) { - $this->addNoteNumber($data[self::FIELD_NOTE_NUMBER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_NOTE_NUMBER])) { - $this->addNoteNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NOTE_NUMBER]] + $ext)); - } else { - $this->addNoteNumber(new FHIRPositiveInt($data[self::FIELD_NOTE_NUMBER])); } } if (isset($data[self::FIELD_PROGRAM_CODE])) { @@ -427,20 +443,27 @@ public function __construct($data = null) $this->setRevenue(new FHIRCodeableConcept($data[self::FIELD_REVENUE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRPositiveInt($data[self::FIELD_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_SERVICE])) { @@ -1126,8 +1149,8 @@ public function setUnitPrice(FHIRMoney $unitPrice = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1329,41 +1352,69 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdjudication())) { - $a[self::FIELD_ADJUDICATION] = $vs; + $a[self::FIELD_ADJUDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADJUDICATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if ([] !== ($vs = $this->getModifier())) { - $a[self::FIELD_MODIFIER] = $vs; + $a[self::FIELD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER][] = $v; + } } if (null !== ($v = $this->getNet())) { $a[self::FIELD_NET] = $v; } if ([] !== ($vs = $this->getNoteNumber())) { $a[self::FIELD_NOTE_NUMBER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_NOTE_NUMBER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_NOTE_NUMBER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPositiveInt::FIELD_VALUE]) || array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_NOTE_NUMBER_EXT][] = null; + unset($enc[FHIRPositiveInt::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_NOTE_NUMBER_EXT] = $encs; + } } if ([] !== ($vs = $this->getProgramCode())) { - $a[self::FIELD_PROGRAM_CODE] = $vs; + $a[self::FIELD_PROGRAM_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGRAM_CODE][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; @@ -1373,8 +1424,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -1385,11 +1438,20 @@ public function jsonSerialize() $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getUdi())) { - $a[self::FIELD_UDI] = $vs; + $a[self::FIELD_UDI] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UDI][] = $v; + } } if (null !== ($v = $this->getUnitPrice())) { $a[self::FIELD_UNIT_PRICE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php index 46cb857cc4..118b2abd7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRFamilyMemberHistoryCondition extends FHIRBackboneElement const FIELD_OUTCOME = 'outcome'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -254,20 +254,27 @@ public function __construct($data = null) $this->setOnsetRange(new FHIRRange($data[self::FIELD_ONSET_RANGE])); } } - if (isset($data[self::FIELD_ONSET_STRING])) { - $ext = (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) - ? $data[self::FIELD_ONSET_STRING_EXT] - : null; - if ($data[self::FIELD_ONSET_STRING] instanceof FHIRString) { - $this->setOnsetString($data[self::FIELD_ONSET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ONSET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString(array_merge($ext, $data[self::FIELD_ONSET_STRING]))); - } + if (isset($data[self::FIELD_ONSET_STRING]) || isset($data[self::FIELD_ONSET_STRING_EXT])) { + if (isset($data[self::FIELD_ONSET_STRING])) { + $value = $data[self::FIELD_ONSET_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) { + $ext = $data[self::FIELD_ONSET_STRING_EXT]; } else { - $this->setOnsetString(new FHIRString($data[self::FIELD_ONSET_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOnsetString($value); + } else if (is_array($value)) { + $this->setOnsetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetString(new FHIRString($ext)); } } if (isset($data[self::FIELD_OUTCOME])) { @@ -577,8 +584,8 @@ public function setOutcome(FHIRCodeableConcept $outcome = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -705,7 +712,13 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOnsetAge())) { $a[self::FIELD_ONSET_AGE] = $v; @@ -718,14 +731,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetString())) { $a[self::FIELD_ONSET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ONSET_STRING_EXT] = $enc; } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php index a833c0eae5..3ddabef8e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRGoalTarget extends FHIRBackboneElement const FIELD_MEASURE = 'measure'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -226,20 +226,27 @@ public function __construct($data = null) $this->setDetailRange(new FHIRRange($data[self::FIELD_DETAIL_RANGE])); } } - if (isset($data[self::FIELD_DUE_DATE])) { - $ext = (isset($data[self::FIELD_DUE_DATE_EXT]) && is_array($data[self::FIELD_DUE_DATE_EXT])) - ? $data[self::FIELD_DUE_DATE_EXT] - : null; - if ($data[self::FIELD_DUE_DATE] instanceof FHIRDate) { - $this->setDueDate($data[self::FIELD_DUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DUE_DATE])) { - $this->setDueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DUE_DATE])) { - $this->setDueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DUE_DATE]))); - } + if (isset($data[self::FIELD_DUE_DATE]) || isset($data[self::FIELD_DUE_DATE_EXT])) { + if (isset($data[self::FIELD_DUE_DATE])) { + $value = $data[self::FIELD_DUE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DUE_DATE_EXT]) && is_array($data[self::FIELD_DUE_DATE_EXT])) { + $ext = $data[self::FIELD_DUE_DATE_EXT]; } else { - $this->setDueDate(new FHIRDate($data[self::FIELD_DUE_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDueDate($value); + } else if (is_array($value)) { + $this->setDueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDueDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_DUE_DURATION])) { @@ -517,8 +524,8 @@ public function setMeasure(FHIRCodeableConcept $measure = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -639,8 +646,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDueDate())) { $a[self::FIELD_DUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DUE_DATE_EXT] = $enc; } } @@ -650,6 +659,9 @@ public function jsonSerialize() if (null !== ($v = $this->getMeasure())) { $a[self::FIELD_MEASURE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php index f0509928b9..c5a383e5fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRGraphDefinitionCompartment extends FHIRBackboneElement const FIELD_RULE_EXT = '_rule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Which compartment a compartment definition describes @@ -157,68 +157,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCompartmentType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCompartmentType([FHIRCompartmentType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCompartmentType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCompartmentType($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); + if (null !== $value) { + if ($value instanceof FHIRCompartmentType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCompartmentType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCompartmentType([FHIRCompartmentType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCompartmentType($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_RULE])) { - $ext = (isset($data[self::FIELD_RULE_EXT]) && is_array($data[self::FIELD_RULE_EXT])) - ? $data[self::FIELD_RULE_EXT] - : null; - if ($data[self::FIELD_RULE] instanceof FHIRGraphCompartmentRule) { - $this->setRule($data[self::FIELD_RULE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULE])) { - $this->setRule(new FHIRGraphCompartmentRule([FHIRGraphCompartmentRule::FIELD_VALUE => $data[self::FIELD_RULE]] + $ext)); - } else if (is_array($data[self::FIELD_RULE])) { - $this->setRule(new FHIRGraphCompartmentRule(array_merge($ext, $data[self::FIELD_RULE]))); + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RULE]) || isset($data[self::FIELD_RULE_EXT])) { + if (isset($data[self::FIELD_RULE])) { + $value = $data[self::FIELD_RULE]; } else { - $this->setRule(new FHIRGraphCompartmentRule($data[self::FIELD_RULE])); + $value = null; + } + if (isset($data[self::FIELD_RULE_EXT]) && is_array($data[self::FIELD_RULE_EXT])) { + $ext = $data[self::FIELD_RULE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGraphCompartmentRule) { + $this->setRule($value); + } else if (is_array($value)) { + $this->setRule(new FHIRGraphCompartmentRule(array_merge($ext, $value))); + } else { + $this->setRule(new FHIRGraphCompartmentRule([FHIRGraphCompartmentRule::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRule(new FHIRGraphCompartmentRule($ext)); } } } @@ -380,8 +408,8 @@ public function setRule(FHIRGraphCompartmentRule $rule = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -489,32 +517,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompartmentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompartmentType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getRule())) { $a[self::FIELD_RULE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGraphCompartmentRule::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGraphCompartmentRule::FIELD_VALUE]); $a[self::FIELD_RULE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php index 7d59ea5c52..410b493b06 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRGraphDefinitionLink extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -187,84 +187,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); - } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); - } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); - } - } - if (isset($data[self::FIELD_SLICE_NAME])) { - $ext = (isset($data[self::FIELD_SLICE_NAME_EXT]) && is_array($data[self::FIELD_SLICE_NAME_EXT])) - ? $data[self::FIELD_SLICE_NAME_EXT] - : null; - if ($data[self::FIELD_SLICE_NAME] instanceof FHIRString) { - $this->setSliceName($data[self::FIELD_SLICE_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SLICE_NAME])) { - $this->setSliceName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SLICE_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_SLICE_NAME])) { - $this->setSliceName(new FHIRString(array_merge($ext, $data[self::FIELD_SLICE_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SLICE_NAME]) || isset($data[self::FIELD_SLICE_NAME_EXT])) { + if (isset($data[self::FIELD_SLICE_NAME])) { + $value = $data[self::FIELD_SLICE_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SLICE_NAME_EXT]) && is_array($data[self::FIELD_SLICE_NAME_EXT])) { + $ext = $data[self::FIELD_SLICE_NAME_EXT]; } else { - $this->setSliceName(new FHIRString($data[self::FIELD_SLICE_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSliceName($value); + } else if (is_array($value)) { + $this->setSliceName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSliceName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSliceName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -558,8 +593,8 @@ public function setTarget(array $target = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -710,41 +745,60 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getSliceName())) { $a[self::FIELD_SLICE_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SLICE_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php index d06c275c55..fcb8ed227d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRGraphDefinitionTarget extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A formal computable definition of a graph of resources - that is, a coherent set @@ -191,36 +191,50 @@ public function __construct($data = null) $this->addLink(new FHIRGraphDefinitionLink($data[self::FIELD_LINK])); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRUri) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRUri(array_merge($ext, $data[self::FIELD_PROFILE]))); - } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; } else { - $this->setProfile(new FHIRUri($data[self::FIELD_PROFILE])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRResourceType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRResourceType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProfile(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRResourceType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRResourceType($ext)); } } } @@ -428,8 +442,8 @@ public function setType(FHIRResourceType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -542,25 +556,44 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCompartment())) { - $a[self::FIELD_COMPARTMENT] = $vs; + $a[self::FIELD_COMPARTMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPARTMENT][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php index f24ee2f2e9..7942a8a722 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRGroupCharacteristic extends FHIRBackboneElement const FIELD_VALUE_RANGE = 'valueRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -210,20 +210,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_EXCLUDE])) { - $ext = (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) - ? $data[self::FIELD_EXCLUDE_EXT] - : null; - if ($data[self::FIELD_EXCLUDE] instanceof FHIRBoolean) { - $this->setExclude($data[self::FIELD_EXCLUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDE]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDE])) { - $this->setExclude(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDE]))); - } + if (isset($data[self::FIELD_EXCLUDE]) || isset($data[self::FIELD_EXCLUDE_EXT])) { + if (isset($data[self::FIELD_EXCLUDE])) { + $value = $data[self::FIELD_EXCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_EXT]; } else { - $this->setExclude(new FHIRBoolean($data[self::FIELD_EXCLUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExclude($value); + } else if (is_array($value)) { + $this->setExclude(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExclude(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExclude(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -233,20 +240,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -539,8 +553,8 @@ public function setValueRange(FHIRRange $valueRange = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -669,8 +683,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExclude())) { $a[self::FIELD_EXCLUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDE_EXT] = $enc; } } @@ -679,8 +695,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -693,6 +711,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValueRange())) { $a[self::FIELD_VALUE_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php index 312798ee01..80f90d64f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMember.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRGroupMember extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -152,20 +152,27 @@ public function __construct($data = null) $this->setEntity(new FHIRReference($data[self::FIELD_ENTITY])); } } - if (isset($data[self::FIELD_INACTIVE])) { - $ext = (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) - ? $data[self::FIELD_INACTIVE_EXT] - : null; - if ($data[self::FIELD_INACTIVE] instanceof FHIRBoolean) { - $this->setInactive($data[self::FIELD_INACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INACTIVE]))); - } + if (isset($data[self::FIELD_INACTIVE]) || isset($data[self::FIELD_INACTIVE_EXT])) { + if (isset($data[self::FIELD_INACTIVE])) { + $value = $data[self::FIELD_INACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) { + $ext = $data[self::FIELD_INACTIVE_EXT]; } else { - $this->setInactive(new FHIRBoolean($data[self::FIELD_INACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInactive($value); + } else if (is_array($value)) { + $this->setInactive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInactive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -302,8 +309,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -400,14 +407,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getInactive())) { $a[self::FIELD_INACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php index a66d6f6ddd..ac78917479 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRHealthcareServiceAvailableTime extends FHIRBackboneElement const FIELD_DAYS_OF_WEEK_EXT = '_daysOfWeek'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -155,81 +155,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALL_DAY])) { - $ext = (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) - ? $data[self::FIELD_ALL_DAY_EXT] - : null; - if ($data[self::FIELD_ALL_DAY] instanceof FHIRBoolean) { - $this->setAllDay($data[self::FIELD_ALL_DAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALL_DAY]] + $ext)); - } else if (is_array($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALL_DAY]))); - } + if (isset($data[self::FIELD_ALL_DAY]) || isset($data[self::FIELD_ALL_DAY_EXT])) { + if (isset($data[self::FIELD_ALL_DAY])) { + $value = $data[self::FIELD_ALL_DAY]; } else { - $this->setAllDay(new FHIRBoolean($data[self::FIELD_ALL_DAY])); + $value = null; } - } - if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_END_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_END_TIME] instanceof FHIRTime) { - $this->setAvailableEndTime($data[self::FIELD_AVAILABLE_END_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_END_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_END_TIME]))); - } + if (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) { + $ext = $data[self::FIELD_ALL_DAY_EXT]; } else { - $this->setAvailableEndTime(new FHIRTime($data[self::FIELD_AVAILABLE_END_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllDay($value); + } else if (is_array($value)) { + $this->setAllDay(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllDay(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_START_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_START_TIME] instanceof FHIRTime) { - $this->setAvailableStartTime($data[self::FIELD_AVAILABLE_START_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_START_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_START_TIME]))); + if (isset($data[self::FIELD_AVAILABLE_END_TIME]) || isset($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { + $value = $data[self::FIELD_AVAILABLE_END_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_END_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableEndTime($value); + } else if (is_array($value)) { + $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAvailableEndTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME]) || isset($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { + $value = $data[self::FIELD_AVAILABLE_START_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_START_TIME_EXT]; } else { - $this->setAvailableStartTime(new FHIRTime($data[self::FIELD_AVAILABLE_START_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableStartTime($value); + } else if (is_array($value)) { + $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailableStartTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_DAYS_OF_WEEK])) { - $ext = (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) - ? $data[self::FIELD_DAYS_OF_WEEK_EXT] - : null; - if (is_array($data[self::FIELD_DAYS_OF_WEEK])) { - foreach($data[self::FIELD_DAYS_OF_WEEK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DAYS_OF_WEEK]) || isset($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + if (isset($data[self::FIELD_DAYS_OF_WEEK])) { + $value = $data[self::FIELD_DAYS_OF_WEEK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + $ext = $data[self::FIELD_DAYS_OF_WEEK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $iext))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($v)); } + } elseif (is_array($value)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($ext, $value))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDaysOfWeek(new FHIRDaysOfWeek($iext)); } - } elseif ($data[self::FIELD_DAYS_OF_WEEK] instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DAYS_OF_WEEK])) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $data[self::FIELD_DAYS_OF_WEEK]] + $ext)); - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK])); } } } @@ -424,8 +454,8 @@ public function setDaysOfWeek(array $daysOfWeek = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -548,39 +578,56 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllDay())) { $a[self::FIELD_ALL_DAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALL_DAY_EXT] = $enc; } } if (null !== ($v = $this->getAvailableEndTime())) { $a[self::FIELD_AVAILABLE_END_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_END_TIME_EXT] = $enc; } } if (null !== ($v = $this->getAvailableStartTime())) { $a[self::FIELD_AVAILABLE_START_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_START_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getDaysOfWeek())) { $a[self::FIELD_DAYS_OF_WEEK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DAYS_OF_WEEK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDaysOfWeek::FIELD_VALUE]) || array_key_exists(FHIRDaysOfWeek::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = null; + unset($enc[FHIRDaysOfWeek::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DAYS_OF_WEEK_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php index e4e21e0167..31ccd9f304 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRHealthcareServiceNotAvailable extends FHIRBackboneElement const FIELD_DURING = 'during'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,20 +130,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DURING])) { @@ -250,8 +257,8 @@ public function setDuring(FHIRPeriod $during = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -339,14 +346,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDuring())) { $a[self::FIELD_DURING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstance.php index 5c57534161..688c5a485f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRImagingManifestInstance extends FHIRBackboneElement const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An OID represented as a URI @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_SOP_CLASS])) { - $ext = (isset($data[self::FIELD_SOP_CLASS_EXT]) && is_array($data[self::FIELD_SOP_CLASS_EXT])) - ? $data[self::FIELD_SOP_CLASS_EXT] - : null; - if ($data[self::FIELD_SOP_CLASS] instanceof FHIROid) { - $this->setSopClass($data[self::FIELD_SOP_CLASS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOP_CLASS])) { - $this->setSopClass(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_SOP_CLASS]] + $ext)); - } else if (is_array($data[self::FIELD_SOP_CLASS])) { - $this->setSopClass(new FHIROid(array_merge($ext, $data[self::FIELD_SOP_CLASS]))); - } + if (isset($data[self::FIELD_SOP_CLASS]) || isset($data[self::FIELD_SOP_CLASS_EXT])) { + if (isset($data[self::FIELD_SOP_CLASS])) { + $value = $data[self::FIELD_SOP_CLASS]; } else { - $this->setSopClass(new FHIROid($data[self::FIELD_SOP_CLASS])); + $value = null; } - } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); + if (isset($data[self::FIELD_SOP_CLASS_EXT]) && is_array($data[self::FIELD_SOP_CLASS_EXT])) { + $ext = $data[self::FIELD_SOP_CLASS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setSopClass($value); + } else if (is_array($value)) { + $this->setSopClass(new FHIROid(array_merge($ext, $value))); + } else { + $this->setSopClass(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSopClass(new FHIROid($ext)); + } + } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); } } } @@ -271,8 +285,8 @@ public function setUid($uid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -368,18 +382,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getSopClass())) { $a[self::FIELD_SOP_CLASS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_SOP_CLASS_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeries.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeries.php index 5becbb2b1d..c5313b21f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeries.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRImagingManifestSeries extends FHIRBackboneElement const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -185,20 +185,27 @@ public function __construct($data = null) $this->addInstance(new FHIRImagingManifestInstance($data[self::FIELD_INSTANCE])); } } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); - } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); } } } @@ -386,8 +393,8 @@ public function setUid($uid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -494,18 +501,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudy.php index 40bebc280f..a11908ff59 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRImagingManifestStudy extends FHIRBackboneElement const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -205,20 +205,27 @@ public function __construct($data = null) $this->addSeries(new FHIRImagingManifestSeries($data[self::FIELD_SERIES])); } } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); - } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); } } } @@ -439,8 +446,8 @@ public function setUid($uid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -553,21 +560,38 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if (null !== ($v = $this->getImagingStudy())) { $a[self::FIELD_IMAGING_STUDY] = $v; } if ([] !== ($vs = $this->getSeries())) { - $a[self::FIELD_SERIES] = $vs; + $a[self::FIELD_SERIES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERIES][] = $v; + } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php index d193db4995..8db36b1601 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRImagingStudyInstance extends FHIRBackboneElement const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An integer with a value that is not negative (e.g. >= 0) @@ -163,68 +163,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRUnsignedInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setNumber(new FHIRUnsignedInt($data[self::FIELD_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_SOP_CLASS])) { - $ext = (isset($data[self::FIELD_SOP_CLASS_EXT]) && is_array($data[self::FIELD_SOP_CLASS_EXT])) - ? $data[self::FIELD_SOP_CLASS_EXT] - : null; - if ($data[self::FIELD_SOP_CLASS] instanceof FHIROid) { - $this->setSopClass($data[self::FIELD_SOP_CLASS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOP_CLASS])) { - $this->setSopClass(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_SOP_CLASS]] + $ext)); - } else if (is_array($data[self::FIELD_SOP_CLASS])) { - $this->setSopClass(new FHIROid(array_merge($ext, $data[self::FIELD_SOP_CLASS]))); - } + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; } else { - $this->setSopClass(new FHIROid($data[self::FIELD_SOP_CLASS])); + $ext = []; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumber(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_SOP_CLASS]) || isset($data[self::FIELD_SOP_CLASS_EXT])) { + if (isset($data[self::FIELD_SOP_CLASS])) { + $value = $data[self::FIELD_SOP_CLASS]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_SOP_CLASS_EXT]) && is_array($data[self::FIELD_SOP_CLASS_EXT])) { + $ext = $data[self::FIELD_SOP_CLASS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setSopClass($value); + } else if (is_array($value)) { + $this->setSopClass(new FHIROid(array_merge($ext, $value))); + } else { + $this->setSopClass(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSopClass(new FHIROid($ext)); } } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); } } } @@ -410,8 +438,8 @@ public function setUid($uid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -535,32 +563,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getSopClass())) { $a[self::FIELD_SOP_CLASS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_SOP_CLASS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php index c59dc8e770..f42d49a952 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeries.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRImagingStudySeries extends FHIRBackboneElement const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Availability of the resource @@ -283,20 +283,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AVAILABILITY])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY] instanceof FHIRInstanceAvailability) { - $this->setAvailability($data[self::FIELD_AVAILABILITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $data[self::FIELD_AVAILABILITY]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $data[self::FIELD_AVAILABILITY]))); - } + if (isset($data[self::FIELD_AVAILABILITY]) || isset($data[self::FIELD_AVAILABILITY_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY])) { + $value = $data[self::FIELD_AVAILABILITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXT]; } else { - $this->setAvailability(new FHIRInstanceAvailability($data[self::FIELD_AVAILABILITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstanceAvailability) { + $this->setAvailability($value); + } else if (is_array($value)) { + $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $value))); + } else { + $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailability(new FHIRInstanceAvailability($ext)); } } if (isset($data[self::FIELD_BODY_SITE])) { @@ -306,20 +313,27 @@ public function __construct($data = null) $this->setBodySite(new FHIRCoding($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENDPOINT])) { @@ -372,36 +386,50 @@ public function __construct($data = null) $this->setModality(new FHIRCoding($data[self::FIELD_MODALITY])); } } - if (isset($data[self::FIELD_NUMBER])) { - $ext = (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) - ? $data[self::FIELD_NUMBER_EXT] - : null; - if ($data[self::FIELD_NUMBER] instanceof FHIRUnsignedInt) { - $this->setNumber($data[self::FIELD_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER])) { - $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER]))); - } + if (isset($data[self::FIELD_NUMBER]) || isset($data[self::FIELD_NUMBER_EXT])) { + if (isset($data[self::FIELD_NUMBER])) { + $value = $data[self::FIELD_NUMBER]; } else { - $this->setNumber(new FHIRUnsignedInt($data[self::FIELD_NUMBER])); + $value = null; } - } - if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) - ? $data[self::FIELD_NUMBER_OF_INSTANCES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_INSTANCES] instanceof FHIRUnsignedInt) { - $this->setNumberOfInstances($data[self::FIELD_NUMBER_OF_INSTANCES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_INSTANCES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_INSTANCES]))); + if (isset($data[self::FIELD_NUMBER_EXT]) && is_array($data[self::FIELD_NUMBER_EXT])) { + $ext = $data[self::FIELD_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumber($value); + } else if (is_array($value)) { + $this->setNumber(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumber(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumber(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES]) || isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { + $value = $data[self::FIELD_NUMBER_OF_INSTANCES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_INSTANCES_EXT]; } else { - $this->setNumberOfInstances(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_INSTANCES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfInstances($value); + } else if (is_array($value)) { + $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfInstances(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -422,36 +450,50 @@ public function __construct($data = null) $this->addPerformer(new FHIRReference($data[self::FIELD_PERFORMER])); } } - if (isset($data[self::FIELD_STARTED])) { - $ext = (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) - ? $data[self::FIELD_STARTED_EXT] - : null; - if ($data[self::FIELD_STARTED] instanceof FHIRDateTime) { - $this->setStarted($data[self::FIELD_STARTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STARTED]] + $ext)); - } else if (is_array($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STARTED]))); - } + if (isset($data[self::FIELD_STARTED]) || isset($data[self::FIELD_STARTED_EXT])) { + if (isset($data[self::FIELD_STARTED])) { + $value = $data[self::FIELD_STARTED]; } else { - $this->setStarted(new FHIRDateTime($data[self::FIELD_STARTED])); + $value = null; } - } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); + if (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) { + $ext = $data[self::FIELD_STARTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStarted($value); + } else if (is_array($value)) { + $this->setStarted(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStarted(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); } } } @@ -1007,8 +1049,8 @@ public function setUid($uid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1209,8 +1251,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAvailability())) { $a[self::FIELD_AVAILABILITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstanceAvailability::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstanceAvailability::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXT] = $enc; } } @@ -1219,16 +1263,30 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if (null !== ($v = $this->getLaterality())) { $a[self::FIELD_LATERALITY] = $v; @@ -1238,35 +1296,52 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumber())) { $a[self::FIELD_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfInstances())) { $a[self::FIELD_NUMBER_OF_INSTANCES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_INSTANCES_EXT] = $enc; } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getStarted())) { $a[self::FIELD_STARTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STARTED_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php index ea7e76ea60..680ff486ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRImmunizationExplanation extends FHIRBackboneElement const FIELD_REASON_NOT_GIVEN = 'reasonNotGiven'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -312,8 +312,8 @@ public function setReasonNotGiven(array $reasonNotGiven = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -406,10 +406,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getReasonNotGiven())) { - $a[self::FIELD_REASON_NOT_GIVEN] = $vs; + $a[self::FIELD_REASON_NOT_GIVEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_NOT_GIVEN][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitioner.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitioner.php index 7c72936b95..0ebab69e8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRImmunizationPractitioner extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -237,8 +237,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -322,6 +322,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php index d46cc8014a..846d95bae2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReaction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRImmunizationReaction extends FHIRBackboneElement const FIELD_REPORTED_EXT = '_reported'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -147,20 +147,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -170,20 +177,27 @@ public function __construct($data = null) $this->setDetail(new FHIRReference($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_REPORTED])) { - $ext = (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) - ? $data[self::FIELD_REPORTED_EXT] - : null; - if ($data[self::FIELD_REPORTED] instanceof FHIRBoolean) { - $this->setReported($data[self::FIELD_REPORTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPORTED]] + $ext)); - } else if (is_array($data[self::FIELD_REPORTED])) { - $this->setReported(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPORTED]))); - } + if (isset($data[self::FIELD_REPORTED]) || isset($data[self::FIELD_REPORTED_EXT])) { + if (isset($data[self::FIELD_REPORTED])) { + $value = $data[self::FIELD_REPORTED]; } else { - $this->setReported(new FHIRBoolean($data[self::FIELD_REPORTED])); + $value = null; + } + if (isset($data[self::FIELD_REPORTED_EXT]) && is_array($data[self::FIELD_REPORTED_EXT])) { + $ext = $data[self::FIELD_REPORTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReported($value); + } else if (is_array($value)) { + $this->setReported(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReported(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReported(new FHIRBoolean($ext)); } } } @@ -323,8 +337,8 @@ public function setReported($reported = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -426,8 +440,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -436,11 +452,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getReported())) { $a[self::FIELD_REPORTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPORTED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php index b684ee5abe..2238158d52 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRImmunizationVaccinationProtocol extends FHIRBackboneElement const FIELD_TARGET_DISEASE = 'targetDisease'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -225,36 +225,50 @@ public function __construct($data = null) $this->setAuthority(new FHIRReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_DOSE_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) - ? $data[self::FIELD_DOSE_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_DOSE_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setDoseSequence($data[self::FIELD_DOSE_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DOSE_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DOSE_SEQUENCE]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DOSE_SEQUENCE]) || isset($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DOSE_SEQUENCE])) { + $value = $data[self::FIELD_DOSE_SEQUENCE]; } else { - $this->setDoseSequence(new FHIRPositiveInt($data[self::FIELD_DOSE_SEQUENCE])); + $value = null; + } + if (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DOSE_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDoseSequence($value); + } else if (is_array($value)) { + $this->setDoseSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDoseSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoseSequence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_DOSE_STATUS])) { @@ -271,36 +285,50 @@ public function __construct($data = null) $this->setDoseStatusReason(new FHIRCodeableConcept($data[self::FIELD_DOSE_STATUS_REASON])); } } - if (isset($data[self::FIELD_SERIES])) { - $ext = (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) - ? $data[self::FIELD_SERIES_EXT] - : null; - if ($data[self::FIELD_SERIES] instanceof FHIRString) { - $this->setSeries($data[self::FIELD_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES]))); - } + if (isset($data[self::FIELD_SERIES]) || isset($data[self::FIELD_SERIES_EXT])) { + if (isset($data[self::FIELD_SERIES])) { + $value = $data[self::FIELD_SERIES]; } else { - $this->setSeries(new FHIRString($data[self::FIELD_SERIES])); + $value = null; } - } - if (isset($data[self::FIELD_SERIES_DOSES])) { - $ext = (isset($data[self::FIELD_SERIES_DOSES_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_EXT])) - ? $data[self::FIELD_SERIES_DOSES_EXT] - : null; - if ($data[self::FIELD_SERIES_DOSES] instanceof FHIRPositiveInt) { - $this->setSeriesDoses($data[self::FIELD_SERIES_DOSES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES_DOSES])) { - $this->setSeriesDoses(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_SERIES_DOSES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES_DOSES])) { - $this->setSeriesDoses(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_SERIES_DOSES]))); + if (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) { + $ext = $data[self::FIELD_SERIES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeries($value); + } else if (is_array($value)) { + $this->setSeries(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeries(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SERIES_DOSES]) || isset($data[self::FIELD_SERIES_DOSES_EXT])) { + if (isset($data[self::FIELD_SERIES_DOSES])) { + $value = $data[self::FIELD_SERIES_DOSES]; } else { - $this->setSeriesDoses(new FHIRPositiveInt($data[self::FIELD_SERIES_DOSES])); + $value = null; + } + if (isset($data[self::FIELD_SERIES_DOSES_EXT]) && is_array($data[self::FIELD_SERIES_DOSES_EXT])) { + $ext = $data[self::FIELD_SERIES_DOSES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setSeriesDoses($value); + } else if (is_array($value)) { + $this->setSeriesDoses(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setSeriesDoses(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeriesDoses(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_TARGET_DISEASE])) { @@ -659,8 +687,8 @@ public function setTargetDisease(array $targetDisease = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -818,15 +846,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoseSequence())) { $a[self::FIELD_DOSE_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DOSE_SEQUENCE_EXT] = $enc; } } @@ -838,20 +870,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getSeries())) { $a[self::FIELD_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_EXT] = $enc; } } if (null !== ($v = $this->getSeriesDoses())) { $a[self::FIELD_SERIES_DOSES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_SERIES_DOSES_EXT] = $enc; } } if ([] !== ($vs = $this->getTargetDisease())) { - $a[self::FIELD_TARGET_DISEASE] = $vs; + $a[self::FIELD_TARGET_DISEASE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET_DISEASE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php index 4a8d3129f5..6956cfb49f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRImmunizationRecommendationDateCriterion extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -143,20 +143,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDateTime) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDateTime($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDateTime($ext)); } } } @@ -264,8 +271,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -357,11 +364,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php index e2d5955f59..98902675c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocol.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRImmunizationRecommendationProtocol extends FHIRBackboneElement const FIELD_SERIES_EXT = '_series'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -168,52 +168,73 @@ public function __construct($data = null) $this->setAuthority(new FHIRReference($data[self::FIELD_AUTHORITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_DOSE_SEQUENCE])) { - $ext = (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) - ? $data[self::FIELD_DOSE_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_DOSE_SEQUENCE] instanceof FHIRPositiveInt) { - $this->setDoseSequence($data[self::FIELD_DOSE_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DOSE_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_SEQUENCE])) { - $this->setDoseSequence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DOSE_SEQUENCE]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDoseSequence(new FHIRPositiveInt($data[self::FIELD_DOSE_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } - if (isset($data[self::FIELD_SERIES])) { - $ext = (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) - ? $data[self::FIELD_SERIES_EXT] - : null; - if ($data[self::FIELD_SERIES] instanceof FHIRString) { - $this->setSeries($data[self::FIELD_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_SERIES])) { - $this->setSeries(new FHIRString(array_merge($ext, $data[self::FIELD_SERIES]))); + if (isset($data[self::FIELD_DOSE_SEQUENCE]) || isset($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_DOSE_SEQUENCE])) { + $value = $data[self::FIELD_DOSE_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOSE_SEQUENCE_EXT]) && is_array($data[self::FIELD_DOSE_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_DOSE_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDoseSequence($value); + } else if (is_array($value)) { + $this->setDoseSequence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDoseSequence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDoseSequence(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SERIES]) || isset($data[self::FIELD_SERIES_EXT])) { + if (isset($data[self::FIELD_SERIES])) { + $value = $data[self::FIELD_SERIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERIES_EXT]) && is_array($data[self::FIELD_SERIES_EXT])) { + $ext = $data[self::FIELD_SERIES_EXT]; } else { - $this->setSeries(new FHIRString($data[self::FIELD_SERIES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSeries($value); + } else if (is_array($value)) { + $this->setSeries(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSeries(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeries(new FHIRString($ext)); } } } @@ -393,8 +414,8 @@ public function setSeries($series = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -513,25 +534,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDoseSequence())) { $a[self::FIELD_DOSE_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DOSE_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getSeries())) { $a[self::FIELD_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SERIES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php index 5de6a43d04..d1f80b7629 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRImmunizationRecommendationRecommendation extends FHIRBackboneElement const FIELD_VACCINE_CODE = 'vaccineCode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -227,20 +227,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DATE_CRITERION])) { @@ -261,20 +268,27 @@ public function __construct($data = null) $this->addDateCriterion(new FHIRImmunizationRecommendationDateCriterion($data[self::FIELD_DATE_CRITERION])); } } - if (isset($data[self::FIELD_DOSE_NUMBER])) { - $ext = (isset($data[self::FIELD_DOSE_NUMBER_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_EXT])) - ? $data[self::FIELD_DOSE_NUMBER_EXT] - : null; - if ($data[self::FIELD_DOSE_NUMBER] instanceof FHIRPositiveInt) { - $this->setDoseNumber($data[self::FIELD_DOSE_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOSE_NUMBER])) { - $this->setDoseNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DOSE_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_DOSE_NUMBER])) { - $this->setDoseNumber(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DOSE_NUMBER]))); - } + if (isset($data[self::FIELD_DOSE_NUMBER]) || isset($data[self::FIELD_DOSE_NUMBER_EXT])) { + if (isset($data[self::FIELD_DOSE_NUMBER])) { + $value = $data[self::FIELD_DOSE_NUMBER]; } else { - $this->setDoseNumber(new FHIRPositiveInt($data[self::FIELD_DOSE_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_DOSE_NUMBER_EXT]) && is_array($data[self::FIELD_DOSE_NUMBER_EXT])) { + $ext = $data[self::FIELD_DOSE_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDoseNumber($value); + } else if (is_array($value)) { + $this->setDoseNumber(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDoseNumber(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoseNumber(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_FORECAST_STATUS])) { @@ -752,8 +766,8 @@ public function setVaccineCode(FHIRCodeableConcept $vaccineCode = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -912,18 +926,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDateCriterion())) { - $a[self::FIELD_DATE_CRITERION] = $vs; + $a[self::FIELD_DATE_CRITERION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATE_CRITERION][] = $v; + } } if (null !== ($v = $this->getDoseNumber())) { $a[self::FIELD_DOSE_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DOSE_NUMBER_EXT] = $enc; } } @@ -934,10 +958,22 @@ public function jsonSerialize() $a[self::FIELD_PROTOCOL] = $v; } if ([] !== ($vs = $this->getSupportingImmunization())) { - $a[self::FIELD_SUPPORTING_IMMUNIZATION] = $vs; + $a[self::FIELD_SUPPORTING_IMMUNIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_IMMUNIZATION][] = $v; + } } if ([] !== ($vs = $this->getSupportingPatientInformation())) { - $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_PATIENT_INFORMATION][] = $v; + } } if (null !== ($v = $this->getTargetDisease())) { $a[self::FIELD_TARGET_DISEASE] = $v; @@ -945,6 +981,9 @@ public function jsonSerialize() if (null !== ($v = $this->getVaccineCode())) { $a[self::FIELD_VACCINE_CODE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php index 1c75ff3644..5c2bfd9bf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependency.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRImplementationGuideDependency extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How a dependency is represented when the guide is published. @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRGuideDependencyType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGuideDependencyType([FHIRGuideDependencyType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGuideDependencyType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRGuideDependencyType($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGuideDependencyType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRGuideDependencyType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRGuideDependencyType([FHIRGuideDependencyType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRGuideDependencyType($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -256,8 +270,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -345,18 +359,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGuideDependencyType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGuideDependencyType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php index 1b1965806f..a76513371e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRImplementationGuideGlobal extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -137,20 +137,27 @@ public function __construct($data = null) $this->setProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRResourceType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRResourceType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRResourceType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRResourceType($ext)); } } } @@ -238,8 +245,8 @@ public function setType(FHIRResourceType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -322,11 +329,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php index 394a2df7e2..b08c5904f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRImplementationGuidePackage extends FHIRBackboneElement const FIELD_RESOURCE = 'resource'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -150,36 +150,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -368,8 +382,8 @@ public function setResource(array $resource = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -478,20 +492,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php index f965cfa2ba..4faa67318d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRImplementationGuidePage extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -202,65 +202,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FORMAT])) { - $ext = (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) - ? $data[self::FIELD_FORMAT_EXT] - : null; - if ($data[self::FIELD_FORMAT] instanceof FHIRCode) { - $this->setFormat($data[self::FIELD_FORMAT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FORMAT])) { - $this->setFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FORMAT]] + $ext)); - } else if (is_array($data[self::FIELD_FORMAT])) { - $this->setFormat(new FHIRCode(array_merge($ext, $data[self::FIELD_FORMAT]))); - } + if (isset($data[self::FIELD_FORMAT]) || isset($data[self::FIELD_FORMAT_EXT])) { + if (isset($data[self::FIELD_FORMAT])) { + $value = $data[self::FIELD_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) { + $ext = $data[self::FIELD_FORMAT_EXT]; } else { - $this->setFormat(new FHIRCode($data[self::FIELD_FORMAT])); - } - } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRGuidePageKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRGuidePageKind([FHIRGuidePageKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRGuidePageKind(array_merge($ext, $data[self::FIELD_KIND]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setFormat($value); + } else if (is_array($value)) { + $this->setFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFormat(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRGuidePageKind($data[self::FIELD_KIND])); + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGuidePageKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRGuidePageKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRGuidePageKind([FHIRGuidePageKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRGuidePageKind($ext)); } } - if (isset($data[self::FIELD_PACKAGE])) { - $ext = (isset($data[self::FIELD_PACKAGE_EXT]) && is_array($data[self::FIELD_PACKAGE_EXT])) - ? $data[self::FIELD_PACKAGE_EXT] - : null; - if (is_array($data[self::FIELD_PACKAGE])) { - foreach($data[self::FIELD_PACKAGE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPackage($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPackage(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPackage(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PACKAGE]) || isset($data[self::FIELD_PACKAGE_EXT])) { + if (isset($data[self::FIELD_PACKAGE])) { + $value = $data[self::FIELD_PACKAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PACKAGE_EXT]) && is_array($data[self::FIELD_PACKAGE_EXT])) { + $ext = $data[self::FIELD_PACKAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPackage($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPackage($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPackage(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPackage(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPackage(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPackage(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPackage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPackage(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PACKAGE] instanceof FHIRString) { - $this->addPackage($data[self::FIELD_PACKAGE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PACKAGE])) { - $this->addPackage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PACKAGE]] + $ext)); - } else { - $this->addPackage(new FHIRString($data[self::FIELD_PACKAGE])); } } if (isset($data[self::FIELD_PAGE])) { @@ -281,65 +304,88 @@ public function __construct($data = null) $this->addPage(new FHIRImplementationGuidePage($data[self::FIELD_PAGE])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if (is_array($data[self::FIELD_TYPE])) { - foreach($data[self::FIELD_TYPE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRResourceType) { - $this->addType($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addType(new FHIRResourceType(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->addType($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRResourceType) { + $this->addType($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addType(new FHIRResourceType(array_merge($v, $iext))); + } else { + $this->addType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addType(new FHIRResourceType($v)); } + } elseif (is_array($value)) { + $this->addType(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->addType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addType(new FHIRResourceType($iext)); } - } elseif ($data[self::FIELD_TYPE] instanceof FHIRResourceType) { - $this->addType($data[self::FIELD_TYPE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TYPE])) { - $this->addType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else { - $this->addType(new FHIRResourceType($data[self::FIELD_TYPE])); } } } @@ -695,8 +741,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -851,64 +897,97 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFormat())) { $a[self::FIELD_FORMAT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_FORMAT_EXT] = $enc; } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGuidePageKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGuidePageKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if ([] !== ($vs = $this->getPackage())) { $a[self::FIELD_PACKAGE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PACKAGE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PACKAGE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PACKAGE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PACKAGE_EXT] = $encs; + } } if ([] !== ($vs = $this->getPage())) { - $a[self::FIELD_PAGE] = $vs; + $a[self::FIELD_PAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAGE][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { $a[self::FIELD_TYPE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TYPE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TYPE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRResourceType::FIELD_VALUE]) || array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TYPE_EXT][] = null; + unset($enc[FHIRResourceType::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TYPE_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php index d26aee3235..e8a3adc121 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRImplementationGuideResource extends FHIRBackboneElement const FIELD_SOURCE_URI_EXT = '_sourceUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -202,52 +202,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACRONYM])) { - $ext = (isset($data[self::FIELD_ACRONYM_EXT]) && is_array($data[self::FIELD_ACRONYM_EXT])) - ? $data[self::FIELD_ACRONYM_EXT] - : null; - if ($data[self::FIELD_ACRONYM] instanceof FHIRString) { - $this->setAcronym($data[self::FIELD_ACRONYM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACRONYM])) { - $this->setAcronym(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ACRONYM]] + $ext)); - } else if (is_array($data[self::FIELD_ACRONYM])) { - $this->setAcronym(new FHIRString(array_merge($ext, $data[self::FIELD_ACRONYM]))); - } + if (isset($data[self::FIELD_ACRONYM]) || isset($data[self::FIELD_ACRONYM_EXT])) { + if (isset($data[self::FIELD_ACRONYM])) { + $value = $data[self::FIELD_ACRONYM]; } else { - $this->setAcronym(new FHIRString($data[self::FIELD_ACRONYM])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_ACRONYM_EXT]) && is_array($data[self::FIELD_ACRONYM_EXT])) { + $ext = $data[self::FIELD_ACRONYM_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAcronym($value); + } else if (is_array($value)) { + $this->setAcronym(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAcronym(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAcronym(new FHIRString($ext)); } } - if (isset($data[self::FIELD_EXAMPLE])) { - $ext = (isset($data[self::FIELD_EXAMPLE_EXT]) && is_array($data[self::FIELD_EXAMPLE_EXT])) - ? $data[self::FIELD_EXAMPLE_EXT] - : null; - if ($data[self::FIELD_EXAMPLE] instanceof FHIRBoolean) { - $this->setExample($data[self::FIELD_EXAMPLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXAMPLE])) { - $this->setExample(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXAMPLE]] + $ext)); - } else if (is_array($data[self::FIELD_EXAMPLE])) { - $this->setExample(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXAMPLE]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXAMPLE]) || isset($data[self::FIELD_EXAMPLE_EXT])) { + if (isset($data[self::FIELD_EXAMPLE])) { + $value = $data[self::FIELD_EXAMPLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXAMPLE_EXT]) && is_array($data[self::FIELD_EXAMPLE_EXT])) { + $ext = $data[self::FIELD_EXAMPLE_EXT]; } else { - $this->setExample(new FHIRBoolean($data[self::FIELD_EXAMPLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExample($value); + } else if (is_array($value)) { + $this->setExample(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExample(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExample(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_EXAMPLE_FOR])) { @@ -257,20 +278,27 @@ public function __construct($data = null) $this->setExampleFor(new FHIRReference($data[self::FIELD_EXAMPLE_FOR])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_SOURCE_REFERENCE])) { @@ -280,20 +308,27 @@ public function __construct($data = null) $this->setSourceReference(new FHIRReference($data[self::FIELD_SOURCE_REFERENCE])); } } - if (isset($data[self::FIELD_SOURCE_URI])) { - $ext = (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) - ? $data[self::FIELD_SOURCE_URI_EXT] - : null; - if ($data[self::FIELD_SOURCE_URI] instanceof FHIRUri) { - $this->setSourceUri($data[self::FIELD_SOURCE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE_URI]))); - } + if (isset($data[self::FIELD_SOURCE_URI]) || isset($data[self::FIELD_SOURCE_URI_EXT])) { + if (isset($data[self::FIELD_SOURCE_URI])) { + $value = $data[self::FIELD_SOURCE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) { + $ext = $data[self::FIELD_SOURCE_URI_EXT]; } else { - $this->setSourceUri(new FHIRUri($data[self::FIELD_SOURCE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSourceUri($value); + } else if (is_array($value)) { + $this->setSourceUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSourceUri(new FHIRUri($ext)); } } } @@ -583,8 +618,8 @@ public function setSourceUri($sourceUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -734,22 +769,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAcronym())) { $a[self::FIELD_ACRONYM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ACRONYM_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExample())) { $a[self::FIELD_EXAMPLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXAMPLE_EXT] = $enc; } } @@ -758,8 +799,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -768,11 +811,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSourceUri())) { $a[self::FIELD_SOURCE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php index 5d1324dc13..ae4575ca0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRLinkageItem extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -138,20 +138,27 @@ public function __construct($data = null) $this->setResource(new FHIRReference($data[self::FIELD_RESOURCE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRLinkageType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkageType([FHIRLinkageType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkageType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRLinkageType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLinkageType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRLinkageType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRLinkageType([FHIRLinkageType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRLinkageType($ext)); } } } @@ -243,8 +250,8 @@ public function setType(FHIRLinkageType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -327,11 +334,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLinkageType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLinkageType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php index 7dc0641f14..8c4fa3d5d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntry.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRListEntry extends FHIRBackboneElement const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -160,36 +160,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DELETED])) { - $ext = (isset($data[self::FIELD_DELETED_EXT]) && is_array($data[self::FIELD_DELETED_EXT])) - ? $data[self::FIELD_DELETED_EXT] - : null; - if ($data[self::FIELD_DELETED] instanceof FHIRBoolean) { - $this->setDeleted($data[self::FIELD_DELETED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DELETED])) { - $this->setDeleted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DELETED]] + $ext)); - } else if (is_array($data[self::FIELD_DELETED])) { - $this->setDeleted(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DELETED]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DELETED]) || isset($data[self::FIELD_DELETED_EXT])) { + if (isset($data[self::FIELD_DELETED])) { + $value = $data[self::FIELD_DELETED]; } else { - $this->setDeleted(new FHIRBoolean($data[self::FIELD_DELETED])); + $value = null; + } + if (isset($data[self::FIELD_DELETED_EXT]) && is_array($data[self::FIELD_DELETED_EXT])) { + $ext = $data[self::FIELD_DELETED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeleted($value); + } else if (is_array($value)) { + $this->setDeleted(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeleted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeleted(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FLAG])) { @@ -377,8 +391,8 @@ public function setItem(FHIRReference $item = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -486,15 +500,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDeleted())) { $a[self::FIELD_DELETED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DELETED_EXT] = $enc; } } @@ -504,6 +522,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItem())) { $a[self::FIELD_ITEM] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php index aa8c0a1184..8e0221fed4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPosition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRLocationPosition extends FHIRBackboneElement const FIELD_LONGITUDE_EXT = '_longitude'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -150,52 +150,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALTITUDE])) { - $ext = (isset($data[self::FIELD_ALTITUDE_EXT]) && is_array($data[self::FIELD_ALTITUDE_EXT])) - ? $data[self::FIELD_ALTITUDE_EXT] - : null; - if ($data[self::FIELD_ALTITUDE] instanceof FHIRDecimal) { - $this->setAltitude($data[self::FIELD_ALTITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALTITUDE])) { - $this->setAltitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ALTITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_ALTITUDE])) { - $this->setAltitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ALTITUDE]))); - } + if (isset($data[self::FIELD_ALTITUDE]) || isset($data[self::FIELD_ALTITUDE_EXT])) { + if (isset($data[self::FIELD_ALTITUDE])) { + $value = $data[self::FIELD_ALTITUDE]; } else { - $this->setAltitude(new FHIRDecimal($data[self::FIELD_ALTITUDE])); + $value = null; } - } - if (isset($data[self::FIELD_LATITUDE])) { - $ext = (isset($data[self::FIELD_LATITUDE_EXT]) && is_array($data[self::FIELD_LATITUDE_EXT])) - ? $data[self::FIELD_LATITUDE_EXT] - : null; - if ($data[self::FIELD_LATITUDE] instanceof FHIRDecimal) { - $this->setLatitude($data[self::FIELD_LATITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LATITUDE])) { - $this->setLatitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LATITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_LATITUDE])) { - $this->setLatitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LATITUDE]))); - } + if (isset($data[self::FIELD_ALTITUDE_EXT]) && is_array($data[self::FIELD_ALTITUDE_EXT])) { + $ext = $data[self::FIELD_ALTITUDE_EXT]; } else { - $this->setLatitude(new FHIRDecimal($data[self::FIELD_LATITUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAltitude($value); + } else if (is_array($value)) { + $this->setAltitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAltitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAltitude(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_LONGITUDE])) { - $ext = (isset($data[self::FIELD_LONGITUDE_EXT]) && is_array($data[self::FIELD_LONGITUDE_EXT])) - ? $data[self::FIELD_LONGITUDE_EXT] - : null; - if ($data[self::FIELD_LONGITUDE] instanceof FHIRDecimal) { - $this->setLongitude($data[self::FIELD_LONGITUDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LONGITUDE])) { - $this->setLongitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LONGITUDE]] + $ext)); - } else if (is_array($data[self::FIELD_LONGITUDE])) { - $this->setLongitude(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LONGITUDE]))); + if (isset($data[self::FIELD_LATITUDE]) || isset($data[self::FIELD_LATITUDE_EXT])) { + if (isset($data[self::FIELD_LATITUDE])) { + $value = $data[self::FIELD_LATITUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LATITUDE_EXT]) && is_array($data[self::FIELD_LATITUDE_EXT])) { + $ext = $data[self::FIELD_LATITUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLatitude($value); + } else if (is_array($value)) { + $this->setLatitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLatitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLatitude(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_LONGITUDE]) || isset($data[self::FIELD_LONGITUDE_EXT])) { + if (isset($data[self::FIELD_LONGITUDE])) { + $value = $data[self::FIELD_LONGITUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LONGITUDE_EXT]) && is_array($data[self::FIELD_LONGITUDE_EXT])) { + $ext = $data[self::FIELD_LONGITUDE_EXT]; } else { - $this->setLongitude(new FHIRDecimal($data[self::FIELD_LONGITUDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLongitude($value); + } else if (is_array($value)) { + $this->setLongitude(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLongitude(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLongitude(new FHIRDecimal($ext)); } } } @@ -351,8 +372,8 @@ public function setLongitude($longitude = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -462,25 +483,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAltitude())) { $a[self::FIELD_ALTITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ALTITUDE_EXT] = $enc; } } if (null !== ($v = $this->getLatitude())) { $a[self::FIELD_LATITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LATITUDE_EXT] = $enc; } } if (null !== ($v = $this->getLongitude())) { $a[self::FIELD_LONGITUDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LONGITUDE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php index bdea3c4058..c2722dde06 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMeasureGroup extends FHIRBackboneElement const FIELD_STRATIFIER = 'stratifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -165,20 +165,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -188,20 +195,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_POPULATION])) { @@ -481,8 +495,8 @@ public function setStratifier(array $stratifier = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -610,8 +624,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -620,16 +636,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPopulation())) { - $a[self::FIELD_POPULATION] = $vs; + $a[self::FIELD_POPULATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POPULATION][] = $v; + } } if ([] !== ($vs = $this->getStratifier())) { - $a[self::FIELD_STRATIFIER] = $vs; + $a[self::FIELD_STRATIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRATIFIER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php index e297552ca3..cfb8b7069c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMeasurePopulation extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -178,36 +178,50 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CRITERIA])) { - $ext = (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) - ? $data[self::FIELD_CRITERIA_EXT] - : null; - if ($data[self::FIELD_CRITERIA] instanceof FHIRString) { - $this->setCriteria($data[self::FIELD_CRITERIA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CRITERIA]] + $ext)); - } else if (is_array($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString(array_merge($ext, $data[self::FIELD_CRITERIA]))); - } + if (isset($data[self::FIELD_CRITERIA]) || isset($data[self::FIELD_CRITERIA_EXT])) { + if (isset($data[self::FIELD_CRITERIA])) { + $value = $data[self::FIELD_CRITERIA]; } else { - $this->setCriteria(new FHIRString($data[self::FIELD_CRITERIA])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) { + $ext = $data[self::FIELD_CRITERIA_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCriteria($value); + } else if (is_array($value)) { + $this->setCriteria(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCriteria(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -217,20 +231,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -440,8 +461,8 @@ public function setName($name = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -566,15 +587,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getCriteria())) { $a[self::FIELD_CRITERIA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CRITERIA_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -583,11 +608,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php index ddaeed1a6d..41a0cf106d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMeasureStratifier extends FHIRBackboneElement const FIELD_PATH_EXT = '_path'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -145,20 +145,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CRITERIA])) { - $ext = (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) - ? $data[self::FIELD_CRITERIA_EXT] - : null; - if ($data[self::FIELD_CRITERIA] instanceof FHIRString) { - $this->setCriteria($data[self::FIELD_CRITERIA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CRITERIA]] + $ext)); - } else if (is_array($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString(array_merge($ext, $data[self::FIELD_CRITERIA]))); - } + if (isset($data[self::FIELD_CRITERIA]) || isset($data[self::FIELD_CRITERIA_EXT])) { + if (isset($data[self::FIELD_CRITERIA])) { + $value = $data[self::FIELD_CRITERIA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) { + $ext = $data[self::FIELD_CRITERIA_EXT]; } else { - $this->setCriteria(new FHIRString($data[self::FIELD_CRITERIA])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCriteria($value); + } else if (is_array($value)) { + $this->setCriteria(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCriteria(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -168,20 +175,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } } @@ -323,8 +337,8 @@ public function setPath($path = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -426,8 +440,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCriteria())) { $a[self::FIELD_CRITERIA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CRITERIA_EXT] = $enc; } } @@ -436,11 +452,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php index 4c74e8241d..4603a80db5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMeasureSupplementalData extends FHIRBackboneElement const FIELD_USAGE = 'usage'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -163,20 +163,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CRITERIA])) { - $ext = (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) - ? $data[self::FIELD_CRITERIA_EXT] - : null; - if ($data[self::FIELD_CRITERIA] instanceof FHIRString) { - $this->setCriteria($data[self::FIELD_CRITERIA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CRITERIA]] + $ext)); - } else if (is_array($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString(array_merge($ext, $data[self::FIELD_CRITERIA]))); - } + if (isset($data[self::FIELD_CRITERIA]) || isset($data[self::FIELD_CRITERIA_EXT])) { + if (isset($data[self::FIELD_CRITERIA])) { + $value = $data[self::FIELD_CRITERIA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) { + $ext = $data[self::FIELD_CRITERIA_EXT]; } else { - $this->setCriteria(new FHIRString($data[self::FIELD_CRITERIA])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCriteria($value); + } else if (is_array($value)) { + $this->setCriteria(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCriteria(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -186,20 +193,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } if (isset($data[self::FIELD_USAGE])) { @@ -430,8 +444,8 @@ public function setUsage(array $usage = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -546,8 +560,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCriteria())) { $a[self::FIELD_CRITERIA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CRITERIA_EXT] = $enc; } } @@ -556,13 +572,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if ([] !== ($vs = $this->getUsage())) { - $a[self::FIELD_USAGE] = $vs; + $a[self::FIELD_USAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USAGE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php index c5064c19f8..ddee4e08ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMeasureReportGroup extends FHIRBackboneElement const FIELD_STRATIFIER = 'stratifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -161,20 +161,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MEASURE_SCORE])) { - $ext = (isset($data[self::FIELD_MEASURE_SCORE_EXT]) && is_array($data[self::FIELD_MEASURE_SCORE_EXT])) - ? $data[self::FIELD_MEASURE_SCORE_EXT] - : null; - if ($data[self::FIELD_MEASURE_SCORE] instanceof FHIRDecimal) { - $this->setMeasureScore($data[self::FIELD_MEASURE_SCORE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEASURE_SCORE])) { - $this->setMeasureScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_MEASURE_SCORE]] + $ext)); - } else if (is_array($data[self::FIELD_MEASURE_SCORE])) { - $this->setMeasureScore(new FHIRDecimal(array_merge($ext, $data[self::FIELD_MEASURE_SCORE]))); - } + if (isset($data[self::FIELD_MEASURE_SCORE]) || isset($data[self::FIELD_MEASURE_SCORE_EXT])) { + if (isset($data[self::FIELD_MEASURE_SCORE])) { + $value = $data[self::FIELD_MEASURE_SCORE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MEASURE_SCORE_EXT]) && is_array($data[self::FIELD_MEASURE_SCORE_EXT])) { + $ext = $data[self::FIELD_MEASURE_SCORE_EXT]; } else { - $this->setMeasureScore(new FHIRDecimal($data[self::FIELD_MEASURE_SCORE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setMeasureScore($value); + } else if (is_array($value)) { + $this->setMeasureScore(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setMeasureScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeasureScore(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_POPULATION])) { @@ -420,8 +427,8 @@ public function setStratifier(array $stratifier = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -538,16 +545,33 @@ public function jsonSerialize() } if (null !== ($v = $this->getMeasureScore())) { $a[self::FIELD_MEASURE_SCORE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_MEASURE_SCORE_EXT] = $enc; } } if ([] !== ($vs = $this->getPopulation())) { - $a[self::FIELD_POPULATION] = $vs; + $a[self::FIELD_POPULATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POPULATION][] = $v; + } } if ([] !== ($vs = $this->getStratifier())) { - $a[self::FIELD_STRATIFIER] = $vs; + $a[self::FIELD_STRATIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRATIFIER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php index dd757761eb..806f91b4d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMeasureReportPopulation extends FHIRBackboneElement const FIELD_PATIENTS = 'patients'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -165,20 +165,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRInteger) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; } else { - $this->setCount(new FHIRInteger($data[self::FIELD_COUNT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCount(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -356,8 +363,8 @@ public function setPatients(FHIRReference $patients = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -460,8 +467,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } @@ -471,6 +480,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPatients())) { $a[self::FIELD_PATIENTS] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php index ba02ea3fed..e2353e42a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMeasureReportPopulation1 extends FHIRBackboneElement const FIELD_PATIENTS = 'patients'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -165,20 +165,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRInteger) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; } else { - $this->setCount(new FHIRInteger($data[self::FIELD_COUNT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCount(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -356,8 +363,8 @@ public function setPatients(FHIRReference $patients = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -460,8 +467,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } @@ -471,6 +480,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPatients())) { $a[self::FIELD_PATIENTS] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php index 3a3fb110db..ca1bbd958a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRMeasureReportStratifier extends FHIRBackboneElement const FIELD_STRATUM = 'stratum'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -265,8 +265,8 @@ public function setStratum(array $stratum = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -355,7 +355,16 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getStratum())) { - $a[self::FIELD_STRATUM] = $vs; + $a[self::FIELD_STRATUM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRATUM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php index e58e1850fd..c2a9dd2e8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratum.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMeasureReportStratum extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -145,20 +145,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MEASURE_SCORE])) { - $ext = (isset($data[self::FIELD_MEASURE_SCORE_EXT]) && is_array($data[self::FIELD_MEASURE_SCORE_EXT])) - ? $data[self::FIELD_MEASURE_SCORE_EXT] - : null; - if ($data[self::FIELD_MEASURE_SCORE] instanceof FHIRDecimal) { - $this->setMeasureScore($data[self::FIELD_MEASURE_SCORE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEASURE_SCORE])) { - $this->setMeasureScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_MEASURE_SCORE]] + $ext)); - } else if (is_array($data[self::FIELD_MEASURE_SCORE])) { - $this->setMeasureScore(new FHIRDecimal(array_merge($ext, $data[self::FIELD_MEASURE_SCORE]))); - } + if (isset($data[self::FIELD_MEASURE_SCORE]) || isset($data[self::FIELD_MEASURE_SCORE_EXT])) { + if (isset($data[self::FIELD_MEASURE_SCORE])) { + $value = $data[self::FIELD_MEASURE_SCORE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MEASURE_SCORE_EXT]) && is_array($data[self::FIELD_MEASURE_SCORE_EXT])) { + $ext = $data[self::FIELD_MEASURE_SCORE_EXT]; } else { - $this->setMeasureScore(new FHIRDecimal($data[self::FIELD_MEASURE_SCORE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setMeasureScore($value); + } else if (is_array($value)) { + $this->setMeasureScore(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setMeasureScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeasureScore(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_POPULATION])) { @@ -179,20 +186,27 @@ public function __construct($data = null) $this->addPopulation(new FHIRMeasureReportPopulation1($data[self::FIELD_POPULATION])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -359,8 +373,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -470,21 +484,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMeasureScore())) { $a[self::FIELD_MEASURE_SCORE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_MEASURE_SCORE_EXT] = $enc; } } if ([] !== ($vs = $this->getPopulation())) { - $a[self::FIELD_POPULATION] = $vs; + $a[self::FIELD_POPULATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POPULATION][] = $v; + } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php index 40aae71706..7c06d75fd5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatch.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicationBatch extends FHIRBackboneElement const FIELD_LOT_NUMBER_EXT = '_lotNumber'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -134,36 +134,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPIRATION_DATE])) { - $ext = (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) - ? $data[self::FIELD_EXPIRATION_DATE_EXT] - : null; - if ($data[self::FIELD_EXPIRATION_DATE] instanceof FHIRDateTime) { - $this->setExpirationDate($data[self::FIELD_EXPIRATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRATION_DATE]))); - } + if (isset($data[self::FIELD_EXPIRATION_DATE]) || isset($data[self::FIELD_EXPIRATION_DATE_EXT])) { + if (isset($data[self::FIELD_EXPIRATION_DATE])) { + $value = $data[self::FIELD_EXPIRATION_DATE]; } else { - $this->setExpirationDate(new FHIRDateTime($data[self::FIELD_EXPIRATION_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); + if (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) { + $ext = $data[self::FIELD_EXPIRATION_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpirationDate($value); + } else if (is_array($value)) { + $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpirationDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); } } } @@ -275,8 +289,8 @@ public function setLotNumber($lotNumber = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -372,18 +386,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpirationDate())) { $a[self::FIELD_EXPIRATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRATION_DATE_EXT] = $enc; } } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php index d69ffe5378..a6f7854a71 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicationContent extends FHIRBackboneElement const FIELD_ITEM_REFERENCE = 'itemReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -289,8 +289,8 @@ public function setItemReference(FHIRReference $itemReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -383,6 +383,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItemReference())) { $a[self::FIELD_ITEM_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php index 9cef094af7..98b5ce557b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRMedicationIngredient extends FHIRBackboneElement const FIELD_ITEM_REFERENCE = 'itemReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A relationship of two Quantity values - expressed as a numerator and a @@ -169,20 +169,27 @@ public function __construct($data = null) $this->setAmount(new FHIRRatio($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_IS_ACTIVE])) { - $ext = (isset($data[self::FIELD_IS_ACTIVE_EXT]) && is_array($data[self::FIELD_IS_ACTIVE_EXT])) - ? $data[self::FIELD_IS_ACTIVE_EXT] - : null; - if ($data[self::FIELD_IS_ACTIVE] instanceof FHIRBoolean) { - $this->setIsActive($data[self::FIELD_IS_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_ACTIVE])) { - $this->setIsActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_IS_ACTIVE])) { - $this->setIsActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_ACTIVE]))); - } + if (isset($data[self::FIELD_IS_ACTIVE]) || isset($data[self::FIELD_IS_ACTIVE_EXT])) { + if (isset($data[self::FIELD_IS_ACTIVE])) { + $value = $data[self::FIELD_IS_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_ACTIVE_EXT]) && is_array($data[self::FIELD_IS_ACTIVE_EXT])) { + $ext = $data[self::FIELD_IS_ACTIVE_EXT]; } else { - $this->setIsActive(new FHIRBoolean($data[self::FIELD_IS_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsActive($value); + } else if (is_array($value)) { + $this->setIsActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ITEM_CODEABLE_CONCEPT])) { @@ -366,8 +373,8 @@ public function setItemReference(FHIRReference $itemReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -470,8 +477,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getIsActive())) { $a[self::FIELD_IS_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_ACTIVE_EXT] = $enc; } } @@ -481,6 +490,9 @@ public function jsonSerialize() if (null !== ($v = $this->getItemReference())) { $a[self::FIELD_ITEM_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php index 7cb59f01b7..5085c25ca1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRMedicationPackage extends FHIRBackboneElement const FIELD_CONTENT = 'content'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource is primarily used for the identification and definition of a @@ -351,8 +351,8 @@ public function setContent(array $content = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -451,13 +451,28 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBatch())) { - $a[self::FIELD_BATCH] = $vs; + $a[self::FIELD_BATCH] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BATCH][] = $v; + } } if (null !== ($v = $this->getContainer())) { $a[self::FIELD_CONTAINER] = $v; } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php index ce2709b323..a75137eb7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRMedicationAdministrationDosage extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -262,20 +262,27 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -573,8 +580,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -710,11 +717,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php index 27db937562..99c596b519 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicationAdministrationPerformer extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -232,8 +232,8 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -317,6 +317,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php index 5b5c0aa8bc..ffc441c068 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRMedicationDispensePerformer extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -234,8 +234,8 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php index 0dca3fbb61..ca6303896f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMedicationDispenseSubstitution extends FHIRBackboneElement const FIELD_WAS_SUBSTITUTED_EXT = '_wasSubstituted'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -204,20 +204,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_WAS_SUBSTITUTED])) { - $ext = (isset($data[self::FIELD_WAS_SUBSTITUTED_EXT]) && is_array($data[self::FIELD_WAS_SUBSTITUTED_EXT])) - ? $data[self::FIELD_WAS_SUBSTITUTED_EXT] - : null; - if ($data[self::FIELD_WAS_SUBSTITUTED] instanceof FHIRBoolean) { - $this->setWasSubstituted($data[self::FIELD_WAS_SUBSTITUTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WAS_SUBSTITUTED])) { - $this->setWasSubstituted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WAS_SUBSTITUTED]] + $ext)); - } else if (is_array($data[self::FIELD_WAS_SUBSTITUTED])) { - $this->setWasSubstituted(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WAS_SUBSTITUTED]))); - } + if (isset($data[self::FIELD_WAS_SUBSTITUTED]) || isset($data[self::FIELD_WAS_SUBSTITUTED_EXT])) { + if (isset($data[self::FIELD_WAS_SUBSTITUTED])) { + $value = $data[self::FIELD_WAS_SUBSTITUTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WAS_SUBSTITUTED_EXT]) && is_array($data[self::FIELD_WAS_SUBSTITUTED_EXT])) { + $ext = $data[self::FIELD_WAS_SUBSTITUTED_EXT]; } else { - $this->setWasSubstituted(new FHIRBoolean($data[self::FIELD_WAS_SUBSTITUTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWasSubstituted($value); + } else if (is_array($value)) { + $this->setWasSubstituted(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWasSubstituted(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWasSubstituted(new FHIRBoolean($ext)); } } } @@ -437,8 +444,8 @@ public function setWasSubstituted($wasSubstituted = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -551,21 +558,38 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getResponsibleParty())) { - $a[self::FIELD_RESPONSIBLE_PARTY] = $vs; + $a[self::FIELD_RESPONSIBLE_PARTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESPONSIBLE_PARTY][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getWasSubstituted())) { $a[self::FIELD_WAS_SUBSTITUTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WAS_SUBSTITUTED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php index 986de70b01..7890c7b10d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMedicationRequestDispenseRequest extends FHIRBackboneElement const FIELD_VALIDITY_PERIOD = 'validityPeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A length of time. @@ -188,20 +188,27 @@ public function __construct($data = null) $this->setExpectedSupplyDuration(new FHIRDuration($data[self::FIELD_EXPECTED_SUPPLY_DURATION])); } } - if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]) && is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) - ? $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] instanceof FHIRPositiveInt) { - $this->setNumberOfRepeatsAllowed($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { - $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]))); - } + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]) || isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])) { + $value = $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]) && is_array($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT]; } else { - $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt($data[self::FIELD_NUMBER_OF_REPEATS_ALLOWED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setNumberOfRepeatsAllowed($value); + } else if (is_array($value)) { + $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfRepeatsAllowed(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -428,8 +435,8 @@ public function setValidityPeriod(FHIRPeriod $validityPeriod = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -538,8 +545,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getNumberOfRepeatsAllowed())) { $a[self::FIELD_NUMBER_OF_REPEATS_ALLOWED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_REPEATS_ALLOWED_EXT] = $enc; } } @@ -552,6 +561,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValidityPeriod())) { $a[self::FIELD_VALIDITY_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequester.php index 40d0c1ef10..aa3bcb779d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMedicationRequestRequester extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -235,8 +235,8 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -320,6 +320,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php index f2fc1325ab..17f67eaf2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitution.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRMedicationRequestSubstitution extends FHIRBackboneElement const FIELD_REASON = 'reason'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -135,20 +135,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALLOWED])) { - $ext = (isset($data[self::FIELD_ALLOWED_EXT]) && is_array($data[self::FIELD_ALLOWED_EXT])) - ? $data[self::FIELD_ALLOWED_EXT] - : null; - if ($data[self::FIELD_ALLOWED] instanceof FHIRBoolean) { - $this->setAllowed($data[self::FIELD_ALLOWED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALLOWED])) { - $this->setAllowed(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALLOWED]] + $ext)); - } else if (is_array($data[self::FIELD_ALLOWED])) { - $this->setAllowed(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALLOWED]))); - } + if (isset($data[self::FIELD_ALLOWED]) || isset($data[self::FIELD_ALLOWED_EXT])) { + if (isset($data[self::FIELD_ALLOWED])) { + $value = $data[self::FIELD_ALLOWED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALLOWED_EXT]) && is_array($data[self::FIELD_ALLOWED_EXT])) { + $ext = $data[self::FIELD_ALLOWED_EXT]; } else { - $this->setAllowed(new FHIRBoolean($data[self::FIELD_ALLOWED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllowed($value); + } else if (is_array($value)) { + $this->setAllowed(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllowed(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllowed(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_REASON])) { @@ -257,8 +264,8 @@ public function setReason(FHIRCodeableConcept $reason = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -346,14 +353,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllowed())) { $a[self::FIELD_ALLOWED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALLOWED_EXT] = $enc; } } if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php index dfe570efea..213c442a2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRMessageDefinitionAllowedResponse extends FHIRBackboneElement const FIELD_SITUATION_EXT = '_situation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -146,20 +146,27 @@ public function __construct($data = null) $this->setMessage(new FHIRReference($data[self::FIELD_MESSAGE])); } } - if (isset($data[self::FIELD_SITUATION])) { - $ext = (isset($data[self::FIELD_SITUATION_EXT]) && is_array($data[self::FIELD_SITUATION_EXT])) - ? $data[self::FIELD_SITUATION_EXT] - : null; - if ($data[self::FIELD_SITUATION] instanceof FHIRMarkdown) { - $this->setSituation($data[self::FIELD_SITUATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SITUATION])) { - $this->setSituation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_SITUATION]] + $ext)); - } else if (is_array($data[self::FIELD_SITUATION])) { - $this->setSituation(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_SITUATION]))); - } + if (isset($data[self::FIELD_SITUATION]) || isset($data[self::FIELD_SITUATION_EXT])) { + if (isset($data[self::FIELD_SITUATION])) { + $value = $data[self::FIELD_SITUATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SITUATION_EXT]) && is_array($data[self::FIELD_SITUATION_EXT])) { + $ext = $data[self::FIELD_SITUATION_EXT]; } else { - $this->setSituation(new FHIRMarkdown($data[self::FIELD_SITUATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setSituation($value); + } else if (is_array($value)) { + $this->setSituation(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setSituation(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSituation(new FHIRMarkdown($ext)); } } } @@ -273,8 +280,8 @@ public function setSituation($situation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -365,11 +372,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSituation())) { $a[self::FIELD_SITUATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_SITUATION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php index a7daff048b..4d08852bee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRMessageDefinitionFocus extends FHIRBackboneElement const FIELD_PROFILE = 'profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of activity the definition is describing @@ -161,52 +161,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRResourceType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResourceType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRResourceType($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRResourceType($ext)); } } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRUnsignedInt) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MIN]))); + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; } else { - $this->setMin(new FHIRUnsignedInt($data[self::FIELD_MIN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMin(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -383,8 +404,8 @@ public function setProfile(FHIRReference $profile = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -492,28 +513,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php index af26613650..843b6db1b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMessageHeaderDestination extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -147,36 +147,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUri) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUri($data[self::FIELD_ENDPOINT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -321,8 +335,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -424,21 +438,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php index a8b2fc78d7..a8296199e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRMessageHeaderResponse extends FHIRBackboneElement const FIELD_IDENTIFIER_EXT = '_identifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of response to a message @@ -149,20 +149,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRResponseType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResponseType([FHIRResponseType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRResponseType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRResponseType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResponseType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRResponseType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRResponseType([FHIRResponseType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRResponseType($ext)); } } if (isset($data[self::FIELD_DETAILS])) { @@ -172,20 +179,27 @@ public function __construct($data = null) $this->setDetails(new FHIRReference($data[self::FIELD_DETAILS])); } } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRId) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; } else { - $this->setIdentifier(new FHIRId($data[self::FIELD_IDENTIFIER])); + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRId($ext)); } } } @@ -319,8 +333,8 @@ public function setIdentifier($identifier = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -414,8 +428,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResponseType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResponseType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } @@ -424,11 +440,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php index 3cae1e0060..42dcf292ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRMessageHeaderSource extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details for all kinds of technology mediated contact points for a person or @@ -182,68 +182,96 @@ public function __construct($data = null) $this->setContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUri) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; } else { - $this->setEndpoint(new FHIRUri($data[self::FIELD_ENDPOINT])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_SOFTWARE])) { - $ext = (isset($data[self::FIELD_SOFTWARE_EXT]) && is_array($data[self::FIELD_SOFTWARE_EXT])) - ? $data[self::FIELD_SOFTWARE_EXT] - : null; - if ($data[self::FIELD_SOFTWARE] instanceof FHIRString) { - $this->setSoftware($data[self::FIELD_SOFTWARE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOFTWARE])) { - $this->setSoftware(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SOFTWARE]] + $ext)); - } else if (is_array($data[self::FIELD_SOFTWARE])) { - $this->setSoftware(new FHIRString(array_merge($ext, $data[self::FIELD_SOFTWARE]))); + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setSoftware(new FHIRString($data[self::FIELD_SOFTWARE])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_SOFTWARE]) || isset($data[self::FIELD_SOFTWARE_EXT])) { + if (isset($data[self::FIELD_SOFTWARE])) { + $value = $data[self::FIELD_SOFTWARE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOFTWARE_EXT]) && is_array($data[self::FIELD_SOFTWARE_EXT])) { + $ext = $data[self::FIELD_SOFTWARE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSoftware($value); + } else if (is_array($value)) { + $this->setSoftware(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSoftware(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSoftware(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -461,8 +489,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -595,32 +623,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getSoftware())) { $a[self::FIELD_SOFTWARE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SOFTWARE_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php index ab8c75af12..90e63672b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRNamingSystemUniqueId extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -173,20 +173,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_PERIOD])) { @@ -196,52 +203,73 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_PREFERRED])) { - $ext = (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) - ? $data[self::FIELD_PREFERRED_EXT] - : null; - if ($data[self::FIELD_PREFERRED] instanceof FHIRBoolean) { - $this->setPreferred($data[self::FIELD_PREFERRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PREFERRED]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PREFERRED]))); - } + if (isset($data[self::FIELD_PREFERRED]) || isset($data[self::FIELD_PREFERRED_EXT])) { + if (isset($data[self::FIELD_PREFERRED])) { + $value = $data[self::FIELD_PREFERRED]; } else { - $this->setPreferred(new FHIRBoolean($data[self::FIELD_PREFERRED])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRNamingSystemIdentifierType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNamingSystemIdentifierType([FHIRNamingSystemIdentifierType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRNamingSystemIdentifierType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) { + $ext = $data[self::FIELD_PREFERRED_EXT]; } else { - $this->setType(new FHIRNamingSystemIdentifierType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPreferred($value); + } else if (is_array($value)) { + $this->setPreferred(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreferred(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNamingSystemIdentifierType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRNamingSystemIdentifierType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRNamingSystemIdentifierType([FHIRNamingSystemIdentifierType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRNamingSystemIdentifierType($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -447,8 +475,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -571,8 +599,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } @@ -581,25 +611,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getPreferred())) { $a[self::FIELD_PREFERRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PREFERRED_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNamingSystemIdentifierType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNamingSystemIdentifierType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php index c654be08b8..b012342692 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRNutritionOrderAdministration extends FHIRBackboneElement const FIELD_SCHEDULE = 'schedule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -368,8 +368,8 @@ public function setSchedule(FHIRTiming $schedule = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -471,6 +471,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSchedule())) { $a[self::FIELD_SCHEDULE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php index 65acca825c..9814aadea3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormula.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRNutritionOrderEnteralFormula extends FHIRBackboneElement const FIELD_ROUTEOF_ADMINISTRATION = 'routeofAdministration'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -237,20 +237,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_ADDITIVE_PRODUCT_NAME] instanceof FHIRString) { - $this->setAdditiveProductName($data[self::FIELD_ADDITIVE_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { - $this->setAdditiveProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADDITIVE_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { - $this->setAdditiveProductName(new FHIRString(array_merge($ext, $data[self::FIELD_ADDITIVE_PRODUCT_NAME]))); - } + if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME]) || isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME])) { + $value = $data[self::FIELD_ADDITIVE_PRODUCT_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT]; } else { - $this->setAdditiveProductName(new FHIRString($data[self::FIELD_ADDITIVE_PRODUCT_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAdditiveProductName($value); + } else if (is_array($value)) { + $this->setAdditiveProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAdditiveProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAdditiveProductName(new FHIRString($ext)); } } if (isset($data[self::FIELD_ADDITIVE_TYPE])) { @@ -278,36 +285,50 @@ public function __construct($data = null) $this->addAdministration(new FHIRNutritionOrderAdministration($data[self::FIELD_ADMINISTRATION])); } } - if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT]) && is_array($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT])) - ? $data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_ADMINISTRATION_INSTRUCTION] instanceof FHIRString) { - $this->setAdministrationInstruction($data[self::FIELD_ADMINISTRATION_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { - $this->setAdministrationInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ADMINISTRATION_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { - $this->setAdministrationInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_ADMINISTRATION_INSTRUCTION]))); - } + if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION]) || isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION])) { + $value = $data[self::FIELD_ADMINISTRATION_INSTRUCTION]; } else { - $this->setAdministrationInstruction(new FHIRString($data[self::FIELD_ADMINISTRATION_INSTRUCTION])); + $value = null; } - } - if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME] instanceof FHIRString) { - $this->setBaseFormulaProductName($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { - $this->setBaseFormulaProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { - $this->setBaseFormulaProductName(new FHIRString(array_merge($ext, $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]))); + if (isset($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT]) && is_array($data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAdministrationInstruction($value); + } else if (is_array($value)) { + $this->setAdministrationInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAdministrationInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAdministrationInstruction(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]) || isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])) { + $value = $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME]; } else { - $this->setBaseFormulaProductName(new FHIRString($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME])); + $value = null; + } + if (isset($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBaseFormulaProductName($value); + } else if (is_array($value)) { + $this->setBaseFormulaProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBaseFormulaProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBaseFormulaProductName(new FHIRString($ext)); } } if (isset($data[self::FIELD_BASE_FORMULA_TYPE])) { @@ -727,8 +748,8 @@ public function setRouteofAdministration(FHIRCodeableConcept $routeofAdministrat */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -881,8 +902,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAdditiveProductName())) { $a[self::FIELD_ADDITIVE_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADDITIVE_PRODUCT_NAME_EXT] = $enc; } } @@ -890,19 +913,29 @@ public function jsonSerialize() $a[self::FIELD_ADDITIVE_TYPE] = $v; } if ([] !== ($vs = $this->getAdministration())) { - $a[self::FIELD_ADMINISTRATION] = $vs; + $a[self::FIELD_ADMINISTRATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADMINISTRATION][] = $v; + } } if (null !== ($v = $this->getAdministrationInstruction())) { $a[self::FIELD_ADMINISTRATION_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ADMINISTRATION_INSTRUCTION_EXT] = $enc; } } if (null !== ($v = $this->getBaseFormulaProductName())) { $a[self::FIELD_BASE_FORMULA_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BASE_FORMULA_PRODUCT_NAME_EXT] = $enc; } } @@ -918,6 +951,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRouteofAdministration())) { $a[self::FIELD_ROUTEOF_ADMINISTRATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php index 2649cdbd62..843c95aee0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRNutritionOrderNutrient extends FHIRBackboneElement const FIELD_MODIFIER = 'modifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -239,8 +239,8 @@ public function setModifier(FHIRCodeableConcept $modifier = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -324,6 +324,9 @@ public function jsonSerialize() if (null !== ($v = $this->getModifier())) { $a[self::FIELD_MODIFIER] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php index a9f53f22a8..278263c0e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDiet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRNutritionOrderOralDiet extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -207,20 +207,27 @@ public function __construct($data = null) $this->addFluidConsistencyType(new FHIRCodeableConcept($data[self::FIELD_FLUID_CONSISTENCY_TYPE])); } } - if (isset($data[self::FIELD_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) - ? $data[self::FIELD_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_INSTRUCTION] instanceof FHIRString) { - $this->setInstruction($data[self::FIELD_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_INSTRUCTION]))); - } + if (isset($data[self::FIELD_INSTRUCTION]) || isset($data[self::FIELD_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_INSTRUCTION])) { + $value = $data[self::FIELD_INSTRUCTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_INSTRUCTION_EXT]; } else { - $this->setInstruction(new FHIRString($data[self::FIELD_INSTRUCTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setInstruction($value); + } else if (is_array($value)) { + $this->setInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInstruction(new FHIRString($ext)); } } if (isset($data[self::FIELD_NUTRIENT])) { @@ -670,8 +677,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -817,26 +824,61 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getFluidConsistencyType())) { - $a[self::FIELD_FLUID_CONSISTENCY_TYPE] = $vs; + $a[self::FIELD_FLUID_CONSISTENCY_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FLUID_CONSISTENCY_TYPE][] = $v; + } } if (null !== ($v = $this->getInstruction())) { $a[self::FIELD_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INSTRUCTION_EXT] = $enc; } } if ([] !== ($vs = $this->getNutrient())) { - $a[self::FIELD_NUTRIENT] = $vs; + $a[self::FIELD_NUTRIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NUTRIENT][] = $v; + } } if ([] !== ($vs = $this->getSchedule())) { - $a[self::FIELD_SCHEDULE] = $vs; + $a[self::FIELD_SCHEDULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SCHEDULE][] = $v; + } } if ([] !== ($vs = $this->getTexture())) { - $a[self::FIELD_TEXTURE] = $vs; + $a[self::FIELD_TEXTURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEXTURE][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php index e1ab4e79c0..729d64e0ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRNutritionOrderSupplement extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -181,36 +181,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) - ? $data[self::FIELD_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_INSTRUCTION] instanceof FHIRString) { - $this->setInstruction($data[self::FIELD_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_INSTRUCTION])) { - $this->setInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_INSTRUCTION]))); - } + if (isset($data[self::FIELD_INSTRUCTION]) || isset($data[self::FIELD_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_INSTRUCTION])) { + $value = $data[self::FIELD_INSTRUCTION]; } else { - $this->setInstruction(new FHIRString($data[self::FIELD_INSTRUCTION])); + $value = null; } - } - if (isset($data[self::FIELD_PRODUCT_NAME])) { - $ext = (isset($data[self::FIELD_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_PRODUCT_NAME_EXT])) - ? $data[self::FIELD_PRODUCT_NAME_EXT] - : null; - if ($data[self::FIELD_PRODUCT_NAME] instanceof FHIRString) { - $this->setProductName($data[self::FIELD_PRODUCT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRODUCT_NAME])) { - $this->setProductName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PRODUCT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_PRODUCT_NAME])) { - $this->setProductName(new FHIRString(array_merge($ext, $data[self::FIELD_PRODUCT_NAME]))); + if (isset($data[self::FIELD_INSTRUCTION_EXT]) && is_array($data[self::FIELD_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_INSTRUCTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setInstruction($value); + } else if (is_array($value)) { + $this->setInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInstruction(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PRODUCT_NAME]) || isset($data[self::FIELD_PRODUCT_NAME_EXT])) { + if (isset($data[self::FIELD_PRODUCT_NAME])) { + $value = $data[self::FIELD_PRODUCT_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRODUCT_NAME_EXT]) && is_array($data[self::FIELD_PRODUCT_NAME_EXT])) { + $ext = $data[self::FIELD_PRODUCT_NAME_EXT]; } else { - $this->setProductName(new FHIRString($data[self::FIELD_PRODUCT_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setProductName($value); + } else if (is_array($value)) { + $this->setProductName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setProductName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProductName(new FHIRString($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -494,8 +508,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -616,15 +630,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getInstruction())) { $a[self::FIELD_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INSTRUCTION_EXT] = $enc; } } if (null !== ($v = $this->getProductName())) { $a[self::FIELD_PRODUCT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PRODUCT_NAME_EXT] = $enc; } } @@ -632,11 +650,20 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getSchedule())) { - $a[self::FIELD_SCHEDULE] = $vs; + $a[self::FIELD_SCHEDULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SCHEDULE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php index b11bf4e5b3..54042249b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTexture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRNutritionOrderTexture extends FHIRBackboneElement const FIELD_MODIFIER = 'modifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -241,8 +241,8 @@ public function setModifier(FHIRCodeableConcept $modifier = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -326,6 +326,9 @@ public function jsonSerialize() if (null !== ($v = $this->getModifier())) { $a[self::FIELD_MODIFIER] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php index b91eda8fe2..76cec1a602 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRObservationComponent extends FHIRBackboneElement const FIELD_VALUE_TIME_EXT = '_valueTime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -361,20 +361,27 @@ public function __construct($data = null) $this->setValueCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_VALUE_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -412,36 +419,50 @@ public function __construct($data = null) $this->setValueSampledData(new FHIRSampledData($data[self::FIELD_VALUE_SAMPLED_DATA])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } } @@ -989,8 +1010,8 @@ public function setValueTime($valueTime = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1181,7 +1202,13 @@ public function jsonSerialize() $a[self::FIELD_INTERPRETATION] = $v; } if ([] !== ($vs = $this->getReferenceRange())) { - $a[self::FIELD_REFERENCE_RANGE] = $vs; + $a[self::FIELD_REFERENCE_RANGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_RANGE][] = $v; + } } if (null !== ($v = $this->getValueAttachment())) { $a[self::FIELD_VALUE_ATTACHMENT] = $v; @@ -1191,8 +1218,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } @@ -1213,18 +1242,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php index 9b42b307bb..ae82139a2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRObservationReferenceRange extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of ordered Quantities defined by a low and high limit. @@ -237,20 +237,27 @@ public function __construct($data = null) $this->setLow(new FHIRQuantity($data[self::FIELD_LOW])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -540,8 +547,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -662,7 +669,13 @@ public function jsonSerialize() $a[self::FIELD_AGE] = $v; } if ([] !== ($vs = $this->getAppliesTo())) { - $a[self::FIELD_APPLIES_TO] = $vs; + $a[self::FIELD_APPLIES_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_APPLIES_TO][] = $v; + } } if (null !== ($v = $this->getHigh())) { $a[self::FIELD_HIGH] = $v; @@ -672,14 +685,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php index fb83951233..ce8fcc835b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelated.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRObservationRelated extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -137,20 +137,27 @@ public function __construct($data = null) $this->setTarget(new FHIRReference($data[self::FIELD_TARGET])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRObservationRelationshipType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRObservationRelationshipType([FHIRObservationRelationshipType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRObservationRelationshipType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRObservationRelationshipType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationRelationshipType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRObservationRelationshipType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRObservationRelationshipType([FHIRObservationRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRObservationRelationshipType($ext)); } } } @@ -240,8 +247,8 @@ public function setType(FHIRObservationRelationshipType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -324,11 +331,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationRelationshipType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php index be52823b72..e7d499afec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIROperationDefinitionBinding extends FHIRBackboneElement const FIELD_VALUE_SET_URI_EXT = '_valueSetUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Indication of the degree of conformance expectations associated with a binding. @@ -147,20 +147,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_STRENGTH])) { - $ext = (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) - ? $data[self::FIELD_STRENGTH_EXT] - : null; - if ($data[self::FIELD_STRENGTH] instanceof FHIRBindingStrength) { - $this->setStrength($data[self::FIELD_STRENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $data[self::FIELD_STRENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength(array_merge($ext, $data[self::FIELD_STRENGTH]))); - } + if (isset($data[self::FIELD_STRENGTH]) || isset($data[self::FIELD_STRENGTH_EXT])) { + if (isset($data[self::FIELD_STRENGTH])) { + $value = $data[self::FIELD_STRENGTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) { + $ext = $data[self::FIELD_STRENGTH_EXT]; } else { - $this->setStrength(new FHIRBindingStrength($data[self::FIELD_STRENGTH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBindingStrength) { + $this->setStrength($value); + } else if (is_array($value)) { + $this->setStrength(new FHIRBindingStrength(array_merge($ext, $value))); + } else { + $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStrength(new FHIRBindingStrength($ext)); } } if (isset($data[self::FIELD_VALUE_SET_REFERENCE])) { @@ -170,20 +177,27 @@ public function __construct($data = null) $this->setValueSetReference(new FHIRReference($data[self::FIELD_VALUE_SET_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_SET_URI])) { - $ext = (isset($data[self::FIELD_VALUE_SET_URI_EXT]) && is_array($data[self::FIELD_VALUE_SET_URI_EXT])) - ? $data[self::FIELD_VALUE_SET_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_SET_URI] instanceof FHIRUri) { - $this->setValueSetUri($data[self::FIELD_VALUE_SET_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET_URI])) { - $this->setValueSetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_SET_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET_URI])) { - $this->setValueSetUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_SET_URI]))); - } + if (isset($data[self::FIELD_VALUE_SET_URI]) || isset($data[self::FIELD_VALUE_SET_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_SET_URI])) { + $value = $data[self::FIELD_VALUE_SET_URI]; } else { - $this->setValueSetUri(new FHIRUri($data[self::FIELD_VALUE_SET_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_URI_EXT]) && is_array($data[self::FIELD_VALUE_SET_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueSetUri($value); + } else if (is_array($value)) { + $this->setValueSetUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueSetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSetUri(new FHIRUri($ext)); } } } @@ -317,8 +331,8 @@ public function setValueSetUri($valueSetUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -412,8 +426,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getStrength())) { $a[self::FIELD_STRENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBindingStrength::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBindingStrength::FIELD_VALUE]); $a[self::FIELD_STRENGTH_EXT] = $enc; } } @@ -422,11 +438,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueSetUri())) { $a[self::FIELD_VALUE_SET_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php index 9646ac4087..3522d43aa1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverload.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIROperationDefinitionOverload extends FHIRBackboneElement const FIELD_PARAMETER_NAME_EXT = '_parameterName'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,49 +130,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PARAMETER_NAME])) { - $ext = (isset($data[self::FIELD_PARAMETER_NAME_EXT]) && is_array($data[self::FIELD_PARAMETER_NAME_EXT])) - ? $data[self::FIELD_PARAMETER_NAME_EXT] - : null; - if (is_array($data[self::FIELD_PARAMETER_NAME])) { - foreach($data[self::FIELD_PARAMETER_NAME] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addParameterName($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addParameterName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addParameterName(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PARAMETER_NAME]) || isset($data[self::FIELD_PARAMETER_NAME_EXT])) { + if (isset($data[self::FIELD_PARAMETER_NAME])) { + $value = $data[self::FIELD_PARAMETER_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARAMETER_NAME_EXT]) && is_array($data[self::FIELD_PARAMETER_NAME_EXT])) { + $ext = $data[self::FIELD_PARAMETER_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addParameterName($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addParameterName($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addParameterName(new FHIRString(array_merge($v, $iext))); + } else { + $this->addParameterName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addParameterName(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addParameterName(new FHIRString(array_merge($ext, $value))); + } else { + $this->addParameterName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addParameterName(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PARAMETER_NAME] instanceof FHIRString) { - $this->addParameterName($data[self::FIELD_PARAMETER_NAME]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PARAMETER_NAME])) { - $this->addParameterName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARAMETER_NAME]] + $ext)); - } else { - $this->addParameterName(new FHIRString($data[self::FIELD_PARAMETER_NAME])); } } } @@ -304,8 +320,8 @@ public function setParameterName(array $parameterName = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -400,25 +416,38 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getParameterName())) { $a[self::FIELD_PARAMETER_NAME] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PARAMETER_NAME][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PARAMETER_NAME_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PARAMETER_NAME_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PARAMETER_NAME_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php index 7cbfb1e418..abc8c9a6f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIROperationDefinitionParameter extends FHIRBackboneElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A formal computable definition of an operation (on the RESTful interface) or a @@ -241,68 +241,96 @@ public function __construct($data = null) $this->setBinding(new FHIROperationDefinitionBinding($data[self::FIELD_BINDING])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); - } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); - } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRCode) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRCode($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PART])) { @@ -330,52 +358,73 @@ public function __construct($data = null) $this->setProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_SEARCH_TYPE])) { - $ext = (isset($data[self::FIELD_SEARCH_TYPE_EXT]) && is_array($data[self::FIELD_SEARCH_TYPE_EXT])) - ? $data[self::FIELD_SEARCH_TYPE_EXT] - : null; - if ($data[self::FIELD_SEARCH_TYPE] instanceof FHIRSearchParamType) { - $this->setSearchType($data[self::FIELD_SEARCH_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEARCH_TYPE])) { - $this->setSearchType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $data[self::FIELD_SEARCH_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_SEARCH_TYPE])) { - $this->setSearchType(new FHIRSearchParamType(array_merge($ext, $data[self::FIELD_SEARCH_TYPE]))); - } + if (isset($data[self::FIELD_SEARCH_TYPE]) || isset($data[self::FIELD_SEARCH_TYPE_EXT])) { + if (isset($data[self::FIELD_SEARCH_TYPE])) { + $value = $data[self::FIELD_SEARCH_TYPE]; } else { - $this->setSearchType(new FHIRSearchParamType($data[self::FIELD_SEARCH_TYPE])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRFHIRAllTypes) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRFHIRAllTypes([FHIRFHIRAllTypes::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRFHIRAllTypes(array_merge($ext, $data[self::FIELD_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_SEARCH_TYPE_EXT]) && is_array($data[self::FIELD_SEARCH_TYPE_EXT])) { + $ext = $data[self::FIELD_SEARCH_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchParamType) { + $this->setSearchType($value); + } else if (is_array($value)) { + $this->setSearchType(new FHIRSearchParamType(array_merge($ext, $value))); + } else { + $this->setSearchType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSearchType(new FHIRSearchParamType($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRFHIRAllTypes($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIROperationParameterUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIROperationParameterUse([FHIROperationParameterUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIROperationParameterUse(array_merge($ext, $data[self::FIELD_USE]))); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRAllTypes) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRFHIRAllTypes(array_merge($ext, $value))); + } else { + $this->setType(new FHIRFHIRAllTypes([FHIRFHIRAllTypes::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRFHIRAllTypes($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIROperationParameterUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROperationParameterUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIROperationParameterUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIROperationParameterUse([FHIROperationParameterUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIROperationParameterUse($ext)); } } } @@ -756,8 +805,8 @@ public function setUse(FHIROperationParameterUse $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -927,59 +976,82 @@ public function jsonSerialize() } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPart())) { - $a[self::FIELD_PART] = $vs; + $a[self::FIELD_PART] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART][] = $v; + } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } if (null !== ($v = $this->getSearchType())) { $a[self::FIELD_SEARCH_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchParamType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchParamType::FIELD_VALUE]); $a[self::FIELD_SEARCH_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFHIRAllTypes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFHIRAllTypes::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROperationParameterUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIROperationParameterUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php index aa987a52c8..8cd88e7b1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIROperationOutcomeIssue extends FHIRBackboneElement const FIELD_SEVERITY_EXT = '_severity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A code that describes the type of issue. @@ -193,20 +193,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRIssueType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRIssueType([FHIRIssueType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRIssueType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRIssueType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIssueType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRIssueType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRIssueType([FHIRIssueType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRIssueType($ext)); } } if (isset($data[self::FIELD_DETAILS])) { @@ -216,94 +223,126 @@ public function __construct($data = null) $this->setDetails(new FHIRCodeableConcept($data[self::FIELD_DETAILS])); } } - if (isset($data[self::FIELD_DIAGNOSTICS])) { - $ext = (isset($data[self::FIELD_DIAGNOSTICS_EXT]) && is_array($data[self::FIELD_DIAGNOSTICS_EXT])) - ? $data[self::FIELD_DIAGNOSTICS_EXT] - : null; - if ($data[self::FIELD_DIAGNOSTICS] instanceof FHIRString) { - $this->setDiagnostics($data[self::FIELD_DIAGNOSTICS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIAGNOSTICS])) { - $this->setDiagnostics(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DIAGNOSTICS]] + $ext)); - } else if (is_array($data[self::FIELD_DIAGNOSTICS])) { - $this->setDiagnostics(new FHIRString(array_merge($ext, $data[self::FIELD_DIAGNOSTICS]))); - } + if (isset($data[self::FIELD_DIAGNOSTICS]) || isset($data[self::FIELD_DIAGNOSTICS_EXT])) { + if (isset($data[self::FIELD_DIAGNOSTICS])) { + $value = $data[self::FIELD_DIAGNOSTICS]; } else { - $this->setDiagnostics(new FHIRString($data[self::FIELD_DIAGNOSTICS])); + $value = null; + } + if (isset($data[self::FIELD_DIAGNOSTICS_EXT]) && is_array($data[self::FIELD_DIAGNOSTICS_EXT])) { + $ext = $data[self::FIELD_DIAGNOSTICS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDiagnostics($value); + } else if (is_array($value)) { + $this->setDiagnostics(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDiagnostics(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDiagnostics(new FHIRString($ext)); } } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if (is_array($data[self::FIELD_EXPRESSION])) { - foreach($data[self::FIELD_EXPRESSION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addExpression($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addExpression(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addExpression(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addExpression($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addExpression($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addExpression(new FHIRString(array_merge($v, $iext))); + } else { + $this->addExpression(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addExpression(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->addExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addExpression(new FHIRString($iext)); } - } elseif ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->addExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_EXPRESSION])) { - $this->addExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else { - $this->addExpression(new FHIRString($data[self::FIELD_EXPRESSION])); } } - if (isset($data[self::FIELD_LOCATION])) { - $ext = (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) - ? $data[self::FIELD_LOCATION_EXT] - : null; - if (is_array($data[self::FIELD_LOCATION])) { - foreach($data[self::FIELD_LOCATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addLocation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLocation(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LOCATION]) || isset($data[self::FIELD_LOCATION_EXT])) { + if (isset($data[self::FIELD_LOCATION])) { + $value = $data[self::FIELD_LOCATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LOCATION_EXT]) && is_array($data[self::FIELD_LOCATION_EXT])) { + $ext = $data[self::FIELD_LOCATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addLocation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addLocation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLocation(new FHIRString(array_merge($v, $iext))); + } else { + $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLocation(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addLocation(new FHIRString(array_merge($ext, $value))); + } else { + $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_LOCATION] instanceof FHIRString) { - $this->addLocation($data[self::FIELD_LOCATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LOCATION])) { - $this->addLocation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOCATION]] + $ext)); - } else { - $this->addLocation(new FHIRString($data[self::FIELD_LOCATION])); - } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRIssueSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRIssueSeverity([FHIRIssueSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRIssueSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLocation(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; } else { - $this->setSeverity(new FHIRIssueSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIssueSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRIssueSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRIssueSeverity([FHIRIssueSeverity::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRIssueSeverity($ext)); } } } @@ -612,8 +651,8 @@ public function setSeverity(FHIRIssueSeverity $severity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -739,8 +778,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIssueType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIssueType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } @@ -749,48 +790,71 @@ public function jsonSerialize() } if (null !== ($v = $this->getDiagnostics())) { $a[self::FIELD_DIAGNOSTICS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DIAGNOSTICS_EXT] = $enc; } } if ([] !== ($vs = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_EXPRESSION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_EXPRESSION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_EXPRESSION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_EXPRESSION_EXT] = $encs; + } } if ([] !== ($vs = $this->getLocation())) { $a[self::FIELD_LOCATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LOCATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LOCATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LOCATION_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LOCATION_EXT] = $encs; + } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIssueSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIssueSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php index a873c4d94a..cccc497ccf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIROrganizationContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An address expressed using postal conventions (as opposed to GPS or other @@ -392,8 +392,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -500,7 +500,16 @@ public function jsonSerialize() $a[self::FIELD_PURPOSE] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php index 114fa55917..e1dd455fc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -178,7 +178,7 @@ class FHIRParametersParameter extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -687,20 +687,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART])) { @@ -775,52 +782,73 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -851,52 +879,73 @@ public function __construct($data = null) $this->setValueCount(new FHIRCount($data[self::FIELD_VALUE_COUNT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -920,20 +969,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -943,52 +999,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -1005,20 +1082,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -1028,20 +1112,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1086,36 +1177,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1125,36 +1230,50 @@ public function __construct($data = null) $this->setValueTiming(new FHIRTiming($data[self::FIELD_VALUE_TIMING])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -2644,8 +2763,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -3108,13 +3227,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPart())) { - $a[self::FIELD_PART] = $vs; + $a[self::FIELD_PART] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART][] = $v; + } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v; @@ -3133,22 +3260,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -3166,22 +3299,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -3196,8 +3335,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -3206,22 +3347,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -3233,8 +3380,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -3243,8 +3392,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -3268,15 +3419,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -3285,18 +3440,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php index 2cf7ccffcb..7a95a437ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRPatientAnimal extends FHIRBackboneElement const FIELD_SPECIES = 'species'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -287,8 +287,8 @@ public function setSpecies(FHIRCodeableConcept $species = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -381,6 +381,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSpecies())) { $a[self::FIELD_SPECIES] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php index 4018f8897e..3f3c53286e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPatientCommunication extends FHIRBackboneElement const FIELD_PREFERRED_EXT = '_preferred'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -141,20 +141,27 @@ public function __construct($data = null) $this->setLanguage(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE])); } } - if (isset($data[self::FIELD_PREFERRED])) { - $ext = (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) - ? $data[self::FIELD_PREFERRED_EXT] - : null; - if ($data[self::FIELD_PREFERRED] instanceof FHIRBoolean) { - $this->setPreferred($data[self::FIELD_PREFERRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PREFERRED]] + $ext)); - } else if (is_array($data[self::FIELD_PREFERRED])) { - $this->setPreferred(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PREFERRED]))); - } + if (isset($data[self::FIELD_PREFERRED]) || isset($data[self::FIELD_PREFERRED_EXT])) { + if (isset($data[self::FIELD_PREFERRED])) { + $value = $data[self::FIELD_PREFERRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFERRED_EXT]) && is_array($data[self::FIELD_PREFERRED_EXT])) { + $ext = $data[self::FIELD_PREFERRED_EXT]; } else { - $this->setPreferred(new FHIRBoolean($data[self::FIELD_PREFERRED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPreferred($value); + } else if (is_array($value)) { + $this->setPreferred(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPreferred(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPreferred(new FHIRBoolean($ext)); } } } @@ -260,8 +267,8 @@ public function setPreferred($preferred = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -352,11 +359,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getPreferred())) { $a[self::FIELD_PREFERRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PREFERRED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php index 85e6df7858..e2dcd78fad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRPatientContact extends FHIRBackboneElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An address expressed using postal conventions (as opposed to GPS or other @@ -209,20 +209,27 @@ public function __construct($data = null) $this->setAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); - } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_NAME])) { @@ -587,8 +594,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -715,8 +722,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } @@ -730,10 +739,25 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getRelationship())) { - $a[self::FIELD_RELATIONSHIP] = $vs; + $a[self::FIELD_RELATIONSHIP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATIONSHIP][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php index db504ab27c..60dd69a9a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPatientLink extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -136,20 +136,27 @@ public function __construct($data = null) $this->setOther(new FHIRReference($data[self::FIELD_OTHER])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRLinkType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkType([FHIRLinkType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRLinkType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRLinkType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLinkType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRLinkType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRLinkType([FHIRLinkType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRLinkType($ext)); } } } @@ -237,8 +244,8 @@ public function setType(FHIRLinkType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -321,11 +328,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLinkType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLinkType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php index e6ce377efe..49313ced38 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRPaymentReconciliationDetail extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An amount of economic utility in some recognized currency. @@ -201,20 +201,27 @@ public function __construct($data = null) $this->setAmount(new FHIRMoney($data[self::FIELD_AMOUNT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDate) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDate($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_PAYEE])) { @@ -501,8 +508,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -623,8 +630,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -643,6 +652,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php index 603fe28648..8e2558aa55 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPaymentReconciliationProcessNote extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -251,8 +258,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -340,14 +347,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php index d8c36bc0b6..51ad52ae0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPersonLink extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The level of confidence that this link represents the same actual person, based @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ASSURANCE])) { - $ext = (isset($data[self::FIELD_ASSURANCE_EXT]) && is_array($data[self::FIELD_ASSURANCE_EXT])) - ? $data[self::FIELD_ASSURANCE_EXT] - : null; - if ($data[self::FIELD_ASSURANCE] instanceof FHIRIdentityAssuranceLevel) { - $this->setAssurance($data[self::FIELD_ASSURANCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ASSURANCE])) { - $this->setAssurance(new FHIRIdentityAssuranceLevel([FHIRIdentityAssuranceLevel::FIELD_VALUE => $data[self::FIELD_ASSURANCE]] + $ext)); - } else if (is_array($data[self::FIELD_ASSURANCE])) { - $this->setAssurance(new FHIRIdentityAssuranceLevel(array_merge($ext, $data[self::FIELD_ASSURANCE]))); - } + if (isset($data[self::FIELD_ASSURANCE]) || isset($data[self::FIELD_ASSURANCE_EXT])) { + if (isset($data[self::FIELD_ASSURANCE])) { + $value = $data[self::FIELD_ASSURANCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ASSURANCE_EXT]) && is_array($data[self::FIELD_ASSURANCE_EXT])) { + $ext = $data[self::FIELD_ASSURANCE_EXT]; } else { - $this->setAssurance(new FHIRIdentityAssuranceLevel($data[self::FIELD_ASSURANCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIdentityAssuranceLevel) { + $this->setAssurance($value); + } else if (is_array($value)) { + $this->setAssurance(new FHIRIdentityAssuranceLevel(array_merge($ext, $value))); + } else { + $this->setAssurance(new FHIRIdentityAssuranceLevel([FHIRIdentityAssuranceLevel::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAssurance(new FHIRIdentityAssuranceLevel($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -243,8 +250,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -324,14 +331,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAssurance())) { $a[self::FIELD_ASSURANCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIdentityAssuranceLevel::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIdentityAssuranceLevel::FIELD_VALUE]); $a[self::FIELD_ASSURANCE_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php index 9ce535b484..0576c2bdcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRPlanDefinitionAction extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource allows for the definition of various types of plans as a sharable, @@ -534,20 +534,27 @@ public function __construct($data = null) $this->addAction(new FHIRPlanDefinitionAction($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]) && is_array($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) - ? $data[self::FIELD_CARDINALITY_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_CARDINALITY_BEHAVIOR] instanceof FHIRActionCardinalityBehavior) { - $this->setCardinalityBehavior($data[self::FIELD_CARDINALITY_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior([FHIRActionCardinalityBehavior::FIELD_VALUE => $data[self::FIELD_CARDINALITY_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior(array_merge($ext, $data[self::FIELD_CARDINALITY_BEHAVIOR]))); - } + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR]) || isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR])) { + $value = $data[self::FIELD_CARDINALITY_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]) && is_array($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]; } else { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior($data[self::FIELD_CARDINALITY_BEHAVIOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionCardinalityBehavior) { + $this->setCardinalityBehavior($value); + } else if (is_array($value)) { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior(array_merge($ext, $value))); + } else { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior([FHIRActionCardinalityBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -593,20 +600,27 @@ public function __construct($data = null) $this->setDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOCUMENTATION])) { @@ -645,49 +659,65 @@ public function __construct($data = null) $this->addDynamicValue(new FHIRPlanDefinitionDynamicValue($data[self::FIELD_DYNAMIC_VALUE])); } } - if (isset($data[self::FIELD_GOAL_ID])) { - $ext = (isset($data[self::FIELD_GOAL_ID_EXT]) && is_array($data[self::FIELD_GOAL_ID_EXT])) - ? $data[self::FIELD_GOAL_ID_EXT] - : null; - if (is_array($data[self::FIELD_GOAL_ID])) { - foreach($data[self::FIELD_GOAL_ID] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRId) { - $this->addGoalId($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addGoalId(new FHIRId([FHIRId::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addGoalId(new FHIRId(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_GOAL_ID]) || isset($data[self::FIELD_GOAL_ID_EXT])) { + if (isset($data[self::FIELD_GOAL_ID])) { + $value = $data[self::FIELD_GOAL_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GOAL_ID_EXT]) && is_array($data[self::FIELD_GOAL_ID_EXT])) { + $ext = $data[self::FIELD_GOAL_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->addGoalId($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRId) { + $this->addGoalId($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addGoalId(new FHIRId(array_merge($v, $iext))); + } else { + $this->addGoalId(new FHIRId([FHIRId::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addGoalId(new FHIRId($v)); } + } elseif (is_array($value)) { + $this->addGoalId(new FHIRId(array_merge($ext, $value))); + } else { + $this->addGoalId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_GOAL_ID] instanceof FHIRId) { - $this->addGoalId($data[self::FIELD_GOAL_ID]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_GOAL_ID])) { - $this->addGoalId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_GOAL_ID]] + $ext)); - } else { - $this->addGoalId(new FHIRId($data[self::FIELD_GOAL_ID])); - } - } - if (isset($data[self::FIELD_GROUPING_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT]) && is_array($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) - ? $data[self::FIELD_GROUPING_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_GROUPING_BEHAVIOR] instanceof FHIRActionGroupingBehavior) { - $this->setGroupingBehavior($data[self::FIELD_GROUPING_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUPING_BEHAVIOR])) { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior([FHIRActionGroupingBehavior::FIELD_VALUE => $data[self::FIELD_GROUPING_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_GROUPING_BEHAVIOR])) { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior(array_merge($ext, $data[self::FIELD_GROUPING_BEHAVIOR]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addGoalId(new FHIRId($iext)); } + } + } + if (isset($data[self::FIELD_GROUPING_BEHAVIOR]) || isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_GROUPING_BEHAVIOR])) { + $value = $data[self::FIELD_GROUPING_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT]) && is_array($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_GROUPING_BEHAVIOR_EXT]; } else { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior($data[self::FIELD_GROUPING_BEHAVIOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionGroupingBehavior) { + $this->setGroupingBehavior($value); + } else if (is_array($value)) { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior(array_merge($ext, $value))); + } else { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior([FHIRActionGroupingBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior($ext)); } } if (isset($data[self::FIELD_INPUT])) { @@ -708,20 +738,27 @@ public function __construct($data = null) $this->addInput(new FHIRDataRequirement($data[self::FIELD_INPUT])); } } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); - } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); } } if (isset($data[self::FIELD_OUTPUT])) { @@ -760,20 +797,27 @@ public function __construct($data = null) $this->addParticipant(new FHIRPlanDefinitionParticipant($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT]) && is_array($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) - ? $data[self::FIELD_PRECHECK_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_PRECHECK_BEHAVIOR] instanceof FHIRActionPrecheckBehavior) { - $this->setPrecheckBehavior($data[self::FIELD_PRECHECK_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior([FHIRActionPrecheckBehavior::FIELD_VALUE => $data[self::FIELD_PRECHECK_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior(array_merge($ext, $data[self::FIELD_PRECHECK_BEHAVIOR]))); - } + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR]) || isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR])) { + $value = $data[self::FIELD_PRECHECK_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT]) && is_array($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_PRECHECK_BEHAVIOR_EXT]; } else { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior($data[self::FIELD_PRECHECK_BEHAVIOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionPrecheckBehavior) { + $this->setPrecheckBehavior($value); + } else if (is_array($value)) { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior(array_merge($ext, $value))); + } else { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior([FHIRActionPrecheckBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior($ext)); } } if (isset($data[self::FIELD_REASON])) { @@ -812,68 +856,96 @@ public function __construct($data = null) $this->addRelatedAction(new FHIRPlanDefinitionRelatedAction($data[self::FIELD_RELATED_ACTION])); } } - if (isset($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT]) && is_array($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) - ? $data[self::FIELD_REQUIRED_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_REQUIRED_BEHAVIOR] instanceof FHIRActionRequiredBehavior) { - $this->setRequiredBehavior($data[self::FIELD_REQUIRED_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior([FHIRActionRequiredBehavior::FIELD_VALUE => $data[self::FIELD_REQUIRED_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior(array_merge($ext, $data[self::FIELD_REQUIRED_BEHAVIOR]))); - } + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR]) || isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR])) { + $value = $data[self::FIELD_REQUIRED_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT]) && is_array($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_REQUIRED_BEHAVIOR_EXT]; } else { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior($data[self::FIELD_REQUIRED_BEHAVIOR])); - } - } - if (isset($data[self::FIELD_SELECTION_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT]) && is_array($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) - ? $data[self::FIELD_SELECTION_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_SELECTION_BEHAVIOR] instanceof FHIRActionSelectionBehavior) { - $this->setSelectionBehavior($data[self::FIELD_SELECTION_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SELECTION_BEHAVIOR])) { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior([FHIRActionSelectionBehavior::FIELD_VALUE => $data[self::FIELD_SELECTION_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_SELECTION_BEHAVIOR])) { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior(array_merge($ext, $data[self::FIELD_SELECTION_BEHAVIOR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionRequiredBehavior) { + $this->setRequiredBehavior($value); + } else if (is_array($value)) { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior(array_merge($ext, $value))); + } else { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior([FHIRActionRequiredBehavior::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior($ext)); + } + } + if (isset($data[self::FIELD_SELECTION_BEHAVIOR]) || isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_SELECTION_BEHAVIOR])) { + $value = $data[self::FIELD_SELECTION_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT]) && is_array($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_SELECTION_BEHAVIOR_EXT]; } else { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior($data[self::FIELD_SELECTION_BEHAVIOR])); - } - } - if (isset($data[self::FIELD_TEXT_EQUIVALENT])) { - $ext = (isset($data[self::FIELD_TEXT_EQUIVALENT_EXT]) && is_array($data[self::FIELD_TEXT_EQUIVALENT_EXT])) - ? $data[self::FIELD_TEXT_EQUIVALENT_EXT] - : null; - if ($data[self::FIELD_TEXT_EQUIVALENT] instanceof FHIRString) { - $this->setTextEquivalent($data[self::FIELD_TEXT_EQUIVALENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT_EQUIVALENT])) { - $this->setTextEquivalent(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT_EQUIVALENT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT_EQUIVALENT])) { - $this->setTextEquivalent(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT_EQUIVALENT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionSelectionBehavior) { + $this->setSelectionBehavior($value); + } else if (is_array($value)) { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior(array_merge($ext, $value))); + } else { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior([FHIRActionSelectionBehavior::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior($ext)); + } + } + if (isset($data[self::FIELD_TEXT_EQUIVALENT]) || isset($data[self::FIELD_TEXT_EQUIVALENT_EXT])) { + if (isset($data[self::FIELD_TEXT_EQUIVALENT])) { + $value = $data[self::FIELD_TEXT_EQUIVALENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EQUIVALENT_EXT]) && is_array($data[self::FIELD_TEXT_EQUIVALENT_EXT])) { + $ext = $data[self::FIELD_TEXT_EQUIVALENT_EXT]; } else { - $this->setTextEquivalent(new FHIRString($data[self::FIELD_TEXT_EQUIVALENT])); - } - } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTextEquivalent($value); + } else if (is_array($value)) { + $this->setTextEquivalent(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTextEquivalent(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTextEquivalent(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_DURATION])) { @@ -904,20 +976,27 @@ public function __construct($data = null) $this->setTimingTiming(new FHIRTiming($data[self::FIELD_TIMING_TIMING])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TRANSFORM])) { @@ -2302,8 +2381,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2668,113 +2747,199 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getCardinalityBehavior())) { $a[self::FIELD_CARDINALITY_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionCardinalityBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionCardinalityBehavior::FIELD_VALUE]); $a[self::FIELD_CARDINALITY_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v; } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDocumentation())) { - $a[self::FIELD_DOCUMENTATION] = $vs; + $a[self::FIELD_DOCUMENTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENTATION][] = $v; + } } if ([] !== ($vs = $this->getDynamicValue())) { - $a[self::FIELD_DYNAMIC_VALUE] = $vs; + $a[self::FIELD_DYNAMIC_VALUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DYNAMIC_VALUE][] = $v; + } } if ([] !== ($vs = $this->getGoalId())) { $a[self::FIELD_GOAL_ID] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_GOAL_ID][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_GOAL_ID_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRId::FIELD_VALUE]) || array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_GOAL_ID_EXT][] = null; + unset($enc[FHIRId::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_GOAL_ID_EXT] = $encs; + } } if (null !== ($v = $this->getGroupingBehavior())) { $a[self::FIELD_GROUPING_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionGroupingBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionGroupingBehavior::FIELD_VALUE]); $a[self::FIELD_GROUPING_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getInput())) { - $a[self::FIELD_INPUT] = $vs; + $a[self::FIELD_INPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INPUT][] = $v; + } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if ([] !== ($vs = $this->getOutput())) { - $a[self::FIELD_OUTPUT] = $vs; + $a[self::FIELD_OUTPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTPUT][] = $v; + } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPrecheckBehavior())) { $a[self::FIELD_PRECHECK_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionPrecheckBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionPrecheckBehavior::FIELD_VALUE]); $a[self::FIELD_PRECHECK_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getRelatedAction())) { - $a[self::FIELD_RELATED_ACTION] = $vs; + $a[self::FIELD_RELATED_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ACTION][] = $v; + } } if (null !== ($v = $this->getRequiredBehavior())) { $a[self::FIELD_REQUIRED_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionRequiredBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionRequiredBehavior::FIELD_VALUE]); $a[self::FIELD_REQUIRED_BEHAVIOR_EXT] = $enc; } } if (null !== ($v = $this->getSelectionBehavior())) { $a[self::FIELD_SELECTION_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionSelectionBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionSelectionBehavior::FIELD_VALUE]); $a[self::FIELD_SELECTION_BEHAVIOR_EXT] = $enc; } } if (null !== ($v = $this->getTextEquivalent())) { $a[self::FIELD_TEXT_EQUIVALENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EQUIVALENT_EXT] = $enc; } } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -2792,8 +2957,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } @@ -2801,11 +2968,20 @@ public function jsonSerialize() $a[self::FIELD_TRANSFORM] = $v; } if ([] !== ($vs = $this->getTriggerDefinition())) { - $a[self::FIELD_TRIGGER_DEFINITION] = $vs; + $a[self::FIELD_TRIGGER_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TRIGGER_DEFINITION][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php index 026034d457..c6c150d997 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRPlanDefinitionCondition extends FHIRBackboneElement const FIELD_LANGUAGE_EXT = '_language'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -160,68 +160,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $ext = []; } - } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRActionConditionKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRActionConditionKind([FHIRActionConditionKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRActionConditionKind(array_merge($ext, $data[self::FIELD_KIND]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; } else { - $this->setKind(new FHIRActionConditionKind($data[self::FIELD_KIND])); + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRString) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionConditionKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRActionConditionKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRActionConditionKind([FHIRActionConditionKind::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKind(new FHIRActionConditionKind($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; } else { - $this->setLanguage(new FHIRString($data[self::FIELD_LANGUAGE])); + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRString($ext)); } } } @@ -397,8 +425,8 @@ public function setLanguage($language = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -514,32 +542,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionConditionKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionConditionKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php index bd36d892d3..58208ffebc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRPlanDefinitionDynamicValue extends FHIRBackboneElement const FIELD_PATH_EXT = '_path'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -160,68 +160,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $ext = []; } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRString) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; } else { - $this->setLanguage(new FHIRString($data[self::FIELD_LANGUAGE])); + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } } @@ -407,8 +435,8 @@ public function setPath($path = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -532,32 +560,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php index 92d702bb3c..e1b4ea1b97 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRPlanDefinitionGoal extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -633,8 +633,8 @@ public function setTarget(array $target = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -764,7 +764,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAddresses())) { - $a[self::FIELD_ADDRESSES] = $vs; + $a[self::FIELD_ADDRESSES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESSES][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -773,7 +779,13 @@ public function jsonSerialize() $a[self::FIELD_DESCRIPTION] = $v; } if ([] !== ($vs = $this->getDocumentation())) { - $a[self::FIELD_DOCUMENTATION] = $vs; + $a[self::FIELD_DOCUMENTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENTATION][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v; @@ -782,7 +794,16 @@ public function jsonSerialize() $a[self::FIELD_START] = $v; } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php index 3dc4153e9e..b1b226e6cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRPlanDefinitionParticipant extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -139,20 +139,27 @@ public function __construct($data = null) $this->setRole(new FHIRCodeableConcept($data[self::FIELD_ROLE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRActionParticipantType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRActionParticipantType([FHIRActionParticipantType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRActionParticipantType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRActionParticipantType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionParticipantType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRActionParticipantType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRActionParticipantType([FHIRActionParticipantType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRActionParticipantType($ext)); } } } @@ -242,8 +249,8 @@ public function setType(FHIRActionParticipantType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -326,11 +333,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionParticipantType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionParticipantType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php index 30d77880fd..9a6ca4e502 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRPlanDefinitionRelatedAction extends FHIRBackboneElement const FIELD_RELATIONSHIP_EXT = '_relationship'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -163,20 +163,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION_ID])) { - $ext = (isset($data[self::FIELD_ACTION_ID_EXT]) && is_array($data[self::FIELD_ACTION_ID_EXT])) - ? $data[self::FIELD_ACTION_ID_EXT] - : null; - if ($data[self::FIELD_ACTION_ID] instanceof FHIRId) { - $this->setActionId($data[self::FIELD_ACTION_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION_ID])) { - $this->setActionId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_ACTION_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION_ID])) { - $this->setActionId(new FHIRId(array_merge($ext, $data[self::FIELD_ACTION_ID]))); - } + if (isset($data[self::FIELD_ACTION_ID]) || isset($data[self::FIELD_ACTION_ID_EXT])) { + if (isset($data[self::FIELD_ACTION_ID])) { + $value = $data[self::FIELD_ACTION_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTION_ID_EXT]) && is_array($data[self::FIELD_ACTION_ID_EXT])) { + $ext = $data[self::FIELD_ACTION_ID_EXT]; } else { - $this->setActionId(new FHIRId($data[self::FIELD_ACTION_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setActionId($value); + } else if (is_array($value)) { + $this->setActionId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setActionId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActionId(new FHIRId($ext)); } } if (isset($data[self::FIELD_OFFSET_DURATION])) { @@ -193,20 +200,27 @@ public function __construct($data = null) $this->setOffsetRange(new FHIRRange($data[self::FIELD_OFFSET_RANGE])); } } - if (isset($data[self::FIELD_RELATIONSHIP])) { - $ext = (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) - ? $data[self::FIELD_RELATIONSHIP_EXT] - : null; - if ($data[self::FIELD_RELATIONSHIP] instanceof FHIRActionRelationshipType) { - $this->setRelationship($data[self::FIELD_RELATIONSHIP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRActionRelationshipType([FHIRActionRelationshipType::FIELD_VALUE => $data[self::FIELD_RELATIONSHIP]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRActionRelationshipType(array_merge($ext, $data[self::FIELD_RELATIONSHIP]))); - } + if (isset($data[self::FIELD_RELATIONSHIP]) || isset($data[self::FIELD_RELATIONSHIP_EXT])) { + if (isset($data[self::FIELD_RELATIONSHIP])) { + $value = $data[self::FIELD_RELATIONSHIP]; } else { - $this->setRelationship(new FHIRActionRelationshipType($data[self::FIELD_RELATIONSHIP])); + $value = null; + } + if (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) { + $ext = $data[self::FIELD_RELATIONSHIP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionRelationshipType) { + $this->setRelationship($value); + } else if (is_array($value)) { + $this->setRelationship(new FHIRActionRelationshipType(array_merge($ext, $value))); + } else { + $this->setRelationship(new FHIRActionRelationshipType([FHIRActionRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelationship(new FHIRActionRelationshipType($ext)); } } } @@ -372,8 +386,8 @@ public function setRelationship(FHIRActionRelationshipType $relationship = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -473,8 +487,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActionId())) { $a[self::FIELD_ACTION_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_ACTION_ID_EXT] = $enc; } } @@ -486,11 +502,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionRelationshipType::FIELD_VALUE]); $a[self::FIELD_RELATIONSHIP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php index b5c659dc6a..dfff28ed90 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRPlanDefinitionTarget extends FHIRBackboneElement const FIELD_MEASURE = 'measure'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -444,8 +444,8 @@ public function setMeasure(FHIRCodeableConcept $measure = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -556,6 +556,9 @@ public function jsonSerialize() if (null !== ($v = $this->getMeasure())) { $a[self::FIELD_MEASURE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php index 5b11d4cc12..281f0aebcb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRPractitionerQualification extends FHIRBackboneElement const FIELD_PERIOD = 'period'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -370,8 +370,8 @@ public function setPeriod(FHIRPeriod $period = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -472,7 +472,13 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIssuer())) { $a[self::FIELD_ISSUER] = $v; @@ -480,6 +486,9 @@ public function jsonSerialize() if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php index c6d5adb882..53af37e70c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRPractitionerRoleAvailableTime extends FHIRBackboneElement const FIELD_DAYS_OF_WEEK_EXT = '_daysOfWeek'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -156,81 +156,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALL_DAY])) { - $ext = (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) - ? $data[self::FIELD_ALL_DAY_EXT] - : null; - if ($data[self::FIELD_ALL_DAY] instanceof FHIRBoolean) { - $this->setAllDay($data[self::FIELD_ALL_DAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ALL_DAY]] + $ext)); - } else if (is_array($data[self::FIELD_ALL_DAY])) { - $this->setAllDay(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ALL_DAY]))); - } + if (isset($data[self::FIELD_ALL_DAY]) || isset($data[self::FIELD_ALL_DAY_EXT])) { + if (isset($data[self::FIELD_ALL_DAY])) { + $value = $data[self::FIELD_ALL_DAY]; } else { - $this->setAllDay(new FHIRBoolean($data[self::FIELD_ALL_DAY])); + $value = null; } - } - if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_END_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_END_TIME] instanceof FHIRTime) { - $this->setAvailableEndTime($data[self::FIELD_AVAILABLE_END_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_END_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_END_TIME])) { - $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_END_TIME]))); - } + if (isset($data[self::FIELD_ALL_DAY_EXT]) && is_array($data[self::FIELD_ALL_DAY_EXT])) { + $ext = $data[self::FIELD_ALL_DAY_EXT]; } else { - $this->setAvailableEndTime(new FHIRTime($data[self::FIELD_AVAILABLE_END_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAllDay($value); + } else if (is_array($value)) { + $this->setAllDay(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAllDay(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAllDay(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { - $ext = (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) - ? $data[self::FIELD_AVAILABLE_START_TIME_EXT] - : null; - if ($data[self::FIELD_AVAILABLE_START_TIME] instanceof FHIRTime) { - $this->setAvailableStartTime($data[self::FIELD_AVAILABLE_START_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_AVAILABLE_START_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABLE_START_TIME])) { - $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $data[self::FIELD_AVAILABLE_START_TIME]))); + if (isset($data[self::FIELD_AVAILABLE_END_TIME]) || isset($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_END_TIME])) { + $value = $data[self::FIELD_AVAILABLE_END_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_END_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_END_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_END_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableEndTime($value); + } else if (is_array($value)) { + $this->setAvailableEndTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableEndTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAvailableEndTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME]) || isset($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + if (isset($data[self::FIELD_AVAILABLE_START_TIME])) { + $value = $data[self::FIELD_AVAILABLE_START_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABLE_START_TIME_EXT]) && is_array($data[self::FIELD_AVAILABLE_START_TIME_EXT])) { + $ext = $data[self::FIELD_AVAILABLE_START_TIME_EXT]; } else { - $this->setAvailableStartTime(new FHIRTime($data[self::FIELD_AVAILABLE_START_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAvailableStartTime($value); + } else if (is_array($value)) { + $this->setAvailableStartTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAvailableStartTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailableStartTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_DAYS_OF_WEEK])) { - $ext = (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) - ? $data[self::FIELD_DAYS_OF_WEEK_EXT] - : null; - if (is_array($data[self::FIELD_DAYS_OF_WEEK])) { - foreach($data[self::FIELD_DAYS_OF_WEEK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DAYS_OF_WEEK]) || isset($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + if (isset($data[self::FIELD_DAYS_OF_WEEK])) { + $value = $data[self::FIELD_DAYS_OF_WEEK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DAYS_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAYS_OF_WEEK_EXT])) { + $ext = $data[self::FIELD_DAYS_OF_WEEK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDaysOfWeek) { + $this->addDaysOfWeek($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($v, $iext))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($v)); } + } elseif (is_array($value)) { + $this->addDaysOfWeek(new FHIRDaysOfWeek(array_merge($ext, $value))); + } else { + $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDaysOfWeek(new FHIRDaysOfWeek($iext)); } - } elseif ($data[self::FIELD_DAYS_OF_WEEK] instanceof FHIRDaysOfWeek) { - $this->addDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DAYS_OF_WEEK])) { - $this->addDaysOfWeek(new FHIRDaysOfWeek([FHIRDaysOfWeek::FIELD_VALUE => $data[self::FIELD_DAYS_OF_WEEK]] + $ext)); - } else { - $this->addDaysOfWeek(new FHIRDaysOfWeek($data[self::FIELD_DAYS_OF_WEEK])); } } } @@ -425,8 +455,8 @@ public function setDaysOfWeek(array $daysOfWeek = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -549,39 +579,56 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAllDay())) { $a[self::FIELD_ALL_DAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ALL_DAY_EXT] = $enc; } } if (null !== ($v = $this->getAvailableEndTime())) { $a[self::FIELD_AVAILABLE_END_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_END_TIME_EXT] = $enc; } } if (null !== ($v = $this->getAvailableStartTime())) { $a[self::FIELD_AVAILABLE_START_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_AVAILABLE_START_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getDaysOfWeek())) { $a[self::FIELD_DAYS_OF_WEEK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DAYS_OF_WEEK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDaysOfWeek::FIELD_VALUE]) || array_key_exists(FHIRDaysOfWeek::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DAYS_OF_WEEK_EXT][] = null; + unset($enc[FHIRDaysOfWeek::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DAYS_OF_WEEK_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php index 99c296c7e4..e4ef1f19a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPractitionerRoleNotAvailable extends FHIRBackboneElement const FIELD_DURING = 'during'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DURING])) { @@ -251,8 +258,8 @@ public function setDuring(FHIRPeriod $during = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -340,14 +347,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDuring())) { $a[self::FIELD_DURING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php index 8ced6e6308..cec8b89c5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRProcedureFocalDevice extends FHIRBackboneElement const FIELD_MANIPULATED = 'manipulated'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -234,8 +234,8 @@ public function setManipulated(FHIRReference $manipulated = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -319,6 +319,9 @@ public function jsonSerialize() if (null !== ($v = $this->getManipulated())) { $a[self::FIELD_MANIPULATED] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php index 53f92e7ea9..b5b64ca752 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRProcedurePerformer extends FHIRBackboneElement const FIELD_ROLE = 'role'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -283,8 +283,8 @@ public function setRole(FHIRCodeableConcept $role = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -377,6 +377,9 @@ public function jsonSerialize() if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequester.php index 3be7bf3b86..782d4807a2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRProcedureRequestRequester extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -229,8 +229,8 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -314,6 +314,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php index 7a97f72e82..1d18216a28 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRProcessRequestItem extends FHIRBackboneElement const FIELD_SEQUENCE_LINK_ID_EXT = '_sequenceLinkId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -117,20 +117,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { - $ext = (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) - ? $data[self::FIELD_SEQUENCE_LINK_ID_EXT] - : null; - if ($data[self::FIELD_SEQUENCE_LINK_ID] instanceof FHIRInteger) { - $this->setSequenceLinkId($data[self::FIELD_SEQUENCE_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SEQUENCE_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE_LINK_ID])) { - $this->setSequenceLinkId(new FHIRInteger(array_merge($ext, $data[self::FIELD_SEQUENCE_LINK_ID]))); - } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID]) || isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + if (isset($data[self::FIELD_SEQUENCE_LINK_ID])) { + $value = $data[self::FIELD_SEQUENCE_LINK_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_LINK_ID_EXT]) && is_array($data[self::FIELD_SEQUENCE_LINK_ID_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_LINK_ID_EXT]; } else { - $this->setSequenceLinkId(new FHIRInteger($data[self::FIELD_SEQUENCE_LINK_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setSequenceLinkId($value); + } else if (is_array($value)) { + $this->setSequenceLinkId(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setSequenceLinkId(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequenceLinkId(new FHIRInteger($ext)); } } } @@ -198,8 +205,8 @@ public function setSequenceLinkId($sequenceLinkId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -281,11 +288,16 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getSequenceLinkId())) { $a[self::FIELD_SEQUENCE_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_LINK_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNote.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNote.php index 6b6ef3e009..f97f9d1075 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNote.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNote.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRProcessResponseProcessNote extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -251,8 +258,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -340,14 +347,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php index 3e817743e7..037d2db12d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRProvenanceAgent extends FHIRBackboneElement const FIELD_WHO_URI_EXT = '_whoUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -197,20 +197,27 @@ public function __construct($data = null) $this->setOnBehalfOfReference(new FHIRReference($data[self::FIELD_ON_BEHALF_OF_REFERENCE])); } } - if (isset($data[self::FIELD_ON_BEHALF_OF_URI])) { - $ext = (isset($data[self::FIELD_ON_BEHALF_OF_URI_EXT]) && is_array($data[self::FIELD_ON_BEHALF_OF_URI_EXT])) - ? $data[self::FIELD_ON_BEHALF_OF_URI_EXT] - : null; - if ($data[self::FIELD_ON_BEHALF_OF_URI] instanceof FHIRUri) { - $this->setOnBehalfOfUri($data[self::FIELD_ON_BEHALF_OF_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ON_BEHALF_OF_URI])) { - $this->setOnBehalfOfUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ON_BEHALF_OF_URI]] + $ext)); - } else if (is_array($data[self::FIELD_ON_BEHALF_OF_URI])) { - $this->setOnBehalfOfUri(new FHIRUri(array_merge($ext, $data[self::FIELD_ON_BEHALF_OF_URI]))); - } + if (isset($data[self::FIELD_ON_BEHALF_OF_URI]) || isset($data[self::FIELD_ON_BEHALF_OF_URI_EXT])) { + if (isset($data[self::FIELD_ON_BEHALF_OF_URI])) { + $value = $data[self::FIELD_ON_BEHALF_OF_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ON_BEHALF_OF_URI_EXT]) && is_array($data[self::FIELD_ON_BEHALF_OF_URI_EXT])) { + $ext = $data[self::FIELD_ON_BEHALF_OF_URI_EXT]; } else { - $this->setOnBehalfOfUri(new FHIRUri($data[self::FIELD_ON_BEHALF_OF_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setOnBehalfOfUri($value); + } else if (is_array($value)) { + $this->setOnBehalfOfUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setOnBehalfOfUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnBehalfOfUri(new FHIRUri($ext)); } } if (isset($data[self::FIELD_RELATED_AGENT_TYPE])) { @@ -245,20 +252,27 @@ public function __construct($data = null) $this->setWhoReference(new FHIRReference($data[self::FIELD_WHO_REFERENCE])); } } - if (isset($data[self::FIELD_WHO_URI])) { - $ext = (isset($data[self::FIELD_WHO_URI_EXT]) && is_array($data[self::FIELD_WHO_URI_EXT])) - ? $data[self::FIELD_WHO_URI_EXT] - : null; - if ($data[self::FIELD_WHO_URI] instanceof FHIRUri) { - $this->setWhoUri($data[self::FIELD_WHO_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHO_URI])) { - $this->setWhoUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_WHO_URI]] + $ext)); - } else if (is_array($data[self::FIELD_WHO_URI])) { - $this->setWhoUri(new FHIRUri(array_merge($ext, $data[self::FIELD_WHO_URI]))); - } + if (isset($data[self::FIELD_WHO_URI]) || isset($data[self::FIELD_WHO_URI_EXT])) { + if (isset($data[self::FIELD_WHO_URI])) { + $value = $data[self::FIELD_WHO_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHO_URI_EXT]) && is_array($data[self::FIELD_WHO_URI_EXT])) { + $ext = $data[self::FIELD_WHO_URI_EXT]; } else { - $this->setWhoUri(new FHIRUri($data[self::FIELD_WHO_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setWhoUri($value); + } else if (is_array($value)) { + $this->setWhoUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setWhoUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhoUri(new FHIRUri($ext)); } } } @@ -518,8 +532,8 @@ public function setWhoUri($whoUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -649,8 +663,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnBehalfOfUri())) { $a[self::FIELD_ON_BEHALF_OF_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ON_BEHALF_OF_URI_EXT] = $enc; } } @@ -658,18 +674,29 @@ public function jsonSerialize() $a[self::FIELD_RELATED_AGENT_TYPE] = $v; } if ([] !== ($vs = $this->getRole())) { - $a[self::FIELD_ROLE] = $vs; + $a[self::FIELD_ROLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ROLE][] = $v; + } } if (null !== ($v = $this->getWhoReference())) { $a[self::FIELD_WHO_REFERENCE] = $v; } if (null !== ($v = $this->getWhoUri())) { $a[self::FIELD_WHO_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_WHO_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php index cd5062225a..0604cc68b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRProvenanceEntity extends FHIRBackboneElement const FIELD_WHAT_URI_EXT = '_whatUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Provenance of a resource is a record that describes entities and processes @@ -205,20 +205,27 @@ public function __construct($data = null) $this->addAgent(new FHIRProvenanceAgent($data[self::FIELD_AGENT])); } } - if (isset($data[self::FIELD_ROLE])) { - $ext = (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) - ? $data[self::FIELD_ROLE_EXT] - : null; - if ($data[self::FIELD_ROLE] instanceof FHIRProvenanceEntityRole) { - $this->setRole($data[self::FIELD_ROLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRProvenanceEntityRole([FHIRProvenanceEntityRole::FIELD_VALUE => $data[self::FIELD_ROLE]] + $ext)); - } else if (is_array($data[self::FIELD_ROLE])) { - $this->setRole(new FHIRProvenanceEntityRole(array_merge($ext, $data[self::FIELD_ROLE]))); - } + if (isset($data[self::FIELD_ROLE]) || isset($data[self::FIELD_ROLE_EXT])) { + if (isset($data[self::FIELD_ROLE])) { + $value = $data[self::FIELD_ROLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ROLE_EXT]) && is_array($data[self::FIELD_ROLE_EXT])) { + $ext = $data[self::FIELD_ROLE_EXT]; } else { - $this->setRole(new FHIRProvenanceEntityRole($data[self::FIELD_ROLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRProvenanceEntityRole) { + $this->setRole($value); + } else if (is_array($value)) { + $this->setRole(new FHIRProvenanceEntityRole(array_merge($ext, $value))); + } else { + $this->setRole(new FHIRProvenanceEntityRole([FHIRProvenanceEntityRole::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRole(new FHIRProvenanceEntityRole($ext)); } } if (isset($data[self::FIELD_WHAT_IDENTIFIER])) { @@ -235,20 +242,27 @@ public function __construct($data = null) $this->setWhatReference(new FHIRReference($data[self::FIELD_WHAT_REFERENCE])); } } - if (isset($data[self::FIELD_WHAT_URI])) { - $ext = (isset($data[self::FIELD_WHAT_URI_EXT]) && is_array($data[self::FIELD_WHAT_URI_EXT])) - ? $data[self::FIELD_WHAT_URI_EXT] - : null; - if ($data[self::FIELD_WHAT_URI] instanceof FHIRUri) { - $this->setWhatUri($data[self::FIELD_WHAT_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHAT_URI])) { - $this->setWhatUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_WHAT_URI]] + $ext)); - } else if (is_array($data[self::FIELD_WHAT_URI])) { - $this->setWhatUri(new FHIRUri(array_merge($ext, $data[self::FIELD_WHAT_URI]))); - } + if (isset($data[self::FIELD_WHAT_URI]) || isset($data[self::FIELD_WHAT_URI_EXT])) { + if (isset($data[self::FIELD_WHAT_URI])) { + $value = $data[self::FIELD_WHAT_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHAT_URI_EXT]) && is_array($data[self::FIELD_WHAT_URI_EXT])) { + $ext = $data[self::FIELD_WHAT_URI_EXT]; } else { - $this->setWhatUri(new FHIRUri($data[self::FIELD_WHAT_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setWhatUri($value); + } else if (is_array($value)) { + $this->setWhatUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setWhatUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhatUri(new FHIRUri($ext)); } } } @@ -493,8 +507,8 @@ public function setWhatUri($whatUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -606,12 +620,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if (null !== ($v = $this->getRole())) { $a[self::FIELD_ROLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRProvenanceEntityRole::FIELD_VALUE, $enc)))) { + unset($enc[FHIRProvenanceEntityRole::FIELD_VALUE]); $a[self::FIELD_ROLE_EXT] = $enc; } } @@ -623,11 +645,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getWhatUri())) { $a[self::FIELD_WHAT_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_WHAT_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php index e8582f32fc..877bcb6851 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRQuestionnaireEnableWhen extends FHIRBackboneElement const FIELD_QUESTION_EXT = '_question'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * For referring to data content defined in other formats. @@ -319,20 +319,27 @@ public function __construct($data = null) $this->setAnswerAttachment(new FHIRAttachment($data[self::FIELD_ANSWER_ATTACHMENT])); } } - if (isset($data[self::FIELD_ANSWER_BOOLEAN])) { - $ext = (isset($data[self::FIELD_ANSWER_BOOLEAN_EXT]) && is_array($data[self::FIELD_ANSWER_BOOLEAN_EXT])) - ? $data[self::FIELD_ANSWER_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_ANSWER_BOOLEAN] instanceof FHIRBoolean) { - $this->setAnswerBoolean($data[self::FIELD_ANSWER_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_BOOLEAN])) { - $this->setAnswerBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ANSWER_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_BOOLEAN])) { - $this->setAnswerBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ANSWER_BOOLEAN]))); - } + if (isset($data[self::FIELD_ANSWER_BOOLEAN]) || isset($data[self::FIELD_ANSWER_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_ANSWER_BOOLEAN])) { + $value = $data[self::FIELD_ANSWER_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_BOOLEAN_EXT]) && is_array($data[self::FIELD_ANSWER_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_ANSWER_BOOLEAN_EXT]; } else { - $this->setAnswerBoolean(new FHIRBoolean($data[self::FIELD_ANSWER_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAnswerBoolean($value); + } else if (is_array($value)) { + $this->setAnswerBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAnswerBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ANSWER_CODING])) { @@ -342,68 +349,96 @@ public function __construct($data = null) $this->setAnswerCoding(new FHIRCoding($data[self::FIELD_ANSWER_CODING])); } } - if (isset($data[self::FIELD_ANSWER_DATE])) { - $ext = (isset($data[self::FIELD_ANSWER_DATE_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_EXT])) - ? $data[self::FIELD_ANSWER_DATE_EXT] - : null; - if ($data[self::FIELD_ANSWER_DATE] instanceof FHIRDate) { - $this->setAnswerDate($data[self::FIELD_ANSWER_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_DATE])) { - $this->setAnswerDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_ANSWER_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_DATE])) { - $this->setAnswerDate(new FHIRDate(array_merge($ext, $data[self::FIELD_ANSWER_DATE]))); - } + if (isset($data[self::FIELD_ANSWER_DATE]) || isset($data[self::FIELD_ANSWER_DATE_EXT])) { + if (isset($data[self::FIELD_ANSWER_DATE])) { + $value = $data[self::FIELD_ANSWER_DATE]; } else { - $this->setAnswerDate(new FHIRDate($data[self::FIELD_ANSWER_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_ANSWER_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ANSWER_DATE_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_TIME_EXT])) - ? $data[self::FIELD_ANSWER_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ANSWER_DATE_TIME] instanceof FHIRDateTime) { - $this->setAnswerDateTime($data[self::FIELD_ANSWER_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_DATE_TIME])) { - $this->setAnswerDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ANSWER_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_DATE_TIME])) { - $this->setAnswerDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ANSWER_DATE_TIME]))); - } + if (isset($data[self::FIELD_ANSWER_DATE_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_EXT])) { + $ext = $data[self::FIELD_ANSWER_DATE_EXT]; } else { - $this->setAnswerDateTime(new FHIRDateTime($data[self::FIELD_ANSWER_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_ANSWER_DECIMAL])) { - $ext = (isset($data[self::FIELD_ANSWER_DECIMAL_EXT]) && is_array($data[self::FIELD_ANSWER_DECIMAL_EXT])) - ? $data[self::FIELD_ANSWER_DECIMAL_EXT] - : null; - if ($data[self::FIELD_ANSWER_DECIMAL] instanceof FHIRDecimal) { - $this->setAnswerDecimal($data[self::FIELD_ANSWER_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_DECIMAL])) { - $this->setAnswerDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ANSWER_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_DECIMAL])) { - $this->setAnswerDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ANSWER_DECIMAL]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setAnswerDate($value); + } else if (is_array($value)) { + $this->setAnswerDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setAnswerDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAnswerDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_ANSWER_DATE_TIME]) || isset($data[self::FIELD_ANSWER_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ANSWER_DATE_TIME])) { + $value = $data[self::FIELD_ANSWER_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_DATE_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ANSWER_DATE_TIME_EXT]; } else { - $this->setAnswerDecimal(new FHIRDecimal($data[self::FIELD_ANSWER_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAnswerDateTime($value); + } else if (is_array($value)) { + $this->setAnswerDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAnswerDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerDateTime(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_ANSWER_INTEGER])) { - $ext = (isset($data[self::FIELD_ANSWER_INTEGER_EXT]) && is_array($data[self::FIELD_ANSWER_INTEGER_EXT])) - ? $data[self::FIELD_ANSWER_INTEGER_EXT] - : null; - if ($data[self::FIELD_ANSWER_INTEGER] instanceof FHIRInteger) { - $this->setAnswerInteger($data[self::FIELD_ANSWER_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_INTEGER])) { - $this->setAnswerInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_ANSWER_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_INTEGER])) { - $this->setAnswerInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_ANSWER_INTEGER]))); + if (isset($data[self::FIELD_ANSWER_DECIMAL]) || isset($data[self::FIELD_ANSWER_DECIMAL_EXT])) { + if (isset($data[self::FIELD_ANSWER_DECIMAL])) { + $value = $data[self::FIELD_ANSWER_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_DECIMAL_EXT]) && is_array($data[self::FIELD_ANSWER_DECIMAL_EXT])) { + $ext = $data[self::FIELD_ANSWER_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAnswerDecimal($value); + } else if (is_array($value)) { + $this->setAnswerDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAnswerDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAnswerDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_ANSWER_INTEGER]) || isset($data[self::FIELD_ANSWER_INTEGER_EXT])) { + if (isset($data[self::FIELD_ANSWER_INTEGER])) { + $value = $data[self::FIELD_ANSWER_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_INTEGER_EXT]) && is_array($data[self::FIELD_ANSWER_INTEGER_EXT])) { + $ext = $data[self::FIELD_ANSWER_INTEGER_EXT]; } else { - $this->setAnswerInteger(new FHIRInteger($data[self::FIELD_ANSWER_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setAnswerInteger($value); + } else if (is_array($value)) { + $this->setAnswerInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setAnswerInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_ANSWER_QUANTITY])) { @@ -420,84 +455,119 @@ public function __construct($data = null) $this->setAnswerReference(new FHIRReference($data[self::FIELD_ANSWER_REFERENCE])); } } - if (isset($data[self::FIELD_ANSWER_STRING])) { - $ext = (isset($data[self::FIELD_ANSWER_STRING_EXT]) && is_array($data[self::FIELD_ANSWER_STRING_EXT])) - ? $data[self::FIELD_ANSWER_STRING_EXT] - : null; - if ($data[self::FIELD_ANSWER_STRING] instanceof FHIRString) { - $this->setAnswerString($data[self::FIELD_ANSWER_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_STRING])) { - $this->setAnswerString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ANSWER_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_STRING])) { - $this->setAnswerString(new FHIRString(array_merge($ext, $data[self::FIELD_ANSWER_STRING]))); - } + if (isset($data[self::FIELD_ANSWER_STRING]) || isset($data[self::FIELD_ANSWER_STRING_EXT])) { + if (isset($data[self::FIELD_ANSWER_STRING])) { + $value = $data[self::FIELD_ANSWER_STRING]; } else { - $this->setAnswerString(new FHIRString($data[self::FIELD_ANSWER_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_ANSWER_TIME])) { - $ext = (isset($data[self::FIELD_ANSWER_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_TIME_EXT])) - ? $data[self::FIELD_ANSWER_TIME_EXT] - : null; - if ($data[self::FIELD_ANSWER_TIME] instanceof FHIRTime) { - $this->setAnswerTime($data[self::FIELD_ANSWER_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_TIME])) { - $this->setAnswerTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_ANSWER_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_TIME])) { - $this->setAnswerTime(new FHIRTime(array_merge($ext, $data[self::FIELD_ANSWER_TIME]))); - } + if (isset($data[self::FIELD_ANSWER_STRING_EXT]) && is_array($data[self::FIELD_ANSWER_STRING_EXT])) { + $ext = $data[self::FIELD_ANSWER_STRING_EXT]; } else { - $this->setAnswerTime(new FHIRTime($data[self::FIELD_ANSWER_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_ANSWER_URI])) { - $ext = (isset($data[self::FIELD_ANSWER_URI_EXT]) && is_array($data[self::FIELD_ANSWER_URI_EXT])) - ? $data[self::FIELD_ANSWER_URI_EXT] - : null; - if ($data[self::FIELD_ANSWER_URI] instanceof FHIRUri) { - $this->setAnswerUri($data[self::FIELD_ANSWER_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ANSWER_URI])) { - $this->setAnswerUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ANSWER_URI]] + $ext)); - } else if (is_array($data[self::FIELD_ANSWER_URI])) { - $this->setAnswerUri(new FHIRUri(array_merge($ext, $data[self::FIELD_ANSWER_URI]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAnswerString($value); + } else if (is_array($value)) { + $this->setAnswerString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAnswerString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setAnswerUri(new FHIRUri($data[self::FIELD_ANSWER_URI])); + } else if ([] !== $ext) { + $this->setAnswerString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_HAS_ANSWER])) { - $ext = (isset($data[self::FIELD_HAS_ANSWER_EXT]) && is_array($data[self::FIELD_HAS_ANSWER_EXT])) - ? $data[self::FIELD_HAS_ANSWER_EXT] - : null; - if ($data[self::FIELD_HAS_ANSWER] instanceof FHIRBoolean) { - $this->setHasAnswer($data[self::FIELD_HAS_ANSWER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HAS_ANSWER])) { - $this->setHasAnswer(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_HAS_ANSWER]] + $ext)); - } else if (is_array($data[self::FIELD_HAS_ANSWER])) { - $this->setHasAnswer(new FHIRBoolean(array_merge($ext, $data[self::FIELD_HAS_ANSWER]))); + if (isset($data[self::FIELD_ANSWER_TIME]) || isset($data[self::FIELD_ANSWER_TIME_EXT])) { + if (isset($data[self::FIELD_ANSWER_TIME])) { + $value = $data[self::FIELD_ANSWER_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ANSWER_TIME_EXT]) && is_array($data[self::FIELD_ANSWER_TIME_EXT])) { + $ext = $data[self::FIELD_ANSWER_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setAnswerTime($value); + } else if (is_array($value)) { + $this->setAnswerTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setAnswerTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAnswerTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_ANSWER_URI]) || isset($data[self::FIELD_ANSWER_URI_EXT])) { + if (isset($data[self::FIELD_ANSWER_URI])) { + $value = $data[self::FIELD_ANSWER_URI]; } else { - $this->setHasAnswer(new FHIRBoolean($data[self::FIELD_HAS_ANSWER])); + $value = null; + } + if (isset($data[self::FIELD_ANSWER_URI_EXT]) && is_array($data[self::FIELD_ANSWER_URI_EXT])) { + $ext = $data[self::FIELD_ANSWER_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setAnswerUri($value); + } else if (is_array($value)) { + $this->setAnswerUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setAnswerUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAnswerUri(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_QUESTION])) { - $ext = (isset($data[self::FIELD_QUESTION_EXT]) && is_array($data[self::FIELD_QUESTION_EXT])) - ? $data[self::FIELD_QUESTION_EXT] - : null; - if ($data[self::FIELD_QUESTION] instanceof FHIRString) { - $this->setQuestion($data[self::FIELD_QUESTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUESTION])) { - $this->setQuestion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_QUESTION]] + $ext)); - } else if (is_array($data[self::FIELD_QUESTION])) { - $this->setQuestion(new FHIRString(array_merge($ext, $data[self::FIELD_QUESTION]))); + if (isset($data[self::FIELD_HAS_ANSWER]) || isset($data[self::FIELD_HAS_ANSWER_EXT])) { + if (isset($data[self::FIELD_HAS_ANSWER])) { + $value = $data[self::FIELD_HAS_ANSWER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HAS_ANSWER_EXT]) && is_array($data[self::FIELD_HAS_ANSWER_EXT])) { + $ext = $data[self::FIELD_HAS_ANSWER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setHasAnswer($value); + } else if (is_array($value)) { + $this->setHasAnswer(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setHasAnswer(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHasAnswer(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_QUESTION]) || isset($data[self::FIELD_QUESTION_EXT])) { + if (isset($data[self::FIELD_QUESTION])) { + $value = $data[self::FIELD_QUESTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUESTION_EXT]) && is_array($data[self::FIELD_QUESTION_EXT])) { + $ext = $data[self::FIELD_QUESTION_EXT]; } else { - $this->setQuestion(new FHIRString($data[self::FIELD_QUESTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setQuestion($value); + } else if (is_array($value)) { + $this->setQuestion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setQuestion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQuestion(new FHIRString($ext)); } } } @@ -1063,8 +1133,8 @@ public function setQuestion($question = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1299,8 +1369,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getAnswerBoolean())) { $a[self::FIELD_ANSWER_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ANSWER_BOOLEAN_EXT] = $enc; } } @@ -1309,29 +1381,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getAnswerDate())) { $a[self::FIELD_ANSWER_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_ANSWER_DATE_EXT] = $enc; } } if (null !== ($v = $this->getAnswerDateTime())) { $a[self::FIELD_ANSWER_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ANSWER_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getAnswerDecimal())) { $a[self::FIELD_ANSWER_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ANSWER_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getAnswerInteger())) { $a[self::FIELD_ANSWER_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_ANSWER_INTEGER_EXT] = $enc; } } @@ -1343,39 +1423,52 @@ public function jsonSerialize() } if (null !== ($v = $this->getAnswerString())) { $a[self::FIELD_ANSWER_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ANSWER_STRING_EXT] = $enc; } } if (null !== ($v = $this->getAnswerTime())) { $a[self::FIELD_ANSWER_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_ANSWER_TIME_EXT] = $enc; } } if (null !== ($v = $this->getAnswerUri())) { $a[self::FIELD_ANSWER_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ANSWER_URI_EXT] = $enc; } } if (null !== ($v = $this->getHasAnswer())) { $a[self::FIELD_HAS_ANSWER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_HAS_ANSWER_EXT] = $enc; } } if (null !== ($v = $this->getQuestion())) { $a[self::FIELD_QUESTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_QUESTION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php index 2a528f835e..ed08d4f43f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIRQuestionnaireItem extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -498,20 +498,27 @@ public function __construct($data = null) $this->addCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRUri) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRUri($data[self::FIELD_DEFINITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRUri($ext)); } } if (isset($data[self::FIELD_ENABLE_WHEN])) { @@ -539,20 +546,27 @@ public function __construct($data = null) $this->setInitialAttachment(new FHIRAttachment($data[self::FIELD_INITIAL_ATTACHMENT])); } } - if (isset($data[self::FIELD_INITIAL_BOOLEAN])) { - $ext = (isset($data[self::FIELD_INITIAL_BOOLEAN_EXT]) && is_array($data[self::FIELD_INITIAL_BOOLEAN_EXT])) - ? $data[self::FIELD_INITIAL_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_INITIAL_BOOLEAN] instanceof FHIRBoolean) { - $this->setInitialBoolean($data[self::FIELD_INITIAL_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL_BOOLEAN])) { - $this->setInitialBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INITIAL_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL_BOOLEAN])) { - $this->setInitialBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INITIAL_BOOLEAN]))); - } + if (isset($data[self::FIELD_INITIAL_BOOLEAN]) || isset($data[self::FIELD_INITIAL_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_INITIAL_BOOLEAN])) { + $value = $data[self::FIELD_INITIAL_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INITIAL_BOOLEAN_EXT]) && is_array($data[self::FIELD_INITIAL_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_INITIAL_BOOLEAN_EXT]; } else { - $this->setInitialBoolean(new FHIRBoolean($data[self::FIELD_INITIAL_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInitialBoolean($value); + } else if (is_array($value)) { + $this->setInitialBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInitialBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInitialBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_INITIAL_CODING])) { @@ -562,68 +576,96 @@ public function __construct($data = null) $this->setInitialCoding(new FHIRCoding($data[self::FIELD_INITIAL_CODING])); } } - if (isset($data[self::FIELD_INITIAL_DATE])) { - $ext = (isset($data[self::FIELD_INITIAL_DATE_EXT]) && is_array($data[self::FIELD_INITIAL_DATE_EXT])) - ? $data[self::FIELD_INITIAL_DATE_EXT] - : null; - if ($data[self::FIELD_INITIAL_DATE] instanceof FHIRDate) { - $this->setInitialDate($data[self::FIELD_INITIAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL_DATE])) { - $this->setInitialDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_INITIAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL_DATE])) { - $this->setInitialDate(new FHIRDate(array_merge($ext, $data[self::FIELD_INITIAL_DATE]))); - } + if (isset($data[self::FIELD_INITIAL_DATE]) || isset($data[self::FIELD_INITIAL_DATE_EXT])) { + if (isset($data[self::FIELD_INITIAL_DATE])) { + $value = $data[self::FIELD_INITIAL_DATE]; } else { - $this->setInitialDate(new FHIRDate($data[self::FIELD_INITIAL_DATE])); - } - } - if (isset($data[self::FIELD_INITIAL_DATE_TIME])) { - $ext = (isset($data[self::FIELD_INITIAL_DATE_TIME_EXT]) && is_array($data[self::FIELD_INITIAL_DATE_TIME_EXT])) - ? $data[self::FIELD_INITIAL_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_INITIAL_DATE_TIME] instanceof FHIRDateTime) { - $this->setInitialDateTime($data[self::FIELD_INITIAL_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL_DATE_TIME])) { - $this->setInitialDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_INITIAL_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL_DATE_TIME])) { - $this->setInitialDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_INITIAL_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_INITIAL_DATE_EXT]) && is_array($data[self::FIELD_INITIAL_DATE_EXT])) { + $ext = $data[self::FIELD_INITIAL_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setInitialDate($value); + } else if (is_array($value)) { + $this->setInitialDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setInitialDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInitialDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_INITIAL_DATE_TIME]) || isset($data[self::FIELD_INITIAL_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_INITIAL_DATE_TIME])) { + $value = $data[self::FIELD_INITIAL_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INITIAL_DATE_TIME_EXT]) && is_array($data[self::FIELD_INITIAL_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_INITIAL_DATE_TIME_EXT]; } else { - $this->setInitialDateTime(new FHIRDateTime($data[self::FIELD_INITIAL_DATE_TIME])); - } - } - if (isset($data[self::FIELD_INITIAL_DECIMAL])) { - $ext = (isset($data[self::FIELD_INITIAL_DECIMAL_EXT]) && is_array($data[self::FIELD_INITIAL_DECIMAL_EXT])) - ? $data[self::FIELD_INITIAL_DECIMAL_EXT] - : null; - if ($data[self::FIELD_INITIAL_DECIMAL] instanceof FHIRDecimal) { - $this->setInitialDecimal($data[self::FIELD_INITIAL_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL_DECIMAL])) { - $this->setInitialDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_INITIAL_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL_DECIMAL])) { - $this->setInitialDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_INITIAL_DECIMAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setInitialDateTime($value); + } else if (is_array($value)) { + $this->setInitialDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setInitialDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInitialDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_INITIAL_DECIMAL]) || isset($data[self::FIELD_INITIAL_DECIMAL_EXT])) { + if (isset($data[self::FIELD_INITIAL_DECIMAL])) { + $value = $data[self::FIELD_INITIAL_DECIMAL]; } else { - $this->setInitialDecimal(new FHIRDecimal($data[self::FIELD_INITIAL_DECIMAL])); - } - } - if (isset($data[self::FIELD_INITIAL_INTEGER])) { - $ext = (isset($data[self::FIELD_INITIAL_INTEGER_EXT]) && is_array($data[self::FIELD_INITIAL_INTEGER_EXT])) - ? $data[self::FIELD_INITIAL_INTEGER_EXT] - : null; - if ($data[self::FIELD_INITIAL_INTEGER] instanceof FHIRInteger) { - $this->setInitialInteger($data[self::FIELD_INITIAL_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL_INTEGER])) { - $this->setInitialInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_INITIAL_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL_INTEGER])) { - $this->setInitialInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_INITIAL_INTEGER]))); + $value = null; + } + if (isset($data[self::FIELD_INITIAL_DECIMAL_EXT]) && is_array($data[self::FIELD_INITIAL_DECIMAL_EXT])) { + $ext = $data[self::FIELD_INITIAL_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setInitialDecimal($value); + } else if (is_array($value)) { + $this->setInitialDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setInitialDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInitialDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_INITIAL_INTEGER]) || isset($data[self::FIELD_INITIAL_INTEGER_EXT])) { + if (isset($data[self::FIELD_INITIAL_INTEGER])) { + $value = $data[self::FIELD_INITIAL_INTEGER]; } else { - $this->setInitialInteger(new FHIRInteger($data[self::FIELD_INITIAL_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_INITIAL_INTEGER_EXT]) && is_array($data[self::FIELD_INITIAL_INTEGER_EXT])) { + $ext = $data[self::FIELD_INITIAL_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setInitialInteger($value); + } else if (is_array($value)) { + $this->setInitialInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setInitialInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInitialInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_INITIAL_QUANTITY])) { @@ -640,52 +682,73 @@ public function __construct($data = null) $this->setInitialReference(new FHIRReference($data[self::FIELD_INITIAL_REFERENCE])); } } - if (isset($data[self::FIELD_INITIAL_STRING])) { - $ext = (isset($data[self::FIELD_INITIAL_STRING_EXT]) && is_array($data[self::FIELD_INITIAL_STRING_EXT])) - ? $data[self::FIELD_INITIAL_STRING_EXT] - : null; - if ($data[self::FIELD_INITIAL_STRING] instanceof FHIRString) { - $this->setInitialString($data[self::FIELD_INITIAL_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL_STRING])) { - $this->setInitialString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INITIAL_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL_STRING])) { - $this->setInitialString(new FHIRString(array_merge($ext, $data[self::FIELD_INITIAL_STRING]))); - } + if (isset($data[self::FIELD_INITIAL_STRING]) || isset($data[self::FIELD_INITIAL_STRING_EXT])) { + if (isset($data[self::FIELD_INITIAL_STRING])) { + $value = $data[self::FIELD_INITIAL_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INITIAL_STRING_EXT]) && is_array($data[self::FIELD_INITIAL_STRING_EXT])) { + $ext = $data[self::FIELD_INITIAL_STRING_EXT]; } else { - $this->setInitialString(new FHIRString($data[self::FIELD_INITIAL_STRING])); - } - } - if (isset($data[self::FIELD_INITIAL_TIME])) { - $ext = (isset($data[self::FIELD_INITIAL_TIME_EXT]) && is_array($data[self::FIELD_INITIAL_TIME_EXT])) - ? $data[self::FIELD_INITIAL_TIME_EXT] - : null; - if ($data[self::FIELD_INITIAL_TIME] instanceof FHIRTime) { - $this->setInitialTime($data[self::FIELD_INITIAL_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL_TIME])) { - $this->setInitialTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_INITIAL_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL_TIME])) { - $this->setInitialTime(new FHIRTime(array_merge($ext, $data[self::FIELD_INITIAL_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setInitialString($value); + } else if (is_array($value)) { + $this->setInitialString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setInitialString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInitialString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_INITIAL_TIME]) || isset($data[self::FIELD_INITIAL_TIME_EXT])) { + if (isset($data[self::FIELD_INITIAL_TIME])) { + $value = $data[self::FIELD_INITIAL_TIME]; } else { - $this->setInitialTime(new FHIRTime($data[self::FIELD_INITIAL_TIME])); - } - } - if (isset($data[self::FIELD_INITIAL_URI])) { - $ext = (isset($data[self::FIELD_INITIAL_URI_EXT]) && is_array($data[self::FIELD_INITIAL_URI_EXT])) - ? $data[self::FIELD_INITIAL_URI_EXT] - : null; - if ($data[self::FIELD_INITIAL_URI] instanceof FHIRUri) { - $this->setInitialUri($data[self::FIELD_INITIAL_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INITIAL_URI])) { - $this->setInitialUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INITIAL_URI]] + $ext)); - } else if (is_array($data[self::FIELD_INITIAL_URI])) { - $this->setInitialUri(new FHIRUri(array_merge($ext, $data[self::FIELD_INITIAL_URI]))); + $value = null; + } + if (isset($data[self::FIELD_INITIAL_TIME_EXT]) && is_array($data[self::FIELD_INITIAL_TIME_EXT])) { + $ext = $data[self::FIELD_INITIAL_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setInitialTime($value); + } else if (is_array($value)) { + $this->setInitialTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setInitialTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInitialTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_INITIAL_URI]) || isset($data[self::FIELD_INITIAL_URI_EXT])) { + if (isset($data[self::FIELD_INITIAL_URI])) { + $value = $data[self::FIELD_INITIAL_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INITIAL_URI_EXT]) && is_array($data[self::FIELD_INITIAL_URI_EXT])) { + $ext = $data[self::FIELD_INITIAL_URI_EXT]; } else { - $this->setInitialUri(new FHIRUri($data[self::FIELD_INITIAL_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setInitialUri($value); + } else if (is_array($value)) { + $this->setInitialUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setInitialUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInitialUri(new FHIRUri($ext)); } } if (isset($data[self::FIELD_ITEM])) { @@ -706,36 +769,50 @@ public function __construct($data = null) $this->addItem(new FHIRQuestionnaireItem($data[self::FIELD_ITEM])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->setLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString(array_merge($ext, $data[self::FIELD_LINK_ID]))); - } + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; } else { - $this->setLinkId(new FHIRString($data[self::FIELD_LINK_ID])); - } - } - if (isset($data[self::FIELD_MAX_LENGTH])) { - $ext = (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) - ? $data[self::FIELD_MAX_LENGTH_EXT] - : null; - if ($data[self::FIELD_MAX_LENGTH] instanceof FHIRInteger) { - $this->setMaxLength($data[self::FIELD_MAX_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MAX_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_MAX_LENGTH]))); + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLinkId($value); + } else if (is_array($value)) { + $this->setLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLinkId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX_LENGTH]) || isset($data[self::FIELD_MAX_LENGTH_EXT])) { + if (isset($data[self::FIELD_MAX_LENGTH])) { + $value = $data[self::FIELD_MAX_LENGTH]; } else { - $this->setMaxLength(new FHIRInteger($data[self::FIELD_MAX_LENGTH])); + $value = null; + } + if (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) { + $ext = $data[self::FIELD_MAX_LENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMaxLength($value); + } else if (is_array($value)) { + $this->setMaxLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxLength(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_OPTION])) { @@ -763,100 +840,142 @@ public function __construct($data = null) $this->setOptions(new FHIRReference($data[self::FIELD_OPTIONS])); } } - if (isset($data[self::FIELD_PREFIX])) { - $ext = (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) - ? $data[self::FIELD_PREFIX_EXT] - : null; - if ($data[self::FIELD_PREFIX] instanceof FHIRString) { - $this->setPrefix($data[self::FIELD_PREFIX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PREFIX])) { - $this->setPrefix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREFIX]] + $ext)); - } else if (is_array($data[self::FIELD_PREFIX])) { - $this->setPrefix(new FHIRString(array_merge($ext, $data[self::FIELD_PREFIX]))); - } + if (isset($data[self::FIELD_PREFIX]) || isset($data[self::FIELD_PREFIX_EXT])) { + if (isset($data[self::FIELD_PREFIX])) { + $value = $data[self::FIELD_PREFIX]; } else { - $this->setPrefix(new FHIRString($data[self::FIELD_PREFIX])); - } - } - if (isset($data[self::FIELD_READ_ONLY])) { - $ext = (isset($data[self::FIELD_READ_ONLY_EXT]) && is_array($data[self::FIELD_READ_ONLY_EXT])) - ? $data[self::FIELD_READ_ONLY_EXT] - : null; - if ($data[self::FIELD_READ_ONLY] instanceof FHIRBoolean) { - $this->setReadOnly($data[self::FIELD_READ_ONLY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READ_ONLY])) { - $this->setReadOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_READ_ONLY]] + $ext)); - } else if (is_array($data[self::FIELD_READ_ONLY])) { - $this->setReadOnly(new FHIRBoolean(array_merge($ext, $data[self::FIELD_READ_ONLY]))); + $value = null; + } + if (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) { + $ext = $data[self::FIELD_PREFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPrefix($value); + } else if (is_array($value)) { + $this->setPrefix(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPrefix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPrefix(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_READ_ONLY]) || isset($data[self::FIELD_READ_ONLY_EXT])) { + if (isset($data[self::FIELD_READ_ONLY])) { + $value = $data[self::FIELD_READ_ONLY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_READ_ONLY_EXT]) && is_array($data[self::FIELD_READ_ONLY_EXT])) { + $ext = $data[self::FIELD_READ_ONLY_EXT]; } else { - $this->setReadOnly(new FHIRBoolean($data[self::FIELD_READ_ONLY])); - } - } - if (isset($data[self::FIELD_REPEATS])) { - $ext = (isset($data[self::FIELD_REPEATS_EXT]) && is_array($data[self::FIELD_REPEATS_EXT])) - ? $data[self::FIELD_REPEATS_EXT] - : null; - if ($data[self::FIELD_REPEATS] instanceof FHIRBoolean) { - $this->setRepeats($data[self::FIELD_REPEATS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPEATS])) { - $this->setRepeats(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REPEATS]] + $ext)); - } else if (is_array($data[self::FIELD_REPEATS])) { - $this->setRepeats(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REPEATS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setReadOnly($value); + } else if (is_array($value)) { + $this->setReadOnly(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setReadOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReadOnly(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_REPEATS]) || isset($data[self::FIELD_REPEATS_EXT])) { + if (isset($data[self::FIELD_REPEATS])) { + $value = $data[self::FIELD_REPEATS]; } else { - $this->setRepeats(new FHIRBoolean($data[self::FIELD_REPEATS])); - } - } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRBoolean) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUIRED]))); + $value = null; + } + if (isset($data[self::FIELD_REPEATS_EXT]) && is_array($data[self::FIELD_REPEATS_EXT])) { + $ext = $data[self::FIELD_REPEATS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRepeats($value); + } else if (is_array($value)) { + $this->setRepeats(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRepeats(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRepeats(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; } else { - $this->setRequired(new FHIRBoolean($data[self::FIELD_REQUIRED])); - } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRQuestionnaireItemType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRQuestionnaireItemType([FHIRQuestionnaireItemType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRQuestionnaireItemType(array_merge($ext, $data[self::FIELD_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRQuestionnaireItemType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuestionnaireItemType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRQuestionnaireItemType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRQuestionnaireItemType([FHIRQuestionnaireItemType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRQuestionnaireItemType($ext)); } } } @@ -1968,8 +2087,8 @@ public function setType(FHIRQuestionnaireItemType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2348,25 +2467,41 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getEnableWhen())) { - $a[self::FIELD_ENABLE_WHEN] = $vs; + $a[self::FIELD_ENABLE_WHEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENABLE_WHEN][] = $v; + } } if (null !== ($v = $this->getInitialAttachment())) { $a[self::FIELD_INITIAL_ATTACHMENT] = $v; } if (null !== ($v = $this->getInitialBoolean())) { $a[self::FIELD_INITIAL_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INITIAL_BOOLEAN_EXT] = $enc; } } @@ -2375,29 +2510,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getInitialDate())) { $a[self::FIELD_INITIAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_INITIAL_DATE_EXT] = $enc; } } if (null !== ($v = $this->getInitialDateTime())) { $a[self::FIELD_INITIAL_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_INITIAL_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getInitialDecimal())) { $a[self::FIELD_INITIAL_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_INITIAL_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getInitialInteger())) { $a[self::FIELD_INITIAL_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_INITIAL_INTEGER_EXT] = $enc; } } @@ -2409,90 +2552,127 @@ public function jsonSerialize() } if (null !== ($v = $this->getInitialString())) { $a[self::FIELD_INITIAL_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_INITIAL_STRING_EXT] = $enc; } } if (null !== ($v = $this->getInitialTime())) { $a[self::FIELD_INITIAL_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_INITIAL_TIME_EXT] = $enc; } } if (null !== ($v = $this->getInitialUri())) { $a[self::FIELD_INITIAL_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_INITIAL_URI_EXT] = $enc; } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LINK_ID_EXT] = $enc; } } if (null !== ($v = $this->getMaxLength())) { $a[self::FIELD_MAX_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MAX_LENGTH_EXT] = $enc; } } if ([] !== ($vs = $this->getOption())) { - $a[self::FIELD_OPTION] = $vs; + $a[self::FIELD_OPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPTION][] = $v; + } } if (null !== ($v = $this->getOptions())) { $a[self::FIELD_OPTIONS] = $v; } if (null !== ($v = $this->getPrefix())) { $a[self::FIELD_PREFIX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PREFIX_EXT] = $enc; } } if (null !== ($v = $this->getReadOnly())) { $a[self::FIELD_READ_ONLY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_READ_ONLY_EXT] = $enc; } } if (null !== ($v = $this->getRepeats())) { $a[self::FIELD_REPEATS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REPEATS_EXT] = $enc; } } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuestionnaireItemType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuestionnaireItemType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOption.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOption.php index 1ab6cf5caf..eb31047aea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOption.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOption.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRQuestionnaireOption extends FHIRBackboneElement const FIELD_VALUE_TIME_EXT = '_valueTime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -180,68 +180,96 @@ public function __construct($data = null) $this->setValueCoding(new FHIRCoding($data[self::FIELD_VALUE_CODING])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; } - } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } } @@ -453,8 +481,8 @@ public function setValueTime($valueTime = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -587,32 +615,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php index 16e60c3a99..0cd7cf0ce6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRQuestionnaireResponseAnswer extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of questions and their answers. The questions are ordered and @@ -310,20 +310,27 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODING])) { @@ -333,68 +340,96 @@ public function __construct($data = null) $this->setValueCoding(new FHIRCoding($data[self::FIELD_VALUE_CODING])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -411,52 +446,73 @@ public function __construct($data = null) $this->setValueReference(new FHIRReference($data[self::FIELD_VALUE_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -976,8 +1032,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1193,15 +1249,23 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getValueAttachment())) { $a[self::FIELD_VALUE_ATTACHMENT] = $v; } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -1210,29 +1274,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } @@ -1244,25 +1316,34 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php index e5bf13f89f..0b55756665 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuestionnaireResponseItem extends FHIRBackboneElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of questions and their answers. The questions are ordered and @@ -204,20 +204,27 @@ public function __construct($data = null) $this->addAnswer(new FHIRQuestionnaireResponseAnswer($data[self::FIELD_ANSWER])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRUri) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION]))); - } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRUri($data[self::FIELD_DEFINITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRUri($ext)); } } if (isset($data[self::FIELD_ITEM])) { @@ -238,20 +245,27 @@ public function __construct($data = null) $this->addItem(new FHIRQuestionnaireResponseItem($data[self::FIELD_ITEM])); } } - if (isset($data[self::FIELD_LINK_ID])) { - $ext = (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) - ? $data[self::FIELD_LINK_ID_EXT] - : null; - if ($data[self::FIELD_LINK_ID] instanceof FHIRString) { - $this->setLinkId($data[self::FIELD_LINK_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LINK_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LINK_ID])) { - $this->setLinkId(new FHIRString(array_merge($ext, $data[self::FIELD_LINK_ID]))); - } + if (isset($data[self::FIELD_LINK_ID]) || isset($data[self::FIELD_LINK_ID_EXT])) { + if (isset($data[self::FIELD_LINK_ID])) { + $value = $data[self::FIELD_LINK_ID]; } else { - $this->setLinkId(new FHIRString($data[self::FIELD_LINK_ID])); + $value = null; + } + if (isset($data[self::FIELD_LINK_ID_EXT]) && is_array($data[self::FIELD_LINK_ID_EXT])) { + $ext = $data[self::FIELD_LINK_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLinkId($value); + } else if (is_array($value)) { + $this->setLinkId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLinkId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLinkId(new FHIRString($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -261,20 +275,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -568,8 +589,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -710,22 +731,38 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAnswer())) { - $a[self::FIELD_ANSWER] = $vs; + $a[self::FIELD_ANSWER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ANSWER][] = $v; + } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getLinkId())) { $a[self::FIELD_LINK_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LINK_ID_EXT] = $enc; } } @@ -734,11 +771,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequester.php index b1d8df1145..74bd1b49e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRReferralRequestRequester extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -229,8 +229,8 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -314,6 +314,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php index 1f9fa47231..7fac1d2f7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRRequestGroupAction extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A group of related requests that can be used to capture intended activities that @@ -420,20 +420,27 @@ public function __construct($data = null) $this->addAction(new FHIRRequestGroupAction($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]) && is_array($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) - ? $data[self::FIELD_CARDINALITY_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_CARDINALITY_BEHAVIOR] instanceof FHIRActionCardinalityBehavior) { - $this->setCardinalityBehavior($data[self::FIELD_CARDINALITY_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior([FHIRActionCardinalityBehavior::FIELD_VALUE => $data[self::FIELD_CARDINALITY_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_CARDINALITY_BEHAVIOR])) { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior(array_merge($ext, $data[self::FIELD_CARDINALITY_BEHAVIOR]))); - } + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR]) || isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR])) { + $value = $data[self::FIELD_CARDINALITY_BEHAVIOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]) && is_array($data[self::FIELD_CARDINALITY_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_CARDINALITY_BEHAVIOR_EXT]; } else { - $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior($data[self::FIELD_CARDINALITY_BEHAVIOR])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionCardinalityBehavior) { + $this->setCardinalityBehavior($value); + } else if (is_array($value)) { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior(array_merge($ext, $value))); + } else { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior([FHIRActionCardinalityBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCardinalityBehavior(new FHIRActionCardinalityBehavior($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -472,20 +479,27 @@ public function __construct($data = null) $this->addCondition(new FHIRRequestGroupCondition($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOCUMENTATION])) { @@ -506,36 +520,50 @@ public function __construct($data = null) $this->addDocumentation(new FHIRRelatedArtifact($data[self::FIELD_DOCUMENTATION])); } } - if (isset($data[self::FIELD_GROUPING_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT]) && is_array($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) - ? $data[self::FIELD_GROUPING_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_GROUPING_BEHAVIOR] instanceof FHIRActionGroupingBehavior) { - $this->setGroupingBehavior($data[self::FIELD_GROUPING_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GROUPING_BEHAVIOR])) { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior([FHIRActionGroupingBehavior::FIELD_VALUE => $data[self::FIELD_GROUPING_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_GROUPING_BEHAVIOR])) { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior(array_merge($ext, $data[self::FIELD_GROUPING_BEHAVIOR]))); - } + if (isset($data[self::FIELD_GROUPING_BEHAVIOR]) || isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_GROUPING_BEHAVIOR])) { + $value = $data[self::FIELD_GROUPING_BEHAVIOR]; } else { - $this->setGroupingBehavior(new FHIRActionGroupingBehavior($data[self::FIELD_GROUPING_BEHAVIOR])); - } - } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); + $value = null; + } + if (isset($data[self::FIELD_GROUPING_BEHAVIOR_EXT]) && is_array($data[self::FIELD_GROUPING_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_GROUPING_BEHAVIOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionGroupingBehavior) { + $this->setGroupingBehavior($value); + } else if (is_array($value)) { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior(array_merge($ext, $value))); + } else { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior([FHIRActionGroupingBehavior::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setGroupingBehavior(new FHIRActionGroupingBehavior($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARTICIPANT])) { @@ -556,20 +584,27 @@ public function __construct($data = null) $this->addParticipant(new FHIRReference($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT]) && is_array($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) - ? $data[self::FIELD_PRECHECK_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_PRECHECK_BEHAVIOR] instanceof FHIRActionPrecheckBehavior) { - $this->setPrecheckBehavior($data[self::FIELD_PRECHECK_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior([FHIRActionPrecheckBehavior::FIELD_VALUE => $data[self::FIELD_PRECHECK_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_PRECHECK_BEHAVIOR])) { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior(array_merge($ext, $data[self::FIELD_PRECHECK_BEHAVIOR]))); - } + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR]) || isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR])) { + $value = $data[self::FIELD_PRECHECK_BEHAVIOR]; } else { - $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior($data[self::FIELD_PRECHECK_BEHAVIOR])); + $value = null; + } + if (isset($data[self::FIELD_PRECHECK_BEHAVIOR_EXT]) && is_array($data[self::FIELD_PRECHECK_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_PRECHECK_BEHAVIOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionPrecheckBehavior) { + $this->setPrecheckBehavior($value); + } else if (is_array($value)) { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior(array_merge($ext, $value))); + } else { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior([FHIRActionPrecheckBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrecheckBehavior(new FHIRActionPrecheckBehavior($ext)); } } if (isset($data[self::FIELD_RELATED_ACTION])) { @@ -590,20 +625,27 @@ public function __construct($data = null) $this->addRelatedAction(new FHIRRequestGroupRelatedAction($data[self::FIELD_RELATED_ACTION])); } } - if (isset($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT]) && is_array($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) - ? $data[self::FIELD_REQUIRED_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_REQUIRED_BEHAVIOR] instanceof FHIRActionRequiredBehavior) { - $this->setRequiredBehavior($data[self::FIELD_REQUIRED_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior([FHIRActionRequiredBehavior::FIELD_VALUE => $data[self::FIELD_REQUIRED_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED_BEHAVIOR])) { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior(array_merge($ext, $data[self::FIELD_REQUIRED_BEHAVIOR]))); - } + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR]) || isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR])) { + $value = $data[self::FIELD_REQUIRED_BEHAVIOR]; } else { - $this->setRequiredBehavior(new FHIRActionRequiredBehavior($data[self::FIELD_REQUIRED_BEHAVIOR])); + $value = null; + } + if (isset($data[self::FIELD_REQUIRED_BEHAVIOR_EXT]) && is_array($data[self::FIELD_REQUIRED_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_REQUIRED_BEHAVIOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionRequiredBehavior) { + $this->setRequiredBehavior($value); + } else if (is_array($value)) { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior(array_merge($ext, $value))); + } else { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior([FHIRActionRequiredBehavior::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequiredBehavior(new FHIRActionRequiredBehavior($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -613,52 +655,73 @@ public function __construct($data = null) $this->setResource(new FHIRReference($data[self::FIELD_RESOURCE])); } } - if (isset($data[self::FIELD_SELECTION_BEHAVIOR])) { - $ext = (isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT]) && is_array($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) - ? $data[self::FIELD_SELECTION_BEHAVIOR_EXT] - : null; - if ($data[self::FIELD_SELECTION_BEHAVIOR] instanceof FHIRActionSelectionBehavior) { - $this->setSelectionBehavior($data[self::FIELD_SELECTION_BEHAVIOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SELECTION_BEHAVIOR])) { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior([FHIRActionSelectionBehavior::FIELD_VALUE => $data[self::FIELD_SELECTION_BEHAVIOR]] + $ext)); - } else if (is_array($data[self::FIELD_SELECTION_BEHAVIOR])) { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior(array_merge($ext, $data[self::FIELD_SELECTION_BEHAVIOR]))); - } + if (isset($data[self::FIELD_SELECTION_BEHAVIOR]) || isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) { + if (isset($data[self::FIELD_SELECTION_BEHAVIOR])) { + $value = $data[self::FIELD_SELECTION_BEHAVIOR]; } else { - $this->setSelectionBehavior(new FHIRActionSelectionBehavior($data[self::FIELD_SELECTION_BEHAVIOR])); - } - } - if (isset($data[self::FIELD_TEXT_EQUIVALENT])) { - $ext = (isset($data[self::FIELD_TEXT_EQUIVALENT_EXT]) && is_array($data[self::FIELD_TEXT_EQUIVALENT_EXT])) - ? $data[self::FIELD_TEXT_EQUIVALENT_EXT] - : null; - if ($data[self::FIELD_TEXT_EQUIVALENT] instanceof FHIRString) { - $this->setTextEquivalent($data[self::FIELD_TEXT_EQUIVALENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT_EQUIVALENT])) { - $this->setTextEquivalent(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT_EQUIVALENT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT_EQUIVALENT])) { - $this->setTextEquivalent(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT_EQUIVALENT]))); + $value = null; + } + if (isset($data[self::FIELD_SELECTION_BEHAVIOR_EXT]) && is_array($data[self::FIELD_SELECTION_BEHAVIOR_EXT])) { + $ext = $data[self::FIELD_SELECTION_BEHAVIOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionSelectionBehavior) { + $this->setSelectionBehavior($value); + } else if (is_array($value)) { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior(array_merge($ext, $value))); + } else { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior([FHIRActionSelectionBehavior::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSelectionBehavior(new FHIRActionSelectionBehavior($ext)); + } + } + if (isset($data[self::FIELD_TEXT_EQUIVALENT]) || isset($data[self::FIELD_TEXT_EQUIVALENT_EXT])) { + if (isset($data[self::FIELD_TEXT_EQUIVALENT])) { + $value = $data[self::FIELD_TEXT_EQUIVALENT]; } else { - $this->setTextEquivalent(new FHIRString($data[self::FIELD_TEXT_EQUIVALENT])); - } - } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EQUIVALENT_EXT]) && is_array($data[self::FIELD_TEXT_EQUIVALENT_EXT])) { + $ext = $data[self::FIELD_TEXT_EQUIVALENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTextEquivalent($value); + } else if (is_array($value)) { + $this->setTextEquivalent(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTextEquivalent(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTextEquivalent(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_DURATION])) { @@ -689,20 +752,27 @@ public function __construct($data = null) $this->setTimingTiming(new FHIRTiming($data[self::FIELD_TIMING_TIMING])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1619,8 +1689,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1901,62 +1971,110 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getCardinalityBehavior())) { $a[self::FIELD_CARDINALITY_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionCardinalityBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionCardinalityBehavior::FIELD_VALUE]); $a[self::FIELD_CARDINALITY_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDocumentation())) { - $a[self::FIELD_DOCUMENTATION] = $vs; + $a[self::FIELD_DOCUMENTATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENTATION][] = $v; + } } if (null !== ($v = $this->getGroupingBehavior())) { $a[self::FIELD_GROUPING_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionGroupingBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionGroupingBehavior::FIELD_VALUE]); $a[self::FIELD_GROUPING_BEHAVIOR_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPrecheckBehavior())) { $a[self::FIELD_PRECHECK_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionPrecheckBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionPrecheckBehavior::FIELD_VALUE]); $a[self::FIELD_PRECHECK_BEHAVIOR_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedAction())) { - $a[self::FIELD_RELATED_ACTION] = $vs; + $a[self::FIELD_RELATED_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ACTION][] = $v; + } } if (null !== ($v = $this->getRequiredBehavior())) { $a[self::FIELD_REQUIRED_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionRequiredBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionRequiredBehavior::FIELD_VALUE]); $a[self::FIELD_REQUIRED_BEHAVIOR_EXT] = $enc; } } @@ -1965,22 +2083,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getSelectionBehavior())) { $a[self::FIELD_SELECTION_BEHAVIOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionSelectionBehavior::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionSelectionBehavior::FIELD_VALUE]); $a[self::FIELD_SELECTION_BEHAVIOR_EXT] = $enc; } } if (null !== ($v = $this->getTextEquivalent())) { $a[self::FIELD_TEXT_EQUIVALENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EQUIVALENT_EXT] = $enc; } } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -1998,14 +2122,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php index eb12b23624..a378a4352b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRRequestGroupCondition extends FHIRBackboneElement const FIELD_LANGUAGE_EXT = '_language'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -158,68 +158,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $ext = []; } - } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRActionConditionKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRActionConditionKind([FHIRActionConditionKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRActionConditionKind(array_merge($ext, $data[self::FIELD_KIND]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; } else { - $this->setKind(new FHIRActionConditionKind($data[self::FIELD_KIND])); + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRString) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRString(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionConditionKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRActionConditionKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRActionConditionKind([FHIRActionConditionKind::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKind(new FHIRActionConditionKind($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; } else { - $this->setLanguage(new FHIRString($data[self::FIELD_LANGUAGE])); + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRString($ext)); } } } @@ -395,8 +423,8 @@ public function setLanguage($language = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -512,32 +540,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionConditionKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionConditionKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php index fcb8141784..ab8b42dbbb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRRequestGroupRelatedAction extends FHIRBackboneElement const FIELD_RELATIONSHIP_EXT = '_relationship'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -161,20 +161,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION_ID])) { - $ext = (isset($data[self::FIELD_ACTION_ID_EXT]) && is_array($data[self::FIELD_ACTION_ID_EXT])) - ? $data[self::FIELD_ACTION_ID_EXT] - : null; - if ($data[self::FIELD_ACTION_ID] instanceof FHIRId) { - $this->setActionId($data[self::FIELD_ACTION_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION_ID])) { - $this->setActionId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_ACTION_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION_ID])) { - $this->setActionId(new FHIRId(array_merge($ext, $data[self::FIELD_ACTION_ID]))); - } + if (isset($data[self::FIELD_ACTION_ID]) || isset($data[self::FIELD_ACTION_ID_EXT])) { + if (isset($data[self::FIELD_ACTION_ID])) { + $value = $data[self::FIELD_ACTION_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTION_ID_EXT]) && is_array($data[self::FIELD_ACTION_ID_EXT])) { + $ext = $data[self::FIELD_ACTION_ID_EXT]; } else { - $this->setActionId(new FHIRId($data[self::FIELD_ACTION_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setActionId($value); + } else if (is_array($value)) { + $this->setActionId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setActionId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActionId(new FHIRId($ext)); } } if (isset($data[self::FIELD_OFFSET_DURATION])) { @@ -191,20 +198,27 @@ public function __construct($data = null) $this->setOffsetRange(new FHIRRange($data[self::FIELD_OFFSET_RANGE])); } } - if (isset($data[self::FIELD_RELATIONSHIP])) { - $ext = (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) - ? $data[self::FIELD_RELATIONSHIP_EXT] - : null; - if ($data[self::FIELD_RELATIONSHIP] instanceof FHIRActionRelationshipType) { - $this->setRelationship($data[self::FIELD_RELATIONSHIP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRActionRelationshipType([FHIRActionRelationshipType::FIELD_VALUE => $data[self::FIELD_RELATIONSHIP]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIONSHIP])) { - $this->setRelationship(new FHIRActionRelationshipType(array_merge($ext, $data[self::FIELD_RELATIONSHIP]))); - } + if (isset($data[self::FIELD_RELATIONSHIP]) || isset($data[self::FIELD_RELATIONSHIP_EXT])) { + if (isset($data[self::FIELD_RELATIONSHIP])) { + $value = $data[self::FIELD_RELATIONSHIP]; } else { - $this->setRelationship(new FHIRActionRelationshipType($data[self::FIELD_RELATIONSHIP])); + $value = null; + } + if (isset($data[self::FIELD_RELATIONSHIP_EXT]) && is_array($data[self::FIELD_RELATIONSHIP_EXT])) { + $ext = $data[self::FIELD_RELATIONSHIP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionRelationshipType) { + $this->setRelationship($value); + } else if (is_array($value)) { + $this->setRelationship(new FHIRActionRelationshipType(array_merge($ext, $value))); + } else { + $this->setRelationship(new FHIRActionRelationshipType([FHIRActionRelationshipType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelationship(new FHIRActionRelationshipType($ext)); } } } @@ -370,8 +384,8 @@ public function setRelationship(FHIRActionRelationshipType $relationship = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -471,8 +485,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActionId())) { $a[self::FIELD_ACTION_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_ACTION_ID_EXT] = $enc; } } @@ -484,11 +500,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionRelationshipType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionRelationshipType::FIELD_VALUE]); $a[self::FIELD_RELATIONSHIP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php index 20e4322434..fe142c9244 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArm.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRResearchStudyArm extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -157,36 +157,50 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -328,8 +342,8 @@ public function setName($name = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -434,18 +448,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php index 0599217b9c..a682fa9e30 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPrediction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRRiskAssessmentPrediction extends FHIRBackboneElement const FIELD_WHEN_RANGE = 'whenRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -225,20 +225,27 @@ public function __construct($data = null) $this->setOutcome(new FHIRCodeableConcept($data[self::FIELD_OUTCOME])); } } - if (isset($data[self::FIELD_PROBABILITY_DECIMAL])) { - $ext = (isset($data[self::FIELD_PROBABILITY_DECIMAL_EXT]) && is_array($data[self::FIELD_PROBABILITY_DECIMAL_EXT])) - ? $data[self::FIELD_PROBABILITY_DECIMAL_EXT] - : null; - if ($data[self::FIELD_PROBABILITY_DECIMAL] instanceof FHIRDecimal) { - $this->setProbabilityDecimal($data[self::FIELD_PROBABILITY_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROBABILITY_DECIMAL])) { - $this->setProbabilityDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PROBABILITY_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_PROBABILITY_DECIMAL])) { - $this->setProbabilityDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PROBABILITY_DECIMAL]))); - } + if (isset($data[self::FIELD_PROBABILITY_DECIMAL]) || isset($data[self::FIELD_PROBABILITY_DECIMAL_EXT])) { + if (isset($data[self::FIELD_PROBABILITY_DECIMAL])) { + $value = $data[self::FIELD_PROBABILITY_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROBABILITY_DECIMAL_EXT]) && is_array($data[self::FIELD_PROBABILITY_DECIMAL_EXT])) { + $ext = $data[self::FIELD_PROBABILITY_DECIMAL_EXT]; } else { - $this->setProbabilityDecimal(new FHIRDecimal($data[self::FIELD_PROBABILITY_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setProbabilityDecimal($value); + } else if (is_array($value)) { + $this->setProbabilityDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setProbabilityDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProbabilityDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PROBABILITY_RANGE])) { @@ -255,36 +262,50 @@ public function __construct($data = null) $this->setQualitativeRisk(new FHIRCodeableConcept($data[self::FIELD_QUALITATIVE_RISK])); } } - if (isset($data[self::FIELD_RATIONALE])) { - $ext = (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) - ? $data[self::FIELD_RATIONALE_EXT] - : null; - if ($data[self::FIELD_RATIONALE] instanceof FHIRString) { - $this->setRationale($data[self::FIELD_RATIONALE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RATIONALE]] + $ext)); - } else if (is_array($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRString(array_merge($ext, $data[self::FIELD_RATIONALE]))); - } + if (isset($data[self::FIELD_RATIONALE]) || isset($data[self::FIELD_RATIONALE_EXT])) { + if (isset($data[self::FIELD_RATIONALE])) { + $value = $data[self::FIELD_RATIONALE]; } else { - $this->setRationale(new FHIRString($data[self::FIELD_RATIONALE])); + $value = null; } - } - if (isset($data[self::FIELD_RELATIVE_RISK])) { - $ext = (isset($data[self::FIELD_RELATIVE_RISK_EXT]) && is_array($data[self::FIELD_RELATIVE_RISK_EXT])) - ? $data[self::FIELD_RELATIVE_RISK_EXT] - : null; - if ($data[self::FIELD_RELATIVE_RISK] instanceof FHIRDecimal) { - $this->setRelativeRisk($data[self::FIELD_RELATIVE_RISK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RELATIVE_RISK])) { - $this->setRelativeRisk(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_RELATIVE_RISK]] + $ext)); - } else if (is_array($data[self::FIELD_RELATIVE_RISK])) { - $this->setRelativeRisk(new FHIRDecimal(array_merge($ext, $data[self::FIELD_RELATIVE_RISK]))); + if (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) { + $ext = $data[self::FIELD_RATIONALE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRationale($value); + } else if (is_array($value)) { + $this->setRationale(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRationale(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRationale(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RELATIVE_RISK]) || isset($data[self::FIELD_RELATIVE_RISK_EXT])) { + if (isset($data[self::FIELD_RELATIVE_RISK])) { + $value = $data[self::FIELD_RELATIVE_RISK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RELATIVE_RISK_EXT]) && is_array($data[self::FIELD_RELATIVE_RISK_EXT])) { + $ext = $data[self::FIELD_RELATIVE_RISK_EXT]; } else { - $this->setRelativeRisk(new FHIRDecimal($data[self::FIELD_RELATIVE_RISK])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setRelativeRisk($value); + } else if (is_array($value)) { + $this->setRelativeRisk(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setRelativeRisk(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRelativeRisk(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_WHEN_PERIOD])) { @@ -614,8 +635,8 @@ public function setWhenRange(FHIRRange $whenRange = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -758,8 +779,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getProbabilityDecimal())) { $a[self::FIELD_PROBABILITY_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PROBABILITY_DECIMAL_EXT] = $enc; } } @@ -771,15 +794,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getRationale())) { $a[self::FIELD_RATIONALE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RATIONALE_EXT] = $enc; } } if (null !== ($v = $this->getRelativeRisk())) { $a[self::FIELD_RELATIVE_RISK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_RELATIVE_RISK_EXT] = $enc; } } @@ -789,6 +816,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhenRange())) { $a[self::FIELD_WHEN_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php index 101d22d552..e95b33e3e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSearchParameterComponent extends FHIRBackboneElement const FIELD_EXPRESSION_EXT = '_expression'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -138,20 +138,27 @@ public function __construct($data = null) $this->setDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); } } } @@ -251,8 +258,8 @@ public function setExpression($expression = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -343,11 +350,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQuality.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQuality.php index 4c4d0d74da..4a0071236c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQuality.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQuality.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRSequenceQuality extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -315,52 +315,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInteger) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRInteger($data[self::FIELD_END])); + $value = null; } - } - if (isset($data[self::FIELD_F_SCORE])) { - $ext = (isset($data[self::FIELD_F_SCORE_EXT]) && is_array($data[self::FIELD_F_SCORE_EXT])) - ? $data[self::FIELD_F_SCORE_EXT] - : null; - if ($data[self::FIELD_F_SCORE] instanceof FHIRDecimal) { - $this->setFScore($data[self::FIELD_F_SCORE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_F_SCORE])) { - $this->setFScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_F_SCORE]] + $ext)); - } else if (is_array($data[self::FIELD_F_SCORE])) { - $this->setFScore(new FHIRDecimal(array_merge($ext, $data[self::FIELD_F_SCORE]))); - } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setFScore(new FHIRDecimal($data[self::FIELD_F_SCORE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_GT_FP])) { - $ext = (isset($data[self::FIELD_GT_FP_EXT]) && is_array($data[self::FIELD_GT_FP_EXT])) - ? $data[self::FIELD_GT_FP_EXT] - : null; - if ($data[self::FIELD_GT_FP] instanceof FHIRDecimal) { - $this->setGtFP($data[self::FIELD_GT_FP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GT_FP])) { - $this->setGtFP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_GT_FP]] + $ext)); - } else if (is_array($data[self::FIELD_GT_FP])) { - $this->setGtFP(new FHIRDecimal(array_merge($ext, $data[self::FIELD_GT_FP]))); + if (isset($data[self::FIELD_F_SCORE]) || isset($data[self::FIELD_F_SCORE_EXT])) { + if (isset($data[self::FIELD_F_SCORE])) { + $value = $data[self::FIELD_F_SCORE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_F_SCORE_EXT]) && is_array($data[self::FIELD_F_SCORE_EXT])) { + $ext = $data[self::FIELD_F_SCORE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFScore($value); + } else if (is_array($value)) { + $this->setFScore(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFScore(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_GT_FP]) || isset($data[self::FIELD_GT_FP_EXT])) { + if (isset($data[self::FIELD_GT_FP])) { + $value = $data[self::FIELD_GT_FP]; } else { - $this->setGtFP(new FHIRDecimal($data[self::FIELD_GT_FP])); + $value = null; + } + if (isset($data[self::FIELD_GT_FP_EXT]) && is_array($data[self::FIELD_GT_FP_EXT])) { + $ext = $data[self::FIELD_GT_FP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setGtFP($value); + } else if (is_array($value)) { + $this->setGtFP(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setGtFP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGtFP(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_METHOD])) { @@ -370,68 +391,96 @@ public function __construct($data = null) $this->setMethod(new FHIRCodeableConcept($data[self::FIELD_METHOD])); } } - if (isset($data[self::FIELD_PRECISION])) { - $ext = (isset($data[self::FIELD_PRECISION_EXT]) && is_array($data[self::FIELD_PRECISION_EXT])) - ? $data[self::FIELD_PRECISION_EXT] - : null; - if ($data[self::FIELD_PRECISION] instanceof FHIRDecimal) { - $this->setPrecision($data[self::FIELD_PRECISION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRECISION])) { - $this->setPrecision(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PRECISION]] + $ext)); - } else if (is_array($data[self::FIELD_PRECISION])) { - $this->setPrecision(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PRECISION]))); - } + if (isset($data[self::FIELD_PRECISION]) || isset($data[self::FIELD_PRECISION_EXT])) { + if (isset($data[self::FIELD_PRECISION])) { + $value = $data[self::FIELD_PRECISION]; } else { - $this->setPrecision(new FHIRDecimal($data[self::FIELD_PRECISION])); + $value = null; } - } - if (isset($data[self::FIELD_QUERY_FP])) { - $ext = (isset($data[self::FIELD_QUERY_FP_EXT]) && is_array($data[self::FIELD_QUERY_FP_EXT])) - ? $data[self::FIELD_QUERY_FP_EXT] - : null; - if ($data[self::FIELD_QUERY_FP] instanceof FHIRDecimal) { - $this->setQueryFP($data[self::FIELD_QUERY_FP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUERY_FP])) { - $this->setQueryFP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_QUERY_FP]] + $ext)); - } else if (is_array($data[self::FIELD_QUERY_FP])) { - $this->setQueryFP(new FHIRDecimal(array_merge($ext, $data[self::FIELD_QUERY_FP]))); - } + if (isset($data[self::FIELD_PRECISION_EXT]) && is_array($data[self::FIELD_PRECISION_EXT])) { + $ext = $data[self::FIELD_PRECISION_EXT]; } else { - $this->setQueryFP(new FHIRDecimal($data[self::FIELD_QUERY_FP])); + $ext = []; } - } - if (isset($data[self::FIELD_QUERY_TP])) { - $ext = (isset($data[self::FIELD_QUERY_TP_EXT]) && is_array($data[self::FIELD_QUERY_TP_EXT])) - ? $data[self::FIELD_QUERY_TP_EXT] - : null; - if ($data[self::FIELD_QUERY_TP] instanceof FHIRDecimal) { - $this->setQueryTP($data[self::FIELD_QUERY_TP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUERY_TP])) { - $this->setQueryTP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_QUERY_TP]] + $ext)); - } else if (is_array($data[self::FIELD_QUERY_TP])) { - $this->setQueryTP(new FHIRDecimal(array_merge($ext, $data[self::FIELD_QUERY_TP]))); + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPrecision($value); + } else if (is_array($value)) { + $this->setPrecision(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPrecision(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPrecision(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_QUERY_FP]) || isset($data[self::FIELD_QUERY_FP_EXT])) { + if (isset($data[self::FIELD_QUERY_FP])) { + $value = $data[self::FIELD_QUERY_FP]; } else { - $this->setQueryTP(new FHIRDecimal($data[self::FIELD_QUERY_TP])); + $value = null; + } + if (isset($data[self::FIELD_QUERY_FP_EXT]) && is_array($data[self::FIELD_QUERY_FP_EXT])) { + $ext = $data[self::FIELD_QUERY_FP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setQueryFP($value); + } else if (is_array($value)) { + $this->setQueryFP(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setQueryFP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setQueryFP(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_RECALL])) { - $ext = (isset($data[self::FIELD_RECALL_EXT]) && is_array($data[self::FIELD_RECALL_EXT])) - ? $data[self::FIELD_RECALL_EXT] - : null; - if ($data[self::FIELD_RECALL] instanceof FHIRDecimal) { - $this->setRecall($data[self::FIELD_RECALL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECALL])) { - $this->setRecall(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_RECALL]] + $ext)); - } else if (is_array($data[self::FIELD_RECALL])) { - $this->setRecall(new FHIRDecimal(array_merge($ext, $data[self::FIELD_RECALL]))); + if (isset($data[self::FIELD_QUERY_TP]) || isset($data[self::FIELD_QUERY_TP_EXT])) { + if (isset($data[self::FIELD_QUERY_TP])) { + $value = $data[self::FIELD_QUERY_TP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_QUERY_TP_EXT]) && is_array($data[self::FIELD_QUERY_TP_EXT])) { + $ext = $data[self::FIELD_QUERY_TP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setQueryTP($value); + } else if (is_array($value)) { + $this->setQueryTP(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setQueryTP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setQueryTP(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_RECALL]) || isset($data[self::FIELD_RECALL_EXT])) { + if (isset($data[self::FIELD_RECALL])) { + $value = $data[self::FIELD_RECALL]; } else { - $this->setRecall(new FHIRDecimal($data[self::FIELD_RECALL])); + $value = null; + } + if (isset($data[self::FIELD_RECALL_EXT]) && is_array($data[self::FIELD_RECALL_EXT])) { + $ext = $data[self::FIELD_RECALL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setRecall($value); + } else if (is_array($value)) { + $this->setRecall(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setRecall(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecall(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_SCORE])) { @@ -448,68 +497,96 @@ public function __construct($data = null) $this->setStandardSequence(new FHIRCodeableConcept($data[self::FIELD_STANDARD_SEQUENCE])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInteger) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInteger($data[self::FIELD_START])); + $value = null; } - } - if (isset($data[self::FIELD_TRUTH_FN])) { - $ext = (isset($data[self::FIELD_TRUTH_FN_EXT]) && is_array($data[self::FIELD_TRUTH_FN_EXT])) - ? $data[self::FIELD_TRUTH_FN_EXT] - : null; - if ($data[self::FIELD_TRUTH_FN] instanceof FHIRDecimal) { - $this->setTruthFN($data[self::FIELD_TRUTH_FN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRUTH_FN])) { - $this->setTruthFN(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_TRUTH_FN]] + $ext)); - } else if (is_array($data[self::FIELD_TRUTH_FN])) { - $this->setTruthFN(new FHIRDecimal(array_merge($ext, $data[self::FIELD_TRUTH_FN]))); - } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; } else { - $this->setTruthFN(new FHIRDecimal($data[self::FIELD_TRUTH_FN])); + $ext = []; } - } - if (isset($data[self::FIELD_TRUTH_TP])) { - $ext = (isset($data[self::FIELD_TRUTH_TP_EXT]) && is_array($data[self::FIELD_TRUTH_TP_EXT])) - ? $data[self::FIELD_TRUTH_TP_EXT] - : null; - if ($data[self::FIELD_TRUTH_TP] instanceof FHIRDecimal) { - $this->setTruthTP($data[self::FIELD_TRUTH_TP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRUTH_TP])) { - $this->setTruthTP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_TRUTH_TP]] + $ext)); - } else if (is_array($data[self::FIELD_TRUTH_TP])) { - $this->setTruthTP(new FHIRDecimal(array_merge($ext, $data[self::FIELD_TRUTH_TP]))); + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStart(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_TRUTH_FN]) || isset($data[self::FIELD_TRUTH_FN_EXT])) { + if (isset($data[self::FIELD_TRUTH_FN])) { + $value = $data[self::FIELD_TRUTH_FN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRUTH_FN_EXT]) && is_array($data[self::FIELD_TRUTH_FN_EXT])) { + $ext = $data[self::FIELD_TRUTH_FN_EXT]; } else { - $this->setTruthTP(new FHIRDecimal($data[self::FIELD_TRUTH_TP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setTruthFN($value); + } else if (is_array($value)) { + $this->setTruthFN(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setTruthFN(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTruthFN(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRQualityType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRQualityType([FHIRQualityType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRQualityType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TRUTH_TP]) || isset($data[self::FIELD_TRUTH_TP_EXT])) { + if (isset($data[self::FIELD_TRUTH_TP])) { + $value = $data[self::FIELD_TRUTH_TP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRUTH_TP_EXT]) && is_array($data[self::FIELD_TRUTH_TP_EXT])) { + $ext = $data[self::FIELD_TRUTH_TP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setTruthTP($value); + } else if (is_array($value)) { + $this->setTruthTP(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setTruthTP(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTruthTP(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRQualityType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQualityType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRQualityType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRQualityType([FHIRQualityType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRQualityType($ext)); } } } @@ -1097,8 +1174,8 @@ public function setType(FHIRQualityType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1330,22 +1407,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getFScore())) { $a[self::FIELD_F_SCORE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_F_SCORE_EXT] = $enc; } } if (null !== ($v = $this->getGtFP())) { $a[self::FIELD_GT_FP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_GT_FP_EXT] = $enc; } } @@ -1354,29 +1437,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getPrecision())) { $a[self::FIELD_PRECISION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PRECISION_EXT] = $enc; } } if (null !== ($v = $this->getQueryFP())) { $a[self::FIELD_QUERY_FP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_QUERY_FP_EXT] = $enc; } } if (null !== ($v = $this->getQueryTP())) { $a[self::FIELD_QUERY_TP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_QUERY_TP_EXT] = $enc; } } if (null !== ($v = $this->getRecall())) { $a[self::FIELD_RECALL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_RECALL_EXT] = $enc; } } @@ -1388,32 +1479,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getTruthFN())) { $a[self::FIELD_TRUTH_FN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_TRUTH_FN_EXT] = $enc; } } if (null !== ($v = $this->getTruthTP())) { $a[self::FIELD_TRUTH_TP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_TRUTH_TP_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQualityType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQualityType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeq.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeq.php index 3d2edc7e96..7772f66c7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeq.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeq.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRSequenceReferenceSeq extends FHIRBackboneElement const FIELD_WINDOW_START_EXT = '_windowStart'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -230,20 +230,27 @@ public function __construct($data = null) $this->setChromosome(new FHIRCodeableConcept($data[self::FIELD_CHROMOSOME])); } } - if (isset($data[self::FIELD_GENOME_BUILD])) { - $ext = (isset($data[self::FIELD_GENOME_BUILD_EXT]) && is_array($data[self::FIELD_GENOME_BUILD_EXT])) - ? $data[self::FIELD_GENOME_BUILD_EXT] - : null; - if ($data[self::FIELD_GENOME_BUILD] instanceof FHIRString) { - $this->setGenomeBuild($data[self::FIELD_GENOME_BUILD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENOME_BUILD])) { - $this->setGenomeBuild(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GENOME_BUILD]] + $ext)); - } else if (is_array($data[self::FIELD_GENOME_BUILD])) { - $this->setGenomeBuild(new FHIRString(array_merge($ext, $data[self::FIELD_GENOME_BUILD]))); - } + if (isset($data[self::FIELD_GENOME_BUILD]) || isset($data[self::FIELD_GENOME_BUILD_EXT])) { + if (isset($data[self::FIELD_GENOME_BUILD])) { + $value = $data[self::FIELD_GENOME_BUILD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENOME_BUILD_EXT]) && is_array($data[self::FIELD_GENOME_BUILD_EXT])) { + $ext = $data[self::FIELD_GENOME_BUILD_EXT]; } else { - $this->setGenomeBuild(new FHIRString($data[self::FIELD_GENOME_BUILD])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setGenomeBuild($value); + } else if (is_array($value)) { + $this->setGenomeBuild(new FHIRString(array_merge($ext, $value))); + } else { + $this->setGenomeBuild(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGenomeBuild(new FHIRString($ext)); } } if (isset($data[self::FIELD_REFERENCE_SEQ_ID])) { @@ -260,68 +267,96 @@ public function __construct($data = null) $this->setReferenceSeqPointer(new FHIRReference($data[self::FIELD_REFERENCE_SEQ_POINTER])); } } - if (isset($data[self::FIELD_REFERENCE_SEQ_STRING])) { - $ext = (isset($data[self::FIELD_REFERENCE_SEQ_STRING_EXT]) && is_array($data[self::FIELD_REFERENCE_SEQ_STRING_EXT])) - ? $data[self::FIELD_REFERENCE_SEQ_STRING_EXT] - : null; - if ($data[self::FIELD_REFERENCE_SEQ_STRING] instanceof FHIRString) { - $this->setReferenceSeqString($data[self::FIELD_REFERENCE_SEQ_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE_SEQ_STRING])) { - $this->setReferenceSeqString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE_SEQ_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE_SEQ_STRING])) { - $this->setReferenceSeqString(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE_SEQ_STRING]))); - } + if (isset($data[self::FIELD_REFERENCE_SEQ_STRING]) || isset($data[self::FIELD_REFERENCE_SEQ_STRING_EXT])) { + if (isset($data[self::FIELD_REFERENCE_SEQ_STRING])) { + $value = $data[self::FIELD_REFERENCE_SEQ_STRING]; } else { - $this->setReferenceSeqString(new FHIRString($data[self::FIELD_REFERENCE_SEQ_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_STRAND])) { - $ext = (isset($data[self::FIELD_STRAND_EXT]) && is_array($data[self::FIELD_STRAND_EXT])) - ? $data[self::FIELD_STRAND_EXT] - : null; - if ($data[self::FIELD_STRAND] instanceof FHIRInteger) { - $this->setStrand($data[self::FIELD_STRAND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRAND])) { - $this->setStrand(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_STRAND]] + $ext)); - } else if (is_array($data[self::FIELD_STRAND])) { - $this->setStrand(new FHIRInteger(array_merge($ext, $data[self::FIELD_STRAND]))); - } + if (isset($data[self::FIELD_REFERENCE_SEQ_STRING_EXT]) && is_array($data[self::FIELD_REFERENCE_SEQ_STRING_EXT])) { + $ext = $data[self::FIELD_REFERENCE_SEQ_STRING_EXT]; } else { - $this->setStrand(new FHIRInteger($data[self::FIELD_STRAND])); + $ext = []; } - } - if (isset($data[self::FIELD_WINDOW_END])) { - $ext = (isset($data[self::FIELD_WINDOW_END_EXT]) && is_array($data[self::FIELD_WINDOW_END_EXT])) - ? $data[self::FIELD_WINDOW_END_EXT] - : null; - if ($data[self::FIELD_WINDOW_END] instanceof FHIRInteger) { - $this->setWindowEnd($data[self::FIELD_WINDOW_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WINDOW_END])) { - $this->setWindowEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_WINDOW_END]] + $ext)); - } else if (is_array($data[self::FIELD_WINDOW_END])) { - $this->setWindowEnd(new FHIRInteger(array_merge($ext, $data[self::FIELD_WINDOW_END]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReferenceSeqString($value); + } else if (is_array($value)) { + $this->setReferenceSeqString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReferenceSeqString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReferenceSeqString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STRAND]) || isset($data[self::FIELD_STRAND_EXT])) { + if (isset($data[self::FIELD_STRAND])) { + $value = $data[self::FIELD_STRAND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STRAND_EXT]) && is_array($data[self::FIELD_STRAND_EXT])) { + $ext = $data[self::FIELD_STRAND_EXT]; } else { - $this->setWindowEnd(new FHIRInteger($data[self::FIELD_WINDOW_END])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setStrand($value); + } else if (is_array($value)) { + $this->setStrand(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setStrand(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStrand(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_WINDOW_START])) { - $ext = (isset($data[self::FIELD_WINDOW_START_EXT]) && is_array($data[self::FIELD_WINDOW_START_EXT])) - ? $data[self::FIELD_WINDOW_START_EXT] - : null; - if ($data[self::FIELD_WINDOW_START] instanceof FHIRInteger) { - $this->setWindowStart($data[self::FIELD_WINDOW_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WINDOW_START])) { - $this->setWindowStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_WINDOW_START]] + $ext)); - } else if (is_array($data[self::FIELD_WINDOW_START])) { - $this->setWindowStart(new FHIRInteger(array_merge($ext, $data[self::FIELD_WINDOW_START]))); + if (isset($data[self::FIELD_WINDOW_END]) || isset($data[self::FIELD_WINDOW_END_EXT])) { + if (isset($data[self::FIELD_WINDOW_END])) { + $value = $data[self::FIELD_WINDOW_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WINDOW_END_EXT]) && is_array($data[self::FIELD_WINDOW_END_EXT])) { + $ext = $data[self::FIELD_WINDOW_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setWindowEnd($value); + } else if (is_array($value)) { + $this->setWindowEnd(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setWindowEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setWindowEnd(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_WINDOW_START]) || isset($data[self::FIELD_WINDOW_START_EXT])) { + if (isset($data[self::FIELD_WINDOW_START])) { + $value = $data[self::FIELD_WINDOW_START]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WINDOW_START_EXT]) && is_array($data[self::FIELD_WINDOW_START_EXT])) { + $ext = $data[self::FIELD_WINDOW_START_EXT]; } else { - $this->setWindowStart(new FHIRInteger($data[self::FIELD_WINDOW_START])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setWindowStart($value); + } else if (is_array($value)) { + $this->setWindowStart(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setWindowStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWindowStart(new FHIRInteger($ext)); } } } @@ -663,8 +698,8 @@ public function setWindowStart($windowStart = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -823,8 +858,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getGenomeBuild())) { $a[self::FIELD_GENOME_BUILD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_GENOME_BUILD_EXT] = $enc; } } @@ -836,32 +873,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getReferenceSeqString())) { $a[self::FIELD_REFERENCE_SEQ_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_SEQ_STRING_EXT] = $enc; } } if (null !== ($v = $this->getStrand())) { $a[self::FIELD_STRAND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_STRAND_EXT] = $enc; } } if (null !== ($v = $this->getWindowEnd())) { $a[self::FIELD_WINDOW_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_WINDOW_END_EXT] = $enc; } } if (null !== ($v = $this->getWindowStart())) { $a[self::FIELD_WINDOW_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_WINDOW_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepository.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepository.php index 6fb27d8417..2d7e6d5792 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepository.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepository.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSequenceRepository extends FHIRBackboneElement const FIELD_VARIANTSET_ID_EXT = '_variantsetId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -187,100 +187,142 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATASET_ID])) { - $ext = (isset($data[self::FIELD_DATASET_ID_EXT]) && is_array($data[self::FIELD_DATASET_ID_EXT])) - ? $data[self::FIELD_DATASET_ID_EXT] - : null; - if ($data[self::FIELD_DATASET_ID] instanceof FHIRString) { - $this->setDatasetId($data[self::FIELD_DATASET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATASET_ID])) { - $this->setDatasetId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DATASET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DATASET_ID])) { - $this->setDatasetId(new FHIRString(array_merge($ext, $data[self::FIELD_DATASET_ID]))); - } + if (isset($data[self::FIELD_DATASET_ID]) || isset($data[self::FIELD_DATASET_ID_EXT])) { + if (isset($data[self::FIELD_DATASET_ID])) { + $value = $data[self::FIELD_DATASET_ID]; } else { - $this->setDatasetId(new FHIRString($data[self::FIELD_DATASET_ID])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_DATASET_ID_EXT]) && is_array($data[self::FIELD_DATASET_ID_EXT])) { + $ext = $data[self::FIELD_DATASET_ID_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; } - } - if (isset($data[self::FIELD_READSET_ID])) { - $ext = (isset($data[self::FIELD_READSET_ID_EXT]) && is_array($data[self::FIELD_READSET_ID_EXT])) - ? $data[self::FIELD_READSET_ID_EXT] - : null; - if ($data[self::FIELD_READSET_ID] instanceof FHIRString) { - $this->setReadsetId($data[self::FIELD_READSET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READSET_ID])) { - $this->setReadsetId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_READSET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_READSET_ID])) { - $this->setReadsetId(new FHIRString(array_merge($ext, $data[self::FIELD_READSET_ID]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDatasetId($value); + } else if (is_array($value)) { + $this->setDatasetId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDatasetId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setReadsetId(new FHIRString($data[self::FIELD_READSET_ID])); + } else if ([] !== $ext) { + $this->setDatasetId(new FHIRString($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRRepositoryType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRRepositoryType([FHIRRepositoryType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRRepositoryType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setType(new FHIRRepositoryType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_READSET_ID]) || isset($data[self::FIELD_READSET_ID_EXT])) { + if (isset($data[self::FIELD_READSET_ID])) { + $value = $data[self::FIELD_READSET_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_READSET_ID_EXT]) && is_array($data[self::FIELD_READSET_ID_EXT])) { + $ext = $data[self::FIELD_READSET_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReadsetId($value); + } else if (is_array($value)) { + $this->setReadsetId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReadsetId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReadsetId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRepositoryType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRRepositoryType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRRepositoryType([FHIRRepositoryType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRRepositoryType($ext)); } } - if (isset($data[self::FIELD_VARIANTSET_ID])) { - $ext = (isset($data[self::FIELD_VARIANTSET_ID_EXT]) && is_array($data[self::FIELD_VARIANTSET_ID_EXT])) - ? $data[self::FIELD_VARIANTSET_ID_EXT] - : null; - if ($data[self::FIELD_VARIANTSET_ID] instanceof FHIRString) { - $this->setVariantsetId($data[self::FIELD_VARIANTSET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VARIANTSET_ID])) { - $this->setVariantsetId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VARIANTSET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VARIANTSET_ID])) { - $this->setVariantsetId(new FHIRString(array_merge($ext, $data[self::FIELD_VARIANTSET_ID]))); + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VARIANTSET_ID]) || isset($data[self::FIELD_VARIANTSET_ID_EXT])) { + if (isset($data[self::FIELD_VARIANTSET_ID])) { + $value = $data[self::FIELD_VARIANTSET_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VARIANTSET_ID_EXT]) && is_array($data[self::FIELD_VARIANTSET_ID_EXT])) { + $ext = $data[self::FIELD_VARIANTSET_ID_EXT]; } else { - $this->setVariantsetId(new FHIRString($data[self::FIELD_VARIANTSET_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVariantsetId($value); + } else if (is_array($value)) { + $this->setVariantsetId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVariantsetId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVariantsetId(new FHIRString($ext)); } } } @@ -538,8 +580,8 @@ public function setVariantsetId($variantsetId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -683,46 +725,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDatasetId())) { $a[self::FIELD_DATASET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DATASET_ID_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getReadsetId())) { $a[self::FIELD_READSET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_READSET_ID_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRepositoryType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRepositoryType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getVariantsetId())) { $a[self::FIELD_VARIANTSET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VARIANTSET_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariant.php index dfd07be5ac..63f28b27e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRSequenceVariant extends FHIRBackboneElement const FIELD_VARIANT_POINTER = 'variantPointer'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -198,84 +198,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CIGAR])) { - $ext = (isset($data[self::FIELD_CIGAR_EXT]) && is_array($data[self::FIELD_CIGAR_EXT])) - ? $data[self::FIELD_CIGAR_EXT] - : null; - if ($data[self::FIELD_CIGAR] instanceof FHIRString) { - $this->setCigar($data[self::FIELD_CIGAR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CIGAR])) { - $this->setCigar(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CIGAR]] + $ext)); - } else if (is_array($data[self::FIELD_CIGAR])) { - $this->setCigar(new FHIRString(array_merge($ext, $data[self::FIELD_CIGAR]))); - } + if (isset($data[self::FIELD_CIGAR]) || isset($data[self::FIELD_CIGAR_EXT])) { + if (isset($data[self::FIELD_CIGAR])) { + $value = $data[self::FIELD_CIGAR]; } else { - $this->setCigar(new FHIRString($data[self::FIELD_CIGAR])); + $value = null; } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInteger) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInteger(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_CIGAR_EXT]) && is_array($data[self::FIELD_CIGAR_EXT])) { + $ext = $data[self::FIELD_CIGAR_EXT]; } else { - $this->setEnd(new FHIRInteger($data[self::FIELD_END])); + $ext = []; } - } - if (isset($data[self::FIELD_OBSERVED_ALLELE])) { - $ext = (isset($data[self::FIELD_OBSERVED_ALLELE_EXT]) && is_array($data[self::FIELD_OBSERVED_ALLELE_EXT])) - ? $data[self::FIELD_OBSERVED_ALLELE_EXT] - : null; - if ($data[self::FIELD_OBSERVED_ALLELE] instanceof FHIRString) { - $this->setObservedAllele($data[self::FIELD_OBSERVED_ALLELE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OBSERVED_ALLELE])) { - $this->setObservedAllele(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OBSERVED_ALLELE]] + $ext)); - } else if (is_array($data[self::FIELD_OBSERVED_ALLELE])) { - $this->setObservedAllele(new FHIRString(array_merge($ext, $data[self::FIELD_OBSERVED_ALLELE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCigar($value); + } else if (is_array($value)) { + $this->setCigar(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCigar(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setObservedAllele(new FHIRString($data[self::FIELD_OBSERVED_ALLELE])); + } else if ([] !== $ext) { + $this->setCigar(new FHIRString($ext)); } } - if (isset($data[self::FIELD_REFERENCE_ALLELE])) { - $ext = (isset($data[self::FIELD_REFERENCE_ALLELE_EXT]) && is_array($data[self::FIELD_REFERENCE_ALLELE_EXT])) - ? $data[self::FIELD_REFERENCE_ALLELE_EXT] - : null; - if ($data[self::FIELD_REFERENCE_ALLELE] instanceof FHIRString) { - $this->setReferenceAllele($data[self::FIELD_REFERENCE_ALLELE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE_ALLELE])) { - $this->setReferenceAllele(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE_ALLELE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE_ALLELE])) { - $this->setReferenceAllele(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE_ALLELE]))); + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_OBSERVED_ALLELE]) || isset($data[self::FIELD_OBSERVED_ALLELE_EXT])) { + if (isset($data[self::FIELD_OBSERVED_ALLELE])) { + $value = $data[self::FIELD_OBSERVED_ALLELE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OBSERVED_ALLELE_EXT]) && is_array($data[self::FIELD_OBSERVED_ALLELE_EXT])) { + $ext = $data[self::FIELD_OBSERVED_ALLELE_EXT]; } else { - $this->setReferenceAllele(new FHIRString($data[self::FIELD_REFERENCE_ALLELE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setObservedAllele($value); + } else if (is_array($value)) { + $this->setObservedAllele(new FHIRString(array_merge($ext, $value))); + } else { + $this->setObservedAllele(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setObservedAllele(new FHIRString($ext)); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInteger) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInteger(array_merge($ext, $data[self::FIELD_START]))); + if (isset($data[self::FIELD_REFERENCE_ALLELE]) || isset($data[self::FIELD_REFERENCE_ALLELE_EXT])) { + if (isset($data[self::FIELD_REFERENCE_ALLELE])) { + $value = $data[self::FIELD_REFERENCE_ALLELE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_ALLELE_EXT]) && is_array($data[self::FIELD_REFERENCE_ALLELE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_ALLELE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReferenceAllele($value); + } else if (is_array($value)) { + $this->setReferenceAllele(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReferenceAllele(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReferenceAllele(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; + } else { + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; } else { - $this->setStart(new FHIRInteger($data[self::FIELD_START])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_VARIANT_POINTER])) { @@ -564,8 +599,8 @@ public function setVariantPointer(FHIRReference $variantPointer = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -709,42 +744,55 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCigar())) { $a[self::FIELD_CIGAR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CIGAR_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getObservedAllele())) { $a[self::FIELD_OBSERVED_ALLELE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OBSERVED_ALLELE_EXT] = $enc; } } if (null !== ($v = $this->getReferenceAllele())) { $a[self::FIELD_REFERENCE_ALLELE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_ALLELE_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getVariantPointer())) { $a[self::FIELD_VARIANT_POINTER] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php index 56b456a56c..a9094c9bd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollection.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRSpecimenCollection extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -199,20 +199,27 @@ public function __construct($data = null) $this->setBodySite(new FHIRCodeableConcept($data[self::FIELD_BODY_SITE])); } } - if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) - ? $data[self::FIELD_COLLECTED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_COLLECTED_DATE_TIME] instanceof FHIRDateTime) { - $this->setCollectedDateTime($data[self::FIELD_COLLECTED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_COLLECTED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_COLLECTED_DATE_TIME])) { - $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_COLLECTED_DATE_TIME]))); - } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME]) || isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_COLLECTED_DATE_TIME])) { + $value = $data[self::FIELD_COLLECTED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COLLECTED_DATE_TIME_EXT]) && is_array($data[self::FIELD_COLLECTED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_COLLECTED_DATE_TIME_EXT]; } else { - $this->setCollectedDateTime(new FHIRDateTime($data[self::FIELD_COLLECTED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCollectedDateTime($value); + } else if (is_array($value)) { + $this->setCollectedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCollectedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCollectedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_COLLECTED_PERIOD])) { @@ -482,8 +489,8 @@ public function setQuantity(FHIRQuantity $quantity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -598,8 +605,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getCollectedDateTime())) { $a[self::FIELD_COLLECTED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_COLLECTED_DATE_TIME_EXT] = $enc; } } @@ -615,6 +624,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php index e21b8a7339..f4dd11d280 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRSpecimenContainer extends FHIRBackboneElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -224,20 +224,27 @@ public function __construct($data = null) $this->setCapacity(new FHIRQuantity($data[self::FIELD_CAPACITY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -567,8 +574,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -702,13 +709,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getSpecimenQuantity())) { $a[self::FIELD_SPECIMEN_QUANTITY] = $v; @@ -716,6 +731,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php index 084386dea5..bf8727befb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRSpecimenProcessing extends FHIRBackboneElement const FIELD_TIME_PERIOD = 'timePeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -195,20 +195,27 @@ public function __construct($data = null) $this->addAdditive(new FHIRReference($data[self::FIELD_ADDITIVE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROCEDURE])) { @@ -218,20 +225,27 @@ public function __construct($data = null) $this->setProcedure(new FHIRCodeableConcept($data[self::FIELD_PROCEDURE])); } } - if (isset($data[self::FIELD_TIME_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIME_DATE_TIME_EXT])) - ? $data[self::FIELD_TIME_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIME_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimeDateTime($data[self::FIELD_TIME_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIME_DATE_TIME])) { - $this->setTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIME_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIME_DATE_TIME])) { - $this->setTimeDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIME_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIME_DATE_TIME]) || isset($data[self::FIELD_TIME_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIME_DATE_TIME])) { + $value = $data[self::FIELD_TIME_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIME_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIME_DATE_TIME_EXT]; } else { - $this->setTimeDateTime(new FHIRDateTime($data[self::FIELD_TIME_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimeDateTime($value); + } else if (is_array($value)) { + $this->setTimeDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimeDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimeDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIME_PERIOD])) { @@ -476,8 +490,8 @@ public function setTimePeriod(FHIRPeriod $timePeriod = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -597,12 +611,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdditive())) { - $a[self::FIELD_ADDITIVE] = $vs; + $a[self::FIELD_ADDITIVE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIVE][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -611,14 +633,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimeDateTime())) { $a[self::FIELD_TIME_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIME_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getTimePeriod())) { $a[self::FIELD_TIME_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php index 1deb435a75..010c19451a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferential.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureDefinitionDifferential extends FHIRBackboneElement const FIELD_ELEMENT = 'element'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Captures constraints on each element within the resource, profile, or extension. @@ -222,8 +222,8 @@ public function setElement(array $element = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -303,7 +303,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php index 6111285a58..6ebb99cd3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRStructureDefinitionMapping extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -165,68 +165,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -420,8 +448,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -545,32 +573,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php index 770906cd05..33d2d66dfb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRStructureDefinitionSnapshot extends FHIRBackboneElement const FIELD_ELEMENT = 'element'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Captures constraints on each element within the resource, profile, or extension. @@ -222,8 +222,8 @@ public function setElement(array $element = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -303,7 +303,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php index 84cffdd7d0..22f6d50e1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRStructureMapDependent extends FHIRBackboneElement const FIELD_VARIABLE_EXT = '_variable'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -137,49 +137,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRId) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRId(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRId($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRId(array_merge($ext, $value))); + } else { + $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRId($ext)); } } - if (isset($data[self::FIELD_VARIABLE])) { - $ext = (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) - ? $data[self::FIELD_VARIABLE_EXT] - : null; - if (is_array($data[self::FIELD_VARIABLE])) { - foreach($data[self::FIELD_VARIABLE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addVariable($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addVariable(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addVariable(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_VARIABLE]) || isset($data[self::FIELD_VARIABLE_EXT])) { + if (isset($data[self::FIELD_VARIABLE])) { + $value = $data[self::FIELD_VARIABLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) { + $ext = $data[self::FIELD_VARIABLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addVariable($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addVariable($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addVariable(new FHIRString(array_merge($v, $iext))); + } else { + $this->addVariable(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addVariable(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addVariable(new FHIRString(array_merge($ext, $value))); + } else { + $this->addVariable(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addVariable(new FHIRString($iext)); } - } elseif ($data[self::FIELD_VARIABLE] instanceof FHIRString) { - $this->addVariable($data[self::FIELD_VARIABLE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_VARIABLE])) { - $this->addVariable(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VARIABLE]] + $ext)); - } else { - $this->addVariable(new FHIRString($data[self::FIELD_VARIABLE])); } } } @@ -317,8 +333,8 @@ public function setVariable(array $variable = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -413,25 +429,38 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getVariable())) { $a[self::FIELD_VARIABLE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_VARIABLE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_VARIABLE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_VARIABLE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_VARIABLE_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php index 2d79a1121f..65eaf6eddb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRStructureMapGroup extends FHIRBackboneElement const FIELD_TYPE_MODE_EXT = '_typeMode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -194,36 +194,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_EXTENDS])) { - $ext = (isset($data[self::FIELD_EXTENDS_EXT]) && is_array($data[self::FIELD_EXTENDS_EXT])) - ? $data[self::FIELD_EXTENDS_EXT] - : null; - if ($data[self::FIELD_EXTENDS] instanceof FHIRId) { - $this->setExtends($data[self::FIELD_EXTENDS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXTENDS])) { - $this->setExtends(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_EXTENDS]] + $ext)); - } else if (is_array($data[self::FIELD_EXTENDS])) { - $this->setExtends(new FHIRId(array_merge($ext, $data[self::FIELD_EXTENDS]))); + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXTENDS]) || isset($data[self::FIELD_EXTENDS_EXT])) { + if (isset($data[self::FIELD_EXTENDS])) { + $value = $data[self::FIELD_EXTENDS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXTENDS_EXT]) && is_array($data[self::FIELD_EXTENDS_EXT])) { + $ext = $data[self::FIELD_EXTENDS_EXT]; } else { - $this->setExtends(new FHIRId($data[self::FIELD_EXTENDS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setExtends($value); + } else if (is_array($value)) { + $this->setExtends(new FHIRId(array_merge($ext, $value))); + } else { + $this->setExtends(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExtends(new FHIRId($ext)); } } if (isset($data[self::FIELD_INPUT])) { @@ -244,20 +258,27 @@ public function __construct($data = null) $this->addInput(new FHIRStructureMapInput($data[self::FIELD_INPUT])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRId) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRId(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRId($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRId(array_merge($ext, $value))); + } else { + $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRId($ext)); } } if (isset($data[self::FIELD_RULE])) { @@ -278,20 +299,27 @@ public function __construct($data = null) $this->addRule(new FHIRStructureMapRule($data[self::FIELD_RULE])); } } - if (isset($data[self::FIELD_TYPE_MODE])) { - $ext = (isset($data[self::FIELD_TYPE_MODE_EXT]) && is_array($data[self::FIELD_TYPE_MODE_EXT])) - ? $data[self::FIELD_TYPE_MODE_EXT] - : null; - if ($data[self::FIELD_TYPE_MODE] instanceof FHIRStructureMapGroupTypeMode) { - $this->setTypeMode($data[self::FIELD_TYPE_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE_MODE])) { - $this->setTypeMode(new FHIRStructureMapGroupTypeMode([FHIRStructureMapGroupTypeMode::FIELD_VALUE => $data[self::FIELD_TYPE_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE_MODE])) { - $this->setTypeMode(new FHIRStructureMapGroupTypeMode(array_merge($ext, $data[self::FIELD_TYPE_MODE]))); - } + if (isset($data[self::FIELD_TYPE_MODE]) || isset($data[self::FIELD_TYPE_MODE_EXT])) { + if (isset($data[self::FIELD_TYPE_MODE])) { + $value = $data[self::FIELD_TYPE_MODE]; } else { - $this->setTypeMode(new FHIRStructureMapGroupTypeMode($data[self::FIELD_TYPE_MODE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_MODE_EXT]) && is_array($data[self::FIELD_TYPE_MODE_EXT])) { + $ext = $data[self::FIELD_TYPE_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapGroupTypeMode) { + $this->setTypeMode($value); + } else if (is_array($value)) { + $this->setTypeMode(new FHIRStructureMapGroupTypeMode(array_merge($ext, $value))); + } else { + $this->setTypeMode(new FHIRStructureMapGroupTypeMode([FHIRStructureMapGroupTypeMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTypeMode(new FHIRStructureMapGroupTypeMode($ext)); } } } @@ -584,8 +612,8 @@ public function setTypeMode(FHIRStructureMapGroupTypeMode $typeMode = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -727,38 +755,61 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getExtends())) { $a[self::FIELD_EXTENDS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_EXTENDS_EXT] = $enc; } } if ([] !== ($vs = $this->getInput())) { - $a[self::FIELD_INPUT] = $vs; + $a[self::FIELD_INPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INPUT][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } } if (null !== ($v = $this->getTypeMode())) { $a[self::FIELD_TYPE_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapGroupTypeMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapGroupTypeMode::FIELD_VALUE]); $a[self::FIELD_TYPE_MODE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php index cd847c8a42..11817a17dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRStructureMapInput extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -159,68 +159,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $value = null; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRStructureMapInputMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRStructureMapInputMode([FHIRStructureMapInputMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRStructureMapInputMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setMode(new FHIRStructureMapInputMode($data[self::FIELD_MODE])); + $ext = []; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRId) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRId(array_merge($ext, $data[self::FIELD_NAME]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setName(new FHIRId($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapInputMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRStructureMapInputMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRStructureMapInputMode([FHIRStructureMapInputMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRStructureMapInputMode($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRId(array_merge($ext, $value))); + } else { + $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); } } } @@ -398,8 +426,8 @@ public function setType($type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -515,32 +543,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapInputMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapInputMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php index 437029a6a8..f9933b31b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRStructureMapParameter extends FHIRBackboneElement const FIELD_VALUE_STRING_EXT = '_valueString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -175,84 +175,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $ext = []; } - } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); } } } @@ -478,8 +513,8 @@ public function setValueString($valueString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -617,39 +652,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php index 78c52f2b4f..13eedf129c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRStructureMapRule extends FHIRBackboneElement const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A Map of relationships between 2 structures that can be used to transform data. @@ -195,36 +195,50 @@ public function __construct($data = null) $this->addDependent(new FHIRStructureMapDependent($data[self::FIELD_DEPENDENT])); } } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRId) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRId(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRId($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRId(array_merge($ext, $value))); + } else { + $this->setName(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRId($ext)); } } if (isset($data[self::FIELD_RULE])) { @@ -590,8 +604,8 @@ public function setTarget(array $target = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -738,30 +752,61 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getDependent())) { - $a[self::FIELD_DEPENDENT] = $vs; + $a[self::FIELD_DEPENDENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEPENDENT][] = $v; + } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } } if ([] !== ($vs = $this->getSource())) { - $a[self::FIELD_SOURCE] = $vs; + $a[self::FIELD_SOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SOURCE][] = $v; + } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php index 09e687cc5b..83089019f4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -189,7 +189,7 @@ class FHIRStructureMapSource extends FHIRBackboneElement const FIELD_VARIABLE_EXT = '_variable'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -778,52 +778,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CHECK])) { - $ext = (isset($data[self::FIELD_CHECK_EXT]) && is_array($data[self::FIELD_CHECK_EXT])) - ? $data[self::FIELD_CHECK_EXT] - : null; - if ($data[self::FIELD_CHECK] instanceof FHIRString) { - $this->setCheck($data[self::FIELD_CHECK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CHECK])) { - $this->setCheck(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CHECK]] + $ext)); - } else if (is_array($data[self::FIELD_CHECK])) { - $this->setCheck(new FHIRString(array_merge($ext, $data[self::FIELD_CHECK]))); - } + if (isset($data[self::FIELD_CHECK]) || isset($data[self::FIELD_CHECK_EXT])) { + if (isset($data[self::FIELD_CHECK])) { + $value = $data[self::FIELD_CHECK]; } else { - $this->setCheck(new FHIRString($data[self::FIELD_CHECK])); + $value = null; } - } - if (isset($data[self::FIELD_CONDITION])) { - $ext = (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) - ? $data[self::FIELD_CONDITION_EXT] - : null; - if ($data[self::FIELD_CONDITION] instanceof FHIRString) { - $this->setCondition($data[self::FIELD_CONDITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONDITION])) { - $this->setCondition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONDITION]] + $ext)); - } else if (is_array($data[self::FIELD_CONDITION])) { - $this->setCondition(new FHIRString(array_merge($ext, $data[self::FIELD_CONDITION]))); - } + if (isset($data[self::FIELD_CHECK_EXT]) && is_array($data[self::FIELD_CHECK_EXT])) { + $ext = $data[self::FIELD_CHECK_EXT]; } else { - $this->setCondition(new FHIRString($data[self::FIELD_CONDITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCheck($value); + } else if (is_array($value)) { + $this->setCheck(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCheck(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCheck(new FHIRString($ext)); } } - if (isset($data[self::FIELD_CONTEXT])) { - $ext = (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) - ? $data[self::FIELD_CONTEXT_EXT] - : null; - if ($data[self::FIELD_CONTEXT] instanceof FHIRId) { - $this->setContext($data[self::FIELD_CONTEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTEXT])) { - $this->setContext(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_CONTEXT]] + $ext)); - } else if (is_array($data[self::FIELD_CONTEXT])) { - $this->setContext(new FHIRId(array_merge($ext, $data[self::FIELD_CONTEXT]))); + if (isset($data[self::FIELD_CONDITION]) || isset($data[self::FIELD_CONDITION_EXT])) { + if (isset($data[self::FIELD_CONDITION])) { + $value = $data[self::FIELD_CONDITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) { + $ext = $data[self::FIELD_CONDITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCondition($value); + } else if (is_array($value)) { + $this->setCondition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCondition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCondition(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CONTEXT]) || isset($data[self::FIELD_CONTEXT_EXT])) { + if (isset($data[self::FIELD_CONTEXT])) { + $value = $data[self::FIELD_CONTEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) { + $ext = $data[self::FIELD_CONTEXT_EXT]; } else { - $this->setContext(new FHIRId($data[self::FIELD_CONTEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setContext($value); + } else if (is_array($value)) { + $this->setContext(new FHIRId(array_merge($ext, $value))); + } else { + $this->setContext(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContext(new FHIRId($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_ADDRESS])) { @@ -854,52 +875,73 @@ public function __construct($data = null) $this->setDefaultValueAttachment(new FHIRAttachment($data[self::FIELD_DEFAULT_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setDefaultValueBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]; } else { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setDefaultValueBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]; } else { - $this->setDefaultValueBoolean(new FHIRBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setDefaultValueBase64Binary($value); + } else if (is_array($value)) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_CODE] instanceof FHIRCode) { - $this->setDefaultValueCode($data[self::FIELD_DEFAULT_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_CODE]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]) || isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDefaultValueBoolean($value); + } else if (is_array($value)) { + $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE]) || isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_CODE_EXT]; } else { - $this->setDefaultValueCode(new FHIRCode($data[self::FIELD_DEFAULT_VALUE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setDefaultValueCode($value); + } else if (is_array($value)) { + $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { @@ -930,52 +972,73 @@ public function __construct($data = null) $this->setDefaultValueCount(new FHIRCount($data[self::FIELD_DEFAULT_VALUE_COUNT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE] instanceof FHIRDate) { - $this->setDefaultValueDate($data[self::FIELD_DEFAULT_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE]; } else { - $this->setDefaultValueDate(new FHIRDate($data[self::FIELD_DEFAULT_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setDefaultValueDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_EXT]; } else { - $this->setDefaultValueDateTime(new FHIRDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDefaultValueDate($value); + } else if (is_array($value)) { + $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setDefaultValueDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDefaultValueDateTime($value); + } else if (is_array($value)) { + $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL]) || isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]; } else { - $this->setDefaultValueDecimal(new FHIRDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDefaultValueDecimal($value); + } else if (is_array($value)) { + $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_DISTANCE])) { @@ -999,20 +1062,27 @@ public function __construct($data = null) $this->setDefaultValueHumanName(new FHIRHumanName($data[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_ID] instanceof FHIRId) { - $this->setDefaultValueId($data[self::FIELD_DEFAULT_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_ID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID]) || isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_ID_EXT]; } else { - $this->setDefaultValueId(new FHIRId($data[self::FIELD_DEFAULT_VALUE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setDefaultValueId($value); + } else if (is_array($value)) { + $this->setDefaultValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { @@ -1022,52 +1092,73 @@ public function __construct($data = null) $this->setDefaultValueIdentifier(new FHIRIdentifier($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setDefaultValueInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT]) || isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INSTANT]; } else { - $this->setDefaultValueInstant(new FHIRInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setDefaultValueInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]; } else { - $this->setDefaultValueInteger(new FHIRInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setDefaultValueInstant($value); + } else if (is_array($value)) { + $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setDefaultValueMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER]) || isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDefaultValueInteger($value); + } else if (is_array($value)) { + $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]) || isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]; } else { - $this->setDefaultValueMarkdown(new FHIRMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDefaultValueMarkdown($value); + } else if (is_array($value)) { + $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_META])) { @@ -1084,20 +1175,27 @@ public function __construct($data = null) $this->setDefaultValueMoney(new FHIRMoney($data[self::FIELD_DEFAULT_VALUE_MONEY])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_OID] instanceof FHIROid) { - $this->setDefaultValueOid($data[self::FIELD_DEFAULT_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_OID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID]) || isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_OID_EXT]; } else { - $this->setDefaultValueOid(new FHIROid($data[self::FIELD_DEFAULT_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setDefaultValueOid($value); + } else if (is_array($value)) { + $this->setDefaultValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_PERIOD])) { @@ -1107,20 +1205,27 @@ public function __construct($data = null) $this->setDefaultValuePeriod(new FHIRPeriod($data[self::FIELD_DEFAULT_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setDefaultValuePositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]; } else { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDefaultValuePositiveInt($value); + } else if (is_array($value)) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_QUANTITY])) { @@ -1165,36 +1270,50 @@ public function __construct($data = null) $this->setDefaultValueSignature(new FHIRSignature($data[self::FIELD_DEFAULT_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_STRING] instanceof FHIRString) { - $this->setDefaultValueString($data[self::FIELD_DEFAULT_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_STRING]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING]) || isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { + $value = $data[self::FIELD_DEFAULT_VALUE_STRING]; } else { - $this->setDefaultValueString(new FHIRString($data[self::FIELD_DEFAULT_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_TIME] instanceof FHIRTime) { - $this->setDefaultValueTime($data[self::FIELD_DEFAULT_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_TIME]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefaultValueString($value); + } else if (is_array($value)) { + $this->setDefaultValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_TIME_EXT]; } else { - $this->setDefaultValueTime(new FHIRTime($data[self::FIELD_DEFAULT_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setDefaultValueTime($value); + } else if (is_array($value)) { + $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_TIMING])) { @@ -1204,132 +1323,188 @@ public function __construct($data = null) $this->setDefaultValueTiming(new FHIRTiming($data[self::FIELD_DEFAULT_VALUE_TIMING])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setDefaultValueUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]; } else { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_URI] instanceof FHIRUri) { - $this->setDefaultValueUri($data[self::FIELD_DEFAULT_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_URI]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setDefaultValueUri(new FHIRUri($data[self::FIELD_DEFAULT_VALUE_URI])); + $ext = []; } - } - if (isset($data[self::FIELD_ELEMENT])) { - $ext = (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) - ? $data[self::FIELD_ELEMENT_EXT] - : null; - if ($data[self::FIELD_ELEMENT] instanceof FHIRString) { - $this->setElement($data[self::FIELD_ELEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ELEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRString(array_merge($ext, $data[self::FIELD_ELEMENT]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setDefaultValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setElement(new FHIRString($data[self::FIELD_ELEMENT])); + } else if ([] !== $ext) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_LIST_MODE])) { - $ext = (isset($data[self::FIELD_LIST_MODE_EXT]) && is_array($data[self::FIELD_LIST_MODE_EXT])) - ? $data[self::FIELD_LIST_MODE_EXT] - : null; - if ($data[self::FIELD_LIST_MODE] instanceof FHIRStructureMapSourceListMode) { - $this->setListMode($data[self::FIELD_LIST_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LIST_MODE])) { - $this->setListMode(new FHIRStructureMapSourceListMode([FHIRStructureMapSourceListMode::FIELD_VALUE => $data[self::FIELD_LIST_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_LIST_MODE])) { - $this->setListMode(new FHIRStructureMapSourceListMode(array_merge($ext, $data[self::FIELD_LIST_MODE]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_URI]) || isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { + $value = $data[self::FIELD_DEFAULT_VALUE_URI]; } else { - $this->setListMode(new FHIRStructureMapSourceListMode($data[self::FIELD_LIST_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_URI_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefaultValueUri($value); + } else if (is_array($value)) { + $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueUri(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + if (isset($data[self::FIELD_ELEMENT]) || isset($data[self::FIELD_ELEMENT_EXT])) { + if (isset($data[self::FIELD_ELEMENT])) { + $value = $data[self::FIELD_ELEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) { + $ext = $data[self::FIELD_ELEMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setElement($value); + } else if (is_array($value)) { + $this->setElement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setElement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setElement(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_LIST_MODE]) || isset($data[self::FIELD_LIST_MODE_EXT])) { + if (isset($data[self::FIELD_LIST_MODE])) { + $value = $data[self::FIELD_LIST_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIST_MODE_EXT]) && is_array($data[self::FIELD_LIST_MODE_EXT])) { + $ext = $data[self::FIELD_LIST_MODE_EXT]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapSourceListMode) { + $this->setListMode($value); + } else if (is_array($value)) { + $this->setListMode(new FHIRStructureMapSourceListMode(array_merge($ext, $value))); + } else { + $this->setListMode(new FHIRStructureMapSourceListMode([FHIRStructureMapSourceListMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setListMode(new FHIRStructureMapSourceListMode($ext)); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRString) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRString(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; } else { - $this->setType(new FHIRString($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_VARIABLE])) { - $ext = (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) - ? $data[self::FIELD_VARIABLE_EXT] - : null; - if ($data[self::FIELD_VARIABLE] instanceof FHIRId) { - $this->setVariable($data[self::FIELD_VARIABLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VARIABLE])) { - $this->setVariable(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VARIABLE]] + $ext)); - } else if (is_array($data[self::FIELD_VARIABLE])) { - $this->setVariable(new FHIRId(array_merge($ext, $data[self::FIELD_VARIABLE]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRString(array_merge($ext, $value))); + } else { + $this->setType(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VARIABLE]) || isset($data[self::FIELD_VARIABLE_EXT])) { + if (isset($data[self::FIELD_VARIABLE])) { + $value = $data[self::FIELD_VARIABLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) { + $ext = $data[self::FIELD_VARIABLE_EXT]; } else { - $this->setVariable(new FHIRId($data[self::FIELD_VARIABLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setVariable($value); + } else if (is_array($value)) { + $this->setVariable(new FHIRId(array_merge($ext, $value))); + } else { + $this->setVariable(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVariable(new FHIRId($ext)); } } } @@ -3057,8 +3232,8 @@ public function setVariable($variable = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -3600,22 +3775,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCheck())) { $a[self::FIELD_CHECK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CHECK_EXT] = $enc; } } if (null !== ($v = $this->getCondition())) { $a[self::FIELD_CONDITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONDITION_EXT] = $enc; } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_CONTEXT_EXT] = $enc; } } @@ -3633,22 +3814,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueBase64Binary())) { $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueBoolean())) { $a[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueCode())) { $a[self::FIELD_DEFAULT_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_CODE_EXT] = $enc; } } @@ -3666,22 +3853,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueDate())) { $a[self::FIELD_DEFAULT_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDateTime())) { $a[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDecimal())) { $a[self::FIELD_DEFAULT_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] = $enc; } } @@ -3696,8 +3889,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueId())) { $a[self::FIELD_DEFAULT_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_ID_EXT] = $enc; } } @@ -3706,22 +3901,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueInstant())) { $a[self::FIELD_DEFAULT_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueInteger())) { $a[self::FIELD_DEFAULT_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueMarkdown())) { $a[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] = $enc; } } @@ -3733,8 +3934,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueOid())) { $a[self::FIELD_DEFAULT_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_OID_EXT] = $enc; } } @@ -3743,8 +3946,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValuePositiveInt())) { $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -3768,15 +3973,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueString())) { $a[self::FIELD_DEFAULT_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueTime())) { $a[self::FIELD_DEFAULT_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_TIME_EXT] = $enc; } } @@ -3785,60 +3994,79 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueUnsignedInt())) { $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueUri())) { $a[self::FIELD_DEFAULT_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getElement())) { $a[self::FIELD_ELEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ELEMENT_EXT] = $enc; } } if (null !== ($v = $this->getListMode())) { $a[self::FIELD_LIST_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapSourceListMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapSourceListMode::FIELD_VALUE]); $a[self::FIELD_LIST_MODE_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getVariable())) { $a[self::FIELD_VARIABLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VARIABLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php index 161bd31244..cdf631bed8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRStructureMapStructure extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -156,68 +156,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->setAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ALIAS])) { - $this->setAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else if (is_array($data[self::FIELD_ALIAS])) { - $this->setAlias(new FHIRString(array_merge($ext, $data[self::FIELD_ALIAS]))); - } + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; } else { - $this->setAlias(new FHIRString($data[self::FIELD_ALIAS])); + $value = null; } - } - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); + $ext = []; } - } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRStructureMapModelMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRStructureMapModelMode([FHIRStructureMapModelMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRStructureMapModelMode(array_merge($ext, $data[self::FIELD_MODE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAlias($value); + } else if (is_array($value)) { + $this->setAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAlias(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; } else { - $this->setMode(new FHIRStructureMapModelMode($data[self::FIELD_MODE])); + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapModelMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRStructureMapModelMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRStructureMapModelMode([FHIRStructureMapModelMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRStructureMapModelMode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -389,8 +417,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -506,32 +534,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAlias())) { $a[self::FIELD_ALIAS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ALIAS_EXT] = $enc; } } if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapModelMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapModelMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php index f06d8a7ecc..21b30d8fb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTarget.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRStructureMapTarget extends FHIRBackboneElement const FIELD_VARIABLE_EXT = '_variable'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -214,97 +214,134 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONTEXT])) { - $ext = (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) - ? $data[self::FIELD_CONTEXT_EXT] - : null; - if ($data[self::FIELD_CONTEXT] instanceof FHIRId) { - $this->setContext($data[self::FIELD_CONTEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTEXT])) { - $this->setContext(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_CONTEXT]] + $ext)); - } else if (is_array($data[self::FIELD_CONTEXT])) { - $this->setContext(new FHIRId(array_merge($ext, $data[self::FIELD_CONTEXT]))); - } + if (isset($data[self::FIELD_CONTEXT]) || isset($data[self::FIELD_CONTEXT_EXT])) { + if (isset($data[self::FIELD_CONTEXT])) { + $value = $data[self::FIELD_CONTEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) { + $ext = $data[self::FIELD_CONTEXT_EXT]; } else { - $this->setContext(new FHIRId($data[self::FIELD_CONTEXT])); - } - } - if (isset($data[self::FIELD_CONTEXT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) - ? $data[self::FIELD_CONTEXT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTEXT_TYPE] instanceof FHIRStructureMapContextType) { - $this->setContextType($data[self::FIELD_CONTEXT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRStructureMapContextType([FHIRStructureMapContextType::FIELD_VALUE => $data[self::FIELD_CONTEXT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRStructureMapContextType(array_merge($ext, $data[self::FIELD_CONTEXT_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setContext($value); + } else if (is_array($value)) { + $this->setContext(new FHIRId(array_merge($ext, $value))); + } else { + $this->setContext(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContext(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_CONTEXT_TYPE]) || isset($data[self::FIELD_CONTEXT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTEXT_TYPE])) { + $value = $data[self::FIELD_CONTEXT_TYPE]; } else { - $this->setContextType(new FHIRStructureMapContextType($data[self::FIELD_CONTEXT_TYPE])); - } - } - if (isset($data[self::FIELD_ELEMENT])) { - $ext = (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) - ? $data[self::FIELD_ELEMENT_EXT] - : null; - if ($data[self::FIELD_ELEMENT] instanceof FHIRString) { - $this->setElement($data[self::FIELD_ELEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ELEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_ELEMENT])) { - $this->setElement(new FHIRString(array_merge($ext, $data[self::FIELD_ELEMENT]))); + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTEXT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapContextType) { + $this->setContextType($value); + } else if (is_array($value)) { + $this->setContextType(new FHIRStructureMapContextType(array_merge($ext, $value))); + } else { + $this->setContextType(new FHIRStructureMapContextType([FHIRStructureMapContextType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContextType(new FHIRStructureMapContextType($ext)); + } + } + if (isset($data[self::FIELD_ELEMENT]) || isset($data[self::FIELD_ELEMENT_EXT])) { + if (isset($data[self::FIELD_ELEMENT])) { + $value = $data[self::FIELD_ELEMENT]; } else { - $this->setElement(new FHIRString($data[self::FIELD_ELEMENT])); + $value = null; + } + if (isset($data[self::FIELD_ELEMENT_EXT]) && is_array($data[self::FIELD_ELEMENT_EXT])) { + $ext = $data[self::FIELD_ELEMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setElement($value); + } else if (is_array($value)) { + $this->setElement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setElement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setElement(new FHIRString($ext)); } } - if (isset($data[self::FIELD_LIST_MODE])) { - $ext = (isset($data[self::FIELD_LIST_MODE_EXT]) && is_array($data[self::FIELD_LIST_MODE_EXT])) - ? $data[self::FIELD_LIST_MODE_EXT] - : null; - if (is_array($data[self::FIELD_LIST_MODE])) { - foreach($data[self::FIELD_LIST_MODE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRStructureMapTargetListMode) { - $this->addListMode($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addListMode(new FHIRStructureMapTargetListMode([FHIRStructureMapTargetListMode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addListMode(new FHIRStructureMapTargetListMode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LIST_MODE]) || isset($data[self::FIELD_LIST_MODE_EXT])) { + if (isset($data[self::FIELD_LIST_MODE])) { + $value = $data[self::FIELD_LIST_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIST_MODE_EXT]) && is_array($data[self::FIELD_LIST_MODE_EXT])) { + $ext = $data[self::FIELD_LIST_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapTargetListMode) { + $this->addListMode($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRStructureMapTargetListMode) { + $this->addListMode($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addListMode(new FHIRStructureMapTargetListMode(array_merge($v, $iext))); + } else { + $this->addListMode(new FHIRStructureMapTargetListMode([FHIRStructureMapTargetListMode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addListMode(new FHIRStructureMapTargetListMode($v)); } + } elseif (is_array($value)) { + $this->addListMode(new FHIRStructureMapTargetListMode(array_merge($ext, $value))); + } else { + $this->addListMode(new FHIRStructureMapTargetListMode([FHIRStructureMapTargetListMode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_LIST_MODE] instanceof FHIRStructureMapTargetListMode) { - $this->addListMode($data[self::FIELD_LIST_MODE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LIST_MODE])) { - $this->addListMode(new FHIRStructureMapTargetListMode([FHIRStructureMapTargetListMode::FIELD_VALUE => $data[self::FIELD_LIST_MODE]] + $ext)); - } else { - $this->addListMode(new FHIRStructureMapTargetListMode($data[self::FIELD_LIST_MODE])); - } - } - if (isset($data[self::FIELD_LIST_RULE_ID])) { - $ext = (isset($data[self::FIELD_LIST_RULE_ID_EXT]) && is_array($data[self::FIELD_LIST_RULE_ID_EXT])) - ? $data[self::FIELD_LIST_RULE_ID_EXT] - : null; - if ($data[self::FIELD_LIST_RULE_ID] instanceof FHIRId) { - $this->setListRuleId($data[self::FIELD_LIST_RULE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LIST_RULE_ID])) { - $this->setListRuleId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_LIST_RULE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_LIST_RULE_ID])) { - $this->setListRuleId(new FHIRId(array_merge($ext, $data[self::FIELD_LIST_RULE_ID]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addListMode(new FHIRStructureMapTargetListMode($iext)); } + } + } + if (isset($data[self::FIELD_LIST_RULE_ID]) || isset($data[self::FIELD_LIST_RULE_ID_EXT])) { + if (isset($data[self::FIELD_LIST_RULE_ID])) { + $value = $data[self::FIELD_LIST_RULE_ID]; } else { - $this->setListRuleId(new FHIRId($data[self::FIELD_LIST_RULE_ID])); + $value = null; + } + if (isset($data[self::FIELD_LIST_RULE_ID_EXT]) && is_array($data[self::FIELD_LIST_RULE_ID_EXT])) { + $ext = $data[self::FIELD_LIST_RULE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setListRuleId($value); + } else if (is_array($value)) { + $this->setListRuleId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setListRuleId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setListRuleId(new FHIRId($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -325,36 +362,50 @@ public function __construct($data = null) $this->addParameter(new FHIRStructureMapParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_TRANSFORM])) { - $ext = (isset($data[self::FIELD_TRANSFORM_EXT]) && is_array($data[self::FIELD_TRANSFORM_EXT])) - ? $data[self::FIELD_TRANSFORM_EXT] - : null; - if ($data[self::FIELD_TRANSFORM] instanceof FHIRStructureMapTransform) { - $this->setTransform($data[self::FIELD_TRANSFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TRANSFORM])) { - $this->setTransform(new FHIRStructureMapTransform([FHIRStructureMapTransform::FIELD_VALUE => $data[self::FIELD_TRANSFORM]] + $ext)); - } else if (is_array($data[self::FIELD_TRANSFORM])) { - $this->setTransform(new FHIRStructureMapTransform(array_merge($ext, $data[self::FIELD_TRANSFORM]))); - } + if (isset($data[self::FIELD_TRANSFORM]) || isset($data[self::FIELD_TRANSFORM_EXT])) { + if (isset($data[self::FIELD_TRANSFORM])) { + $value = $data[self::FIELD_TRANSFORM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TRANSFORM_EXT]) && is_array($data[self::FIELD_TRANSFORM_EXT])) { + $ext = $data[self::FIELD_TRANSFORM_EXT]; } else { - $this->setTransform(new FHIRStructureMapTransform($data[self::FIELD_TRANSFORM])); - } - } - if (isset($data[self::FIELD_VARIABLE])) { - $ext = (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) - ? $data[self::FIELD_VARIABLE_EXT] - : null; - if ($data[self::FIELD_VARIABLE] instanceof FHIRId) { - $this->setVariable($data[self::FIELD_VARIABLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VARIABLE])) { - $this->setVariable(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VARIABLE]] + $ext)); - } else if (is_array($data[self::FIELD_VARIABLE])) { - $this->setVariable(new FHIRId(array_merge($ext, $data[self::FIELD_VARIABLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureMapTransform) { + $this->setTransform($value); + } else if (is_array($value)) { + $this->setTransform(new FHIRStructureMapTransform(array_merge($ext, $value))); + } else { + $this->setTransform(new FHIRStructureMapTransform([FHIRStructureMapTransform::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTransform(new FHIRStructureMapTransform($ext)); + } + } + if (isset($data[self::FIELD_VARIABLE]) || isset($data[self::FIELD_VARIABLE_EXT])) { + if (isset($data[self::FIELD_VARIABLE])) { + $value = $data[self::FIELD_VARIABLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VARIABLE_EXT]) && is_array($data[self::FIELD_VARIABLE_EXT])) { + $ext = $data[self::FIELD_VARIABLE_EXT]; } else { - $this->setVariable(new FHIRId($data[self::FIELD_VARIABLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setVariable($value); + } else if (is_array($value)) { + $this->setVariable(new FHIRId(array_merge($ext, $value))); + } else { + $this->setVariable(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVariable(new FHIRId($ext)); } } } @@ -713,8 +764,8 @@ public function setVariable($variable = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -876,64 +927,93 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_CONTEXT_EXT] = $enc; } } if (null !== ($v = $this->getContextType())) { $a[self::FIELD_CONTEXT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapContextType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapContextType::FIELD_VALUE]); $a[self::FIELD_CONTEXT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getElement())) { $a[self::FIELD_ELEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ELEMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getListMode())) { $a[self::FIELD_LIST_MODE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LIST_MODE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LIST_MODE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRStructureMapTargetListMode::FIELD_VALUE]) || array_key_exists(FHIRStructureMapTargetListMode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LIST_MODE_EXT][] = null; + unset($enc[FHIRStructureMapTargetListMode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LIST_MODE_EXT] = $encs; + } } if (null !== ($v = $this->getListRuleId())) { $a[self::FIELD_LIST_RULE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_LIST_RULE_ID_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getTransform())) { $a[self::FIELD_TRANSFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureMapTransform::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureMapTransform::FIELD_VALUE]); $a[self::FIELD_TRANSFORM_EXT] = $enc; } } if (null !== ($v = $this->getVariable())) { $a[self::FIELD_VARIABLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VARIABLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php index 43d0c3855e..7353b4a6aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRSubscriptionChannel extends FHIRBackboneElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -162,81 +162,111 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ENDPOINT])) { - $ext = (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) - ? $data[self::FIELD_ENDPOINT_EXT] - : null; - if ($data[self::FIELD_ENDPOINT] instanceof FHIRUri) { - $this->setEndpoint($data[self::FIELD_ENDPOINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ENDPOINT]] + $ext)); - } else if (is_array($data[self::FIELD_ENDPOINT])) { - $this->setEndpoint(new FHIRUri(array_merge($ext, $data[self::FIELD_ENDPOINT]))); - } + if (isset($data[self::FIELD_ENDPOINT]) || isset($data[self::FIELD_ENDPOINT_EXT])) { + if (isset($data[self::FIELD_ENDPOINT])) { + $value = $data[self::FIELD_ENDPOINT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ENDPOINT_EXT]) && is_array($data[self::FIELD_ENDPOINT_EXT])) { + $ext = $data[self::FIELD_ENDPOINT_EXT]; } else { - $this->setEndpoint(new FHIRUri($data[self::FIELD_ENDPOINT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setEndpoint($value); + } else if (is_array($value)) { + $this->setEndpoint(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setEndpoint(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEndpoint(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_HEADER])) { - $ext = (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) - ? $data[self::FIELD_HEADER_EXT] - : null; - if (is_array($data[self::FIELD_HEADER])) { - foreach($data[self::FIELD_HEADER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addHeader($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addHeader(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_HEADER]) || isset($data[self::FIELD_HEADER_EXT])) { + if (isset($data[self::FIELD_HEADER])) { + $value = $data[self::FIELD_HEADER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) { + $ext = $data[self::FIELD_HEADER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addHeader($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addHeader($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addHeader(new FHIRString(array_merge($v, $iext))); + } else { + $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addHeader(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addHeader(new FHIRString(array_merge($ext, $value))); + } else { + $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addHeader(new FHIRString($iext)); } - } elseif ($data[self::FIELD_HEADER] instanceof FHIRString) { - $this->addHeader($data[self::FIELD_HEADER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_HEADER])) { - $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER]] + $ext)); - } else { - $this->addHeader(new FHIRString($data[self::FIELD_HEADER])); } } - if (isset($data[self::FIELD_PAYLOAD])) { - $ext = (isset($data[self::FIELD_PAYLOAD_EXT]) && is_array($data[self::FIELD_PAYLOAD_EXT])) - ? $data[self::FIELD_PAYLOAD_EXT] - : null; - if ($data[self::FIELD_PAYLOAD] instanceof FHIRString) { - $this->setPayload($data[self::FIELD_PAYLOAD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PAYLOAD])) { - $this->setPayload(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PAYLOAD]] + $ext)); - } else if (is_array($data[self::FIELD_PAYLOAD])) { - $this->setPayload(new FHIRString(array_merge($ext, $data[self::FIELD_PAYLOAD]))); - } + if (isset($data[self::FIELD_PAYLOAD]) || isset($data[self::FIELD_PAYLOAD_EXT])) { + if (isset($data[self::FIELD_PAYLOAD])) { + $value = $data[self::FIELD_PAYLOAD]; } else { - $this->setPayload(new FHIRString($data[self::FIELD_PAYLOAD])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSubscriptionChannelType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSubscriptionChannelType([FHIRSubscriptionChannelType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSubscriptionChannelType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_PAYLOAD_EXT]) && is_array($data[self::FIELD_PAYLOAD_EXT])) { + $ext = $data[self::FIELD_PAYLOAD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPayload($value); + } else if (is_array($value)) { + $this->setPayload(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPayload(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPayload(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRSubscriptionChannelType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSubscriptionChannelType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSubscriptionChannelType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSubscriptionChannelType([FHIRSubscriptionChannelType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRSubscriptionChannelType($ext)); } } } @@ -438,8 +468,8 @@ public function setType(FHIRSubscriptionChannelType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -554,40 +584,57 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEndpoint())) { $a[self::FIELD_ENDPOINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ENDPOINT_EXT] = $enc; } } if ([] !== ($vs = $this->getHeader())) { $a[self::FIELD_HEADER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_HEADER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_HEADER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_HEADER_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_HEADER_EXT] = $encs; + } } if (null !== ($v = $this->getPayload())) { $a[self::FIELD_PAYLOAD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PAYLOAD_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSubscriptionChannelType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSubscriptionChannelType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php index 718c744a89..ebbd2a24ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSubstanceIngredient extends FHIRBackboneElement const FIELD_SUBSTANCE_REFERENCE = 'substanceReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A relationship of two Quantity values - expressed as a numerator and a @@ -285,8 +285,8 @@ public function setSubstanceReference(FHIRReference $substanceReference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -379,6 +379,9 @@ public function jsonSerialize() if (null !== ($v = $this->getSubstanceReference())) { $a[self::FIELD_SUBSTANCE_REFERENCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php index dacfed650a..0406cf3c31 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSubstanceInstance extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -149,20 +149,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPIRY])) { - $ext = (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) - ? $data[self::FIELD_EXPIRY_EXT] - : null; - if ($data[self::FIELD_EXPIRY] instanceof FHIRDateTime) { - $this->setExpiry($data[self::FIELD_EXPIRY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRY]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRY])) { - $this->setExpiry(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRY]))); - } + if (isset($data[self::FIELD_EXPIRY]) || isset($data[self::FIELD_EXPIRY_EXT])) { + if (isset($data[self::FIELD_EXPIRY])) { + $value = $data[self::FIELD_EXPIRY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRY_EXT]) && is_array($data[self::FIELD_EXPIRY_EXT])) { + $ext = $data[self::FIELD_EXPIRY_EXT]; } else { - $this->setExpiry(new FHIRDateTime($data[self::FIELD_EXPIRY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpiry($value); + } else if (is_array($value)) { + $this->setExpiry(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpiry(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpiry(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -318,8 +325,8 @@ public function setQuantity(FHIRQuantity $quantity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -413,8 +420,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpiry())) { $a[self::FIELD_EXPIRY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRY_EXT] = $enc; } } @@ -424,6 +433,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php index 167ec165a9..0226735b58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRSupplyDeliverySuppliedItem extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -300,8 +300,8 @@ public function setQuantity(FHIRQuantity $quantity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -394,6 +394,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItem.php index bfc61e0a68..9d2a474223 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRSupplyRequestOrderedItem extends FHIRBackboneElement const FIELD_QUANTITY = 'quantity'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -301,8 +301,8 @@ public function setQuantity(FHIRQuantity $quantity = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -395,6 +395,9 @@ public function jsonSerialize() if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequester.php index fa4d97890d..daccf3292b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRSupplyRequestRequester extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -229,8 +229,8 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -314,6 +314,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php index 5305d7472b..501cd0f4b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRTaskInput extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -699,52 +699,73 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -775,52 +796,73 @@ public function __construct($data = null) $this->setValueCount(new FHIRCount($data[self::FIELD_VALUE_COUNT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -844,20 +886,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -867,52 +916,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -929,20 +999,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -952,20 +1029,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1010,36 +1094,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1049,36 +1147,50 @@ public function __construct($data = null) $this->setValueTiming(new FHIRTiming($data[self::FIELD_VALUE_TIMING])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -2486,8 +2598,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2932,22 +3044,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -2965,22 +3083,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -2995,8 +3119,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -3005,22 +3131,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -3032,8 +3164,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -3042,8 +3176,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -3067,15 +3203,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -3084,18 +3224,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php index 5652225fb3..7e80f82626 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutput.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -171,7 +171,7 @@ class FHIRTaskOutput extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -698,52 +698,73 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -774,52 +795,73 @@ public function __construct($data = null) $this->setValueCount(new FHIRCount($data[self::FIELD_VALUE_COUNT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -843,20 +885,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -866,52 +915,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -928,20 +998,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -951,20 +1028,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1009,36 +1093,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1048,36 +1146,50 @@ public function __construct($data = null) $this->setValueTiming(new FHIRTiming($data[self::FIELD_VALUE_TIMING])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -2483,8 +2595,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2929,22 +3041,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -2962,22 +3080,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -2992,8 +3116,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -3002,22 +3128,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -3029,8 +3161,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -3039,8 +3173,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -3064,15 +3200,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -3081,18 +3221,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequester.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequester.php index 3811505840..5448f89414 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequester.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequester.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTaskRequester extends FHIRBackboneElement const FIELD_ON_BEHALF_OF = 'onBehalfOf'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -231,8 +231,8 @@ public function setOnBehalfOf(FHIRReference $onBehalfOf = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -316,6 +316,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOnBehalfOf())) { $a[self::FIELD_ON_BEHALF_OF] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php index fd057489d0..7abb3ad8f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestriction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRTaskRestriction extends FHIRBackboneElement const FIELD_REPETITIONS_EXT = '_repetitions'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -168,20 +168,27 @@ public function __construct($data = null) $this->addRecipient(new FHIRReference($data[self::FIELD_RECIPIENT])); } } - if (isset($data[self::FIELD_REPETITIONS])) { - $ext = (isset($data[self::FIELD_REPETITIONS_EXT]) && is_array($data[self::FIELD_REPETITIONS_EXT])) - ? $data[self::FIELD_REPETITIONS_EXT] - : null; - if ($data[self::FIELD_REPETITIONS] instanceof FHIRPositiveInt) { - $this->setRepetitions($data[self::FIELD_REPETITIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REPETITIONS])) { - $this->setRepetitions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_REPETITIONS]] + $ext)); - } else if (is_array($data[self::FIELD_REPETITIONS])) { - $this->setRepetitions(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_REPETITIONS]))); - } + if (isset($data[self::FIELD_REPETITIONS]) || isset($data[self::FIELD_REPETITIONS_EXT])) { + if (isset($data[self::FIELD_REPETITIONS])) { + $value = $data[self::FIELD_REPETITIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPETITIONS_EXT]) && is_array($data[self::FIELD_REPETITIONS_EXT])) { + $ext = $data[self::FIELD_REPETITIONS_EXT]; } else { - $this->setRepetitions(new FHIRPositiveInt($data[self::FIELD_REPETITIONS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setRepetitions($value); + } else if (is_array($value)) { + $this->setRepetitions(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setRepetitions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRepetitions(new FHIRPositiveInt($ext)); } } } @@ -338,8 +345,8 @@ public function setRepetitions($repetitions = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -442,15 +449,26 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if (null !== ($v = $this->getRepetitions())) { $a[self::FIELD_REPETITIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_REPETITIONS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php index ac628921cd..eae37316ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestReportAction extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -215,8 +215,8 @@ public function setOperation(FHIRTestReportOperation $operation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -300,6 +300,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php index bfb3b07420..e7fcb3bb3b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestReportAction1 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -215,8 +215,8 @@ public function setOperation(FHIRTestReportOperation $operation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -300,6 +300,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php index 1edc1c10cf..f1fadb5b02 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRTestReportAction2 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -172,8 +172,8 @@ public function setOperation(FHIRTestReportOperation $operation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -248,6 +248,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php index 5844cac4f9..861643fc65 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRTestReportAssert extends FHIRBackboneElement const FIELD_RESULT_EXT = '_result'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -149,52 +149,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DETAIL])) { - $ext = (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) - ? $data[self::FIELD_DETAIL_EXT] - : null; - if ($data[self::FIELD_DETAIL] instanceof FHIRString) { - $this->setDetail($data[self::FIELD_DETAIL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DETAIL]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString(array_merge($ext, $data[self::FIELD_DETAIL]))); - } + if (isset($data[self::FIELD_DETAIL]) || isset($data[self::FIELD_DETAIL_EXT])) { + if (isset($data[self::FIELD_DETAIL])) { + $value = $data[self::FIELD_DETAIL]; } else { - $this->setDetail(new FHIRString($data[self::FIELD_DETAIL])); + $value = null; } - } - if (isset($data[self::FIELD_MESSAGE])) { - $ext = (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) - ? $data[self::FIELD_MESSAGE_EXT] - : null; - if ($data[self::FIELD_MESSAGE] instanceof FHIRMarkdown) { - $this->setMessage($data[self::FIELD_MESSAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_MESSAGE]] + $ext)); - } else if (is_array($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_MESSAGE]))); - } + if (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) { + $ext = $data[self::FIELD_DETAIL_EXT]; } else { - $this->setMessage(new FHIRMarkdown($data[self::FIELD_MESSAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDetail($value); + } else if (is_array($value)) { + $this->setDetail(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetail(new FHIRString($ext)); } } - if (isset($data[self::FIELD_RESULT])) { - $ext = (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) - ? $data[self::FIELD_RESULT_EXT] - : null; - if ($data[self::FIELD_RESULT] instanceof FHIRTestReportActionResult) { - $this->setResult($data[self::FIELD_RESULT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportActionResult([FHIRTestReportActionResult::FIELD_VALUE => $data[self::FIELD_RESULT]] + $ext)); - } else if (is_array($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportActionResult(array_merge($ext, $data[self::FIELD_RESULT]))); + if (isset($data[self::FIELD_MESSAGE]) || isset($data[self::FIELD_MESSAGE_EXT])) { + if (isset($data[self::FIELD_MESSAGE])) { + $value = $data[self::FIELD_MESSAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) { + $ext = $data[self::FIELD_MESSAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setMessage($value); + } else if (is_array($value)) { + $this->setMessage(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setMessage(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMessage(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_RESULT]) || isset($data[self::FIELD_RESULT_EXT])) { + if (isset($data[self::FIELD_RESULT])) { + $value = $data[self::FIELD_RESULT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) { + $ext = $data[self::FIELD_RESULT_EXT]; } else { - $this->setResult(new FHIRTestReportActionResult($data[self::FIELD_RESULT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportActionResult) { + $this->setResult($value); + } else if (is_array($value)) { + $this->setResult(new FHIRTestReportActionResult(array_merge($ext, $value))); + } else { + $this->setResult(new FHIRTestReportActionResult([FHIRTestReportActionResult::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResult(new FHIRTestReportActionResult($ext)); } } } @@ -340,8 +361,8 @@ public function setResult(FHIRTestReportActionResult $result = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -443,25 +464,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DETAIL_EXT] = $enc; } } if (null !== ($v = $this->getMessage())) { $a[self::FIELD_MESSAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_MESSAGE_EXT] = $enc; } } if (null !== ($v = $this->getResult())) { $a[self::FIELD_RESULT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportActionResult::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportActionResult::FIELD_VALUE]); $a[self::FIELD_RESULT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php index a689bdde0c..8a7a158a6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRTestReportOperation extends FHIRBackboneElement const FIELD_RESULT_EXT = '_result'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -149,52 +149,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DETAIL])) { - $ext = (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) - ? $data[self::FIELD_DETAIL_EXT] - : null; - if ($data[self::FIELD_DETAIL] instanceof FHIRUri) { - $this->setDetail($data[self::FIELD_DETAIL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DETAIL]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRUri(array_merge($ext, $data[self::FIELD_DETAIL]))); - } + if (isset($data[self::FIELD_DETAIL]) || isset($data[self::FIELD_DETAIL_EXT])) { + if (isset($data[self::FIELD_DETAIL])) { + $value = $data[self::FIELD_DETAIL]; } else { - $this->setDetail(new FHIRUri($data[self::FIELD_DETAIL])); + $value = null; } - } - if (isset($data[self::FIELD_MESSAGE])) { - $ext = (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) - ? $data[self::FIELD_MESSAGE_EXT] - : null; - if ($data[self::FIELD_MESSAGE] instanceof FHIRMarkdown) { - $this->setMessage($data[self::FIELD_MESSAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_MESSAGE]] + $ext)); - } else if (is_array($data[self::FIELD_MESSAGE])) { - $this->setMessage(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_MESSAGE]))); - } + if (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) { + $ext = $data[self::FIELD_DETAIL_EXT]; } else { - $this->setMessage(new FHIRMarkdown($data[self::FIELD_MESSAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDetail($value); + } else if (is_array($value)) { + $this->setDetail(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDetail(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetail(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_RESULT])) { - $ext = (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) - ? $data[self::FIELD_RESULT_EXT] - : null; - if ($data[self::FIELD_RESULT] instanceof FHIRTestReportActionResult) { - $this->setResult($data[self::FIELD_RESULT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportActionResult([FHIRTestReportActionResult::FIELD_VALUE => $data[self::FIELD_RESULT]] + $ext)); - } else if (is_array($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportActionResult(array_merge($ext, $data[self::FIELD_RESULT]))); + if (isset($data[self::FIELD_MESSAGE]) || isset($data[self::FIELD_MESSAGE_EXT])) { + if (isset($data[self::FIELD_MESSAGE])) { + $value = $data[self::FIELD_MESSAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MESSAGE_EXT]) && is_array($data[self::FIELD_MESSAGE_EXT])) { + $ext = $data[self::FIELD_MESSAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setMessage($value); + } else if (is_array($value)) { + $this->setMessage(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setMessage(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMessage(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_RESULT]) || isset($data[self::FIELD_RESULT_EXT])) { + if (isset($data[self::FIELD_RESULT])) { + $value = $data[self::FIELD_RESULT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) { + $ext = $data[self::FIELD_RESULT_EXT]; } else { - $this->setResult(new FHIRTestReportActionResult($data[self::FIELD_RESULT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportActionResult) { + $this->setResult($value); + } else if (is_array($value)) { + $this->setResult(new FHIRTestReportActionResult(array_merge($ext, $value))); + } else { + $this->setResult(new FHIRTestReportActionResult([FHIRTestReportActionResult::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResult(new FHIRTestReportActionResult($ext)); } } } @@ -340,8 +361,8 @@ public function setResult(FHIRTestReportActionResult $result = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -443,25 +464,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DETAIL_EXT] = $enc; } } if (null !== ($v = $this->getMessage())) { $a[self::FIELD_MESSAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_MESSAGE_EXT] = $enc; } } if (null !== ($v = $this->getResult())) { $a[self::FIELD_RESULT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportActionResult::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportActionResult::FIELD_VALUE]); $a[self::FIELD_RESULT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php index be54d8daee..65e0c7c6f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRTestReportParticipant extends FHIRBackboneElement const FIELD_URI_EXT = '_uri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -143,52 +143,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRTestReportParticipantType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRTestReportParticipantType([FHIRTestReportParticipantType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRTestReportParticipantType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setType(new FHIRTestReportParticipantType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URI])) { - $ext = (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) - ? $data[self::FIELD_URI_EXT] - : null; - if ($data[self::FIELD_URI] instanceof FHIRUri) { - $this->setUri($data[self::FIELD_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URI]] + $ext)); - } else if (is_array($data[self::FIELD_URI])) { - $this->setUri(new FHIRUri(array_merge($ext, $data[self::FIELD_URI]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportParticipantType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRTestReportParticipantType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRTestReportParticipantType([FHIRTestReportParticipantType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRTestReportParticipantType($ext)); + } + } + if (isset($data[self::FIELD_URI]) || isset($data[self::FIELD_URI_EXT])) { + if (isset($data[self::FIELD_URI])) { + $value = $data[self::FIELD_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URI_EXT]) && is_array($data[self::FIELD_URI_EXT])) { + $ext = $data[self::FIELD_URI_EXT]; } else { - $this->setUri(new FHIRUri($data[self::FIELD_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUri($value); + } else if (is_array($value)) { + $this->setUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUri(new FHIRUri($ext)); } } } @@ -322,8 +343,8 @@ public function setUri($uri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -425,25 +446,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportParticipantType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportParticipantType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUri())) { $a[self::FIELD_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php index b12ba717f7..56f885ff0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRTestReportSetup extends FHIRBackboneElement const FIELD_ACTION = 'action'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -211,8 +211,8 @@ public function setAction(array $action = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -292,7 +292,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php index 44d0cf31ab..4f10c12e6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,7 +79,7 @@ class FHIRTestReportTeardown extends FHIRBackboneElement const FIELD_ACTION = 'action'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -211,8 +211,8 @@ public function setAction(array $action = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -292,7 +292,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php index fd07572ab2..7d6cd2c82b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestReportTest extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A summary of information based on the results of executing a TestScript. @@ -162,36 +162,50 @@ public function __construct($data = null) $this->addAction(new FHIRTestReportAction1($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -349,8 +363,8 @@ public function setName($name = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -458,22 +472,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php index 0652b4259e..589061a4aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptAction extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -225,8 +225,8 @@ public function setOperation(FHIRTestScriptOperation $operation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -310,6 +310,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php index c020e476f0..0dafdaabc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptAction1 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -225,8 +225,8 @@ public function setOperation(FHIRTestScriptOperation $operation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -310,6 +310,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php index 22093eab3c..e3cb4f780b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestScriptAction2 extends FHIRBackboneElement const FIELD_OPERATION = 'operation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -176,8 +176,8 @@ public function setOperation(FHIRTestScriptOperation $operation = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -252,6 +252,9 @@ public function jsonSerialize() if (null !== ($v = $this->getOperation())) { $a[self::FIELD_OPERATION] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php index 684963af6e..6d4616025f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssert.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -134,7 +134,7 @@ class FHIRTestScriptAssert extends FHIRBackboneElement const FIELD_WARNING_ONLY_EXT = '_warningOnly'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -432,292 +432,418 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { - $ext = (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT])) - ? $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] instanceof FHIRString) { - $this->setCompareToSourceExpression($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { - $this->setCompareToSourceExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { - $this->setCompareToSourceExpression(new FHIRString(array_merge($ext, $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]))); - } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]) || isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])) { + $value = $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT]; } else { - $this->setCompareToSourceExpression(new FHIRString($data[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION])); - } - } - if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT])) - ? $data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_COMPARE_TO_SOURCE_ID] instanceof FHIRString) { - $this->setCompareToSourceId($data[self::FIELD_COMPARE_TO_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { - $this->setCompareToSourceId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMPARE_TO_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { - $this->setCompareToSourceId(new FHIRString(array_merge($ext, $data[self::FIELD_COMPARE_TO_SOURCE_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCompareToSourceExpression($value); + } else if (is_array($value)) { + $this->setCompareToSourceExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCompareToSourceExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCompareToSourceExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID]) || isset($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID])) { + $value = $data[self::FIELD_COMPARE_TO_SOURCE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_COMPARE_TO_SOURCE_ID_EXT]; } else { - $this->setCompareToSourceId(new FHIRString($data[self::FIELD_COMPARE_TO_SOURCE_ID])); - } - } - if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { - $ext = (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT])) - ? $data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT] - : null; - if ($data[self::FIELD_COMPARE_TO_SOURCE_PATH] instanceof FHIRString) { - $this->setCompareToSourcePath($data[self::FIELD_COMPARE_TO_SOURCE_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { - $this->setCompareToSourcePath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMPARE_TO_SOURCE_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { - $this->setCompareToSourcePath(new FHIRString(array_merge($ext, $data[self::FIELD_COMPARE_TO_SOURCE_PATH]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCompareToSourceId($value); + } else if (is_array($value)) { + $this->setCompareToSourceId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCompareToSourceId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCompareToSourceId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH]) || isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT])) { + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH])) { + $value = $data[self::FIELD_COMPARE_TO_SOURCE_PATH]; } else { - $this->setCompareToSourcePath(new FHIRString($data[self::FIELD_COMPARE_TO_SOURCE_PATH])); - } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRContentType) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRContentType([FHIRContentType::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRContentType(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT]) && is_array($data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT])) { + $ext = $data[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCompareToSourcePath($value); + } else if (is_array($value)) { + $this->setCompareToSourcePath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCompareToSourcePath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCompareToSourcePath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; } else { - $this->setContentType(new FHIRContentType($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContentType) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRContentType(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRContentType([FHIRContentType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRContentType($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DIRECTION])) { - $ext = (isset($data[self::FIELD_DIRECTION_EXT]) && is_array($data[self::FIELD_DIRECTION_EXT])) - ? $data[self::FIELD_DIRECTION_EXT] - : null; - if ($data[self::FIELD_DIRECTION] instanceof FHIRAssertionDirectionType) { - $this->setDirection($data[self::FIELD_DIRECTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIRECTION])) { - $this->setDirection(new FHIRAssertionDirectionType([FHIRAssertionDirectionType::FIELD_VALUE => $data[self::FIELD_DIRECTION]] + $ext)); - } else if (is_array($data[self::FIELD_DIRECTION])) { - $this->setDirection(new FHIRAssertionDirectionType(array_merge($ext, $data[self::FIELD_DIRECTION]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DIRECTION]) || isset($data[self::FIELD_DIRECTION_EXT])) { + if (isset($data[self::FIELD_DIRECTION])) { + $value = $data[self::FIELD_DIRECTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIRECTION_EXT]) && is_array($data[self::FIELD_DIRECTION_EXT])) { + $ext = $data[self::FIELD_DIRECTION_EXT]; } else { - $this->setDirection(new FHIRAssertionDirectionType($data[self::FIELD_DIRECTION])); - } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAssertionDirectionType) { + $this->setDirection($value); + } else if (is_array($value)) { + $this->setDirection(new FHIRAssertionDirectionType(array_merge($ext, $value))); + } else { + $this->setDirection(new FHIRAssertionDirectionType([FHIRAssertionDirectionType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDirection(new FHIRAssertionDirectionType($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); - } - } - if (isset($data[self::FIELD_HEADER_FIELD])) { - $ext = (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) - ? $data[self::FIELD_HEADER_FIELD_EXT] - : null; - if ($data[self::FIELD_HEADER_FIELD] instanceof FHIRString) { - $this->setHeaderField($data[self::FIELD_HEADER_FIELD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER_FIELD]] + $ext)); - } else if (is_array($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString(array_merge($ext, $data[self::FIELD_HEADER_FIELD]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_HEADER_FIELD]) || isset($data[self::FIELD_HEADER_FIELD_EXT])) { + if (isset($data[self::FIELD_HEADER_FIELD])) { + $value = $data[self::FIELD_HEADER_FIELD]; } else { - $this->setHeaderField(new FHIRString($data[self::FIELD_HEADER_FIELD])); - } - } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); + $value = null; + } + if (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) { + $ext = $data[self::FIELD_HEADER_FIELD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHeaderField($value); + } else if (is_array($value)) { + $this->setHeaderField(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHeaderField(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); - } - } - if (isset($data[self::FIELD_MINIMUM_ID])) { - $ext = (isset($data[self::FIELD_MINIMUM_ID_EXT]) && is_array($data[self::FIELD_MINIMUM_ID_EXT])) - ? $data[self::FIELD_MINIMUM_ID_EXT] - : null; - if ($data[self::FIELD_MINIMUM_ID] instanceof FHIRString) { - $this->setMinimumId($data[self::FIELD_MINIMUM_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MINIMUM_ID])) { - $this->setMinimumId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MINIMUM_ID]] + $ext)); - } else if (is_array($data[self::FIELD_MINIMUM_ID])) { - $this->setMinimumId(new FHIRString(array_merge($ext, $data[self::FIELD_MINIMUM_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MINIMUM_ID]) || isset($data[self::FIELD_MINIMUM_ID_EXT])) { + if (isset($data[self::FIELD_MINIMUM_ID])) { + $value = $data[self::FIELD_MINIMUM_ID]; } else { - $this->setMinimumId(new FHIRString($data[self::FIELD_MINIMUM_ID])); - } - } - if (isset($data[self::FIELD_NAVIGATION_LINKS])) { - $ext = (isset($data[self::FIELD_NAVIGATION_LINKS_EXT]) && is_array($data[self::FIELD_NAVIGATION_LINKS_EXT])) - ? $data[self::FIELD_NAVIGATION_LINKS_EXT] - : null; - if ($data[self::FIELD_NAVIGATION_LINKS] instanceof FHIRBoolean) { - $this->setNavigationLinks($data[self::FIELD_NAVIGATION_LINKS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAVIGATION_LINKS])) { - $this->setNavigationLinks(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NAVIGATION_LINKS]] + $ext)); - } else if (is_array($data[self::FIELD_NAVIGATION_LINKS])) { - $this->setNavigationLinks(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NAVIGATION_LINKS]))); + $value = null; + } + if (isset($data[self::FIELD_MINIMUM_ID_EXT]) && is_array($data[self::FIELD_MINIMUM_ID_EXT])) { + $ext = $data[self::FIELD_MINIMUM_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMinimumId($value); + } else if (is_array($value)) { + $this->setMinimumId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMinimumId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinimumId(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAVIGATION_LINKS]) || isset($data[self::FIELD_NAVIGATION_LINKS_EXT])) { + if (isset($data[self::FIELD_NAVIGATION_LINKS])) { + $value = $data[self::FIELD_NAVIGATION_LINKS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAVIGATION_LINKS_EXT]) && is_array($data[self::FIELD_NAVIGATION_LINKS_EXT])) { + $ext = $data[self::FIELD_NAVIGATION_LINKS_EXT]; } else { - $this->setNavigationLinks(new FHIRBoolean($data[self::FIELD_NAVIGATION_LINKS])); - } - } - if (isset($data[self::FIELD_OPERATOR])) { - $ext = (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) - ? $data[self::FIELD_OPERATOR_EXT] - : null; - if ($data[self::FIELD_OPERATOR] instanceof FHIRAssertionOperatorType) { - $this->setOperator($data[self::FIELD_OPERATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OPERATOR])) { - $this->setOperator(new FHIRAssertionOperatorType([FHIRAssertionOperatorType::FIELD_VALUE => $data[self::FIELD_OPERATOR]] + $ext)); - } else if (is_array($data[self::FIELD_OPERATOR])) { - $this->setOperator(new FHIRAssertionOperatorType(array_merge($ext, $data[self::FIELD_OPERATOR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNavigationLinks($value); + } else if (is_array($value)) { + $this->setNavigationLinks(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNavigationLinks(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNavigationLinks(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_OPERATOR]) || isset($data[self::FIELD_OPERATOR_EXT])) { + if (isset($data[self::FIELD_OPERATOR])) { + $value = $data[self::FIELD_OPERATOR]; } else { - $this->setOperator(new FHIRAssertionOperatorType($data[self::FIELD_OPERATOR])); - } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + $value = null; + } + if (isset($data[self::FIELD_OPERATOR_EXT]) && is_array($data[self::FIELD_OPERATOR_EXT])) { + $ext = $data[self::FIELD_OPERATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAssertionOperatorType) { + $this->setOperator($value); + } else if (is_array($value)) { + $this->setOperator(new FHIRAssertionOperatorType(array_merge($ext, $value))); + } else { + $this->setOperator(new FHIRAssertionOperatorType([FHIRAssertionOperatorType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOperator(new FHIRAssertionOperatorType($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); - } - } - if (isset($data[self::FIELD_REQUEST_METHOD])) { - $ext = (isset($data[self::FIELD_REQUEST_METHOD_EXT]) && is_array($data[self::FIELD_REQUEST_METHOD_EXT])) - ? $data[self::FIELD_REQUEST_METHOD_EXT] - : null; - if ($data[self::FIELD_REQUEST_METHOD] instanceof FHIRTestScriptRequestMethodCode) { - $this->setRequestMethod($data[self::FIELD_REQUEST_METHOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUEST_METHOD])) { - $this->setRequestMethod(new FHIRTestScriptRequestMethodCode([FHIRTestScriptRequestMethodCode::FIELD_VALUE => $data[self::FIELD_REQUEST_METHOD]] + $ext)); - } else if (is_array($data[self::FIELD_REQUEST_METHOD])) { - $this->setRequestMethod(new FHIRTestScriptRequestMethodCode(array_merge($ext, $data[self::FIELD_REQUEST_METHOD]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REQUEST_METHOD]) || isset($data[self::FIELD_REQUEST_METHOD_EXT])) { + if (isset($data[self::FIELD_REQUEST_METHOD])) { + $value = $data[self::FIELD_REQUEST_METHOD]; } else { - $this->setRequestMethod(new FHIRTestScriptRequestMethodCode($data[self::FIELD_REQUEST_METHOD])); - } - } - if (isset($data[self::FIELD_REQUEST_URL])) { - $ext = (isset($data[self::FIELD_REQUEST_URL_EXT]) && is_array($data[self::FIELD_REQUEST_URL_EXT])) - ? $data[self::FIELD_REQUEST_URL_EXT] - : null; - if ($data[self::FIELD_REQUEST_URL] instanceof FHIRString) { - $this->setRequestURL($data[self::FIELD_REQUEST_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUEST_URL])) { - $this->setRequestURL(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUEST_URL]] + $ext)); - } else if (is_array($data[self::FIELD_REQUEST_URL])) { - $this->setRequestURL(new FHIRString(array_merge($ext, $data[self::FIELD_REQUEST_URL]))); + $value = null; + } + if (isset($data[self::FIELD_REQUEST_METHOD_EXT]) && is_array($data[self::FIELD_REQUEST_METHOD_EXT])) { + $ext = $data[self::FIELD_REQUEST_METHOD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestScriptRequestMethodCode) { + $this->setRequestMethod($value); + } else if (is_array($value)) { + $this->setRequestMethod(new FHIRTestScriptRequestMethodCode(array_merge($ext, $value))); + } else { + $this->setRequestMethod(new FHIRTestScriptRequestMethodCode([FHIRTestScriptRequestMethodCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequestMethod(new FHIRTestScriptRequestMethodCode($ext)); + } + } + if (isset($data[self::FIELD_REQUEST_URL]) || isset($data[self::FIELD_REQUEST_URL_EXT])) { + if (isset($data[self::FIELD_REQUEST_URL])) { + $value = $data[self::FIELD_REQUEST_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUEST_URL_EXT]) && is_array($data[self::FIELD_REQUEST_URL_EXT])) { + $ext = $data[self::FIELD_REQUEST_URL_EXT]; } else { - $this->setRequestURL(new FHIRString($data[self::FIELD_REQUEST_URL])); - } - } - if (isset($data[self::FIELD_RESOURCE])) { - $ext = (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) - ? $data[self::FIELD_RESOURCE_EXT] - : null; - if ($data[self::FIELD_RESOURCE] instanceof FHIRFHIRDefinedType) { - $this->setResource($data[self::FIELD_RESOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRFHIRDefinedType([FHIRFHIRDefinedType::FIELD_VALUE => $data[self::FIELD_RESOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRFHIRDefinedType(array_merge($ext, $data[self::FIELD_RESOURCE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequestURL($value); + } else if (is_array($value)) { + $this->setRequestURL(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequestURL(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequestURL(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RESOURCE]) || isset($data[self::FIELD_RESOURCE_EXT])) { + if (isset($data[self::FIELD_RESOURCE])) { + $value = $data[self::FIELD_RESOURCE]; } else { - $this->setResource(new FHIRFHIRDefinedType($data[self::FIELD_RESOURCE])); - } - } - if (isset($data[self::FIELD_RESPONSE])) { - $ext = (isset($data[self::FIELD_RESPONSE_EXT]) && is_array($data[self::FIELD_RESPONSE_EXT])) - ? $data[self::FIELD_RESPONSE_EXT] - : null; - if ($data[self::FIELD_RESPONSE] instanceof FHIRAssertionResponseTypes) { - $this->setResponse($data[self::FIELD_RESPONSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE])) { - $this->setResponse(new FHIRAssertionResponseTypes([FHIRAssertionResponseTypes::FIELD_VALUE => $data[self::FIELD_RESPONSE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE])) { - $this->setResponse(new FHIRAssertionResponseTypes(array_merge($ext, $data[self::FIELD_RESPONSE]))); + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRDefinedType) { + $this->setResource($value); + } else if (is_array($value)) { + $this->setResource(new FHIRFHIRDefinedType(array_merge($ext, $value))); + } else { + $this->setResource(new FHIRFHIRDefinedType([FHIRFHIRDefinedType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResource(new FHIRFHIRDefinedType($ext)); + } + } + if (isset($data[self::FIELD_RESPONSE]) || isset($data[self::FIELD_RESPONSE_EXT])) { + if (isset($data[self::FIELD_RESPONSE])) { + $value = $data[self::FIELD_RESPONSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_EXT]) && is_array($data[self::FIELD_RESPONSE_EXT])) { + $ext = $data[self::FIELD_RESPONSE_EXT]; } else { - $this->setResponse(new FHIRAssertionResponseTypes($data[self::FIELD_RESPONSE])); - } - } - if (isset($data[self::FIELD_RESPONSE_CODE])) { - $ext = (isset($data[self::FIELD_RESPONSE_CODE_EXT]) && is_array($data[self::FIELD_RESPONSE_CODE_EXT])) - ? $data[self::FIELD_RESPONSE_CODE_EXT] - : null; - if ($data[self::FIELD_RESPONSE_CODE] instanceof FHIRString) { - $this->setResponseCode($data[self::FIELD_RESPONSE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE_CODE])) { - $this->setResponseCode(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESPONSE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE_CODE])) { - $this->setResponseCode(new FHIRString(array_merge($ext, $data[self::FIELD_RESPONSE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAssertionResponseTypes) { + $this->setResponse($value); + } else if (is_array($value)) { + $this->setResponse(new FHIRAssertionResponseTypes(array_merge($ext, $value))); + } else { + $this->setResponse(new FHIRAssertionResponseTypes([FHIRAssertionResponseTypes::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponse(new FHIRAssertionResponseTypes($ext)); + } + } + if (isset($data[self::FIELD_RESPONSE_CODE]) || isset($data[self::FIELD_RESPONSE_CODE_EXT])) { + if (isset($data[self::FIELD_RESPONSE_CODE])) { + $value = $data[self::FIELD_RESPONSE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_CODE_EXT]) && is_array($data[self::FIELD_RESPONSE_CODE_EXT])) { + $ext = $data[self::FIELD_RESPONSE_CODE_EXT]; } else { - $this->setResponseCode(new FHIRString($data[self::FIELD_RESPONSE_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResponseCode($value); + } else if (is_array($value)) { + $this->setResponseCode(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResponseCode(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setResponseCode(new FHIRString($ext)); } } if (isset($data[self::FIELD_RULE])) { @@ -734,68 +860,96 @@ public function __construct($data = null) $this->setRuleset(new FHIRTestScriptRuleset1($data[self::FIELD_RULESET])); } } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRId) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); - } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; } else { - $this->setSourceId(new FHIRId($data[self::FIELD_SOURCE_ID])); - } - } - if (isset($data[self::FIELD_VALIDATE_PROFILE_ID])) { - $ext = (isset($data[self::FIELD_VALIDATE_PROFILE_ID_EXT]) && is_array($data[self::FIELD_VALIDATE_PROFILE_ID_EXT])) - ? $data[self::FIELD_VALIDATE_PROFILE_ID_EXT] - : null; - if ($data[self::FIELD_VALIDATE_PROFILE_ID] instanceof FHIRId) { - $this->setValidateProfileId($data[self::FIELD_VALIDATE_PROFILE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALIDATE_PROFILE_ID])) { - $this->setValidateProfileId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALIDATE_PROFILE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALIDATE_PROFILE_ID])) { - $this->setValidateProfileId(new FHIRId(array_merge($ext, $data[self::FIELD_VALIDATE_PROFILE_ID]))); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_VALIDATE_PROFILE_ID]) || isset($data[self::FIELD_VALIDATE_PROFILE_ID_EXT])) { + if (isset($data[self::FIELD_VALIDATE_PROFILE_ID])) { + $value = $data[self::FIELD_VALIDATE_PROFILE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALIDATE_PROFILE_ID_EXT]) && is_array($data[self::FIELD_VALIDATE_PROFILE_ID_EXT])) { + $ext = $data[self::FIELD_VALIDATE_PROFILE_ID_EXT]; } else { - $this->setValidateProfileId(new FHIRId($data[self::FIELD_VALIDATE_PROFILE_ID])); - } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValidateProfileId($value); + } else if (is_array($value)) { + $this->setValidateProfileId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValidateProfileId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValidateProfileId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); - } - } - if (isset($data[self::FIELD_WARNING_ONLY])) { - $ext = (isset($data[self::FIELD_WARNING_ONLY_EXT]) && is_array($data[self::FIELD_WARNING_ONLY_EXT])) - ? $data[self::FIELD_WARNING_ONLY_EXT] - : null; - if ($data[self::FIELD_WARNING_ONLY] instanceof FHIRBoolean) { - $this->setWarningOnly($data[self::FIELD_WARNING_ONLY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WARNING_ONLY])) { - $this->setWarningOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_WARNING_ONLY]] + $ext)); - } else if (is_array($data[self::FIELD_WARNING_ONLY])) { - $this->setWarningOnly(new FHIRBoolean(array_merge($ext, $data[self::FIELD_WARNING_ONLY]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_WARNING_ONLY]) || isset($data[self::FIELD_WARNING_ONLY_EXT])) { + if (isset($data[self::FIELD_WARNING_ONLY])) { + $value = $data[self::FIELD_WARNING_ONLY]; } else { - $this->setWarningOnly(new FHIRBoolean($data[self::FIELD_WARNING_ONLY])); + $value = null; + } + if (isset($data[self::FIELD_WARNING_ONLY_EXT]) && is_array($data[self::FIELD_WARNING_ONLY_EXT])) { + $ext = $data[self::FIELD_WARNING_ONLY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setWarningOnly($value); + } else if (is_array($value)) { + $this->setWarningOnly(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setWarningOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWarningOnly(new FHIRBoolean($ext)); } } } @@ -1693,8 +1847,8 @@ public function setWarningOnly($warningOnly = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2035,127 +2189,163 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCompareToSourceExpression())) { $a[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMPARE_TO_SOURCE_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getCompareToSourceId())) { $a[self::FIELD_COMPARE_TO_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMPARE_TO_SOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getCompareToSourcePath())) { $a[self::FIELD_COMPARE_TO_SOURCE_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMPARE_TO_SOURCE_PATH_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContentType::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDirection())) { $a[self::FIELD_DIRECTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAssertionDirectionType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAssertionDirectionType::FIELD_VALUE]); $a[self::FIELD_DIRECTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getHeaderField())) { $a[self::FIELD_HEADER_FIELD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HEADER_FIELD_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if (null !== ($v = $this->getMinimumId())) { $a[self::FIELD_MINIMUM_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MINIMUM_ID_EXT] = $enc; } } if (null !== ($v = $this->getNavigationLinks())) { $a[self::FIELD_NAVIGATION_LINKS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NAVIGATION_LINKS_EXT] = $enc; } } if (null !== ($v = $this->getOperator())) { $a[self::FIELD_OPERATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAssertionOperatorType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAssertionOperatorType::FIELD_VALUE]); $a[self::FIELD_OPERATOR_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getRequestMethod())) { $a[self::FIELD_REQUEST_METHOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestScriptRequestMethodCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestScriptRequestMethodCode::FIELD_VALUE]); $a[self::FIELD_REQUEST_METHOD_EXT] = $enc; } } if (null !== ($v = $this->getRequestURL())) { $a[self::FIELD_REQUEST_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUEST_URL_EXT] = $enc; } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFHIRDefinedType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFHIRDefinedType::FIELD_VALUE]); $a[self::FIELD_RESOURCE_EXT] = $enc; } } if (null !== ($v = $this->getResponse())) { $a[self::FIELD_RESPONSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAssertionResponseTypes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAssertionResponseTypes::FIELD_VALUE]); $a[self::FIELD_RESPONSE_EXT] = $enc; } } if (null !== ($v = $this->getResponseCode())) { $a[self::FIELD_RESPONSE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESPONSE_CODE_EXT] = $enc; } } @@ -2167,32 +2357,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getValidateProfileId())) { $a[self::FIELD_VALIDATE_PROFILE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALIDATE_PROFILE_ID_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } if (null !== ($v = $this->getWarningOnly())) { $a[self::FIELD_WARNING_ONLY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_WARNING_ONLY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php index ad435c3d51..b76a7699d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRTestScriptCapability extends FHIRBackboneElement const FIELD_VALIDATED_EXT = '_validated'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -209,126 +209,172 @@ public function __construct($data = null) $this->setCapabilities(new FHIRReference($data[self::FIELD_CAPABILITIES])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DESTINATION])) { - $ext = (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) - ? $data[self::FIELD_DESTINATION_EXT] - : null; - if ($data[self::FIELD_DESTINATION] instanceof FHIRInteger) { - $this->setDestination($data[self::FIELD_DESTINATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DESTINATION]] + $ext)); - } else if (is_array($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger(array_merge($ext, $data[self::FIELD_DESTINATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESTINATION]) || isset($data[self::FIELD_DESTINATION_EXT])) { + if (isset($data[self::FIELD_DESTINATION])) { + $value = $data[self::FIELD_DESTINATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) { + $ext = $data[self::FIELD_DESTINATION_EXT]; } else { - $this->setDestination(new FHIRInteger($data[self::FIELD_DESTINATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDestination($value); + } else if (is_array($value)) { + $this->setDestination(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDestination(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_LINK])) { - $ext = (isset($data[self::FIELD_LINK_EXT]) && is_array($data[self::FIELD_LINK_EXT])) - ? $data[self::FIELD_LINK_EXT] - : null; - if (is_array($data[self::FIELD_LINK])) { - foreach($data[self::FIELD_LINK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addLink($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addLink(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_LINK]) || isset($data[self::FIELD_LINK_EXT])) { + if (isset($data[self::FIELD_LINK])) { + $value = $data[self::FIELD_LINK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LINK_EXT]) && is_array($data[self::FIELD_LINK_EXT])) { + $ext = $data[self::FIELD_LINK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addLink($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addLink($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addLink(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addLink(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addLink(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addLink(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_LINK] instanceof FHIRUri) { - $this->addLink($data[self::FIELD_LINK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_LINK])) { - $this->addLink(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_LINK]] + $ext)); - } else { - $this->addLink(new FHIRUri($data[self::FIELD_LINK])); } } - if (isset($data[self::FIELD_ORIGIN])) { - $ext = (isset($data[self::FIELD_ORIGIN_EXT]) && is_array($data[self::FIELD_ORIGIN_EXT])) - ? $data[self::FIELD_ORIGIN_EXT] - : null; - if (is_array($data[self::FIELD_ORIGIN])) { - foreach($data[self::FIELD_ORIGIN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRInteger) { - $this->addOrigin($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addOrigin(new FHIRInteger(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ORIGIN]) || isset($data[self::FIELD_ORIGIN_EXT])) { + if (isset($data[self::FIELD_ORIGIN])) { + $value = $data[self::FIELD_ORIGIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ORIGIN_EXT]) && is_array($data[self::FIELD_ORIGIN_EXT])) { + $ext = $data[self::FIELD_ORIGIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->addOrigin($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRInteger) { + $this->addOrigin($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addOrigin(new FHIRInteger(array_merge($v, $iext))); + } else { + $this->addOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addOrigin(new FHIRInteger($v)); } + } elseif (is_array($value)) { + $this->addOrigin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->addOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_ORIGIN] instanceof FHIRInteger) { - $this->addOrigin($data[self::FIELD_ORIGIN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ORIGIN])) { - $this->addOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_ORIGIN]] + $ext)); - } else { - $this->addOrigin(new FHIRInteger($data[self::FIELD_ORIGIN])); - } - } - if (isset($data[self::FIELD_REQUIRED])) { - $ext = (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) - ? $data[self::FIELD_REQUIRED_EXT] - : null; - if ($data[self::FIELD_REQUIRED] instanceof FHIRBoolean) { - $this->setRequired($data[self::FIELD_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIRED])) { - $this->setRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_REQUIRED]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addOrigin(new FHIRInteger($iext)); } + } + } + if (isset($data[self::FIELD_REQUIRED]) || isset($data[self::FIELD_REQUIRED_EXT])) { + if (isset($data[self::FIELD_REQUIRED])) { + $value = $data[self::FIELD_REQUIRED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIRED_EXT]) && is_array($data[self::FIELD_REQUIRED_EXT])) { + $ext = $data[self::FIELD_REQUIRED_EXT]; } else { - $this->setRequired(new FHIRBoolean($data[self::FIELD_REQUIRED])); - } - } - if (isset($data[self::FIELD_VALIDATED])) { - $ext = (isset($data[self::FIELD_VALIDATED_EXT]) && is_array($data[self::FIELD_VALIDATED_EXT])) - ? $data[self::FIELD_VALIDATED_EXT] - : null; - if ($data[self::FIELD_VALIDATED] instanceof FHIRBoolean) { - $this->setValidated($data[self::FIELD_VALIDATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALIDATED])) { - $this->setValidated(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALIDATED]] + $ext)); - } else if (is_array($data[self::FIELD_VALIDATED])) { - $this->setValidated(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALIDATED]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setRequired($value); + } else if (is_array($value)) { + $this->setRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALIDATED]) || isset($data[self::FIELD_VALIDATED_EXT])) { + if (isset($data[self::FIELD_VALIDATED])) { + $value = $data[self::FIELD_VALIDATED]; } else { - $this->setValidated(new FHIRBoolean($data[self::FIELD_VALIDATED])); + $value = null; + } + if (isset($data[self::FIELD_VALIDATED_EXT]) && is_array($data[self::FIELD_VALIDATED_EXT])) { + $ext = $data[self::FIELD_VALIDATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValidated($value); + } else if (is_array($value)) { + $this->setValidated(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValidated(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValidated(new FHIRBoolean($ext)); } } } @@ -677,8 +723,8 @@ public function setValidated($validated = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -837,62 +883,89 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDestination())) { $a[self::FIELD_DESTINATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DESTINATION_EXT] = $enc; } } if ([] !== ($vs = $this->getLink())) { $a[self::FIELD_LINK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_LINK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_LINK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_LINK_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_LINK_EXT] = $encs; + } } if ([] !== ($vs = $this->getOrigin())) { $a[self::FIELD_ORIGIN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ORIGIN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ORIGIN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRInteger::FIELD_VALUE]) || array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ORIGIN_EXT][] = null; + unset($enc[FHIRInteger::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ORIGIN_EXT] = $encs; + } } if (null !== ($v = $this->getRequired())) { $a[self::FIELD_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getValidated())) { $a[self::FIELD_VALIDATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALIDATED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php index 43ca1be7aa..3ab1fc1896 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestination.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptDestination extends FHIRBackboneElement const FIELD_PROFILE = 'profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INDEX])) { - $ext = (isset($data[self::FIELD_INDEX_EXT]) && is_array($data[self::FIELD_INDEX_EXT])) - ? $data[self::FIELD_INDEX_EXT] - : null; - if ($data[self::FIELD_INDEX] instanceof FHIRInteger) { - $this->setIndex($data[self::FIELD_INDEX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INDEX])) { - $this->setIndex(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_INDEX]] + $ext)); - } else if (is_array($data[self::FIELD_INDEX])) { - $this->setIndex(new FHIRInteger(array_merge($ext, $data[self::FIELD_INDEX]))); - } + if (isset($data[self::FIELD_INDEX]) || isset($data[self::FIELD_INDEX_EXT])) { + if (isset($data[self::FIELD_INDEX])) { + $value = $data[self::FIELD_INDEX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INDEX_EXT]) && is_array($data[self::FIELD_INDEX_EXT])) { + $ext = $data[self::FIELD_INDEX_EXT]; } else { - $this->setIndex(new FHIRInteger($data[self::FIELD_INDEX])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setIndex($value); + } else if (is_array($value)) { + $this->setIndex(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setIndex(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIndex(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -251,8 +258,8 @@ public function setProfile(FHIRCoding $profile = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -340,14 +347,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIndex())) { $a[self::FIELD_INDEX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_INDEX_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php index 565a8be2dc..947fce5582 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixture.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRTestScriptFixture extends FHIRBackboneElement const FIELD_RESOURCE = 'resource'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -148,36 +148,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTOCREATE])) { - $ext = (isset($data[self::FIELD_AUTOCREATE_EXT]) && is_array($data[self::FIELD_AUTOCREATE_EXT])) - ? $data[self::FIELD_AUTOCREATE_EXT] - : null; - if ($data[self::FIELD_AUTOCREATE] instanceof FHIRBoolean) { - $this->setAutocreate($data[self::FIELD_AUTOCREATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTOCREATE])) { - $this->setAutocreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AUTOCREATE]] + $ext)); - } else if (is_array($data[self::FIELD_AUTOCREATE])) { - $this->setAutocreate(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AUTOCREATE]))); - } + if (isset($data[self::FIELD_AUTOCREATE]) || isset($data[self::FIELD_AUTOCREATE_EXT])) { + if (isset($data[self::FIELD_AUTOCREATE])) { + $value = $data[self::FIELD_AUTOCREATE]; } else { - $this->setAutocreate(new FHIRBoolean($data[self::FIELD_AUTOCREATE])); + $value = null; } - } - if (isset($data[self::FIELD_AUTODELETE])) { - $ext = (isset($data[self::FIELD_AUTODELETE_EXT]) && is_array($data[self::FIELD_AUTODELETE_EXT])) - ? $data[self::FIELD_AUTODELETE_EXT] - : null; - if ($data[self::FIELD_AUTODELETE] instanceof FHIRBoolean) { - $this->setAutodelete($data[self::FIELD_AUTODELETE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTODELETE])) { - $this->setAutodelete(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AUTODELETE]] + $ext)); - } else if (is_array($data[self::FIELD_AUTODELETE])) { - $this->setAutodelete(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AUTODELETE]))); + if (isset($data[self::FIELD_AUTOCREATE_EXT]) && is_array($data[self::FIELD_AUTOCREATE_EXT])) { + $ext = $data[self::FIELD_AUTOCREATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAutocreate($value); + } else if (is_array($value)) { + $this->setAutocreate(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAutocreate(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAutocreate(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_AUTODELETE]) || isset($data[self::FIELD_AUTODELETE_EXT])) { + if (isset($data[self::FIELD_AUTODELETE])) { + $value = $data[self::FIELD_AUTODELETE]; } else { - $this->setAutodelete(new FHIRBoolean($data[self::FIELD_AUTODELETE])); + $value = null; + } + if (isset($data[self::FIELD_AUTODELETE_EXT]) && is_array($data[self::FIELD_AUTODELETE_EXT])) { + $ext = $data[self::FIELD_AUTODELETE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAutodelete($value); + } else if (is_array($value)) { + $this->setAutodelete(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAutodelete(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAutodelete(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -330,8 +344,8 @@ public function setResource(FHIRReference $resource = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -433,21 +447,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAutocreate())) { $a[self::FIELD_AUTOCREATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AUTOCREATE_EXT] = $enc; } } if (null !== ($v = $this->getAutodelete())) { $a[self::FIELD_AUTODELETE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AUTODELETE_EXT] = $enc; } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php index db6d88c7db..ce25cd6328 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLink.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRTestScriptLink extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,36 +131,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -266,8 +280,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -363,18 +377,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php index 437f4584bf..8530294daf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadata.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,7 +81,7 @@ class FHIRTestScriptMetadata extends FHIRBackboneElement const FIELD_LINK = 'link'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -302,8 +302,8 @@ public function setLink(array $link = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -396,10 +396,25 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCapability())) { - $a[self::FIELD_CAPABILITY] = $vs; + $a[self::FIELD_CAPABILITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CAPABILITY][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php index dcb1c7b4a0..20cd3fd0d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRTestScriptOperation extends FHIRBackboneElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The content or mime type. @@ -330,132 +330,188 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACCEPT])) { - $ext = (isset($data[self::FIELD_ACCEPT_EXT]) && is_array($data[self::FIELD_ACCEPT_EXT])) - ? $data[self::FIELD_ACCEPT_EXT] - : null; - if ($data[self::FIELD_ACCEPT] instanceof FHIRContentType) { - $this->setAccept($data[self::FIELD_ACCEPT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACCEPT])) { - $this->setAccept(new FHIRContentType([FHIRContentType::FIELD_VALUE => $data[self::FIELD_ACCEPT]] + $ext)); - } else if (is_array($data[self::FIELD_ACCEPT])) { - $this->setAccept(new FHIRContentType(array_merge($ext, $data[self::FIELD_ACCEPT]))); - } + if (isset($data[self::FIELD_ACCEPT]) || isset($data[self::FIELD_ACCEPT_EXT])) { + if (isset($data[self::FIELD_ACCEPT])) { + $value = $data[self::FIELD_ACCEPT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACCEPT_EXT]) && is_array($data[self::FIELD_ACCEPT_EXT])) { + $ext = $data[self::FIELD_ACCEPT_EXT]; } else { - $this->setAccept(new FHIRContentType($data[self::FIELD_ACCEPT])); - } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRContentType) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRContentType([FHIRContentType::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRContentType(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContentType) { + $this->setAccept($value); + } else if (is_array($value)) { + $this->setAccept(new FHIRContentType(array_merge($ext, $value))); + } else { + $this->setAccept(new FHIRContentType([FHIRContentType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAccept(new FHIRContentType($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; } else { - $this->setContentType(new FHIRContentType($data[self::FIELD_CONTENT_TYPE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContentType) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRContentType(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRContentType([FHIRContentType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContentType(new FHIRContentType($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_DESTINATION])) { - $ext = (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) - ? $data[self::FIELD_DESTINATION_EXT] - : null; - if ($data[self::FIELD_DESTINATION] instanceof FHIRInteger) { - $this->setDestination($data[self::FIELD_DESTINATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DESTINATION]] + $ext)); - } else if (is_array($data[self::FIELD_DESTINATION])) { - $this->setDestination(new FHIRInteger(array_merge($ext, $data[self::FIELD_DESTINATION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESTINATION]) || isset($data[self::FIELD_DESTINATION_EXT])) { + if (isset($data[self::FIELD_DESTINATION])) { + $value = $data[self::FIELD_DESTINATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESTINATION_EXT]) && is_array($data[self::FIELD_DESTINATION_EXT])) { + $ext = $data[self::FIELD_DESTINATION_EXT]; } else { - $this->setDestination(new FHIRInteger($data[self::FIELD_DESTINATION])); - } - } - if (isset($data[self::FIELD_ENCODE_REQUEST_URL])) { - $ext = (isset($data[self::FIELD_ENCODE_REQUEST_URL_EXT]) && is_array($data[self::FIELD_ENCODE_REQUEST_URL_EXT])) - ? $data[self::FIELD_ENCODE_REQUEST_URL_EXT] - : null; - if ($data[self::FIELD_ENCODE_REQUEST_URL] instanceof FHIRBoolean) { - $this->setEncodeRequestUrl($data[self::FIELD_ENCODE_REQUEST_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENCODE_REQUEST_URL])) { - $this->setEncodeRequestUrl(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ENCODE_REQUEST_URL]] + $ext)); - } else if (is_array($data[self::FIELD_ENCODE_REQUEST_URL])) { - $this->setEncodeRequestUrl(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ENCODE_REQUEST_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDestination($value); + } else if (is_array($value)) { + $this->setDestination(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDestination(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDestination(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_ENCODE_REQUEST_URL]) || isset($data[self::FIELD_ENCODE_REQUEST_URL_EXT])) { + if (isset($data[self::FIELD_ENCODE_REQUEST_URL])) { + $value = $data[self::FIELD_ENCODE_REQUEST_URL]; } else { - $this->setEncodeRequestUrl(new FHIRBoolean($data[self::FIELD_ENCODE_REQUEST_URL])); - } - } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); + $value = null; + } + if (isset($data[self::FIELD_ENCODE_REQUEST_URL_EXT]) && is_array($data[self::FIELD_ENCODE_REQUEST_URL_EXT])) { + $ext = $data[self::FIELD_ENCODE_REQUEST_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setEncodeRequestUrl($value); + } else if (is_array($value)) { + $this->setEncodeRequestUrl(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setEncodeRequestUrl(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEncodeRequestUrl(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); - } - } - if (isset($data[self::FIELD_ORIGIN])) { - $ext = (isset($data[self::FIELD_ORIGIN_EXT]) && is_array($data[self::FIELD_ORIGIN_EXT])) - ? $data[self::FIELD_ORIGIN_EXT] - : null; - if ($data[self::FIELD_ORIGIN] instanceof FHIRInteger) { - $this->setOrigin($data[self::FIELD_ORIGIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORIGIN])) { - $this->setOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_ORIGIN]] + $ext)); - } else if (is_array($data[self::FIELD_ORIGIN])) { - $this->setOrigin(new FHIRInteger(array_merge($ext, $data[self::FIELD_ORIGIN]))); + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ORIGIN]) || isset($data[self::FIELD_ORIGIN_EXT])) { + if (isset($data[self::FIELD_ORIGIN])) { + $value = $data[self::FIELD_ORIGIN]; } else { - $this->setOrigin(new FHIRInteger($data[self::FIELD_ORIGIN])); - } - } - if (isset($data[self::FIELD_PARAMS])) { - $ext = (isset($data[self::FIELD_PARAMS_EXT]) && is_array($data[self::FIELD_PARAMS_EXT])) - ? $data[self::FIELD_PARAMS_EXT] - : null; - if ($data[self::FIELD_PARAMS] instanceof FHIRString) { - $this->setParams($data[self::FIELD_PARAMS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARAMS])) { - $this->setParams(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PARAMS]] + $ext)); - } else if (is_array($data[self::FIELD_PARAMS])) { - $this->setParams(new FHIRString(array_merge($ext, $data[self::FIELD_PARAMS]))); + $value = null; + } + if (isset($data[self::FIELD_ORIGIN_EXT]) && is_array($data[self::FIELD_ORIGIN_EXT])) { + $ext = $data[self::FIELD_ORIGIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setOrigin($value); + } else if (is_array($value)) { + $this->setOrigin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setOrigin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOrigin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_PARAMS]) || isset($data[self::FIELD_PARAMS_EXT])) { + if (isset($data[self::FIELD_PARAMS])) { + $value = $data[self::FIELD_PARAMS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARAMS_EXT]) && is_array($data[self::FIELD_PARAMS_EXT])) { + $ext = $data[self::FIELD_PARAMS_EXT]; } else { - $this->setParams(new FHIRString($data[self::FIELD_PARAMS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setParams($value); + } else if (is_array($value)) { + $this->setParams(new FHIRString(array_merge($ext, $value))); + } else { + $this->setParams(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParams(new FHIRString($ext)); } } if (isset($data[self::FIELD_REQUEST_HEADER])) { @@ -476,84 +532,119 @@ public function __construct($data = null) $this->addRequestHeader(new FHIRTestScriptRequestHeader($data[self::FIELD_REQUEST_HEADER])); } } - if (isset($data[self::FIELD_REQUEST_ID])) { - $ext = (isset($data[self::FIELD_REQUEST_ID_EXT]) && is_array($data[self::FIELD_REQUEST_ID_EXT])) - ? $data[self::FIELD_REQUEST_ID_EXT] - : null; - if ($data[self::FIELD_REQUEST_ID] instanceof FHIRId) { - $this->setRequestId($data[self::FIELD_REQUEST_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUEST_ID])) { - $this->setRequestId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_REQUEST_ID]] + $ext)); - } else if (is_array($data[self::FIELD_REQUEST_ID])) { - $this->setRequestId(new FHIRId(array_merge($ext, $data[self::FIELD_REQUEST_ID]))); - } + if (isset($data[self::FIELD_REQUEST_ID]) || isset($data[self::FIELD_REQUEST_ID_EXT])) { + if (isset($data[self::FIELD_REQUEST_ID])) { + $value = $data[self::FIELD_REQUEST_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUEST_ID_EXT]) && is_array($data[self::FIELD_REQUEST_ID_EXT])) { + $ext = $data[self::FIELD_REQUEST_ID_EXT]; } else { - $this->setRequestId(new FHIRId($data[self::FIELD_REQUEST_ID])); - } - } - if (isset($data[self::FIELD_RESOURCE])) { - $ext = (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) - ? $data[self::FIELD_RESOURCE_EXT] - : null; - if ($data[self::FIELD_RESOURCE] instanceof FHIRFHIRDefinedType) { - $this->setResource($data[self::FIELD_RESOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRFHIRDefinedType([FHIRFHIRDefinedType::FIELD_VALUE => $data[self::FIELD_RESOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_RESOURCE])) { - $this->setResource(new FHIRFHIRDefinedType(array_merge($ext, $data[self::FIELD_RESOURCE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setRequestId($value); + } else if (is_array($value)) { + $this->setRequestId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setRequestId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequestId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_RESOURCE]) || isset($data[self::FIELD_RESOURCE_EXT])) { + if (isset($data[self::FIELD_RESOURCE])) { + $value = $data[self::FIELD_RESOURCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_EXT]; } else { - $this->setResource(new FHIRFHIRDefinedType($data[self::FIELD_RESOURCE])); - } - } - if (isset($data[self::FIELD_RESPONSE_ID])) { - $ext = (isset($data[self::FIELD_RESPONSE_ID_EXT]) && is_array($data[self::FIELD_RESPONSE_ID_EXT])) - ? $data[self::FIELD_RESPONSE_ID_EXT] - : null; - if ($data[self::FIELD_RESPONSE_ID] instanceof FHIRId) { - $this->setResponseId($data[self::FIELD_RESPONSE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE_ID])) { - $this->setResponseId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_RESPONSE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE_ID])) { - $this->setResponseId(new FHIRId(array_merge($ext, $data[self::FIELD_RESPONSE_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRDefinedType) { + $this->setResource($value); + } else if (is_array($value)) { + $this->setResource(new FHIRFHIRDefinedType(array_merge($ext, $value))); + } else { + $this->setResource(new FHIRFHIRDefinedType([FHIRFHIRDefinedType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResource(new FHIRFHIRDefinedType($ext)); + } + } + if (isset($data[self::FIELD_RESPONSE_ID]) || isset($data[self::FIELD_RESPONSE_ID_EXT])) { + if (isset($data[self::FIELD_RESPONSE_ID])) { + $value = $data[self::FIELD_RESPONSE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_ID_EXT]) && is_array($data[self::FIELD_RESPONSE_ID_EXT])) { + $ext = $data[self::FIELD_RESPONSE_ID_EXT]; } else { - $this->setResponseId(new FHIRId($data[self::FIELD_RESPONSE_ID])); - } - } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRId) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setResponseId($value); + } else if (is_array($value)) { + $this->setResponseId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setResponseId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponseId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; } else { - $this->setSourceId(new FHIRId($data[self::FIELD_SOURCE_ID])); - } - } - if (isset($data[self::FIELD_TARGET_ID])) { - $ext = (isset($data[self::FIELD_TARGET_ID_EXT]) && is_array($data[self::FIELD_TARGET_ID_EXT])) - ? $data[self::FIELD_TARGET_ID_EXT] - : null; - if ($data[self::FIELD_TARGET_ID] instanceof FHIRId) { - $this->setTargetId($data[self::FIELD_TARGET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_ID])) { - $this->setTargetId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_TARGET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_ID])) { - $this->setTargetId(new FHIRId(array_merge($ext, $data[self::FIELD_TARGET_ID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_TARGET_ID]) || isset($data[self::FIELD_TARGET_ID_EXT])) { + if (isset($data[self::FIELD_TARGET_ID])) { + $value = $data[self::FIELD_TARGET_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_ID_EXT]) && is_array($data[self::FIELD_TARGET_ID_EXT])) { + $ext = $data[self::FIELD_TARGET_ID_EXT]; } else { - $this->setTargetId(new FHIRId($data[self::FIELD_TARGET_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setTargetId($value); + } else if (is_array($value)) { + $this->setTargetId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setTargetId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTargetId(new FHIRId($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -563,20 +654,27 @@ public function __construct($data = null) $this->setType(new FHIRCoding($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRString) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRString(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRString($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRString($ext)); } } } @@ -1227,8 +1325,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1487,95 +1585,127 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAccept())) { $a[self::FIELD_ACCEPT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContentType::FIELD_VALUE]); $a[self::FIELD_ACCEPT_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContentType::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDestination())) { $a[self::FIELD_DESTINATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DESTINATION_EXT] = $enc; } } if (null !== ($v = $this->getEncodeRequestUrl())) { $a[self::FIELD_ENCODE_REQUEST_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ENCODE_REQUEST_URL_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if (null !== ($v = $this->getOrigin())) { $a[self::FIELD_ORIGIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_ORIGIN_EXT] = $enc; } } if (null !== ($v = $this->getParams())) { $a[self::FIELD_PARAMS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PARAMS_EXT] = $enc; } } if ([] !== ($vs = $this->getRequestHeader())) { - $a[self::FIELD_REQUEST_HEADER] = $vs; + $a[self::FIELD_REQUEST_HEADER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUEST_HEADER][] = $v; + } } if (null !== ($v = $this->getRequestId())) { $a[self::FIELD_REQUEST_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_REQUEST_ID_EXT] = $enc; } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFHIRDefinedType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFHIRDefinedType::FIELD_VALUE]); $a[self::FIELD_RESOURCE_EXT] = $enc; } } if (null !== ($v = $this->getResponseId())) { $a[self::FIELD_RESPONSE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_RESPONSE_ID_EXT] = $enc; } } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } if (null !== ($v = $this->getTargetId())) { $a[self::FIELD_TARGET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_TARGET_ID_EXT] = $enc; } } @@ -1584,11 +1714,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php index ccb6f602b5..bf30c4a687 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOrigin.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptOrigin extends FHIRBackboneElement const FIELD_PROFILE = 'profile'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_INDEX])) { - $ext = (isset($data[self::FIELD_INDEX_EXT]) && is_array($data[self::FIELD_INDEX_EXT])) - ? $data[self::FIELD_INDEX_EXT] - : null; - if ($data[self::FIELD_INDEX] instanceof FHIRInteger) { - $this->setIndex($data[self::FIELD_INDEX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INDEX])) { - $this->setIndex(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_INDEX]] + $ext)); - } else if (is_array($data[self::FIELD_INDEX])) { - $this->setIndex(new FHIRInteger(array_merge($ext, $data[self::FIELD_INDEX]))); - } + if (isset($data[self::FIELD_INDEX]) || isset($data[self::FIELD_INDEX_EXT])) { + if (isset($data[self::FIELD_INDEX])) { + $value = $data[self::FIELD_INDEX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INDEX_EXT]) && is_array($data[self::FIELD_INDEX_EXT])) { + $ext = $data[self::FIELD_INDEX_EXT]; } else { - $this->setIndex(new FHIRInteger($data[self::FIELD_INDEX])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setIndex($value); + } else if (is_array($value)) { + $this->setIndex(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setIndex(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIndex(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -251,8 +258,8 @@ public function setProfile(FHIRCoding $profile = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -340,14 +347,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getIndex())) { $a[self::FIELD_INDEX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_INDEX_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam.php index efa2fa5bef..652b23a143 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptParam extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -271,8 +285,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -369,18 +383,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1.php index 586237b1d2..28104fb695 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptParam1 extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -271,8 +285,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -369,18 +383,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2.php index 2c28075803..851492d5f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptParam2 extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -271,8 +285,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -369,18 +383,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3.php index fbbca49d03..9e2632d26a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptParam3 extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -271,8 +285,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -369,18 +383,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php index 499d56fdce..c02a9fd201 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRTestScriptRequestHeader extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -130,36 +130,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FIELD])) { - $ext = (isset($data[self::FIELD_FIELD_EXT]) && is_array($data[self::FIELD_FIELD_EXT])) - ? $data[self::FIELD_FIELD_EXT] - : null; - if ($data[self::FIELD_FIELD] instanceof FHIRString) { - $this->setField($data[self::FIELD_FIELD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIELD])) { - $this->setField(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FIELD]] + $ext)); - } else if (is_array($data[self::FIELD_FIELD])) { - $this->setField(new FHIRString(array_merge($ext, $data[self::FIELD_FIELD]))); - } + if (isset($data[self::FIELD_FIELD]) || isset($data[self::FIELD_FIELD_EXT])) { + if (isset($data[self::FIELD_FIELD])) { + $value = $data[self::FIELD_FIELD]; } else { - $this->setField(new FHIRString($data[self::FIELD_FIELD])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_FIELD_EXT]) && is_array($data[self::FIELD_FIELD_EXT])) { + $ext = $data[self::FIELD_FIELD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setField($value); + } else if (is_array($value)) { + $this->setField(new FHIRString(array_merge($ext, $value))); + } else { + $this->setField(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setField(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -265,8 +279,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -363,18 +377,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getField())) { $a[self::FIELD_FIELD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FIELD_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule.php index d401604729..9561bfe442 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestScriptRule extends FHIRBackboneElement const FIELD_RESOURCE = 'resource'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -265,8 +265,8 @@ public function setResource(FHIRReference $resource = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -352,11 +352,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getParam())) { - $a[self::FIELD_PARAM] = $vs; + $a[self::FIELD_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAM][] = $v; + } } if (null !== ($v = $this->getResource())) { $a[self::FIELD_RESOURCE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1.php index 3d5fa8f558..4306552942 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRTestScriptRule1 extends FHIRBackboneElement const FIELD_RULE_ID_EXT = '_ruleId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -149,20 +149,27 @@ public function __construct($data = null) $this->addParam(new FHIRTestScriptParam1($data[self::FIELD_PARAM])); } } - if (isset($data[self::FIELD_RULE_ID])) { - $ext = (isset($data[self::FIELD_RULE_ID_EXT]) && is_array($data[self::FIELD_RULE_ID_EXT])) - ? $data[self::FIELD_RULE_ID_EXT] - : null; - if ($data[self::FIELD_RULE_ID] instanceof FHIRId) { - $this->setRuleId($data[self::FIELD_RULE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULE_ID])) { - $this->setRuleId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_RULE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_RULE_ID])) { - $this->setRuleId(new FHIRId(array_merge($ext, $data[self::FIELD_RULE_ID]))); - } + if (isset($data[self::FIELD_RULE_ID]) || isset($data[self::FIELD_RULE_ID_EXT])) { + if (isset($data[self::FIELD_RULE_ID])) { + $value = $data[self::FIELD_RULE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RULE_ID_EXT]) && is_array($data[self::FIELD_RULE_ID_EXT])) { + $ext = $data[self::FIELD_RULE_ID_EXT]; } else { - $this->setRuleId(new FHIRId($data[self::FIELD_RULE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setRuleId($value); + } else if (is_array($value)) { + $this->setRuleId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setRuleId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRuleId(new FHIRId($ext)); } } } @@ -289,8 +296,8 @@ public function setRuleId($ruleId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -384,15 +391,26 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getParam())) { - $a[self::FIELD_PARAM] = $vs; + $a[self::FIELD_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAM][] = $v; + } } if (null !== ($v = $this->getRuleId())) { $a[self::FIELD_RULE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_RULE_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2.php index e6480ad0b9..9899b1866e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRTestScriptRule2 extends FHIRBackboneElement const FIELD_RULE_ID_EXT = '_ruleId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -149,20 +149,27 @@ public function __construct($data = null) $this->addParam(new FHIRTestScriptParam2($data[self::FIELD_PARAM])); } } - if (isset($data[self::FIELD_RULE_ID])) { - $ext = (isset($data[self::FIELD_RULE_ID_EXT]) && is_array($data[self::FIELD_RULE_ID_EXT])) - ? $data[self::FIELD_RULE_ID_EXT] - : null; - if ($data[self::FIELD_RULE_ID] instanceof FHIRId) { - $this->setRuleId($data[self::FIELD_RULE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULE_ID])) { - $this->setRuleId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_RULE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_RULE_ID])) { - $this->setRuleId(new FHIRId(array_merge($ext, $data[self::FIELD_RULE_ID]))); - } + if (isset($data[self::FIELD_RULE_ID]) || isset($data[self::FIELD_RULE_ID_EXT])) { + if (isset($data[self::FIELD_RULE_ID])) { + $value = $data[self::FIELD_RULE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RULE_ID_EXT]) && is_array($data[self::FIELD_RULE_ID_EXT])) { + $ext = $data[self::FIELD_RULE_ID_EXT]; } else { - $this->setRuleId(new FHIRId($data[self::FIELD_RULE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setRuleId($value); + } else if (is_array($value)) { + $this->setRuleId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setRuleId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRuleId(new FHIRId($ext)); } } } @@ -289,8 +296,8 @@ public function setRuleId($ruleId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -384,15 +391,26 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getParam())) { - $a[self::FIELD_PARAM] = $vs; + $a[self::FIELD_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAM][] = $v; + } } if (null !== ($v = $this->getRuleId())) { $a[self::FIELD_RULE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_RULE_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3.php index c16785c525..b4f381e4b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRTestScriptRule3 extends FHIRBackboneElement const FIELD_RULE_ID_EXT = '_ruleId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -149,20 +149,27 @@ public function __construct($data = null) $this->addParam(new FHIRTestScriptParam3($data[self::FIELD_PARAM])); } } - if (isset($data[self::FIELD_RULE_ID])) { - $ext = (isset($data[self::FIELD_RULE_ID_EXT]) && is_array($data[self::FIELD_RULE_ID_EXT])) - ? $data[self::FIELD_RULE_ID_EXT] - : null; - if ($data[self::FIELD_RULE_ID] instanceof FHIRId) { - $this->setRuleId($data[self::FIELD_RULE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULE_ID])) { - $this->setRuleId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_RULE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_RULE_ID])) { - $this->setRuleId(new FHIRId(array_merge($ext, $data[self::FIELD_RULE_ID]))); - } + if (isset($data[self::FIELD_RULE_ID]) || isset($data[self::FIELD_RULE_ID_EXT])) { + if (isset($data[self::FIELD_RULE_ID])) { + $value = $data[self::FIELD_RULE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RULE_ID_EXT]) && is_array($data[self::FIELD_RULE_ID_EXT])) { + $ext = $data[self::FIELD_RULE_ID_EXT]; } else { - $this->setRuleId(new FHIRId($data[self::FIELD_RULE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setRuleId($value); + } else if (is_array($value)) { + $this->setRuleId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setRuleId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRuleId(new FHIRId($ext)); } } } @@ -289,8 +296,8 @@ public function setRuleId($ruleId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -384,15 +391,26 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getParam())) { - $a[self::FIELD_PARAM] = $vs; + $a[self::FIELD_PARAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAM][] = $v; + } } if (null !== ($v = $this->getRuleId())) { $a[self::FIELD_RULE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_RULE_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset.php index 409e99151e..6779a4b67a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRTestScriptRuleset extends FHIRBackboneElement const FIELD_RULE = 'rule'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -269,8 +269,8 @@ public function setRule(array $rule = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -359,7 +359,16 @@ public function jsonSerialize() $a[self::FIELD_RESOURCE] = $v; } if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1.php index 05a95ff9d8..81c67a9448 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRTestScriptRuleset1 extends FHIRBackboneElement const FIELD_RULESET_ID_EXT = '_rulesetId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -149,20 +149,27 @@ public function __construct($data = null) $this->addRule(new FHIRTestScriptRule3($data[self::FIELD_RULE])); } } - if (isset($data[self::FIELD_RULESET_ID])) { - $ext = (isset($data[self::FIELD_RULESET_ID_EXT]) && is_array($data[self::FIELD_RULESET_ID_EXT])) - ? $data[self::FIELD_RULESET_ID_EXT] - : null; - if ($data[self::FIELD_RULESET_ID] instanceof FHIRId) { - $this->setRulesetId($data[self::FIELD_RULESET_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULESET_ID])) { - $this->setRulesetId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_RULESET_ID]] + $ext)); - } else if (is_array($data[self::FIELD_RULESET_ID])) { - $this->setRulesetId(new FHIRId(array_merge($ext, $data[self::FIELD_RULESET_ID]))); - } + if (isset($data[self::FIELD_RULESET_ID]) || isset($data[self::FIELD_RULESET_ID_EXT])) { + if (isset($data[self::FIELD_RULESET_ID])) { + $value = $data[self::FIELD_RULESET_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RULESET_ID_EXT]) && is_array($data[self::FIELD_RULESET_ID_EXT])) { + $ext = $data[self::FIELD_RULESET_ID_EXT]; } else { - $this->setRulesetId(new FHIRId($data[self::FIELD_RULESET_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setRulesetId($value); + } else if (is_array($value)) { + $this->setRulesetId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setRulesetId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRulesetId(new FHIRId($ext)); } } } @@ -289,8 +296,8 @@ public function setRulesetId($rulesetId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -384,15 +391,26 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } } if (null !== ($v = $this->getRulesetId())) { $a[self::FIELD_RULESET_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_RULESET_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php index 18aad22bf0..a240e12f0f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestScriptSetup extends FHIRBackboneElement const FIELD_ACTION = 'action'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -216,8 +216,8 @@ public function setAction(array $action = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -297,7 +297,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php index 2d7c814030..cc25393272 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRTestScriptTeardown extends FHIRBackboneElement const FIELD_ACTION = 'action'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -216,8 +216,8 @@ public function setAction(array $action = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -297,7 +297,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php index c63f465ee5..80735f4f6e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRTestScriptTest extends FHIRBackboneElement const FIELD_NAME_EXT = '_name'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A structured set of tests against a FHIR server implementation to determine @@ -164,36 +164,50 @@ public function __construct($data = null) $this->addAction(new FHIRTestScriptAction1($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } } @@ -354,8 +368,8 @@ public function setName($name = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -463,22 +477,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php index 98ad3557b6..8e578ae41d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariable.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRTestScriptVariable extends FHIRBackboneElement const FIELD_SOURCE_ID_EXT = '_sourceId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -218,132 +218,188 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DEFAULT_VALUE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE] instanceof FHIRString) { - $this->setDefaultValue($data[self::FIELD_DEFAULT_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE])) { - $this->setDefaultValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE])) { - $this->setDefaultValue(new FHIRString(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE]) || isset($data[self::FIELD_DEFAULT_VALUE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE])) { + $value = $data[self::FIELD_DEFAULT_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_EXT]; } else { - $this->setDefaultValue(new FHIRString($data[self::FIELD_DEFAULT_VALUE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefaultValue($value); + } else if (is_array($value)) { + $this->setDefaultValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefaultValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValue(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); - } - } - if (isset($data[self::FIELD_HEADER_FIELD])) { - $ext = (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) - ? $data[self::FIELD_HEADER_FIELD_EXT] - : null; - if ($data[self::FIELD_HEADER_FIELD] instanceof FHIRString) { - $this->setHeaderField($data[self::FIELD_HEADER_FIELD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER_FIELD]] + $ext)); - } else if (is_array($data[self::FIELD_HEADER_FIELD])) { - $this->setHeaderField(new FHIRString(array_merge($ext, $data[self::FIELD_HEADER_FIELD]))); + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_HEADER_FIELD]) || isset($data[self::FIELD_HEADER_FIELD_EXT])) { + if (isset($data[self::FIELD_HEADER_FIELD])) { + $value = $data[self::FIELD_HEADER_FIELD]; } else { - $this->setHeaderField(new FHIRString($data[self::FIELD_HEADER_FIELD])); - } - } - if (isset($data[self::FIELD_HINT])) { - $ext = (isset($data[self::FIELD_HINT_EXT]) && is_array($data[self::FIELD_HINT_EXT])) - ? $data[self::FIELD_HINT_EXT] - : null; - if ($data[self::FIELD_HINT] instanceof FHIRString) { - $this->setHint($data[self::FIELD_HINT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HINT])) { - $this->setHint(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HINT]] + $ext)); - } else if (is_array($data[self::FIELD_HINT])) { - $this->setHint(new FHIRString(array_merge($ext, $data[self::FIELD_HINT]))); + $value = null; + } + if (isset($data[self::FIELD_HEADER_FIELD_EXT]) && is_array($data[self::FIELD_HEADER_FIELD_EXT])) { + $ext = $data[self::FIELD_HEADER_FIELD_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHeaderField($value); + } else if (is_array($value)) { + $this->setHeaderField(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHeaderField(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHeaderField(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_HINT]) || isset($data[self::FIELD_HINT_EXT])) { + if (isset($data[self::FIELD_HINT])) { + $value = $data[self::FIELD_HINT]; } else { - $this->setHint(new FHIRString($data[self::FIELD_HINT])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_HINT_EXT]) && is_array($data[self::FIELD_HINT_EXT])) { + $ext = $data[self::FIELD_HINT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHint($value); + } else if (is_array($value)) { + $this->setHint(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHint(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHint(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); - } - } - if (isset($data[self::FIELD_SOURCE_ID])) { - $ext = (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) - ? $data[self::FIELD_SOURCE_ID_EXT] - : null; - if ($data[self::FIELD_SOURCE_ID] instanceof FHIRId) { - $this->setSourceId($data[self::FIELD_SOURCE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_SOURCE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_ID])) { - $this->setSourceId(new FHIRId(array_merge($ext, $data[self::FIELD_SOURCE_ID]))); + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SOURCE_ID]) || isset($data[self::FIELD_SOURCE_ID_EXT])) { + if (isset($data[self::FIELD_SOURCE_ID])) { + $value = $data[self::FIELD_SOURCE_ID]; } else { - $this->setSourceId(new FHIRId($data[self::FIELD_SOURCE_ID])); + $value = null; + } + if (isset($data[self::FIELD_SOURCE_ID_EXT]) && is_array($data[self::FIELD_SOURCE_ID_EXT])) { + $ext = $data[self::FIELD_SOURCE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setSourceId($value); + } else if (is_array($value)) { + $this->setSourceId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setSourceId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSourceId(new FHIRId($ext)); } } } @@ -695,8 +751,8 @@ public function setSourceId($sourceId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -876,60 +932,79 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDefaultValue())) { $a[self::FIELD_DEFAULT_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getHeaderField())) { $a[self::FIELD_HEADER_FIELD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HEADER_FIELD_EXT] = $enc; } } if (null !== ($v = $this->getHint())) { $a[self::FIELD_HINT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HINT_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getSourceId())) { $a[self::FIELD_SOURCE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_SOURCE_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php index 2bd8a5ccec..76f53eec24 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetCompose.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRValueSetCompose extends FHIRBackboneElement const FIELD_LOCKED_DATE_EXT = '_lockedDate'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -181,20 +181,27 @@ public function __construct($data = null) $this->addExclude(new FHIRValueSetInclude($data[self::FIELD_EXCLUDE])); } } - if (isset($data[self::FIELD_INACTIVE])) { - $ext = (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) - ? $data[self::FIELD_INACTIVE_EXT] - : null; - if ($data[self::FIELD_INACTIVE] instanceof FHIRBoolean) { - $this->setInactive($data[self::FIELD_INACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INACTIVE]))); - } + if (isset($data[self::FIELD_INACTIVE]) || isset($data[self::FIELD_INACTIVE_EXT])) { + if (isset($data[self::FIELD_INACTIVE])) { + $value = $data[self::FIELD_INACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) { + $ext = $data[self::FIELD_INACTIVE_EXT]; } else { - $this->setInactive(new FHIRBoolean($data[self::FIELD_INACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInactive($value); + } else if (is_array($value)) { + $this->setInactive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInactive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_INCLUDE])) { @@ -215,20 +222,27 @@ public function __construct($data = null) $this->addInclude(new FHIRValueSetInclude($data[self::FIELD_INCLUDE])); } } - if (isset($data[self::FIELD_LOCKED_DATE])) { - $ext = (isset($data[self::FIELD_LOCKED_DATE_EXT]) && is_array($data[self::FIELD_LOCKED_DATE_EXT])) - ? $data[self::FIELD_LOCKED_DATE_EXT] - : null; - if ($data[self::FIELD_LOCKED_DATE] instanceof FHIRDate) { - $this->setLockedDate($data[self::FIELD_LOCKED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOCKED_DATE])) { - $this->setLockedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LOCKED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LOCKED_DATE])) { - $this->setLockedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LOCKED_DATE]))); - } + if (isset($data[self::FIELD_LOCKED_DATE]) || isset($data[self::FIELD_LOCKED_DATE_EXT])) { + if (isset($data[self::FIELD_LOCKED_DATE])) { + $value = $data[self::FIELD_LOCKED_DATE]; } else { - $this->setLockedDate(new FHIRDate($data[self::FIELD_LOCKED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_LOCKED_DATE_EXT]) && is_array($data[self::FIELD_LOCKED_DATE_EXT])) { + $ext = $data[self::FIELD_LOCKED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLockedDate($value); + } else if (is_array($value)) { + $this->setLockedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLockedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLockedDate(new FHIRDate($ext)); } } } @@ -453,8 +467,8 @@ public function setLockedDate($lockedDate = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -575,25 +589,44 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getExclude())) { - $a[self::FIELD_EXCLUDE] = $vs; + $a[self::FIELD_EXCLUDE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCLUDE][] = $v; + } } if (null !== ($v = $this->getInactive())) { $a[self::FIELD_INACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getInclude())) { - $a[self::FIELD_INCLUDE] = $vs; + $a[self::FIELD_INCLUDE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INCLUDE][] = $v; + } } if (null !== ($v = $this->getLockedDate())) { $a[self::FIELD_LOCKED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LOCKED_DATE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php index 6a679014b0..e4cfdeb5b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRValueSetConcept extends FHIRBackboneElement const FIELD_DISPLAY_EXT = '_display'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -144,20 +144,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DESIGNATION])) { @@ -178,20 +185,27 @@ public function __construct($data = null) $this->addDesignation(new FHIRValueSetDesignation($data[self::FIELD_DESIGNATION])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } } @@ -356,8 +370,8 @@ public function setDisplay($display = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -466,21 +480,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php index 6116b2631b..6714e40d45 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContains.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRValueSetContains extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -212,36 +212,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ABSTRACT])) { - $ext = (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) - ? $data[self::FIELD_ABSTRACT_EXT] - : null; - if ($data[self::FIELD_ABSTRACT] instanceof FHIRBoolean) { - $this->setAbstract($data[self::FIELD_ABSTRACT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABSTRACT]] + $ext)); - } else if (is_array($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABSTRACT]))); - } + if (isset($data[self::FIELD_ABSTRACT]) || isset($data[self::FIELD_ABSTRACT_EXT])) { + if (isset($data[self::FIELD_ABSTRACT])) { + $value = $data[self::FIELD_ABSTRACT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) { + $ext = $data[self::FIELD_ABSTRACT_EXT]; } else { - $this->setAbstract(new FHIRBoolean($data[self::FIELD_ABSTRACT])); - } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbstract($value); + } else if (is_array($value)) { + $this->setAbstract(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbstract(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_CONTAINS])) { @@ -280,68 +294,96 @@ public function __construct($data = null) $this->addDesignation(new FHIRValueSetDesignation($data[self::FIELD_DESIGNATION])); } } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); - } - } - if (isset($data[self::FIELD_INACTIVE])) { - $ext = (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) - ? $data[self::FIELD_INACTIVE_EXT] - : null; - if ($data[self::FIELD_INACTIVE] instanceof FHIRBoolean) { - $this->setInactive($data[self::FIELD_INACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_INACTIVE])) { - $this->setInactive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INACTIVE]))); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_INACTIVE]) || isset($data[self::FIELD_INACTIVE_EXT])) { + if (isset($data[self::FIELD_INACTIVE])) { + $value = $data[self::FIELD_INACTIVE]; } else { - $this->setInactive(new FHIRBoolean($data[self::FIELD_INACTIVE])); - } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + $value = null; + } + if (isset($data[self::FIELD_INACTIVE_EXT]) && is_array($data[self::FIELD_INACTIVE_EXT])) { + $ext = $data[self::FIELD_INACTIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInactive($value); + } else if (is_array($value)) { + $this->setInactive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInactive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setInactive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); - } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -717,8 +759,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -896,52 +938,79 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAbstract())) { $a[self::FIELD_ABSTRACT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABSTRACT_EXT] = $enc; } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getContains())) { - $a[self::FIELD_CONTAINS] = $vs; + $a[self::FIELD_CONTAINS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINS][] = $v; + } } if ([] !== ($vs = $this->getDesignation())) { - $a[self::FIELD_DESIGNATION] = $vs; + $a[self::FIELD_DESIGNATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESIGNATION][] = $v; + } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getInactive())) { $a[self::FIELD_INACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php index 0c16cf9e98..71cf701c2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRValueSetDesignation extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -144,20 +144,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); - } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_USE])) { @@ -167,20 +174,27 @@ public function __construct($data = null) $this->setUse(new FHIRCoding($data[self::FIELD_USE])); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); - } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -318,8 +332,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -422,8 +436,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } @@ -432,11 +448,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php index 5fb9d0e7ca..de1899d458 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansion.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRValueSetExpansion extends FHIRBackboneElement const FIELD_TOTAL_EXT = '_total'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -206,36 +206,50 @@ public function __construct($data = null) $this->addContains(new FHIRValueSetContains($data[self::FIELD_CONTAINS])); } } - if (isset($data[self::FIELD_IDENTIFIER])) { - $ext = (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) - ? $data[self::FIELD_IDENTIFIER_EXT] - : null; - if ($data[self::FIELD_IDENTIFIER] instanceof FHIRUri) { - $this->setIdentifier($data[self::FIELD_IDENTIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IDENTIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTIFIER])) { - $this->setIdentifier(new FHIRUri(array_merge($ext, $data[self::FIELD_IDENTIFIER]))); - } + if (isset($data[self::FIELD_IDENTIFIER]) || isset($data[self::FIELD_IDENTIFIER_EXT])) { + if (isset($data[self::FIELD_IDENTIFIER])) { + $value = $data[self::FIELD_IDENTIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDENTIFIER_EXT]) && is_array($data[self::FIELD_IDENTIFIER_EXT])) { + $ext = $data[self::FIELD_IDENTIFIER_EXT]; } else { - $this->setIdentifier(new FHIRUri($data[self::FIELD_IDENTIFIER])); - } - } - if (isset($data[self::FIELD_OFFSET])) { - $ext = (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) - ? $data[self::FIELD_OFFSET_EXT] - : null; - if ($data[self::FIELD_OFFSET] instanceof FHIRInteger) { - $this->setOffset($data[self::FIELD_OFFSET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_OFFSET]] + $ext)); - } else if (is_array($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRInteger(array_merge($ext, $data[self::FIELD_OFFSET]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setIdentifier($value); + } else if (is_array($value)) { + $this->setIdentifier(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setIdentifier(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIdentifier(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_OFFSET]) || isset($data[self::FIELD_OFFSET_EXT])) { + if (isset($data[self::FIELD_OFFSET])) { + $value = $data[self::FIELD_OFFSET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) { + $ext = $data[self::FIELD_OFFSET_EXT]; } else { - $this->setOffset(new FHIRInteger($data[self::FIELD_OFFSET])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setOffset($value); + } else if (is_array($value)) { + $this->setOffset(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setOffset(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOffset(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -256,36 +270,50 @@ public function __construct($data = null) $this->addParameter(new FHIRValueSetParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_TIMESTAMP])) { - $ext = (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) - ? $data[self::FIELD_TIMESTAMP_EXT] - : null; - if ($data[self::FIELD_TIMESTAMP] instanceof FHIRDateTime) { - $this->setTimestamp($data[self::FIELD_TIMESTAMP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMESTAMP]] + $ext)); - } else if (is_array($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMESTAMP]))); - } + if (isset($data[self::FIELD_TIMESTAMP]) || isset($data[self::FIELD_TIMESTAMP_EXT])) { + if (isset($data[self::FIELD_TIMESTAMP])) { + $value = $data[self::FIELD_TIMESTAMP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) { + $ext = $data[self::FIELD_TIMESTAMP_EXT]; } else { - $this->setTimestamp(new FHIRDateTime($data[self::FIELD_TIMESTAMP])); - } - } - if (isset($data[self::FIELD_TOTAL])) { - $ext = (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) - ? $data[self::FIELD_TOTAL_EXT] - : null; - if ($data[self::FIELD_TOTAL] instanceof FHIRInteger) { - $this->setTotal($data[self::FIELD_TOTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_TOTAL]] + $ext)); - } else if (is_array($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRInteger(array_merge($ext, $data[self::FIELD_TOTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimestamp($value); + } else if (is_array($value)) { + $this->setTimestamp(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimestamp(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTimestamp(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_TOTAL]) || isset($data[self::FIELD_TOTAL_EXT])) { + if (isset($data[self::FIELD_TOTAL])) { + $value = $data[self::FIELD_TOTAL]; } else { - $this->setTotal(new FHIRInteger($data[self::FIELD_TOTAL])); + $value = null; + } + if (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) { + $ext = $data[self::FIELD_TOTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setTotal($value); + } else if (is_array($value)) { + $this->setTotal(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setTotal(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTotal(new FHIRInteger($ext)); } } } @@ -591,8 +619,8 @@ public function setTotal($total = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -741,39 +769,62 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContains())) { - $a[self::FIELD_CONTAINS] = $vs; + $a[self::FIELD_CONTAINS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINS][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_IDENTIFIER_EXT] = $enc; } } if (null !== ($v = $this->getOffset())) { $a[self::FIELD_OFFSET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_OFFSET_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getTimestamp())) { $a[self::FIELD_TIMESTAMP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMESTAMP_EXT] = $enc; } } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_TOTAL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php index 264c78f08e..2fefb78c1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRValueSetFilter extends FHIRBackboneElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of operation to perform as a part of a property based filter. @@ -147,52 +147,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_OP])) { - $ext = (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) - ? $data[self::FIELD_OP_EXT] - : null; - if ($data[self::FIELD_OP] instanceof FHIRFilterOperator) { - $this->setOp($data[self::FIELD_OP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OP])) { - $this->setOp(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $data[self::FIELD_OP]] + $ext)); - } else if (is_array($data[self::FIELD_OP])) { - $this->setOp(new FHIRFilterOperator(array_merge($ext, $data[self::FIELD_OP]))); - } + if (isset($data[self::FIELD_OP]) || isset($data[self::FIELD_OP_EXT])) { + if (isset($data[self::FIELD_OP])) { + $value = $data[self::FIELD_OP]; } else { - $this->setOp(new FHIRFilterOperator($data[self::FIELD_OP])); + $value = null; } - } - if (isset($data[self::FIELD_PROPERTY])) { - $ext = (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) - ? $data[self::FIELD_PROPERTY_EXT] - : null; - if ($data[self::FIELD_PROPERTY] instanceof FHIRCode) { - $this->setProperty($data[self::FIELD_PROPERTY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PROPERTY]] + $ext)); - } else if (is_array($data[self::FIELD_PROPERTY])) { - $this->setProperty(new FHIRCode(array_merge($ext, $data[self::FIELD_PROPERTY]))); - } + if (isset($data[self::FIELD_OP_EXT]) && is_array($data[self::FIELD_OP_EXT])) { + $ext = $data[self::FIELD_OP_EXT]; } else { - $this->setProperty(new FHIRCode($data[self::FIELD_PROPERTY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFilterOperator) { + $this->setOp($value); + } else if (is_array($value)) { + $this->setOp(new FHIRFilterOperator(array_merge($ext, $value))); + } else { + $this->setOp(new FHIRFilterOperator([FHIRFilterOperator::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOp(new FHIRFilterOperator($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRCode) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_PROPERTY]) || isset($data[self::FIELD_PROPERTY_EXT])) { + if (isset($data[self::FIELD_PROPERTY])) { + $value = $data[self::FIELD_PROPERTY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROPERTY_EXT]) && is_array($data[self::FIELD_PROPERTY_EXT])) { + $ext = $data[self::FIELD_PROPERTY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setProperty($value); + } else if (is_array($value)) { + $this->setProperty(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setProperty(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProperty(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRCode($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRCode($ext)); } } } @@ -336,8 +357,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -440,25 +461,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getOp())) { $a[self::FIELD_OP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFilterOperator::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFilterOperator::FIELD_VALUE]); $a[self::FIELD_OP_EXT] = $enc; } } if (null !== ($v = $this->getProperty())) { $a[self::FIELD_PROPERTY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_PROPERTY_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php index c70f04326f..408ce477d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetInclude.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRValueSetInclude extends FHIRBackboneElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -203,65 +203,88 @@ public function __construct($data = null) $this->addFilter(new FHIRValueSetFilter($data[self::FIELD_FILTER])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VALUE_SET])) { - $ext = (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) - ? $data[self::FIELD_VALUE_SET_EXT] - : null; - if (is_array($data[self::FIELD_VALUE_SET])) { - foreach($data[self::FIELD_VALUE_SET] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addValueSet($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addValueSet(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addValueSet(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_VALUE_SET]) || isset($data[self::FIELD_VALUE_SET_EXT])) { + if (isset($data[self::FIELD_VALUE_SET])) { + $value = $data[self::FIELD_VALUE_SET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addValueSet($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addValueSet($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addValueSet(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addValueSet(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addValueSet(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addValueSet(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addValueSet(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addValueSet(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_VALUE_SET] instanceof FHIRUri) { - $this->addValueSet($data[self::FIELD_VALUE_SET]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_VALUE_SET])) { - $this->addValueSet(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_SET]] + $ext)); - } else { - $this->addValueSet(new FHIRUri($data[self::FIELD_VALUE_SET])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -542,8 +565,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -677,40 +700,67 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getFilter())) { - $a[self::FIELD_FILTER] = $vs; + $a[self::FIELD_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FILTER][] = $v; + } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if ([] !== ($vs = $this->getValueSet())) { $a[self::FIELD_VALUE_SET] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_VALUE_SET][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_VALUE_SET_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_VALUE_SET_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_VALUE_SET_EXT] = $encs; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php index 15aaf20f7b..06d355812d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRValueSetParameter extends FHIRBackboneElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -200,116 +200,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); - } - } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); - } - } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); - } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); - } - } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -607,8 +656,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -774,53 +823,70 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php index e05c3e38ea..7b09215db4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRVisionPrescriptionDispense extends FHIRBackboneElement const FIELD_SPHERE_EXT = '_sphere'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A rational number with implicit precision @@ -312,132 +312,188 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADD])) { - $ext = (isset($data[self::FIELD_ADD_EXT]) && is_array($data[self::FIELD_ADD_EXT])) - ? $data[self::FIELD_ADD_EXT] - : null; - if ($data[self::FIELD_ADD] instanceof FHIRDecimal) { - $this->setAdd($data[self::FIELD_ADD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADD])) { - $this->setAdd(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_ADD]] + $ext)); - } else if (is_array($data[self::FIELD_ADD])) { - $this->setAdd(new FHIRDecimal(array_merge($ext, $data[self::FIELD_ADD]))); - } + if (isset($data[self::FIELD_ADD]) || isset($data[self::FIELD_ADD_EXT])) { + if (isset($data[self::FIELD_ADD])) { + $value = $data[self::FIELD_ADD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADD_EXT]) && is_array($data[self::FIELD_ADD_EXT])) { + $ext = $data[self::FIELD_ADD_EXT]; } else { - $this->setAdd(new FHIRDecimal($data[self::FIELD_ADD])); - } - } - if (isset($data[self::FIELD_AXIS])) { - $ext = (isset($data[self::FIELD_AXIS_EXT]) && is_array($data[self::FIELD_AXIS_EXT])) - ? $data[self::FIELD_AXIS_EXT] - : null; - if ($data[self::FIELD_AXIS] instanceof FHIRInteger) { - $this->setAxis($data[self::FIELD_AXIS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AXIS])) { - $this->setAxis(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_AXIS]] + $ext)); - } else if (is_array($data[self::FIELD_AXIS])) { - $this->setAxis(new FHIRInteger(array_merge($ext, $data[self::FIELD_AXIS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setAdd($value); + } else if (is_array($value)) { + $this->setAdd(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setAdd(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAdd(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_AXIS]) || isset($data[self::FIELD_AXIS_EXT])) { + if (isset($data[self::FIELD_AXIS])) { + $value = $data[self::FIELD_AXIS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AXIS_EXT]) && is_array($data[self::FIELD_AXIS_EXT])) { + $ext = $data[self::FIELD_AXIS_EXT]; } else { - $this->setAxis(new FHIRInteger($data[self::FIELD_AXIS])); - } - } - if (isset($data[self::FIELD_BACK_CURVE])) { - $ext = (isset($data[self::FIELD_BACK_CURVE_EXT]) && is_array($data[self::FIELD_BACK_CURVE_EXT])) - ? $data[self::FIELD_BACK_CURVE_EXT] - : null; - if ($data[self::FIELD_BACK_CURVE] instanceof FHIRDecimal) { - $this->setBackCurve($data[self::FIELD_BACK_CURVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BACK_CURVE])) { - $this->setBackCurve(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_BACK_CURVE]] + $ext)); - } else if (is_array($data[self::FIELD_BACK_CURVE])) { - $this->setBackCurve(new FHIRDecimal(array_merge($ext, $data[self::FIELD_BACK_CURVE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setAxis($value); + } else if (is_array($value)) { + $this->setAxis(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setAxis(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAxis(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_BACK_CURVE]) || isset($data[self::FIELD_BACK_CURVE_EXT])) { + if (isset($data[self::FIELD_BACK_CURVE])) { + $value = $data[self::FIELD_BACK_CURVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BACK_CURVE_EXT]) && is_array($data[self::FIELD_BACK_CURVE_EXT])) { + $ext = $data[self::FIELD_BACK_CURVE_EXT]; } else { - $this->setBackCurve(new FHIRDecimal($data[self::FIELD_BACK_CURVE])); - } - } - if (isset($data[self::FIELD_BASE])) { - $ext = (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) - ? $data[self::FIELD_BASE_EXT] - : null; - if ($data[self::FIELD_BASE] instanceof FHIRVisionBase) { - $this->setBase($data[self::FIELD_BASE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE])) { - $this->setBase(new FHIRVisionBase([FHIRVisionBase::FIELD_VALUE => $data[self::FIELD_BASE]] + $ext)); - } else if (is_array($data[self::FIELD_BASE])) { - $this->setBase(new FHIRVisionBase(array_merge($ext, $data[self::FIELD_BASE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setBackCurve($value); + } else if (is_array($value)) { + $this->setBackCurve(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setBackCurve(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBackCurve(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_BASE]) || isset($data[self::FIELD_BASE_EXT])) { + if (isset($data[self::FIELD_BASE])) { + $value = $data[self::FIELD_BASE]; } else { - $this->setBase(new FHIRVisionBase($data[self::FIELD_BASE])); - } - } - if (isset($data[self::FIELD_BRAND])) { - $ext = (isset($data[self::FIELD_BRAND_EXT]) && is_array($data[self::FIELD_BRAND_EXT])) - ? $data[self::FIELD_BRAND_EXT] - : null; - if ($data[self::FIELD_BRAND] instanceof FHIRString) { - $this->setBrand($data[self::FIELD_BRAND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BRAND])) { - $this->setBrand(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BRAND]] + $ext)); - } else if (is_array($data[self::FIELD_BRAND])) { - $this->setBrand(new FHIRString(array_merge($ext, $data[self::FIELD_BRAND]))); + $value = null; + } + if (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) { + $ext = $data[self::FIELD_BASE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRVisionBase) { + $this->setBase($value); + } else if (is_array($value)) { + $this->setBase(new FHIRVisionBase(array_merge($ext, $value))); + } else { + $this->setBase(new FHIRVisionBase([FHIRVisionBase::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBase(new FHIRVisionBase($ext)); + } + } + if (isset($data[self::FIELD_BRAND]) || isset($data[self::FIELD_BRAND_EXT])) { + if (isset($data[self::FIELD_BRAND])) { + $value = $data[self::FIELD_BRAND]; } else { - $this->setBrand(new FHIRString($data[self::FIELD_BRAND])); - } - } - if (isset($data[self::FIELD_COLOR])) { - $ext = (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) - ? $data[self::FIELD_COLOR_EXT] - : null; - if ($data[self::FIELD_COLOR] instanceof FHIRString) { - $this->setColor($data[self::FIELD_COLOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COLOR]] + $ext)); - } else if (is_array($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRString(array_merge($ext, $data[self::FIELD_COLOR]))); + $value = null; + } + if (isset($data[self::FIELD_BRAND_EXT]) && is_array($data[self::FIELD_BRAND_EXT])) { + $ext = $data[self::FIELD_BRAND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBrand($value); + } else if (is_array($value)) { + $this->setBrand(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBrand(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBrand(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_COLOR]) || isset($data[self::FIELD_COLOR_EXT])) { + if (isset($data[self::FIELD_COLOR])) { + $value = $data[self::FIELD_COLOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) { + $ext = $data[self::FIELD_COLOR_EXT]; } else { - $this->setColor(new FHIRString($data[self::FIELD_COLOR])); - } - } - if (isset($data[self::FIELD_CYLINDER])) { - $ext = (isset($data[self::FIELD_CYLINDER_EXT]) && is_array($data[self::FIELD_CYLINDER_EXT])) - ? $data[self::FIELD_CYLINDER_EXT] - : null; - if ($data[self::FIELD_CYLINDER] instanceof FHIRDecimal) { - $this->setCylinder($data[self::FIELD_CYLINDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CYLINDER])) { - $this->setCylinder(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_CYLINDER]] + $ext)); - } else if (is_array($data[self::FIELD_CYLINDER])) { - $this->setCylinder(new FHIRDecimal(array_merge($ext, $data[self::FIELD_CYLINDER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setColor($value); + } else if (is_array($value)) { + $this->setColor(new FHIRString(array_merge($ext, $value))); + } else { + $this->setColor(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setColor(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CYLINDER]) || isset($data[self::FIELD_CYLINDER_EXT])) { + if (isset($data[self::FIELD_CYLINDER])) { + $value = $data[self::FIELD_CYLINDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CYLINDER_EXT]) && is_array($data[self::FIELD_CYLINDER_EXT])) { + $ext = $data[self::FIELD_CYLINDER_EXT]; } else { - $this->setCylinder(new FHIRDecimal($data[self::FIELD_CYLINDER])); - } - } - if (isset($data[self::FIELD_DIAMETER])) { - $ext = (isset($data[self::FIELD_DIAMETER_EXT]) && is_array($data[self::FIELD_DIAMETER_EXT])) - ? $data[self::FIELD_DIAMETER_EXT] - : null; - if ($data[self::FIELD_DIAMETER] instanceof FHIRDecimal) { - $this->setDiameter($data[self::FIELD_DIAMETER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIAMETER])) { - $this->setDiameter(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DIAMETER]] + $ext)); - } else if (is_array($data[self::FIELD_DIAMETER])) { - $this->setDiameter(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DIAMETER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setCylinder($value); + } else if (is_array($value)) { + $this->setCylinder(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setCylinder(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCylinder(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_DIAMETER]) || isset($data[self::FIELD_DIAMETER_EXT])) { + if (isset($data[self::FIELD_DIAMETER])) { + $value = $data[self::FIELD_DIAMETER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIAMETER_EXT]) && is_array($data[self::FIELD_DIAMETER_EXT])) { + $ext = $data[self::FIELD_DIAMETER_EXT]; } else { - $this->setDiameter(new FHIRDecimal($data[self::FIELD_DIAMETER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDiameter($value); + } else if (is_array($value)) { + $this->setDiameter(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDiameter(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDiameter(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_DURATION])) { @@ -447,20 +503,27 @@ public function __construct($data = null) $this->setDuration(new FHIRQuantity($data[self::FIELD_DURATION])); } } - if (isset($data[self::FIELD_EYE])) { - $ext = (isset($data[self::FIELD_EYE_EXT]) && is_array($data[self::FIELD_EYE_EXT])) - ? $data[self::FIELD_EYE_EXT] - : null; - if ($data[self::FIELD_EYE] instanceof FHIRVisionEyes) { - $this->setEye($data[self::FIELD_EYE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EYE])) { - $this->setEye(new FHIRVisionEyes([FHIRVisionEyes::FIELD_VALUE => $data[self::FIELD_EYE]] + $ext)); - } else if (is_array($data[self::FIELD_EYE])) { - $this->setEye(new FHIRVisionEyes(array_merge($ext, $data[self::FIELD_EYE]))); - } + if (isset($data[self::FIELD_EYE]) || isset($data[self::FIELD_EYE_EXT])) { + if (isset($data[self::FIELD_EYE])) { + $value = $data[self::FIELD_EYE]; } else { - $this->setEye(new FHIRVisionEyes($data[self::FIELD_EYE])); + $value = null; + } + if (isset($data[self::FIELD_EYE_EXT]) && is_array($data[self::FIELD_EYE_EXT])) { + $ext = $data[self::FIELD_EYE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRVisionEyes) { + $this->setEye($value); + } else if (is_array($value)) { + $this->setEye(new FHIRVisionEyes(array_merge($ext, $value))); + } else { + $this->setEye(new FHIRVisionEyes([FHIRVisionEyes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEye(new FHIRVisionEyes($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -481,36 +544,50 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_POWER])) { - $ext = (isset($data[self::FIELD_POWER_EXT]) && is_array($data[self::FIELD_POWER_EXT])) - ? $data[self::FIELD_POWER_EXT] - : null; - if ($data[self::FIELD_POWER] instanceof FHIRDecimal) { - $this->setPower($data[self::FIELD_POWER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POWER])) { - $this->setPower(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_POWER]] + $ext)); - } else if (is_array($data[self::FIELD_POWER])) { - $this->setPower(new FHIRDecimal(array_merge($ext, $data[self::FIELD_POWER]))); - } + if (isset($data[self::FIELD_POWER]) || isset($data[self::FIELD_POWER_EXT])) { + if (isset($data[self::FIELD_POWER])) { + $value = $data[self::FIELD_POWER]; } else { - $this->setPower(new FHIRDecimal($data[self::FIELD_POWER])); - } - } - if (isset($data[self::FIELD_PRISM])) { - $ext = (isset($data[self::FIELD_PRISM_EXT]) && is_array($data[self::FIELD_PRISM_EXT])) - ? $data[self::FIELD_PRISM_EXT] - : null; - if ($data[self::FIELD_PRISM] instanceof FHIRDecimal) { - $this->setPrism($data[self::FIELD_PRISM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRISM])) { - $this->setPrism(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PRISM]] + $ext)); - } else if (is_array($data[self::FIELD_PRISM])) { - $this->setPrism(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PRISM]))); + $value = null; + } + if (isset($data[self::FIELD_POWER_EXT]) && is_array($data[self::FIELD_POWER_EXT])) { + $ext = $data[self::FIELD_POWER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPower($value); + } else if (is_array($value)) { + $this->setPower(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPower(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPower(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_PRISM]) || isset($data[self::FIELD_PRISM_EXT])) { + if (isset($data[self::FIELD_PRISM])) { + $value = $data[self::FIELD_PRISM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRISM_EXT]) && is_array($data[self::FIELD_PRISM_EXT])) { + $ext = $data[self::FIELD_PRISM_EXT]; } else { - $this->setPrism(new FHIRDecimal($data[self::FIELD_PRISM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPrism($value); + } else if (is_array($value)) { + $this->setPrism(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPrism(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrism(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PRODUCT])) { @@ -520,20 +597,27 @@ public function __construct($data = null) $this->setProduct(new FHIRCodeableConcept($data[self::FIELD_PRODUCT])); } } - if (isset($data[self::FIELD_SPHERE])) { - $ext = (isset($data[self::FIELD_SPHERE_EXT]) && is_array($data[self::FIELD_SPHERE_EXT])) - ? $data[self::FIELD_SPHERE_EXT] - : null; - if ($data[self::FIELD_SPHERE] instanceof FHIRDecimal) { - $this->setSphere($data[self::FIELD_SPHERE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SPHERE])) { - $this->setSphere(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_SPHERE]] + $ext)); - } else if (is_array($data[self::FIELD_SPHERE])) { - $this->setSphere(new FHIRDecimal(array_merge($ext, $data[self::FIELD_SPHERE]))); - } + if (isset($data[self::FIELD_SPHERE]) || isset($data[self::FIELD_SPHERE_EXT])) { + if (isset($data[self::FIELD_SPHERE])) { + $value = $data[self::FIELD_SPHERE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SPHERE_EXT]) && is_array($data[self::FIELD_SPHERE_EXT])) { + $ext = $data[self::FIELD_SPHERE_EXT]; } else { - $this->setSphere(new FHIRDecimal($data[self::FIELD_SPHERE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setSphere($value); + } else if (is_array($value)) { + $this->setSphere(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setSphere(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSphere(new FHIRDecimal($ext)); } } } @@ -1140,8 +1224,8 @@ public function setSphere($sphere = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1386,57 +1470,73 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAdd())) { $a[self::FIELD_ADD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_ADD_EXT] = $enc; } } if (null !== ($v = $this->getAxis())) { $a[self::FIELD_AXIS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_AXIS_EXT] = $enc; } } if (null !== ($v = $this->getBackCurve())) { $a[self::FIELD_BACK_CURVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_BACK_CURVE_EXT] = $enc; } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRVisionBase::FIELD_VALUE, $enc)))) { + unset($enc[FHIRVisionBase::FIELD_VALUE]); $a[self::FIELD_BASE_EXT] = $enc; } } if (null !== ($v = $this->getBrand())) { $a[self::FIELD_BRAND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BRAND_EXT] = $enc; } } if (null !== ($v = $this->getColor())) { $a[self::FIELD_COLOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COLOR_EXT] = $enc; } } if (null !== ($v = $this->getCylinder())) { $a[self::FIELD_CYLINDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_CYLINDER_EXT] = $enc; } } if (null !== ($v = $this->getDiameter())) { $a[self::FIELD_DIAMETER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DIAMETER_EXT] = $enc; } } @@ -1445,25 +1545,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getEye())) { $a[self::FIELD_EYE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRVisionEyes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRVisionEyes::FIELD_VALUE]); $a[self::FIELD_EYE_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPower())) { $a[self::FIELD_POWER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_POWER_EXT] = $enc; } } if (null !== ($v = $this->getPrism())) { $a[self::FIELD_PRISM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PRISM_EXT] = $enc; } } @@ -1472,11 +1584,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSphere())) { $a[self::FIELD_SPHERE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_SPHERE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBase64Binary.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBase64Binary.php index 28a9a16bcb..bf571bc1db 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBase64Binary.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBase64Binary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRBase64Binary extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BASE_64BINARY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRBase64BinaryPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBindingStrength.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBindingStrength.php index f7b956e0fd..461e2cc8c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBindingStrength.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBindingStrength.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBindingStrength extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINDING_STRENGTH; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRBindingStrengthList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBoolean.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBoolean.php index f9330b9b58..25ef4e0eb7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBoolean.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBoolean.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBoolean extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BOOLEAN; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRBooleanPrimitive @@ -175,8 +174,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -259,6 +258,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBundleType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBundleType.php index 3ffa93cc08..fadd16a645 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBundleType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRBundleType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRBundleType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BUNDLE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRBundleTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCapabilityStatementKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCapabilityStatementKind.php index b2ac8ffbdf..c0d0b2e282 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCapabilityStatementKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCapabilityStatementKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCapabilityStatementKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CAPABILITY_STATEMENT_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCapabilityStatementKindList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanActivityStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanActivityStatus.php index 1debda1362..d161e791df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanActivityStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanActivityStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCarePlanActivityStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_ACTIVITY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCarePlanActivityStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanIntent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanIntent.php index 3edc8ccacf..88d079ab5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRCarePlanIntent extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_INTENT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCarePlanIntentList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanStatus.php index bce922b097..deb2dfab76 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCarePlanStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRCarePlanStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_PLAN_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCarePlanStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCareTeamStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCareTeamStatus.php index 84d2e6458f..2c7aae7a83 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCareTeamStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCareTeamStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCareTeamStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CARE_TEAM_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCareTeamStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRChargeItemStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRChargeItemStatus.php index 984cb21bf0..8202324153 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRChargeItemStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRChargeItemStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRChargeItemStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CHARGE_ITEM_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRChargeItemStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRClinicalImpressionStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRClinicalImpressionStatus.php index 01920f923a..f7c57fede7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRClinicalImpressionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRClinicalImpressionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRClinicalImpressionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRClinicalImpressionStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCode.php index bd334c25c4..ce1d62731d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemContentMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemContentMode.php index 9702896e23..71ad5ee1e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemContentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemContentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRCodeSystemContentMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_CONTENT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCodeSystemContentModeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemHierarchyMeaning.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemHierarchyMeaning.php index 41acc729d9..6434bdacd3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemHierarchyMeaning.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeSystemHierarchyMeaning.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCodeSystemHierarchyMeaning extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_SYSTEM_HIERARCHY_MEANING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCodeSystemHierarchyMeaningList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeableConcept.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeableConcept.php index 617243ee13..9c2a6150d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeableConcept.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCodeableConcept.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRCodeableConcept extends FHIRElement const FIELD_TEXT_EXT = '_text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -150,20 +150,27 @@ public function __construct($data = null) $this->addCoding(new FHIRCoding($data[self::FIELD_CODING])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } } @@ -291,8 +298,8 @@ public function setText($text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,15 +393,26 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCoding())) { - $a[self::FIELD_CODING] = $vs; + $a[self::FIELD_CODING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODING][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCoding.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCoding.php index 80cf562162..0b8e51e57d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCoding.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCoding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRCoding extends FHIRElement const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -177,84 +177,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_USER_SELECTED])) { - $ext = (isset($data[self::FIELD_USER_SELECTED_EXT]) && is_array($data[self::FIELD_USER_SELECTED_EXT])) - ? $data[self::FIELD_USER_SELECTED_EXT] - : null; - if ($data[self::FIELD_USER_SELECTED] instanceof FHIRBoolean) { - $this->setUserSelected($data[self::FIELD_USER_SELECTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USER_SELECTED])) { - $this->setUserSelected(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_USER_SELECTED]] + $ext)); - } else if (is_array($data[self::FIELD_USER_SELECTED])) { - $this->setUserSelected(new FHIRBoolean(array_merge($ext, $data[self::FIELD_USER_SELECTED]))); + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setUserSelected(new FHIRBoolean($data[self::FIELD_USER_SELECTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + if (isset($data[self::FIELD_USER_SELECTED]) || isset($data[self::FIELD_USER_SELECTED_EXT])) { + if (isset($data[self::FIELD_USER_SELECTED])) { + $value = $data[self::FIELD_USER_SELECTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USER_SELECTED_EXT]) && is_array($data[self::FIELD_USER_SELECTED_EXT])) { + $ext = $data[self::FIELD_USER_SELECTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setUserSelected($value); + } else if (is_array($value)) { + $this->setUserSelected(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setUserSelected(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUserSelected(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -490,8 +525,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -629,39 +664,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUserSelected())) { $a[self::FIELD_USER_SELECTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_USER_SELECTED_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompartmentType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompartmentType.php index 2bfd6ee636..00670f432e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompartmentType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompartmentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCompartmentType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPARTMENT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCompartmentTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionAttestationMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionAttestationMode.php index 177ce12836..0648c1dbe1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionAttestationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionAttestationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCompositionAttestationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_ATTESTATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCompositionAttestationModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionStatus.php index ff7b892151..db5e9d7cbd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRCompositionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRCompositionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COMPOSITION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRCompositionStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapEquivalence.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapEquivalence.php index beea1671d2..d30e960c1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapEquivalence.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapEquivalence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRConceptMapEquivalence extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_EQUIVALENCE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConceptMapEquivalenceList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapGroupUnmappedMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapGroupUnmappedMode.php index 4a61d326c0..d5206577a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapGroupUnmappedMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConceptMapGroupUnmappedMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConceptMapGroupUnmappedMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONCEPT_MAP_GROUP_UNMAPPED_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConceptMapGroupUnmappedModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionClinicalStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionClinicalStatusCodes.php index 73e0351726..04b250df5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionClinicalStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionClinicalStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConditionClinicalStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_CLINICAL_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConditionClinicalStatusCodesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionVerificationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionVerificationStatus.php index a38c0be2da..93250572c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionVerificationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionVerificationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRConditionVerificationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITION_VERIFICATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConditionVerificationStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalDeleteStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalDeleteStatus.php index 4200ccfb13..520cfb96ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalDeleteStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalDeleteStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConditionalDeleteStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_DELETE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConditionalDeleteStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalReadStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalReadStatus.php index 3784a95729..28a2b7f962 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalReadStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConditionalReadStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConditionalReadStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONDITIONAL_READ_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConditionalReadStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConfidentialityClassification.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConfidentialityClassification.php index 06c97c273c..6fa427aa8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConfidentialityClassification.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConfidentialityClassification.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConfidentialityClassification extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONFIDENTIALITY_CLASSIFICATION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConfidentialityClassificationList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentDataMeaning.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentDataMeaning.php index 4e4a88fcec..f1810168be 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentDataMeaning.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentDataMeaning.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConsentDataMeaning extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_DATA_MEANING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConsentDataMeaningList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentExceptType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentExceptType.php index b0b6f88e4a..afd6f2e27e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentExceptType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentExceptType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRConsentExceptType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_EXCEPT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConsentExceptTypeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentState.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentState.php index c11396d709..c6de1a44a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentState.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConsentState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConsentState extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSENT_STATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConsentStateList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConstraintSeverity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConstraintSeverity.php index d6e40d9d37..196878df2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConstraintSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRConstraintSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRConstraintSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONSTRAINT_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRConstraintSeverityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactDetail.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactDetail.php index c9ecca4484..05438b7bdd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactDetail.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactDetail.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRContactDetail extends FHIRElement const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -131,20 +131,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -292,8 +299,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -388,13 +395,24 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPoint.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPoint.php index 4611ca6afc..561498b7aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPoint.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRContactPoint extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -177,68 +177,96 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_RANK])) { - $ext = (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) - ? $data[self::FIELD_RANK_EXT] - : null; - if ($data[self::FIELD_RANK] instanceof FHIRPositiveInt) { - $this->setRank($data[self::FIELD_RANK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_RANK]] + $ext)); - } else if (is_array($data[self::FIELD_RANK])) { - $this->setRank(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_RANK]))); - } + if (isset($data[self::FIELD_RANK]) || isset($data[self::FIELD_RANK_EXT])) { + if (isset($data[self::FIELD_RANK])) { + $value = $data[self::FIELD_RANK]; } else { - $this->setRank(new FHIRPositiveInt($data[self::FIELD_RANK])); + $value = null; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRContactPointSystem) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRContactPointSystem([FHIRContactPointSystem::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRContactPointSystem(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_RANK_EXT]) && is_array($data[self::FIELD_RANK_EXT])) { + $ext = $data[self::FIELD_RANK_EXT]; } else { - $this->setSystem(new FHIRContactPointSystem($data[self::FIELD_SYSTEM])); + $ext = []; } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRContactPointUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRContactPointUse([FHIRContactPointUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRContactPointUse(array_merge($ext, $data[self::FIELD_USE]))); + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setRank($value); + } else if (is_array($value)) { + $this->setRank(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setRank(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRank(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setUse(new FHIRContactPointUse($data[self::FIELD_USE])); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContactPointSystem) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRContactPointSystem(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRContactPointSystem([FHIRContactPointSystem::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRContactPointSystem($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContactPointUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRContactPointUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRContactPointUse([FHIRContactPointUse::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUse(new FHIRContactPointUse($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -436,8 +464,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -555,32 +583,43 @@ public function jsonSerialize() } if (null !== ($v = $this->getRank())) { $a[self::FIELD_RANK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_RANK_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContactPointSystem::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContactPointSystem::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContactPointUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContactPointUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointSystem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointSystem.php index fb95cdf09d..406fa3ff78 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContactPointSystem extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_SYSTEM; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRContactPointSystemList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointUse.php index 739153524d..fc0f980c39 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContactPointUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContactPointUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTACT_POINT_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRContactPointUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContentType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContentType.php index 39ac09c84c..004113f4b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContentType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContentType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContentType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTENT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRContentTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContractResourceStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContractResourceStatusCodes.php index 4b37794f52..9a20942e7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContractResourceStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContractResourceStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContractResourceStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRACT_RESOURCE_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRContractResourceStatusCodesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributor.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributor.php index c4f0ce04b1..b44fc3b020 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributor.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRContributor extends FHIRElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -161,36 +161,50 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRContributorType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRContributorType([FHIRContributorType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRContributorType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRContributorType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContributorType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRContributorType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRContributorType([FHIRContributorType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRContributorType($ext)); } } } @@ -345,8 +359,8 @@ public function setType(FHIRContributorType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -446,22 +460,35 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContributorType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContributorType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributorType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributorType.php index c63da150e6..a889c9d61e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributorType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRContributorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRContributorType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CONTRIBUTOR_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRContributorTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataElementStringency.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataElementStringency.php index 10784af52f..7c5191e2fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataElementStringency.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataElementStringency.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDataElementStringency extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATA_ELEMENT_STRINGENCY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDataElementStringencyList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement.php index d305dddd8b..6a65b52e28 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRDataRequirement extends FHIRElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes a required data item for evaluation in terms of the type of data, and @@ -219,78 +219,103 @@ public function __construct($data = null) $this->addDateFilter(new FHIRDataRequirementDateFilter($data[self::FIELD_DATE_FILTER])); } } - if (isset($data[self::FIELD_MUST_SUPPORT])) { - $ext = (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) - ? $data[self::FIELD_MUST_SUPPORT_EXT] - : null; - if (is_array($data[self::FIELD_MUST_SUPPORT])) { - foreach($data[self::FIELD_MUST_SUPPORT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addMustSupport($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addMustSupport(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addMustSupport(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MUST_SUPPORT]) || isset($data[self::FIELD_MUST_SUPPORT_EXT])) { + if (isset($data[self::FIELD_MUST_SUPPORT])) { + $value = $data[self::FIELD_MUST_SUPPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) { + $ext = $data[self::FIELD_MUST_SUPPORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addMustSupport($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addMustSupport($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addMustSupport(new FHIRString(array_merge($v, $iext))); + } else { + $this->addMustSupport(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addMustSupport(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addMustSupport(new FHIRString(array_merge($ext, $value))); + } else { + $this->addMustSupport(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addMustSupport(new FHIRString($iext)); } - } elseif ($data[self::FIELD_MUST_SUPPORT] instanceof FHIRString) { - $this->addMustSupport($data[self::FIELD_MUST_SUPPORT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MUST_SUPPORT])) { - $this->addMustSupport(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MUST_SUPPORT]] + $ext)); - } else { - $this->addMustSupport(new FHIRString($data[self::FIELD_MUST_SUPPORT])); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_PROFILE])) { - foreach($data[self::FIELD_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProfile(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProfile(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProfile(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addProfile(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_PROFILE] instanceof FHIRUri) { - $this->addProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROFILE])) { - $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else { - $this->addProfile(new FHIRUri($data[self::FIELD_PROFILE])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProfile(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } } @@ -635,8 +660,8 @@ public function setType($type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -769,48 +794,81 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCodeFilter())) { - $a[self::FIELD_CODE_FILTER] = $vs; + $a[self::FIELD_CODE_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE_FILTER][] = $v; + } } if ([] !== ($vs = $this->getDateFilter())) { - $a[self::FIELD_DATE_FILTER] = $vs; + $a[self::FIELD_DATE_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATE_FILTER][] = $v; + } } if ([] !== ($vs = $this->getMustSupport())) { $a[self::FIELD_MUST_SUPPORT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MUST_SUPPORT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MUST_SUPPORT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MUST_SUPPORT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MUST_SUPPORT_EXT] = $encs; + } } if ([] !== ($vs = $this->getProfile())) { $a[self::FIELD_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROFILE_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROFILE_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php index b3fb5c69ad..4b59268f58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRDataRequirementCodeFilter extends FHIRElement const FIELD_VALUE_SET_STRING_EXT = '_valueSetString'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -207,49 +207,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if (is_array($data[self::FIELD_VALUE_CODE])) { - foreach($data[self::FIELD_VALUE_CODE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addValueCode($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addValueCode(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addValueCode($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addValueCode($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addValueCode(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addValueCode(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addValueCode(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->addValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->addValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else { - $this->addValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -295,20 +311,27 @@ public function __construct($data = null) $this->setValueSetReference(new FHIRReference($data[self::FIELD_VALUE_SET_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_SET_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_SET_STRING_EXT]) && is_array($data[self::FIELD_VALUE_SET_STRING_EXT])) - ? $data[self::FIELD_VALUE_SET_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_SET_STRING] instanceof FHIRString) { - $this->setValueSetString($data[self::FIELD_VALUE_SET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET_STRING])) { - $this->setValueSetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_SET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET_STRING])) { - $this->setValueSetString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_SET_STRING]))); - } + if (isset($data[self::FIELD_VALUE_SET_STRING]) || isset($data[self::FIELD_VALUE_SET_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_SET_STRING])) { + $value = $data[self::FIELD_VALUE_SET_STRING]; } else { - $this->setValueSetString(new FHIRString($data[self::FIELD_VALUE_SET_STRING])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_STRING_EXT]) && is_array($data[self::FIELD_VALUE_SET_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueSetString($value); + } else if (is_array($value)) { + $this->setValueSetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueSetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSetString(new FHIRString($ext)); } } } @@ -675,8 +698,8 @@ public function setValueSetString($valueSetString = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -817,42 +840,69 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if ([] !== ($vs = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_VALUE_CODE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_VALUE_CODE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_VALUE_CODE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_VALUE_CODE_EXT] = $encs; + } } if ([] !== ($vs = $this->getValueCodeableConcept())) { - $a[self::FIELD_VALUE_CODEABLE_CONCEPT] = $vs; + $a[self::FIELD_VALUE_CODEABLE_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUE_CODEABLE_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getValueCoding())) { - $a[self::FIELD_VALUE_CODING] = $vs; + $a[self::FIELD_VALUE_CODING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUE_CODING][] = $v; + } } if (null !== ($v = $this->getValueSetReference())) { $a[self::FIELD_VALUE_SET_REFERENCE] = $v; } if (null !== ($v = $this->getValueSetString())) { $a[self::FIELD_VALUE_SET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_STRING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php index bbdec89745..5ff5b1b10c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRDataRequirementDateFilter extends FHIRElement const FIELD_VALUE_PERIOD = 'valuePeriod'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -182,36 +182,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_VALUE_DURATION])) { @@ -437,8 +451,8 @@ public function setValuePeriod(FHIRPeriod $valuePeriod = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -546,15 +560,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } @@ -564,6 +582,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValuePeriod())) { $a[self::FIELD_VALUE_PERIOD] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDate.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDate.php index 150b03d112..44fa6815b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDate.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDate.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRDate extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRDatePrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDateTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDateTime.php index 2b2281f888..40e84539b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDateTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDateTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,10 +83,9 @@ class FHIRDateTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRDateTimePrimitive @@ -179,8 +178,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -263,6 +262,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDaysOfWeek.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDaysOfWeek.php index cf30740039..5ed13863b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDaysOfWeek.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDaysOfWeek.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDaysOfWeek extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DAYS_OF_WEEK; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDaysOfWeekList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDecimal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDecimal.php index 82a34da38b..7bc52f3815 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDecimal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDecimal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRDecimal extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DECIMAL; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRDecimalPrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDetectedIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDetectedIssueSeverity.php index c3bd30b282..22666e889a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDetectedIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDetectedIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDetectedIssueSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DETECTED_ISSUE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDetectedIssueSeverityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationState.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationState.php index 9c97a60e5c..352a138636 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationState.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationState.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricCalibrationState extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_STATE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDeviceMetricCalibrationStateList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationType.php index fb1a6735c4..84eb2a8144 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCalibrationType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricCalibrationType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CALIBRATION_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDeviceMetricCalibrationTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCategory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCategory.php index e3573db01d..967dceb2ed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDeviceMetricCategoryList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricColor.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricColor.php index 14b8ebaa3f..c3f76bfbef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricColor.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricColor.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricColor extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_COLOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDeviceMetricColorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricOperationalStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricOperationalStatus.php index 0010f0562d..ed5ebcd7ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricOperationalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceMetricOperationalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceMetricOperationalStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_METRIC_OPERATIONAL_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDeviceMetricOperationalStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceUseStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceUseStatementStatus.php index 8f69e9fc62..310c3835a0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceUseStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDeviceUseStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDeviceUseStatementStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DEVICE_USE_STATEMENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDeviceUseStatementStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiagnosticReportStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiagnosticReportStatus.php index fe03a37c30..b21e9cf937 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiagnosticReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiagnosticReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDiagnosticReportStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDiagnosticReportStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDigitalMediaType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDigitalMediaType.php index f4dd646739..8e0e84342e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDigitalMediaType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDigitalMediaType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDigitalMediaType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DIGITAL_MEDIA_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDigitalMediaTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiscriminatorType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiscriminatorType.php index e26e7b6cd5..580d803ae5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiscriminatorType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDiscriminatorType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDiscriminatorType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DISCRIMINATOR_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDiscriminatorTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentMode.php index 728b572e9d..ca7d18044d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDocumentMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDocumentModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentReferenceStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentReferenceStatus.php index 8292a10fbf..c19ad7ed69 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentReferenceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentReferenceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRDocumentReferenceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_REFERENCE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDocumentReferenceStatusList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentRelationshipType.php index 0712d9a254..ae7fc42505 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDocumentRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRDocumentRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DOCUMENT_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRDocumentRelationshipTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDosage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDosage.php index 7c789d2816..f38091f6e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDosage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRDosage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIRDosage extends FHIRElement const FIELD_TIMING = 'timing'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -365,20 +365,27 @@ public function __construct($data = null) $this->addAdditionalInstruction(new FHIRCodeableConcept($data[self::FIELD_ADDITIONAL_INSTRUCTION])); } } - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -430,20 +437,27 @@ public function __construct($data = null) $this->setMethod(new FHIRCodeableConcept($data[self::FIELD_METHOD])); } } - if (isset($data[self::FIELD_PATIENT_INSTRUCTION])) { - $ext = (isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) - ? $data[self::FIELD_PATIENT_INSTRUCTION_EXT] - : null; - if ($data[self::FIELD_PATIENT_INSTRUCTION] instanceof FHIRString) { - $this->setPatientInstruction($data[self::FIELD_PATIENT_INSTRUCTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATIENT_INSTRUCTION])) { - $this->setPatientInstruction(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATIENT_INSTRUCTION]] + $ext)); - } else if (is_array($data[self::FIELD_PATIENT_INSTRUCTION])) { - $this->setPatientInstruction(new FHIRString(array_merge($ext, $data[self::FIELD_PATIENT_INSTRUCTION]))); - } + if (isset($data[self::FIELD_PATIENT_INSTRUCTION]) || isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) { + if (isset($data[self::FIELD_PATIENT_INSTRUCTION])) { + $value = $data[self::FIELD_PATIENT_INSTRUCTION]; } else { - $this->setPatientInstruction(new FHIRString($data[self::FIELD_PATIENT_INSTRUCTION])); + $value = null; + } + if (isset($data[self::FIELD_PATIENT_INSTRUCTION_EXT]) && is_array($data[self::FIELD_PATIENT_INSTRUCTION_EXT])) { + $ext = $data[self::FIELD_PATIENT_INSTRUCTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPatientInstruction($value); + } else if (is_array($value)) { + $this->setPatientInstruction(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPatientInstruction(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatientInstruction(new FHIRString($ext)); } } if (isset($data[self::FIELD_RATE_QUANTITY])) { @@ -474,20 +488,27 @@ public function __construct($data = null) $this->setRoute(new FHIRCodeableConcept($data[self::FIELD_ROUTE])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRInteger) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRInteger(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; } else { - $this->setSequence(new FHIRInteger($data[self::FIELD_SEQUENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSequence(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_SITE])) { @@ -497,20 +518,27 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); - } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); } } if (isset($data[self::FIELD_TIMING])) { @@ -1192,8 +1220,8 @@ public function setTiming(FHIRTiming $timing = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1407,12 +1435,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAdditionalInstruction())) { - $a[self::FIELD_ADDITIONAL_INSTRUCTION] = $vs; + $a[self::FIELD_ADDITIONAL_INSTRUCTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDITIONAL_INSTRUCTION][] = $v; + } } if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -1439,8 +1475,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatientInstruction())) { $a[self::FIELD_PATIENT_INSTRUCTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATIENT_INSTRUCTION_EXT] = $enc; } } @@ -1458,8 +1496,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } @@ -1468,14 +1508,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getTiming())) { $a[self::FIELD_TIMING] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition.php index b20661594d..148030e93a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -334,7 +334,7 @@ class FHIRElementDefinition extends FHIRElement const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -2644,33 +2644,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if (is_array($data[self::FIELD_ALIAS])) { - foreach($data[self::FIELD_ALIAS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAlias($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAlias(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAlias($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAlias($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAlias(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAlias(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAlias(new FHIRString($iext)); } - } elseif ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->addAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ALIAS])) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else { - $this->addAlias(new FHIRString($data[self::FIELD_ALIAS])); } } if (isset($data[self::FIELD_BASE])) { @@ -2705,49 +2714,65 @@ public function __construct($data = null) $this->addCode(new FHIRCoding($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRMarkdown) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRMarkdown($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_CONDITION])) { - $ext = (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) - ? $data[self::FIELD_CONDITION_EXT] - : null; - if (is_array($data[self::FIELD_CONDITION])) { - foreach($data[self::FIELD_CONDITION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRId) { - $this->addCondition($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCondition(new FHIRId(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_CONDITION]) || isset($data[self::FIELD_CONDITION_EXT])) { + if (isset($data[self::FIELD_CONDITION])) { + $value = $data[self::FIELD_CONDITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONDITION_EXT]) && is_array($data[self::FIELD_CONDITION_EXT])) { + $ext = $data[self::FIELD_CONDITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->addCondition($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRId) { + $this->addCondition($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCondition(new FHIRId(array_merge($v, $iext))); + } else { + $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCondition(new FHIRId($v)); } + } elseif (is_array($value)) { + $this->addCondition(new FHIRId(array_merge($ext, $value))); + } else { + $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCondition(new FHIRId($iext)); } - } elseif ($data[self::FIELD_CONDITION] instanceof FHIRId) { - $this->addCondition($data[self::FIELD_CONDITION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONDITION])) { - $this->addCondition(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_CONDITION]] + $ext)); - } else { - $this->addCondition(new FHIRId($data[self::FIELD_CONDITION])); } } if (isset($data[self::FIELD_CONSTRAINT])) { @@ -2768,20 +2793,27 @@ public function __construct($data = null) $this->addConstraint(new FHIRElementDefinitionConstraint($data[self::FIELD_CONSTRAINT])); } } - if (isset($data[self::FIELD_CONTENT_REFERENCE])) { - $ext = (isset($data[self::FIELD_CONTENT_REFERENCE_EXT]) && is_array($data[self::FIELD_CONTENT_REFERENCE_EXT])) - ? $data[self::FIELD_CONTENT_REFERENCE_EXT] - : null; - if ($data[self::FIELD_CONTENT_REFERENCE] instanceof FHIRUri) { - $this->setContentReference($data[self::FIELD_CONTENT_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_REFERENCE])) { - $this->setContentReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_CONTENT_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_REFERENCE])) { - $this->setContentReference(new FHIRUri(array_merge($ext, $data[self::FIELD_CONTENT_REFERENCE]))); - } + if (isset($data[self::FIELD_CONTENT_REFERENCE]) || isset($data[self::FIELD_CONTENT_REFERENCE_EXT])) { + if (isset($data[self::FIELD_CONTENT_REFERENCE])) { + $value = $data[self::FIELD_CONTENT_REFERENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_REFERENCE_EXT]) && is_array($data[self::FIELD_CONTENT_REFERENCE_EXT])) { + $ext = $data[self::FIELD_CONTENT_REFERENCE_EXT]; } else { - $this->setContentReference(new FHIRUri($data[self::FIELD_CONTENT_REFERENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setContentReference($value); + } else if (is_array($value)) { + $this->setContentReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setContentReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentReference(new FHIRUri($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_ADDRESS])) { @@ -2812,52 +2844,73 @@ public function __construct($data = null) $this->setDefaultValueAttachment(new FHIRAttachment($data[self::FIELD_DEFAULT_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setDefaultValueBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY]; } else { - $this->setDefaultValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setDefaultValueBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { - $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT]; } else { - $this->setDefaultValueBoolean(new FHIRBoolean($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setDefaultValueBase64Binary($value); + } else if (is_array($value)) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_CODE] instanceof FHIRCode) { - $this->setDefaultValueCode($data[self::FIELD_DEFAULT_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_CODE])) { - $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_CODE]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN]) || isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDefaultValueBoolean($value); + } else if (is_array($value)) { + $this->setDefaultValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDefaultValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE]) || isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_CODE]; } else { - $this->setDefaultValueCode(new FHIRCode($data[self::FIELD_DEFAULT_VALUE_CODE])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_CODE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setDefaultValueCode($value); + } else if (is_array($value)) { + $this->setDefaultValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setDefaultValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_CODEABLE_CONCEPT])) { @@ -2888,52 +2941,73 @@ public function __construct($data = null) $this->setDefaultValueCount(new FHIRCount($data[self::FIELD_DEFAULT_VALUE_COUNT])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE] instanceof FHIRDate) { - $this->setDefaultValueDate($data[self::FIELD_DEFAULT_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE])) { - $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE]; } else { - $this->setDefaultValueDate(new FHIRDate($data[self::FIELD_DEFAULT_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setDefaultValueDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { - $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_EXT]; } else { - $this->setDefaultValueDateTime(new FHIRDateTime($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDefaultValueDate($value); + } else if (is_array($value)) { + $this->setDefaultValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDefaultValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setDefaultValueDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { - $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDefaultValueDateTime($value); + } else if (is_array($value)) { + $this->setDefaultValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL]) || isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL])) { + $value = $data[self::FIELD_DEFAULT_VALUE_DECIMAL]; } else { - $this->setDefaultValueDecimal(new FHIRDecimal($data[self::FIELD_DEFAULT_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDefaultValueDecimal($value); + } else if (is_array($value)) { + $this->setDefaultValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDefaultValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_DISTANCE])) { @@ -2957,20 +3031,27 @@ public function __construct($data = null) $this->setDefaultValueHumanName(new FHIRHumanName($data[self::FIELD_DEFAULT_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_ID] instanceof FHIRId) { - $this->setDefaultValueId($data[self::FIELD_DEFAULT_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_ID])) { - $this->setDefaultValueId(new FHIRId(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_ID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID]) || isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_ID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_ID]; } else { - $this->setDefaultValueId(new FHIRId($data[self::FIELD_DEFAULT_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_ID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setDefaultValueId($value); + } else if (is_array($value)) { + $this->setDefaultValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setDefaultValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])) { @@ -2980,52 +3061,73 @@ public function __construct($data = null) $this->setDefaultValueIdentifier(new FHIRIdentifier($data[self::FIELD_DEFAULT_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setDefaultValueInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { - $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT]) || isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INSTANT]; } else { - $this->setDefaultValueInstant(new FHIRInstant($data[self::FIELD_DEFAULT_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setDefaultValueInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { - $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INSTANT_EXT]; } else { - $this->setDefaultValueInteger(new FHIRInteger($data[self::FIELD_DEFAULT_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setDefaultValueInstant($value); + } else if (is_array($value)) { + $this->setDefaultValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setDefaultValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setDefaultValueMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { - $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER]) || isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER])) { + $value = $data[self::FIELD_DEFAULT_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setDefaultValueInteger($value); + } else if (is_array($value)) { + $this->setDefaultValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setDefaultValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN]) || isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT]; } else { - $this->setDefaultValueMarkdown(new FHIRMarkdown($data[self::FIELD_DEFAULT_VALUE_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDefaultValueMarkdown($value); + } else if (is_array($value)) { + $this->setDefaultValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDefaultValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_META])) { @@ -3042,20 +3144,27 @@ public function __construct($data = null) $this->setDefaultValueMoney(new FHIRMoney($data[self::FIELD_DEFAULT_VALUE_MONEY])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_OID] instanceof FHIROid) { - $this->setDefaultValueOid($data[self::FIELD_DEFAULT_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_OID])) { - $this->setDefaultValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_OID]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID]) || isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_OID])) { + $value = $data[self::FIELD_DEFAULT_VALUE_OID]; } else { - $this->setDefaultValueOid(new FHIROid($data[self::FIELD_DEFAULT_VALUE_OID])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_OID_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_OID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setDefaultValueOid($value); + } else if (is_array($value)) { + $this->setDefaultValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setDefaultValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_PERIOD])) { @@ -3065,20 +3174,27 @@ public function __construct($data = null) $this->setDefaultValuePeriod(new FHIRPeriod($data[self::FIELD_DEFAULT_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setDefaultValuePositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT]; } else { - $this->setDefaultValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDefaultValuePositiveInt($value); + } else if (is_array($value)) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_QUANTITY])) { @@ -3123,36 +3239,50 @@ public function __construct($data = null) $this->setDefaultValueSignature(new FHIRSignature($data[self::FIELD_DEFAULT_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_STRING] instanceof FHIRString) { - $this->setDefaultValueString($data[self::FIELD_DEFAULT_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_STRING])) { - $this->setDefaultValueString(new FHIRString(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_STRING]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING]) || isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING])) { + $value = $data[self::FIELD_DEFAULT_VALUE_STRING]; } else { - $this->setDefaultValueString(new FHIRString($data[self::FIELD_DEFAULT_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_TIME] instanceof FHIRTime) { - $this->setDefaultValueTime($data[self::FIELD_DEFAULT_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_TIME])) { - $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_TIME]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_STRING_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDefaultValueString($value); + } else if (is_array($value)) { + $this->setDefaultValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDefaultValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME]) || isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME])) { + $value = $data[self::FIELD_DEFAULT_VALUE_TIME]; } else { - $this->setDefaultValueTime(new FHIRTime($data[self::FIELD_DEFAULT_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_TIME_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setDefaultValueTime($value); + } else if (is_array($value)) { + $this->setDefaultValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setDefaultValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_DEFAULT_VALUE_TIMING])) { @@ -3162,52 +3292,73 @@ public function __construct($data = null) $this->setDefaultValueTiming(new FHIRTiming($data[self::FIELD_DEFAULT_VALUE_TIMING])); } } - if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setDefaultValueUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT]; } else { - $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { - $ext = (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) - ? $data[self::FIELD_DEFAULT_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_DEFAULT_VALUE_URI] instanceof FHIRUri) { - $this->setDefaultValueUri($data[self::FIELD_DEFAULT_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFAULT_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_DEFAULT_VALUE_URI])) { - $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFAULT_VALUE_URI]))); - } + if (isset($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setDefaultValueUri(new FHIRUri($data[self::FIELD_DEFAULT_VALUE_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setDefaultValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefaultValueUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if ($data[self::FIELD_DEFINITION] instanceof FHIRMarkdown) { - $this->setDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION])) { - $this->setDefinition(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DEFINITION]))); + if (isset($data[self::FIELD_DEFAULT_VALUE_URI]) || isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_DEFAULT_VALUE_URI])) { + $value = $data[self::FIELD_DEFAULT_VALUE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFAULT_VALUE_URI_EXT]) && is_array($data[self::FIELD_DEFAULT_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_DEFAULT_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefaultValueUri($value); + } else if (is_array($value)) { + $this->setDefaultValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefaultValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefaultValueUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; } else { - $this->setDefinition(new FHIRMarkdown($data[self::FIELD_DEFINITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDefinition($value); + } else if (is_array($value)) { + $this->setDefinition(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDefinition(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EXAMPLE])) { @@ -3256,52 +3407,73 @@ public function __construct($data = null) $this->setFixedAttachment(new FHIRAttachment($data[self::FIELD_FIXED_ATTACHMENT])); } } - if (isset($data[self::FIELD_FIXED_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_FIXED_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_FIXED_BASE_64BINARY_EXT])) - ? $data[self::FIELD_FIXED_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_FIXED_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setFixedBase64Binary($data[self::FIELD_FIXED_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_BASE_64BINARY])) { - $this->setFixedBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_FIXED_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_BASE_64BINARY])) { - $this->setFixedBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_FIXED_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_FIXED_BASE_64BINARY]) || isset($data[self::FIELD_FIXED_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_FIXED_BASE_64BINARY])) { + $value = $data[self::FIELD_FIXED_BASE_64BINARY]; } else { - $this->setFixedBase64Binary(new FHIRBase64Binary($data[self::FIELD_FIXED_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_FIXED_BOOLEAN_EXT]) && is_array($data[self::FIELD_FIXED_BOOLEAN_EXT])) - ? $data[self::FIELD_FIXED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_FIXED_BOOLEAN] instanceof FHIRBoolean) { - $this->setFixedBoolean($data[self::FIELD_FIXED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_BOOLEAN])) { - $this->setFixedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_FIXED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_BOOLEAN])) { - $this->setFixedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_FIXED_BOOLEAN]))); - } + if (isset($data[self::FIELD_FIXED_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_FIXED_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_FIXED_BASE_64BINARY_EXT]; } else { - $this->setFixedBoolean(new FHIRBoolean($data[self::FIELD_FIXED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setFixedBase64Binary($value); + } else if (is_array($value)) { + $this->setFixedBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setFixedBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_FIXED_CODE])) { - $ext = (isset($data[self::FIELD_FIXED_CODE_EXT]) && is_array($data[self::FIELD_FIXED_CODE_EXT])) - ? $data[self::FIELD_FIXED_CODE_EXT] - : null; - if ($data[self::FIELD_FIXED_CODE] instanceof FHIRCode) { - $this->setFixedCode($data[self::FIELD_FIXED_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_CODE])) { - $this->setFixedCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FIXED_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_CODE])) { - $this->setFixedCode(new FHIRCode(array_merge($ext, $data[self::FIELD_FIXED_CODE]))); + if (isset($data[self::FIELD_FIXED_BOOLEAN]) || isset($data[self::FIELD_FIXED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_FIXED_BOOLEAN])) { + $value = $data[self::FIELD_FIXED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_BOOLEAN_EXT]) && is_array($data[self::FIELD_FIXED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_FIXED_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setFixedBoolean($value); + } else if (is_array($value)) { + $this->setFixedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setFixedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FIXED_CODE]) || isset($data[self::FIELD_FIXED_CODE_EXT])) { + if (isset($data[self::FIELD_FIXED_CODE])) { + $value = $data[self::FIELD_FIXED_CODE]; } else { - $this->setFixedCode(new FHIRCode($data[self::FIELD_FIXED_CODE])); + $value = null; + } + if (isset($data[self::FIELD_FIXED_CODE_EXT]) && is_array($data[self::FIELD_FIXED_CODE_EXT])) { + $ext = $data[self::FIELD_FIXED_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setFixedCode($value); + } else if (is_array($value)) { + $this->setFixedCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setFixedCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_FIXED_CODEABLE_CONCEPT])) { @@ -3332,52 +3504,73 @@ public function __construct($data = null) $this->setFixedCount(new FHIRCount($data[self::FIELD_FIXED_COUNT])); } } - if (isset($data[self::FIELD_FIXED_DATE])) { - $ext = (isset($data[self::FIELD_FIXED_DATE_EXT]) && is_array($data[self::FIELD_FIXED_DATE_EXT])) - ? $data[self::FIELD_FIXED_DATE_EXT] - : null; - if ($data[self::FIELD_FIXED_DATE] instanceof FHIRDate) { - $this->setFixedDate($data[self::FIELD_FIXED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_DATE])) { - $this->setFixedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_FIXED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_DATE])) { - $this->setFixedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_FIXED_DATE]))); - } + if (isset($data[self::FIELD_FIXED_DATE]) || isset($data[self::FIELD_FIXED_DATE_EXT])) { + if (isset($data[self::FIELD_FIXED_DATE])) { + $value = $data[self::FIELD_FIXED_DATE]; } else { - $this->setFixedDate(new FHIRDate($data[self::FIELD_FIXED_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_FIXED_DATE_TIME_EXT]) && is_array($data[self::FIELD_FIXED_DATE_TIME_EXT])) - ? $data[self::FIELD_FIXED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_FIXED_DATE_TIME] instanceof FHIRDateTime) { - $this->setFixedDateTime($data[self::FIELD_FIXED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_DATE_TIME])) { - $this->setFixedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_FIXED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_DATE_TIME])) { - $this->setFixedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_FIXED_DATE_TIME]))); - } + if (isset($data[self::FIELD_FIXED_DATE_EXT]) && is_array($data[self::FIELD_FIXED_DATE_EXT])) { + $ext = $data[self::FIELD_FIXED_DATE_EXT]; } else { - $this->setFixedDateTime(new FHIRDateTime($data[self::FIELD_FIXED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setFixedDate($value); + } else if (is_array($value)) { + $this->setFixedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setFixedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_FIXED_DECIMAL])) { - $ext = (isset($data[self::FIELD_FIXED_DECIMAL_EXT]) && is_array($data[self::FIELD_FIXED_DECIMAL_EXT])) - ? $data[self::FIELD_FIXED_DECIMAL_EXT] - : null; - if ($data[self::FIELD_FIXED_DECIMAL] instanceof FHIRDecimal) { - $this->setFixedDecimal($data[self::FIELD_FIXED_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_DECIMAL])) { - $this->setFixedDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FIXED_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_DECIMAL])) { - $this->setFixedDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FIXED_DECIMAL]))); + if (isset($data[self::FIELD_FIXED_DATE_TIME]) || isset($data[self::FIELD_FIXED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_FIXED_DATE_TIME])) { + $value = $data[self::FIELD_FIXED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_DATE_TIME_EXT]) && is_array($data[self::FIELD_FIXED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_FIXED_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setFixedDateTime($value); + } else if (is_array($value)) { + $this->setFixedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setFixedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_FIXED_DECIMAL]) || isset($data[self::FIELD_FIXED_DECIMAL_EXT])) { + if (isset($data[self::FIELD_FIXED_DECIMAL])) { + $value = $data[self::FIELD_FIXED_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_DECIMAL_EXT]) && is_array($data[self::FIELD_FIXED_DECIMAL_EXT])) { + $ext = $data[self::FIELD_FIXED_DECIMAL_EXT]; } else { - $this->setFixedDecimal(new FHIRDecimal($data[self::FIELD_FIXED_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFixedDecimal($value); + } else if (is_array($value)) { + $this->setFixedDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFixedDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_FIXED_DISTANCE])) { @@ -3401,20 +3594,27 @@ public function __construct($data = null) $this->setFixedHumanName(new FHIRHumanName($data[self::FIELD_FIXED_HUMAN_NAME])); } } - if (isset($data[self::FIELD_FIXED_ID])) { - $ext = (isset($data[self::FIELD_FIXED_ID_EXT]) && is_array($data[self::FIELD_FIXED_ID_EXT])) - ? $data[self::FIELD_FIXED_ID_EXT] - : null; - if ($data[self::FIELD_FIXED_ID] instanceof FHIRId) { - $this->setFixedId($data[self::FIELD_FIXED_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_ID])) { - $this->setFixedId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FIXED_ID]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_ID])) { - $this->setFixedId(new FHIRId(array_merge($ext, $data[self::FIELD_FIXED_ID]))); - } + if (isset($data[self::FIELD_FIXED_ID]) || isset($data[self::FIELD_FIXED_ID_EXT])) { + if (isset($data[self::FIELD_FIXED_ID])) { + $value = $data[self::FIELD_FIXED_ID]; } else { - $this->setFixedId(new FHIRId($data[self::FIELD_FIXED_ID])); + $value = null; + } + if (isset($data[self::FIELD_FIXED_ID_EXT]) && is_array($data[self::FIELD_FIXED_ID_EXT])) { + $ext = $data[self::FIELD_FIXED_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFixedId($value); + } else if (is_array($value)) { + $this->setFixedId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFixedId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedId(new FHIRId($ext)); } } if (isset($data[self::FIELD_FIXED_IDENTIFIER])) { @@ -3424,52 +3624,73 @@ public function __construct($data = null) $this->setFixedIdentifier(new FHIRIdentifier($data[self::FIELD_FIXED_IDENTIFIER])); } } - if (isset($data[self::FIELD_FIXED_INSTANT])) { - $ext = (isset($data[self::FIELD_FIXED_INSTANT_EXT]) && is_array($data[self::FIELD_FIXED_INSTANT_EXT])) - ? $data[self::FIELD_FIXED_INSTANT_EXT] - : null; - if ($data[self::FIELD_FIXED_INSTANT] instanceof FHIRInstant) { - $this->setFixedInstant($data[self::FIELD_FIXED_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_INSTANT])) { - $this->setFixedInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_FIXED_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_INSTANT])) { - $this->setFixedInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_FIXED_INSTANT]))); - } + if (isset($data[self::FIELD_FIXED_INSTANT]) || isset($data[self::FIELD_FIXED_INSTANT_EXT])) { + if (isset($data[self::FIELD_FIXED_INSTANT])) { + $value = $data[self::FIELD_FIXED_INSTANT]; } else { - $this->setFixedInstant(new FHIRInstant($data[self::FIELD_FIXED_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_INTEGER])) { - $ext = (isset($data[self::FIELD_FIXED_INTEGER_EXT]) && is_array($data[self::FIELD_FIXED_INTEGER_EXT])) - ? $data[self::FIELD_FIXED_INTEGER_EXT] - : null; - if ($data[self::FIELD_FIXED_INTEGER] instanceof FHIRInteger) { - $this->setFixedInteger($data[self::FIELD_FIXED_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_INTEGER])) { - $this->setFixedInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_FIXED_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_INTEGER])) { - $this->setFixedInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_FIXED_INTEGER]))); - } + if (isset($data[self::FIELD_FIXED_INSTANT_EXT]) && is_array($data[self::FIELD_FIXED_INSTANT_EXT])) { + $ext = $data[self::FIELD_FIXED_INSTANT_EXT]; } else { - $this->setFixedInteger(new FHIRInteger($data[self::FIELD_FIXED_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setFixedInstant($value); + } else if (is_array($value)) { + $this->setFixedInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setFixedInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_FIXED_MARKDOWN])) { - $ext = (isset($data[self::FIELD_FIXED_MARKDOWN_EXT]) && is_array($data[self::FIELD_FIXED_MARKDOWN_EXT])) - ? $data[self::FIELD_FIXED_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_FIXED_MARKDOWN] instanceof FHIRMarkdown) { - $this->setFixedMarkdown($data[self::FIELD_FIXED_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_MARKDOWN])) { - $this->setFixedMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_FIXED_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_MARKDOWN])) { - $this->setFixedMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_FIXED_MARKDOWN]))); + if (isset($data[self::FIELD_FIXED_INTEGER]) || isset($data[self::FIELD_FIXED_INTEGER_EXT])) { + if (isset($data[self::FIELD_FIXED_INTEGER])) { + $value = $data[self::FIELD_FIXED_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_INTEGER_EXT]) && is_array($data[self::FIELD_FIXED_INTEGER_EXT])) { + $ext = $data[self::FIELD_FIXED_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setFixedInteger($value); + } else if (is_array($value)) { + $this->setFixedInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setFixedInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFixedInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_FIXED_MARKDOWN]) || isset($data[self::FIELD_FIXED_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_FIXED_MARKDOWN])) { + $value = $data[self::FIELD_FIXED_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_MARKDOWN_EXT]) && is_array($data[self::FIELD_FIXED_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_FIXED_MARKDOWN_EXT]; } else { - $this->setFixedMarkdown(new FHIRMarkdown($data[self::FIELD_FIXED_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setFixedMarkdown($value); + } else if (is_array($value)) { + $this->setFixedMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setFixedMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_FIXED_META])) { @@ -3486,20 +3707,27 @@ public function __construct($data = null) $this->setFixedMoney(new FHIRMoney($data[self::FIELD_FIXED_MONEY])); } } - if (isset($data[self::FIELD_FIXED_OID])) { - $ext = (isset($data[self::FIELD_FIXED_OID_EXT]) && is_array($data[self::FIELD_FIXED_OID_EXT])) - ? $data[self::FIELD_FIXED_OID_EXT] - : null; - if ($data[self::FIELD_FIXED_OID] instanceof FHIROid) { - $this->setFixedOid($data[self::FIELD_FIXED_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_OID])) { - $this->setFixedOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_FIXED_OID]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_OID])) { - $this->setFixedOid(new FHIROid(array_merge($ext, $data[self::FIELD_FIXED_OID]))); - } + if (isset($data[self::FIELD_FIXED_OID]) || isset($data[self::FIELD_FIXED_OID_EXT])) { + if (isset($data[self::FIELD_FIXED_OID])) { + $value = $data[self::FIELD_FIXED_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_OID_EXT]) && is_array($data[self::FIELD_FIXED_OID_EXT])) { + $ext = $data[self::FIELD_FIXED_OID_EXT]; } else { - $this->setFixedOid(new FHIROid($data[self::FIELD_FIXED_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setFixedOid($value); + } else if (is_array($value)) { + $this->setFixedOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setFixedOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_FIXED_PERIOD])) { @@ -3509,20 +3737,27 @@ public function __construct($data = null) $this->setFixedPeriod(new FHIRPeriod($data[self::FIELD_FIXED_PERIOD])); } } - if (isset($data[self::FIELD_FIXED_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_FIXED_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_FIXED_POSITIVE_INT_EXT])) - ? $data[self::FIELD_FIXED_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_FIXED_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setFixedPositiveInt($data[self::FIELD_FIXED_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_POSITIVE_INT])) { - $this->setFixedPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_FIXED_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_POSITIVE_INT])) { - $this->setFixedPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_FIXED_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_FIXED_POSITIVE_INT]) || isset($data[self::FIELD_FIXED_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_FIXED_POSITIVE_INT])) { + $value = $data[self::FIELD_FIXED_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_FIXED_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_FIXED_POSITIVE_INT_EXT]; } else { - $this->setFixedPositiveInt(new FHIRPositiveInt($data[self::FIELD_FIXED_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setFixedPositiveInt($value); + } else if (is_array($value)) { + $this->setFixedPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setFixedPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedPositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_FIXED_QUANTITY])) { @@ -3566,437 +3801,612 @@ public function __construct($data = null) } else { $this->setFixedSignature(new FHIRSignature($data[self::FIELD_FIXED_SIGNATURE])); } - } - if (isset($data[self::FIELD_FIXED_STRING])) { - $ext = (isset($data[self::FIELD_FIXED_STRING_EXT]) && is_array($data[self::FIELD_FIXED_STRING_EXT])) - ? $data[self::FIELD_FIXED_STRING_EXT] - : null; - if ($data[self::FIELD_FIXED_STRING] instanceof FHIRString) { - $this->setFixedString($data[self::FIELD_FIXED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_STRING])) { - $this->setFixedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FIXED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_STRING])) { - $this->setFixedString(new FHIRString(array_merge($ext, $data[self::FIELD_FIXED_STRING]))); + } + if (isset($data[self::FIELD_FIXED_STRING]) || isset($data[self::FIELD_FIXED_STRING_EXT])) { + if (isset($data[self::FIELD_FIXED_STRING])) { + $value = $data[self::FIELD_FIXED_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_STRING_EXT]) && is_array($data[self::FIELD_FIXED_STRING_EXT])) { + $ext = $data[self::FIELD_FIXED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setFixedString($value); + } else if (is_array($value)) { + $this->setFixedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setFixedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_FIXED_TIME]) || isset($data[self::FIELD_FIXED_TIME_EXT])) { + if (isset($data[self::FIELD_FIXED_TIME])) { + $value = $data[self::FIELD_FIXED_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_TIME_EXT]) && is_array($data[self::FIELD_FIXED_TIME_EXT])) { + $ext = $data[self::FIELD_FIXED_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setFixedTime($value); + } else if (is_array($value)) { + $this->setFixedTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setFixedTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedTime(new FHIRTime($ext)); + } + } + if (isset($data[self::FIELD_FIXED_TIMING])) { + if ($data[self::FIELD_FIXED_TIMING] instanceof FHIRTiming) { + $this->setFixedTiming($data[self::FIELD_FIXED_TIMING]); + } else { + $this->setFixedTiming(new FHIRTiming($data[self::FIELD_FIXED_TIMING])); + } + } + if (isset($data[self::FIELD_FIXED_UNSIGNED_INT]) || isset($data[self::FIELD_FIXED_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_FIXED_UNSIGNED_INT])) { + $value = $data[self::FIELD_FIXED_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_FIXED_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_FIXED_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setFixedUnsignedInt($value); + } else if (is_array($value)) { + $this->setFixedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setFixedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_FIXED_URI]) || isset($data[self::FIELD_FIXED_URI_EXT])) { + if (isset($data[self::FIELD_FIXED_URI])) { + $value = $data[self::FIELD_FIXED_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FIXED_URI_EXT]) && is_array($data[self::FIELD_FIXED_URI_EXT])) { + $ext = $data[self::FIELD_FIXED_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setFixedUri($value); + } else if (is_array($value)) { + $this->setFixedUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setFixedUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFixedUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_IS_MODIFIER]) || isset($data[self::FIELD_IS_MODIFIER_EXT])) { + if (isset($data[self::FIELD_IS_MODIFIER])) { + $value = $data[self::FIELD_IS_MODIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_MODIFIER_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_EXT])) { + $ext = $data[self::FIELD_IS_MODIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsModifier($value); + } else if (is_array($value)) { + $this->setIsModifier(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsModifier(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsModifier(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_IS_SUMMARY]) || isset($data[self::FIELD_IS_SUMMARY_EXT])) { + if (isset($data[self::FIELD_IS_SUMMARY])) { + $value = $data[self::FIELD_IS_SUMMARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IS_SUMMARY_EXT]) && is_array($data[self::FIELD_IS_SUMMARY_EXT])) { + $ext = $data[self::FIELD_IS_SUMMARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsSummary($value); + } else if (is_array($value)) { + $this->setIsSummary(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsSummary(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsSummary(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAPPING])) { + if (is_array($data[self::FIELD_MAPPING])) { + foreach($data[self::FIELD_MAPPING] as $v) { + if (null === $v) { + continue; + } + if ($v instanceof FHIRElementDefinitionMapping) { + $this->addMapping($v); + } else { + $this->addMapping(new FHIRElementDefinitionMapping($v)); + } + } + } else if ($data[self::FIELD_MAPPING] instanceof FHIRElementDefinitionMapping) { + $this->addMapping($data[self::FIELD_MAPPING]); + } else { + $this->addMapping(new FHIRElementDefinitionMapping($data[self::FIELD_MAPPING])); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX_LENGTH]) || isset($data[self::FIELD_MAX_LENGTH_EXT])) { + if (isset($data[self::FIELD_MAX_LENGTH])) { + $value = $data[self::FIELD_MAX_LENGTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) { + $ext = $data[self::FIELD_MAX_LENGTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMaxLength($value); + } else if (is_array($value)) { + $this->setMaxLength(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxLength(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_DATE]) || isset($data[self::FIELD_MAX_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_DATE])) { + $value = $data[self::FIELD_MAX_VALUE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setMaxValueDate($value); + } else if (is_array($value)) { + $this->setMaxValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setMaxValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME]) || isset($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_MAX_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setMaxValueDateTime($value); + } else if (is_array($value)) { + $this->setMaxValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setMaxValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_DECIMAL]) || isset($data[self::FIELD_MAX_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_DECIMAL])) { + $value = $data[self::FIELD_MAX_VALUE_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setMaxValueDecimal($value); + } else if (is_array($value)) { + $this->setMaxValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setMaxValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueDecimal(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_INSTANT]) || isset($data[self::FIELD_MAX_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_INSTANT])) { + $value = $data[self::FIELD_MAX_VALUE_INSTANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_INSTANT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setMaxValueInstant($value); + } else if (is_array($value)) { + $this->setMaxValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setMaxValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueInstant(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_INTEGER]) || isset($data[self::FIELD_MAX_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_INTEGER])) { + $value = $data[self::FIELD_MAX_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMaxValueInteger($value); + } else if (is_array($value)) { + $this->setMaxValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMaxValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_MAX_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setMaxValuePositiveInt($value); + } else if (is_array($value)) { + $this->setMaxValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setMaxValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMaxValuePositiveInt(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_MAX_VALUE_QUANTITY])) { + if ($data[self::FIELD_MAX_VALUE_QUANTITY] instanceof FHIRQuantity) { + $this->setMaxValueQuantity($data[self::FIELD_MAX_VALUE_QUANTITY]); + } else { + $this->setMaxValueQuantity(new FHIRQuantity($data[self::FIELD_MAX_VALUE_QUANTITY])); + } + } + if (isset($data[self::FIELD_MAX_VALUE_TIME]) || isset($data[self::FIELD_MAX_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_TIME])) { + $value = $data[self::FIELD_MAX_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setMaxValueTime($value); + } else if (is_array($value)) { + $this->setMaxValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setMaxValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setFixedString(new FHIRString($data[self::FIELD_FIXED_STRING])); + } else if ([] !== $ext) { + $this->setMaxValueTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_FIXED_TIME])) { - $ext = (isset($data[self::FIELD_FIXED_TIME_EXT]) && is_array($data[self::FIELD_FIXED_TIME_EXT])) - ? $data[self::FIELD_FIXED_TIME_EXT] - : null; - if ($data[self::FIELD_FIXED_TIME] instanceof FHIRTime) { - $this->setFixedTime($data[self::FIELD_FIXED_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_TIME])) { - $this->setFixedTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_FIXED_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_TIME])) { - $this->setFixedTime(new FHIRTime(array_merge($ext, $data[self::FIELD_FIXED_TIME]))); - } + if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_MAX_VALUE_UNSIGNED_INT]; } else { - $this->setFixedTime(new FHIRTime($data[self::FIELD_FIXED_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_FIXED_TIMING])) { - if ($data[self::FIELD_FIXED_TIMING] instanceof FHIRTiming) { - $this->setFixedTiming($data[self::FIELD_FIXED_TIMING]); + if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT]; } else { - $this->setFixedTiming(new FHIRTiming($data[self::FIELD_FIXED_TIMING])); + $ext = []; } - } - if (isset($data[self::FIELD_FIXED_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_FIXED_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_FIXED_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_FIXED_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_FIXED_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setFixedUnsignedInt($data[self::FIELD_FIXED_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_UNSIGNED_INT])) { - $this->setFixedUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_FIXED_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_UNSIGNED_INT])) { - $this->setFixedUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_FIXED_UNSIGNED_INT]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMaxValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setMaxValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMaxValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setFixedUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_FIXED_UNSIGNED_INT])); + } else if ([] !== $ext) { + $this->setMaxValueUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_FIXED_URI])) { - $ext = (isset($data[self::FIELD_FIXED_URI_EXT]) && is_array($data[self::FIELD_FIXED_URI_EXT])) - ? $data[self::FIELD_FIXED_URI_EXT] - : null; - if ($data[self::FIELD_FIXED_URI] instanceof FHIRUri) { - $this->setFixedUri($data[self::FIELD_FIXED_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FIXED_URI])) { - $this->setFixedUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_FIXED_URI]] + $ext)); - } else if (is_array($data[self::FIELD_FIXED_URI])) { - $this->setFixedUri(new FHIRUri(array_merge($ext, $data[self::FIELD_FIXED_URI]))); - } + if (isset($data[self::FIELD_MEANING_WHEN_MISSING]) || isset($data[self::FIELD_MEANING_WHEN_MISSING_EXT])) { + if (isset($data[self::FIELD_MEANING_WHEN_MISSING])) { + $value = $data[self::FIELD_MEANING_WHEN_MISSING]; } else { - $this->setFixedUri(new FHIRUri($data[self::FIELD_FIXED_URI])); + $value = null; } - } - if (isset($data[self::FIELD_IS_MODIFIER])) { - $ext = (isset($data[self::FIELD_IS_MODIFIER_EXT]) && is_array($data[self::FIELD_IS_MODIFIER_EXT])) - ? $data[self::FIELD_IS_MODIFIER_EXT] - : null; - if ($data[self::FIELD_IS_MODIFIER] instanceof FHIRBoolean) { - $this->setIsModifier($data[self::FIELD_IS_MODIFIER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_MODIFIER])) { - $this->setIsModifier(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_MODIFIER]] + $ext)); - } else if (is_array($data[self::FIELD_IS_MODIFIER])) { - $this->setIsModifier(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_MODIFIER]))); - } + if (isset($data[self::FIELD_MEANING_WHEN_MISSING_EXT]) && is_array($data[self::FIELD_MEANING_WHEN_MISSING_EXT])) { + $ext = $data[self::FIELD_MEANING_WHEN_MISSING_EXT]; } else { - $this->setIsModifier(new FHIRBoolean($data[self::FIELD_IS_MODIFIER])); + $ext = []; } - } - if (isset($data[self::FIELD_IS_SUMMARY])) { - $ext = (isset($data[self::FIELD_IS_SUMMARY_EXT]) && is_array($data[self::FIELD_IS_SUMMARY_EXT])) - ? $data[self::FIELD_IS_SUMMARY_EXT] - : null; - if ($data[self::FIELD_IS_SUMMARY] instanceof FHIRBoolean) { - $this->setIsSummary($data[self::FIELD_IS_SUMMARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_SUMMARY])) { - $this->setIsSummary(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_SUMMARY]] + $ext)); - } else if (is_array($data[self::FIELD_IS_SUMMARY])) { - $this->setIsSummary(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_SUMMARY]))); + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setMeaningWhenMissing($value); + } else if (is_array($value)) { + $this->setMeaningWhenMissing(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setMeaningWhenMissing(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setIsSummary(new FHIRBoolean($data[self::FIELD_IS_SUMMARY])); + } else if ([] !== $ext) { + $this->setMeaningWhenMissing(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); - } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); + $value = null; } - } - if (isset($data[self::FIELD_MAPPING])) { - if (is_array($data[self::FIELD_MAPPING])) { - foreach($data[self::FIELD_MAPPING] as $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRElementDefinitionMapping) { - $this->addMapping($v); - } else { - $this->addMapping(new FHIRElementDefinitionMapping($v)); - } - } - } else if ($data[self::FIELD_MAPPING] instanceof FHIRElementDefinitionMapping) { - $this->addMapping($data[self::FIELD_MAPPING]); + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; } else { - $this->addMapping(new FHIRElementDefinitionMapping($data[self::FIELD_MAPPING])); + $ext = []; } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + } else if ([] !== $ext) { + $this->setMin(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_MAX_LENGTH])) { - $ext = (isset($data[self::FIELD_MAX_LENGTH_EXT]) && is_array($data[self::FIELD_MAX_LENGTH_EXT])) - ? $data[self::FIELD_MAX_LENGTH_EXT] - : null; - if ($data[self::FIELD_MAX_LENGTH] instanceof FHIRInteger) { - $this->setMaxLength($data[self::FIELD_MAX_LENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MAX_LENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_LENGTH])) { - $this->setMaxLength(new FHIRInteger(array_merge($ext, $data[self::FIELD_MAX_LENGTH]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DATE]) || isset($data[self::FIELD_MIN_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_DATE])) { + $value = $data[self::FIELD_MIN_VALUE_DATE]; } else { - $this->setMaxLength(new FHIRInteger($data[self::FIELD_MAX_LENGTH])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_EXT])) - ? $data[self::FIELD_MAX_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_DATE] instanceof FHIRDate) { - $this->setMaxValueDate($data[self::FIELD_MAX_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_DATE])) { - $this->setMaxValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_DATE])) { - $this->setMaxValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_MAX_VALUE_DATE]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_DATE_EXT]; } else { - $this->setMaxValueDate(new FHIRDate($data[self::FIELD_MAX_VALUE_DATE])); + $ext = []; } - } - if (isset($data[self::FIELD_MAX_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_MAX_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setMaxValueDateTime($data[self::FIELD_MAX_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_DATE_TIME])) { - $this->setMaxValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_DATE_TIME])) { - $this->setMaxValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MAX_VALUE_DATE_TIME]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setMinValueDate($value); + } else if (is_array($value)) { + $this->setMinValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setMinValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMaxValueDateTime(new FHIRDateTime($data[self::FIELD_MAX_VALUE_DATE_TIME])); + } else if ([] !== $ext) { + $this->setMinValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_MAX_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MAX_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_MAX_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setMaxValueDecimal($data[self::FIELD_MAX_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_DECIMAL])) { - $this->setMaxValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_DECIMAL])) { - $this->setMaxValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_MAX_VALUE_DECIMAL]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME]) || isset($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_MIN_VALUE_DATE_TIME]; } else { - $this->setMaxValueDecimal(new FHIRDecimal($data[self::FIELD_MAX_VALUE_DECIMAL])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_MAX_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setMaxValueInstant($data[self::FIELD_MAX_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_INSTANT])) { - $this->setMaxValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_INSTANT])) { - $this->setMaxValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_MAX_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_DATE_TIME_EXT]; } else { - $this->setMaxValueInstant(new FHIRInstant($data[self::FIELD_MAX_VALUE_INSTANT])); + $ext = []; } - } - if (isset($data[self::FIELD_MAX_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MAX_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_MAX_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setMaxValueInteger($data[self::FIELD_MAX_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_INTEGER])) { - $this->setMaxValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_INTEGER])) { - $this->setMaxValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MAX_VALUE_INTEGER]))); + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setMinValueDateTime($value); + } else if (is_array($value)) { + $this->setMinValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setMinValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMaxValueInteger(new FHIRInteger($data[self::FIELD_MAX_VALUE_INTEGER])); + } else if ([] !== $ext) { + $this->setMinValueDateTime(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setMaxValuePositiveInt($data[self::FIELD_MAX_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { - $this->setMaxValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_POSITIVE_INT])) { - $this->setMaxValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_MAX_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_DECIMAL]) || isset($data[self::FIELD_MIN_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_DECIMAL])) { + $value = $data[self::FIELD_MIN_VALUE_DECIMAL]; } else { - $this->setMaxValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_MAX_VALUE_POSITIVE_INT])); + $value = null; } - } - if (isset($data[self::FIELD_MAX_VALUE_QUANTITY])) { - if ($data[self::FIELD_MAX_VALUE_QUANTITY] instanceof FHIRQuantity) { - $this->setMaxValueQuantity($data[self::FIELD_MAX_VALUE_QUANTITY]); + if (isset($data[self::FIELD_MIN_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_DECIMAL_EXT]; } else { - $this->setMaxValueQuantity(new FHIRQuantity($data[self::FIELD_MAX_VALUE_QUANTITY])); + $ext = []; } - } - if (isset($data[self::FIELD_MAX_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MAX_VALUE_TIME_EXT])) - ? $data[self::FIELD_MAX_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_TIME] instanceof FHIRTime) { - $this->setMaxValueTime($data[self::FIELD_MAX_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_TIME])) { - $this->setMaxValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_TIME])) { - $this->setMaxValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_MAX_VALUE_TIME]))); + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setMinValueDecimal($value); + } else if (is_array($value)) { + $this->setMinValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setMinValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMaxValueTime(new FHIRTime($data[self::FIELD_MAX_VALUE_TIME])); + } else if ([] !== $ext) { + $this->setMinValueDecimal(new FHIRDecimal($ext)); } } - if (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_MAX_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setMaxValueUnsignedInt($data[self::FIELD_MAX_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { - $this->setMaxValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MAX_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])) { - $this->setMaxValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MAX_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_INSTANT]) || isset($data[self::FIELD_MIN_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_INSTANT])) { + $value = $data[self::FIELD_MIN_VALUE_INSTANT]; } else { - $this->setMaxValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_MAX_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_MEANING_WHEN_MISSING])) { - $ext = (isset($data[self::FIELD_MEANING_WHEN_MISSING_EXT]) && is_array($data[self::FIELD_MEANING_WHEN_MISSING_EXT])) - ? $data[self::FIELD_MEANING_WHEN_MISSING_EXT] - : null; - if ($data[self::FIELD_MEANING_WHEN_MISSING] instanceof FHIRMarkdown) { - $this->setMeaningWhenMissing($data[self::FIELD_MEANING_WHEN_MISSING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEANING_WHEN_MISSING])) { - $this->setMeaningWhenMissing(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_MEANING_WHEN_MISSING]] + $ext)); - } else if (is_array($data[self::FIELD_MEANING_WHEN_MISSING])) { - $this->setMeaningWhenMissing(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_MEANING_WHEN_MISSING]))); - } + if (isset($data[self::FIELD_MIN_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_INSTANT_EXT]; } else { - $this->setMeaningWhenMissing(new FHIRMarkdown($data[self::FIELD_MEANING_WHEN_MISSING])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRUnsignedInt) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MIN]))); + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setMinValueInstant($value); + } else if (is_array($value)) { + $this->setMinValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setMinValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMin(new FHIRUnsignedInt($data[self::FIELD_MIN])); + } else if ([] !== $ext) { + $this->setMinValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_MIN_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_DATE_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_EXT])) - ? $data[self::FIELD_MIN_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_DATE] instanceof FHIRDate) { - $this->setMinValueDate($data[self::FIELD_MIN_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_DATE])) { - $this->setMinValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_DATE])) { - $this->setMinValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_MIN_VALUE_DATE]))); - } + if (isset($data[self::FIELD_MIN_VALUE_INTEGER]) || isset($data[self::FIELD_MIN_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_INTEGER])) { + $value = $data[self::FIELD_MIN_VALUE_INTEGER]; } else { - $this->setMinValueDate(new FHIRDate($data[self::FIELD_MIN_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_MIN_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setMinValueDateTime($data[self::FIELD_MIN_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_DATE_TIME])) { - $this->setMinValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_DATE_TIME])) { - $this->setMinValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MIN_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_MIN_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_INTEGER_EXT]; } else { - $this->setMinValueDateTime(new FHIRDateTime($data[self::FIELD_MIN_VALUE_DATE_TIME])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_MIN_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_MIN_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setMinValueDecimal($data[self::FIELD_MIN_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_DECIMAL])) { - $this->setMinValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_DECIMAL])) { - $this->setMinValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_MIN_VALUE_DECIMAL]))); + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMinValueInteger($value); + } else if (is_array($value)) { + $this->setMinValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMinValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMinValueDecimal(new FHIRDecimal($data[self::FIELD_MIN_VALUE_DECIMAL])); + } else if ([] !== $ext) { + $this->setMinValueInteger(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_MIN_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_MIN_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setMinValueInstant($data[self::FIELD_MIN_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_INSTANT])) { - $this->setMinValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_INSTANT])) { - $this->setMinValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_MIN_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_MIN_VALUE_POSITIVE_INT]; } else { - $this->setMinValueInstant(new FHIRInstant($data[self::FIELD_MIN_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_MIN_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_MIN_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setMinValueInteger($data[self::FIELD_MIN_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_INTEGER])) { - $this->setMinValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_INTEGER])) { - $this->setMinValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT]; } else { - $this->setMinValueInteger(new FHIRInteger($data[self::FIELD_MIN_VALUE_INTEGER])); + $ext = []; } - } - if (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setMinValuePositiveInt($data[self::FIELD_MIN_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { - $this->setMinValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_POSITIVE_INT])) { - $this->setMinValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_MIN_VALUE_POSITIVE_INT]))); + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setMinValuePositiveInt($value); + } else if (is_array($value)) { + $this->setMinValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setMinValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMinValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_MIN_VALUE_POSITIVE_INT])); + } else if ([] !== $ext) { + $this->setMinValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_MIN_VALUE_QUANTITY])) { @@ -4006,84 +4416,119 @@ public function __construct($data = null) $this->setMinValueQuantity(new FHIRQuantity($data[self::FIELD_MIN_VALUE_QUANTITY])); } } - if (isset($data[self::FIELD_MIN_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_TIME_EXT])) - ? $data[self::FIELD_MIN_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_TIME] instanceof FHIRTime) { - $this->setMinValueTime($data[self::FIELD_MIN_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_TIME])) { - $this->setMinValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_TIME])) { - $this->setMinValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_MIN_VALUE_TIME]))); - } + if (isset($data[self::FIELD_MIN_VALUE_TIME]) || isset($data[self::FIELD_MIN_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_TIME])) { + $value = $data[self::FIELD_MIN_VALUE_TIME]; } else { - $this->setMinValueTime(new FHIRTime($data[self::FIELD_MIN_VALUE_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_MIN_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setMinValueUnsignedInt($data[self::FIELD_MIN_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { - $this->setMinValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MIN_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { - $this->setMinValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MIN_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_MIN_VALUE_TIME_EXT]) && is_array($data[self::FIELD_MIN_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_TIME_EXT]; } else { - $this->setMinValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])); + $ext = []; } - } - if (isset($data[self::FIELD_MUST_SUPPORT])) { - $ext = (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) - ? $data[self::FIELD_MUST_SUPPORT_EXT] - : null; - if ($data[self::FIELD_MUST_SUPPORT] instanceof FHIRBoolean) { - $this->setMustSupport($data[self::FIELD_MUST_SUPPORT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MUST_SUPPORT])) { - $this->setMustSupport(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MUST_SUPPORT]] + $ext)); - } else if (is_array($data[self::FIELD_MUST_SUPPORT])) { - $this->setMustSupport(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MUST_SUPPORT]))); + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setMinValueTime($value); + } else if (is_array($value)) { + $this->setMinValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setMinValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setMustSupport(new FHIRBoolean($data[self::FIELD_MUST_SUPPORT])); + } else if ([] !== $ext) { + $this->setMinValueTime(new FHIRTime($ext)); } } - if (isset($data[self::FIELD_ORDER_MEANING])) { - $ext = (isset($data[self::FIELD_ORDER_MEANING_EXT]) && is_array($data[self::FIELD_ORDER_MEANING_EXT])) - ? $data[self::FIELD_ORDER_MEANING_EXT] - : null; - if ($data[self::FIELD_ORDER_MEANING] instanceof FHIRString) { - $this->setOrderMeaning($data[self::FIELD_ORDER_MEANING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDER_MEANING])) { - $this->setOrderMeaning(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ORDER_MEANING]] + $ext)); - } else if (is_array($data[self::FIELD_ORDER_MEANING])) { - $this->setOrderMeaning(new FHIRString(array_merge($ext, $data[self::FIELD_ORDER_MEANING]))); + if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_MIN_VALUE_UNSIGNED_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMinValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setMinValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMinValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMinValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_MUST_SUPPORT]) || isset($data[self::FIELD_MUST_SUPPORT_EXT])) { + if (isset($data[self::FIELD_MUST_SUPPORT])) { + $value = $data[self::FIELD_MUST_SUPPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MUST_SUPPORT_EXT]) && is_array($data[self::FIELD_MUST_SUPPORT_EXT])) { + $ext = $data[self::FIELD_MUST_SUPPORT_EXT]; } else { - $this->setOrderMeaning(new FHIRString($data[self::FIELD_ORDER_MEANING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMustSupport($value); + } else if (is_array($value)) { + $this->setMustSupport(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMustSupport(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMustSupport(new FHIRBoolean($ext)); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_ORDER_MEANING]) || isset($data[self::FIELD_ORDER_MEANING_EXT])) { + if (isset($data[self::FIELD_ORDER_MEANING])) { + $value = $data[self::FIELD_ORDER_MEANING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ORDER_MEANING_EXT]) && is_array($data[self::FIELD_ORDER_MEANING_EXT])) { + $ext = $data[self::FIELD_ORDER_MEANING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOrderMeaning($value); + } else if (is_array($value)) { + $this->setOrderMeaning(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOrderMeaning(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOrderMeaning(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATTERN_ADDRESS])) { @@ -4114,52 +4559,73 @@ public function __construct($data = null) $this->setPatternAttachment(new FHIRAttachment($data[self::FIELD_PATTERN_ATTACHMENT])); } } - if (isset($data[self::FIELD_PATTERN_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_PATTERN_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_PATTERN_BASE_64BINARY_EXT])) - ? $data[self::FIELD_PATTERN_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_PATTERN_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setPatternBase64Binary($data[self::FIELD_PATTERN_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_BASE_64BINARY])) { - $this->setPatternBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_PATTERN_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_BASE_64BINARY])) { - $this->setPatternBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_PATTERN_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_PATTERN_BASE_64BINARY]) || isset($data[self::FIELD_PATTERN_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_PATTERN_BASE_64BINARY])) { + $value = $data[self::FIELD_PATTERN_BASE_64BINARY]; } else { - $this->setPatternBase64Binary(new FHIRBase64Binary($data[self::FIELD_PATTERN_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_BOOLEAN])) { - $ext = (isset($data[self::FIELD_PATTERN_BOOLEAN_EXT]) && is_array($data[self::FIELD_PATTERN_BOOLEAN_EXT])) - ? $data[self::FIELD_PATTERN_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_PATTERN_BOOLEAN] instanceof FHIRBoolean) { - $this->setPatternBoolean($data[self::FIELD_PATTERN_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_BOOLEAN])) { - $this->setPatternBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PATTERN_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_BOOLEAN])) { - $this->setPatternBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PATTERN_BOOLEAN]))); - } + if (isset($data[self::FIELD_PATTERN_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_PATTERN_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_PATTERN_BASE_64BINARY_EXT]; } else { - $this->setPatternBoolean(new FHIRBoolean($data[self::FIELD_PATTERN_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setPatternBase64Binary($value); + } else if (is_array($value)) { + $this->setPatternBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setPatternBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_PATTERN_CODE])) { - $ext = (isset($data[self::FIELD_PATTERN_CODE_EXT]) && is_array($data[self::FIELD_PATTERN_CODE_EXT])) - ? $data[self::FIELD_PATTERN_CODE_EXT] - : null; - if ($data[self::FIELD_PATTERN_CODE] instanceof FHIRCode) { - $this->setPatternCode($data[self::FIELD_PATTERN_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_CODE])) { - $this->setPatternCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PATTERN_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_CODE])) { - $this->setPatternCode(new FHIRCode(array_merge($ext, $data[self::FIELD_PATTERN_CODE]))); + if (isset($data[self::FIELD_PATTERN_BOOLEAN]) || isset($data[self::FIELD_PATTERN_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_PATTERN_BOOLEAN])) { + $value = $data[self::FIELD_PATTERN_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_BOOLEAN_EXT]) && is_array($data[self::FIELD_PATTERN_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_PATTERN_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPatternBoolean($value); + } else if (is_array($value)) { + $this->setPatternBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPatternBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_CODE]) || isset($data[self::FIELD_PATTERN_CODE_EXT])) { + if (isset($data[self::FIELD_PATTERN_CODE])) { + $value = $data[self::FIELD_PATTERN_CODE]; } else { - $this->setPatternCode(new FHIRCode($data[self::FIELD_PATTERN_CODE])); + $value = null; + } + if (isset($data[self::FIELD_PATTERN_CODE_EXT]) && is_array($data[self::FIELD_PATTERN_CODE_EXT])) { + $ext = $data[self::FIELD_PATTERN_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setPatternCode($value); + } else if (is_array($value)) { + $this->setPatternCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setPatternCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PATTERN_CODEABLE_CONCEPT])) { @@ -4190,52 +4656,73 @@ public function __construct($data = null) $this->setPatternCount(new FHIRCount($data[self::FIELD_PATTERN_COUNT])); } } - if (isset($data[self::FIELD_PATTERN_DATE])) { - $ext = (isset($data[self::FIELD_PATTERN_DATE_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_EXT])) - ? $data[self::FIELD_PATTERN_DATE_EXT] - : null; - if ($data[self::FIELD_PATTERN_DATE] instanceof FHIRDate) { - $this->setPatternDate($data[self::FIELD_PATTERN_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_DATE])) { - $this->setPatternDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_PATTERN_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_DATE])) { - $this->setPatternDate(new FHIRDate(array_merge($ext, $data[self::FIELD_PATTERN_DATE]))); - } + if (isset($data[self::FIELD_PATTERN_DATE]) || isset($data[self::FIELD_PATTERN_DATE_EXT])) { + if (isset($data[self::FIELD_PATTERN_DATE])) { + $value = $data[self::FIELD_PATTERN_DATE]; } else { - $this->setPatternDate(new FHIRDate($data[self::FIELD_PATTERN_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_DATE_TIME])) { - $ext = (isset($data[self::FIELD_PATTERN_DATE_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_TIME_EXT])) - ? $data[self::FIELD_PATTERN_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_PATTERN_DATE_TIME] instanceof FHIRDateTime) { - $this->setPatternDateTime($data[self::FIELD_PATTERN_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_DATE_TIME])) { - $this->setPatternDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PATTERN_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_DATE_TIME])) { - $this->setPatternDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PATTERN_DATE_TIME]))); - } + if (isset($data[self::FIELD_PATTERN_DATE_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_EXT])) { + $ext = $data[self::FIELD_PATTERN_DATE_EXT]; } else { - $this->setPatternDateTime(new FHIRDateTime($data[self::FIELD_PATTERN_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setPatternDate($value); + } else if (is_array($value)) { + $this->setPatternDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setPatternDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_PATTERN_DECIMAL])) { - $ext = (isset($data[self::FIELD_PATTERN_DECIMAL_EXT]) && is_array($data[self::FIELD_PATTERN_DECIMAL_EXT])) - ? $data[self::FIELD_PATTERN_DECIMAL_EXT] - : null; - if ($data[self::FIELD_PATTERN_DECIMAL] instanceof FHIRDecimal) { - $this->setPatternDecimal($data[self::FIELD_PATTERN_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_DECIMAL])) { - $this->setPatternDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PATTERN_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_DECIMAL])) { - $this->setPatternDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PATTERN_DECIMAL]))); + if (isset($data[self::FIELD_PATTERN_DATE_TIME]) || isset($data[self::FIELD_PATTERN_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_PATTERN_DATE_TIME])) { + $value = $data[self::FIELD_PATTERN_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_DATE_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_PATTERN_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPatternDateTime($value); + } else if (is_array($value)) { + $this->setPatternDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPatternDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_DECIMAL]) || isset($data[self::FIELD_PATTERN_DECIMAL_EXT])) { + if (isset($data[self::FIELD_PATTERN_DECIMAL])) { + $value = $data[self::FIELD_PATTERN_DECIMAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_DECIMAL_EXT]) && is_array($data[self::FIELD_PATTERN_DECIMAL_EXT])) { + $ext = $data[self::FIELD_PATTERN_DECIMAL_EXT]; } else { - $this->setPatternDecimal(new FHIRDecimal($data[self::FIELD_PATTERN_DECIMAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPatternDecimal($value); + } else if (is_array($value)) { + $this->setPatternDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPatternDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_PATTERN_DISTANCE])) { @@ -4259,20 +4746,27 @@ public function __construct($data = null) $this->setPatternHumanName(new FHIRHumanName($data[self::FIELD_PATTERN_HUMAN_NAME])); } } - if (isset($data[self::FIELD_PATTERN_ID])) { - $ext = (isset($data[self::FIELD_PATTERN_ID_EXT]) && is_array($data[self::FIELD_PATTERN_ID_EXT])) - ? $data[self::FIELD_PATTERN_ID_EXT] - : null; - if ($data[self::FIELD_PATTERN_ID] instanceof FHIRId) { - $this->setPatternId($data[self::FIELD_PATTERN_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_ID])) { - $this->setPatternId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_PATTERN_ID]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_ID])) { - $this->setPatternId(new FHIRId(array_merge($ext, $data[self::FIELD_PATTERN_ID]))); - } + if (isset($data[self::FIELD_PATTERN_ID]) || isset($data[self::FIELD_PATTERN_ID_EXT])) { + if (isset($data[self::FIELD_PATTERN_ID])) { + $value = $data[self::FIELD_PATTERN_ID]; } else { - $this->setPatternId(new FHIRId($data[self::FIELD_PATTERN_ID])); + $value = null; + } + if (isset($data[self::FIELD_PATTERN_ID_EXT]) && is_array($data[self::FIELD_PATTERN_ID_EXT])) { + $ext = $data[self::FIELD_PATTERN_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setPatternId($value); + } else if (is_array($value)) { + $this->setPatternId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setPatternId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternId(new FHIRId($ext)); } } if (isset($data[self::FIELD_PATTERN_IDENTIFIER])) { @@ -4282,52 +4776,73 @@ public function __construct($data = null) $this->setPatternIdentifier(new FHIRIdentifier($data[self::FIELD_PATTERN_IDENTIFIER])); } } - if (isset($data[self::FIELD_PATTERN_INSTANT])) { - $ext = (isset($data[self::FIELD_PATTERN_INSTANT_EXT]) && is_array($data[self::FIELD_PATTERN_INSTANT_EXT])) - ? $data[self::FIELD_PATTERN_INSTANT_EXT] - : null; - if ($data[self::FIELD_PATTERN_INSTANT] instanceof FHIRInstant) { - $this->setPatternInstant($data[self::FIELD_PATTERN_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_INSTANT])) { - $this->setPatternInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_PATTERN_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_INSTANT])) { - $this->setPatternInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_PATTERN_INSTANT]))); - } + if (isset($data[self::FIELD_PATTERN_INSTANT]) || isset($data[self::FIELD_PATTERN_INSTANT_EXT])) { + if (isset($data[self::FIELD_PATTERN_INSTANT])) { + $value = $data[self::FIELD_PATTERN_INSTANT]; } else { - $this->setPatternInstant(new FHIRInstant($data[self::FIELD_PATTERN_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_INTEGER])) { - $ext = (isset($data[self::FIELD_PATTERN_INTEGER_EXT]) && is_array($data[self::FIELD_PATTERN_INTEGER_EXT])) - ? $data[self::FIELD_PATTERN_INTEGER_EXT] - : null; - if ($data[self::FIELD_PATTERN_INTEGER] instanceof FHIRInteger) { - $this->setPatternInteger($data[self::FIELD_PATTERN_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_INTEGER])) { - $this->setPatternInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_PATTERN_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_INTEGER])) { - $this->setPatternInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_PATTERN_INTEGER]))); - } + if (isset($data[self::FIELD_PATTERN_INSTANT_EXT]) && is_array($data[self::FIELD_PATTERN_INSTANT_EXT])) { + $ext = $data[self::FIELD_PATTERN_INSTANT_EXT]; } else { - $this->setPatternInteger(new FHIRInteger($data[self::FIELD_PATTERN_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setPatternInstant($value); + } else if (is_array($value)) { + $this->setPatternInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setPatternInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_PATTERN_MARKDOWN])) { - $ext = (isset($data[self::FIELD_PATTERN_MARKDOWN_EXT]) && is_array($data[self::FIELD_PATTERN_MARKDOWN_EXT])) - ? $data[self::FIELD_PATTERN_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_PATTERN_MARKDOWN] instanceof FHIRMarkdown) { - $this->setPatternMarkdown($data[self::FIELD_PATTERN_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_MARKDOWN])) { - $this->setPatternMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PATTERN_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_MARKDOWN])) { - $this->setPatternMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PATTERN_MARKDOWN]))); + if (isset($data[self::FIELD_PATTERN_INTEGER]) || isset($data[self::FIELD_PATTERN_INTEGER_EXT])) { + if (isset($data[self::FIELD_PATTERN_INTEGER])) { + $value = $data[self::FIELD_PATTERN_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_INTEGER_EXT]) && is_array($data[self::FIELD_PATTERN_INTEGER_EXT])) { + $ext = $data[self::FIELD_PATTERN_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setPatternInteger($value); + } else if (is_array($value)) { + $this->setPatternInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setPatternInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_MARKDOWN]) || isset($data[self::FIELD_PATTERN_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_PATTERN_MARKDOWN])) { + $value = $data[self::FIELD_PATTERN_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_MARKDOWN_EXT]) && is_array($data[self::FIELD_PATTERN_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_PATTERN_MARKDOWN_EXT]; } else { - $this->setPatternMarkdown(new FHIRMarkdown($data[self::FIELD_PATTERN_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPatternMarkdown($value); + } else if (is_array($value)) { + $this->setPatternMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPatternMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_PATTERN_META])) { @@ -4344,20 +4859,27 @@ public function __construct($data = null) $this->setPatternMoney(new FHIRMoney($data[self::FIELD_PATTERN_MONEY])); } } - if (isset($data[self::FIELD_PATTERN_OID])) { - $ext = (isset($data[self::FIELD_PATTERN_OID_EXT]) && is_array($data[self::FIELD_PATTERN_OID_EXT])) - ? $data[self::FIELD_PATTERN_OID_EXT] - : null; - if ($data[self::FIELD_PATTERN_OID] instanceof FHIROid) { - $this->setPatternOid($data[self::FIELD_PATTERN_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_OID])) { - $this->setPatternOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_PATTERN_OID]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_OID])) { - $this->setPatternOid(new FHIROid(array_merge($ext, $data[self::FIELD_PATTERN_OID]))); - } + if (isset($data[self::FIELD_PATTERN_OID]) || isset($data[self::FIELD_PATTERN_OID_EXT])) { + if (isset($data[self::FIELD_PATTERN_OID])) { + $value = $data[self::FIELD_PATTERN_OID]; } else { - $this->setPatternOid(new FHIROid($data[self::FIELD_PATTERN_OID])); + $value = null; + } + if (isset($data[self::FIELD_PATTERN_OID_EXT]) && is_array($data[self::FIELD_PATTERN_OID_EXT])) { + $ext = $data[self::FIELD_PATTERN_OID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setPatternOid($value); + } else if (is_array($value)) { + $this->setPatternOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setPatternOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_PATTERN_PERIOD])) { @@ -4367,20 +4889,27 @@ public function __construct($data = null) $this->setPatternPeriod(new FHIRPeriod($data[self::FIELD_PATTERN_PERIOD])); } } - if (isset($data[self::FIELD_PATTERN_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_PATTERN_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_PATTERN_POSITIVE_INT_EXT])) - ? $data[self::FIELD_PATTERN_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_PATTERN_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setPatternPositiveInt($data[self::FIELD_PATTERN_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_POSITIVE_INT])) { - $this->setPatternPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PATTERN_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_POSITIVE_INT])) { - $this->setPatternPositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_PATTERN_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_PATTERN_POSITIVE_INT]) || isset($data[self::FIELD_PATTERN_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_PATTERN_POSITIVE_INT])) { + $value = $data[self::FIELD_PATTERN_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_PATTERN_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_PATTERN_POSITIVE_INT_EXT]; } else { - $this->setPatternPositiveInt(new FHIRPositiveInt($data[self::FIELD_PATTERN_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setPatternPositiveInt($value); + } else if (is_array($value)) { + $this->setPatternPositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setPatternPositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternPositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PATTERN_QUANTITY])) { @@ -4425,36 +4954,50 @@ public function __construct($data = null) $this->setPatternSignature(new FHIRSignature($data[self::FIELD_PATTERN_SIGNATURE])); } } - if (isset($data[self::FIELD_PATTERN_STRING])) { - $ext = (isset($data[self::FIELD_PATTERN_STRING_EXT]) && is_array($data[self::FIELD_PATTERN_STRING_EXT])) - ? $data[self::FIELD_PATTERN_STRING_EXT] - : null; - if ($data[self::FIELD_PATTERN_STRING] instanceof FHIRString) { - $this->setPatternString($data[self::FIELD_PATTERN_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_STRING])) { - $this->setPatternString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATTERN_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_STRING])) { - $this->setPatternString(new FHIRString(array_merge($ext, $data[self::FIELD_PATTERN_STRING]))); - } + if (isset($data[self::FIELD_PATTERN_STRING]) || isset($data[self::FIELD_PATTERN_STRING_EXT])) { + if (isset($data[self::FIELD_PATTERN_STRING])) { + $value = $data[self::FIELD_PATTERN_STRING]; } else { - $this->setPatternString(new FHIRString($data[self::FIELD_PATTERN_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_TIME])) { - $ext = (isset($data[self::FIELD_PATTERN_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_TIME_EXT])) - ? $data[self::FIELD_PATTERN_TIME_EXT] - : null; - if ($data[self::FIELD_PATTERN_TIME] instanceof FHIRTime) { - $this->setPatternTime($data[self::FIELD_PATTERN_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_TIME])) { - $this->setPatternTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_PATTERN_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_TIME])) { - $this->setPatternTime(new FHIRTime(array_merge($ext, $data[self::FIELD_PATTERN_TIME]))); + if (isset($data[self::FIELD_PATTERN_STRING_EXT]) && is_array($data[self::FIELD_PATTERN_STRING_EXT])) { + $ext = $data[self::FIELD_PATTERN_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPatternString($value); + } else if (is_array($value)) { + $this->setPatternString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPatternString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPatternString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PATTERN_TIME]) || isset($data[self::FIELD_PATTERN_TIME_EXT])) { + if (isset($data[self::FIELD_PATTERN_TIME])) { + $value = $data[self::FIELD_PATTERN_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_TIME_EXT]) && is_array($data[self::FIELD_PATTERN_TIME_EXT])) { + $ext = $data[self::FIELD_PATTERN_TIME_EXT]; } else { - $this->setPatternTime(new FHIRTime($data[self::FIELD_PATTERN_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setPatternTime($value); + } else if (is_array($value)) { + $this->setPatternTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setPatternTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_PATTERN_TIMING])) { @@ -4464,113 +5007,157 @@ public function __construct($data = null) $this->setPatternTiming(new FHIRTiming($data[self::FIELD_PATTERN_TIMING])); } } - if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_PATTERN_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_PATTERN_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setPatternUnsignedInt($data[self::FIELD_PATTERN_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_UNSIGNED_INT])) { - $this->setPatternUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_PATTERN_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_UNSIGNED_INT])) { - $this->setPatternUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_PATTERN_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT]) || isset($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT])) { + $value = $data[self::FIELD_PATTERN_UNSIGNED_INT]; } else { - $this->setPatternUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_PATTERN_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_PATTERN_URI])) { - $ext = (isset($data[self::FIELD_PATTERN_URI_EXT]) && is_array($data[self::FIELD_PATTERN_URI_EXT])) - ? $data[self::FIELD_PATTERN_URI_EXT] - : null; - if ($data[self::FIELD_PATTERN_URI] instanceof FHIRUri) { - $this->setPatternUri($data[self::FIELD_PATTERN_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATTERN_URI])) { - $this->setPatternUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PATTERN_URI]] + $ext)); - } else if (is_array($data[self::FIELD_PATTERN_URI])) { - $this->setPatternUri(new FHIRUri(array_merge($ext, $data[self::FIELD_PATTERN_URI]))); - } + if (isset($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_PATTERN_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_PATTERN_UNSIGNED_INT_EXT]; } else { - $this->setPatternUri(new FHIRUri($data[self::FIELD_PATTERN_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setPatternUnsignedInt($value); + } else if (is_array($value)) { + $this->setPatternUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setPatternUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternUnsignedInt(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_REPRESENTATION])) { - $ext = (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) - ? $data[self::FIELD_REPRESENTATION_EXT] - : null; - if (is_array($data[self::FIELD_REPRESENTATION])) { - foreach($data[self::FIELD_REPRESENTATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRPropertyRepresentation) { - $this->addRepresentation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PATTERN_URI]) || isset($data[self::FIELD_PATTERN_URI_EXT])) { + if (isset($data[self::FIELD_PATTERN_URI])) { + $value = $data[self::FIELD_PATTERN_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATTERN_URI_EXT]) && is_array($data[self::FIELD_PATTERN_URI_EXT])) { + $ext = $data[self::FIELD_PATTERN_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setPatternUri($value); + } else if (is_array($value)) { + $this->setPatternUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setPatternUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPatternUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_REPRESENTATION]) || isset($data[self::FIELD_REPRESENTATION_EXT])) { + if (isset($data[self::FIELD_REPRESENTATION])) { + $value = $data[self::FIELD_REPRESENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REPRESENTATION_EXT]) && is_array($data[self::FIELD_REPRESENTATION_EXT])) { + $ext = $data[self::FIELD_REPRESENTATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPropertyRepresentation) { + $this->addRepresentation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRPropertyRepresentation) { + $this->addRepresentation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($v, $iext))); + } else { + $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addRepresentation(new FHIRPropertyRepresentation($v)); } + } elseif (is_array($value)) { + $this->addRepresentation(new FHIRPropertyRepresentation(array_merge($ext, $value))); + } else { + $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_REPRESENTATION] instanceof FHIRPropertyRepresentation) { - $this->addRepresentation($data[self::FIELD_REPRESENTATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_REPRESENTATION])) { - $this->addRepresentation(new FHIRPropertyRepresentation([FHIRPropertyRepresentation::FIELD_VALUE => $data[self::FIELD_REPRESENTATION]] + $ext)); - } else { - $this->addRepresentation(new FHIRPropertyRepresentation($data[self::FIELD_REPRESENTATION])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRMarkdown) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addRepresentation(new FHIRPropertyRepresentation($iext)); } - } else { - $this->setRequirements(new FHIRMarkdown($data[self::FIELD_REQUIREMENTS])); } } - if (isset($data[self::FIELD_SHORT])) { - $ext = (isset($data[self::FIELD_SHORT_EXT]) && is_array($data[self::FIELD_SHORT_EXT])) - ? $data[self::FIELD_SHORT_EXT] - : null; - if ($data[self::FIELD_SHORT] instanceof FHIRString) { - $this->setShort($data[self::FIELD_SHORT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SHORT])) { - $this->setShort(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SHORT]] + $ext)); - } else if (is_array($data[self::FIELD_SHORT])) { - $this->setShort(new FHIRString(array_merge($ext, $data[self::FIELD_SHORT]))); - } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; } else { - $this->setShort(new FHIRString($data[self::FIELD_SHORT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_SLICE_NAME])) { - $ext = (isset($data[self::FIELD_SLICE_NAME_EXT]) && is_array($data[self::FIELD_SLICE_NAME_EXT])) - ? $data[self::FIELD_SLICE_NAME_EXT] - : null; - if ($data[self::FIELD_SLICE_NAME] instanceof FHIRString) { - $this->setSliceName($data[self::FIELD_SLICE_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SLICE_NAME])) { - $this->setSliceName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SLICE_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_SLICE_NAME])) { - $this->setSliceName(new FHIRString(array_merge($ext, $data[self::FIELD_SLICE_NAME]))); + if (isset($data[self::FIELD_SHORT]) || isset($data[self::FIELD_SHORT_EXT])) { + if (isset($data[self::FIELD_SHORT])) { + $value = $data[self::FIELD_SHORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SHORT_EXT]) && is_array($data[self::FIELD_SHORT_EXT])) { + $ext = $data[self::FIELD_SHORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setShort($value); + } else if (is_array($value)) { + $this->setShort(new FHIRString(array_merge($ext, $value))); + } else { + $this->setShort(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setShort(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SLICE_NAME]) || isset($data[self::FIELD_SLICE_NAME_EXT])) { + if (isset($data[self::FIELD_SLICE_NAME])) { + $value = $data[self::FIELD_SLICE_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SLICE_NAME_EXT]) && is_array($data[self::FIELD_SLICE_NAME_EXT])) { + $ext = $data[self::FIELD_SLICE_NAME_EXT]; } else { - $this->setSliceName(new FHIRString($data[self::FIELD_SLICE_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSliceName($value); + } else if (is_array($value)) { + $this->setSliceName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSliceName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSliceName(new FHIRString($ext)); } } if (isset($data[self::FIELD_SLICING])) { @@ -11340,8 +11927,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -13059,18 +13646,26 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAlias())) { $a[self::FIELD_ALIAS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ALIAS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ALIAS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ALIAS_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ALIAS_EXT] = $encs; + } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v; @@ -13079,37 +13674,61 @@ public function jsonSerialize() $a[self::FIELD_BINDING] = $v; } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getCondition())) { $a[self::FIELD_CONDITION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONDITION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONDITION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRId::FIELD_VALUE]) || array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONDITION_EXT][] = null; + unset($enc[FHIRId::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONDITION_EXT] = $encs; + } } if ([] !== ($vs = $this->getConstraint())) { - $a[self::FIELD_CONSTRAINT] = $vs; + $a[self::FIELD_CONSTRAINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONSTRAINT][] = $v; + } } if (null !== ($v = $this->getContentReference())) { $a[self::FIELD_CONTENT_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_CONTENT_REFERENCE_EXT] = $enc; } } @@ -13127,22 +13746,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueBase64Binary())) { $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueBoolean())) { $a[self::FIELD_DEFAULT_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueCode())) { $a[self::FIELD_DEFAULT_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_CODE_EXT] = $enc; } } @@ -13160,22 +13785,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueDate())) { $a[self::FIELD_DEFAULT_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDateTime())) { $a[self::FIELD_DEFAULT_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueDecimal())) { $a[self::FIELD_DEFAULT_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_DECIMAL_EXT] = $enc; } } @@ -13190,8 +13821,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueId())) { $a[self::FIELD_DEFAULT_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_ID_EXT] = $enc; } } @@ -13200,22 +13833,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueInstant())) { $a[self::FIELD_DEFAULT_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueInteger())) { $a[self::FIELD_DEFAULT_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueMarkdown())) { $a[self::FIELD_DEFAULT_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_MARKDOWN_EXT] = $enc; } } @@ -13227,8 +13866,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueOid())) { $a[self::FIELD_DEFAULT_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_OID_EXT] = $enc; } } @@ -13237,8 +13878,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValuePositiveInt())) { $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -13262,15 +13905,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueString())) { $a[self::FIELD_DEFAULT_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueTime())) { $a[self::FIELD_DEFAULT_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_TIME_EXT] = $enc; } } @@ -13279,27 +13926,39 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefaultValueUnsignedInt())) { $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getDefaultValueUri())) { $a[self::FIELD_DEFAULT_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFAULT_VALUE_URI_EXT] = $enc; } } if (null !== ($v = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getExample())) { - $a[self::FIELD_EXAMPLE] = $vs; + $a[self::FIELD_EXAMPLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXAMPLE][] = $v; + } } if (null !== ($v = $this->getFixedAddress())) { $a[self::FIELD_FIXED_ADDRESS] = $v; @@ -13315,22 +13974,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedBase64Binary())) { $a[self::FIELD_FIXED_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_FIXED_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getFixedBoolean())) { $a[self::FIELD_FIXED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_FIXED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getFixedCode())) { $a[self::FIELD_FIXED_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_FIXED_CODE_EXT] = $enc; } } @@ -13348,22 +14013,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedDate())) { $a[self::FIELD_FIXED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_FIXED_DATE_EXT] = $enc; } } if (null !== ($v = $this->getFixedDateTime())) { $a[self::FIELD_FIXED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_FIXED_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getFixedDecimal())) { $a[self::FIELD_FIXED_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FIXED_DECIMAL_EXT] = $enc; } } @@ -13378,8 +14049,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedId())) { $a[self::FIELD_FIXED_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FIXED_ID_EXT] = $enc; } } @@ -13388,22 +14061,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedInstant())) { $a[self::FIELD_FIXED_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_FIXED_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getFixedInteger())) { $a[self::FIELD_FIXED_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_FIXED_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getFixedMarkdown())) { $a[self::FIELD_FIXED_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_FIXED_MARKDOWN_EXT] = $enc; } } @@ -13415,8 +14094,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedOid())) { $a[self::FIELD_FIXED_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_FIXED_OID_EXT] = $enc; } } @@ -13425,8 +14106,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedPositiveInt())) { $a[self::FIELD_FIXED_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_FIXED_POSITIVE_INT_EXT] = $enc; } } @@ -13450,15 +14133,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedString())) { $a[self::FIELD_FIXED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FIXED_STRING_EXT] = $enc; } } if (null !== ($v = $this->getFixedTime())) { $a[self::FIELD_FIXED_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_FIXED_TIME_EXT] = $enc; } } @@ -13467,95 +14154,127 @@ public function jsonSerialize() } if (null !== ($v = $this->getFixedUnsignedInt())) { $a[self::FIELD_FIXED_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_FIXED_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getFixedUri())) { $a[self::FIELD_FIXED_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_FIXED_URI_EXT] = $enc; } } if (null !== ($v = $this->getIsModifier())) { $a[self::FIELD_IS_MODIFIER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_MODIFIER_EXT] = $enc; } } if (null !== ($v = $this->getIsSummary())) { $a[self::FIELD_IS_SUMMARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_SUMMARY_EXT] = $enc; } } if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMaxLength())) { $a[self::FIELD_MAX_LENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MAX_LENGTH_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueDate())) { $a[self::FIELD_MAX_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueDateTime())) { $a[self::FIELD_MAX_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueDecimal())) { $a[self::FIELD_MAX_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueInstant())) { $a[self::FIELD_MAX_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueInteger())) { $a[self::FIELD_MAX_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getMaxValuePositiveInt())) { $a[self::FIELD_MAX_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -13564,71 +14283,91 @@ public function jsonSerialize() } if (null !== ($v = $this->getMaxValueTime())) { $a[self::FIELD_MAX_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMaxValueUnsignedInt())) { $a[self::FIELD_MAX_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MAX_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getMeaningWhenMissing())) { $a[self::FIELD_MEANING_WHEN_MISSING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_MEANING_WHEN_MISSING_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getMinValueDate())) { $a[self::FIELD_MIN_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getMinValueDateTime())) { $a[self::FIELD_MIN_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMinValueDecimal())) { $a[self::FIELD_MIN_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_DECIMAL_EXT] = $enc; } } if (null !== ($v = $this->getMinValueInstant())) { $a[self::FIELD_MIN_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getMinValueInteger())) { $a[self::FIELD_MIN_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getMinValuePositiveInt())) { $a[self::FIELD_MIN_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -13637,36 +14376,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getMinValueTime())) { $a[self::FIELD_MIN_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getMinValueUnsignedInt())) { $a[self::FIELD_MIN_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MIN_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getMustSupport())) { $a[self::FIELD_MUST_SUPPORT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MUST_SUPPORT_EXT] = $enc; } } if (null !== ($v = $this->getOrderMeaning())) { $a[self::FIELD_ORDER_MEANING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ORDER_MEANING_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } @@ -13684,22 +14433,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternBase64Binary())) { $a[self::FIELD_PATTERN_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_PATTERN_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getPatternBoolean())) { $a[self::FIELD_PATTERN_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PATTERN_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getPatternCode())) { $a[self::FIELD_PATTERN_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_PATTERN_CODE_EXT] = $enc; } } @@ -13717,22 +14472,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternDate())) { $a[self::FIELD_PATTERN_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_PATTERN_DATE_EXT] = $enc; } } if (null !== ($v = $this->getPatternDateTime())) { $a[self::FIELD_PATTERN_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PATTERN_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getPatternDecimal())) { $a[self::FIELD_PATTERN_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PATTERN_DECIMAL_EXT] = $enc; } } @@ -13747,8 +14508,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternId())) { $a[self::FIELD_PATTERN_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_PATTERN_ID_EXT] = $enc; } } @@ -13757,22 +14520,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternInstant())) { $a[self::FIELD_PATTERN_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_PATTERN_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getPatternInteger())) { $a[self::FIELD_PATTERN_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_PATTERN_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getPatternMarkdown())) { $a[self::FIELD_PATTERN_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PATTERN_MARKDOWN_EXT] = $enc; } } @@ -13784,8 +14553,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternOid())) { $a[self::FIELD_PATTERN_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_PATTERN_OID_EXT] = $enc; } } @@ -13794,8 +14565,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternPositiveInt())) { $a[self::FIELD_PATTERN_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_PATTERN_POSITIVE_INT_EXT] = $enc; } } @@ -13819,15 +14592,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternString())) { $a[self::FIELD_PATTERN_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATTERN_STRING_EXT] = $enc; } } if (null !== ($v = $this->getPatternTime())) { $a[self::FIELD_PATTERN_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_PATTERN_TIME_EXT] = $enc; } } @@ -13836,51 +14613,69 @@ public function jsonSerialize() } if (null !== ($v = $this->getPatternUnsignedInt())) { $a[self::FIELD_PATTERN_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_PATTERN_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getPatternUri())) { $a[self::FIELD_PATTERN_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PATTERN_URI_EXT] = $enc; } } if ([] !== ($vs = $this->getRepresentation())) { $a[self::FIELD_REPRESENTATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_REPRESENTATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_REPRESENTATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRPropertyRepresentation::FIELD_VALUE]) || array_key_exists(FHIRPropertyRepresentation::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_REPRESENTATION_EXT][] = null; + unset($enc[FHIRPropertyRepresentation::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_REPRESENTATION_EXT] = $encs; + } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getShort())) { $a[self::FIELD_SHORT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SHORT_EXT] = $enc; } } if (null !== ($v = $this->getSliceName())) { $a[self::FIELD_SLICE_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SLICE_NAME_EXT] = $enc; } } @@ -13888,7 +14683,16 @@ public function jsonSerialize() $a[self::FIELD_SLICING] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php index 4a6acb2811..5eae008a01 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRElementDefinitionBase extends FHIRElement const FIELD_PATH_EXT = '_path'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -148,52 +148,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); - } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); + $value = null; } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRUnsignedInt) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_MIN]))); - } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMin(new FHIRUnsignedInt($data[self::FIELD_MIN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); } } } @@ -343,8 +364,8 @@ public function setPath($path = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -454,25 +475,34 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php index 76c9db7441..b61e1a2a0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBinding.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRElementDefinitionBinding extends FHIRElement const FIELD_VALUE_SET_URI_EXT = '_valueSetUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -170,36 +170,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_STRENGTH])) { - $ext = (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) - ? $data[self::FIELD_STRENGTH_EXT] - : null; - if ($data[self::FIELD_STRENGTH] instanceof FHIRBindingStrength) { - $this->setStrength($data[self::FIELD_STRENGTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $data[self::FIELD_STRENGTH]] + $ext)); - } else if (is_array($data[self::FIELD_STRENGTH])) { - $this->setStrength(new FHIRBindingStrength(array_merge($ext, $data[self::FIELD_STRENGTH]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STRENGTH]) || isset($data[self::FIELD_STRENGTH_EXT])) { + if (isset($data[self::FIELD_STRENGTH])) { + $value = $data[self::FIELD_STRENGTH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STRENGTH_EXT]) && is_array($data[self::FIELD_STRENGTH_EXT])) { + $ext = $data[self::FIELD_STRENGTH_EXT]; } else { - $this->setStrength(new FHIRBindingStrength($data[self::FIELD_STRENGTH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBindingStrength) { + $this->setStrength($value); + } else if (is_array($value)) { + $this->setStrength(new FHIRBindingStrength(array_merge($ext, $value))); + } else { + $this->setStrength(new FHIRBindingStrength([FHIRBindingStrength::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStrength(new FHIRBindingStrength($ext)); } } if (isset($data[self::FIELD_VALUE_SET_REFERENCE])) { @@ -209,20 +223,27 @@ public function __construct($data = null) $this->setValueSetReference(new FHIRReference($data[self::FIELD_VALUE_SET_REFERENCE])); } } - if (isset($data[self::FIELD_VALUE_SET_URI])) { - $ext = (isset($data[self::FIELD_VALUE_SET_URI_EXT]) && is_array($data[self::FIELD_VALUE_SET_URI_EXT])) - ? $data[self::FIELD_VALUE_SET_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_SET_URI] instanceof FHIRUri) { - $this->setValueSetUri($data[self::FIELD_VALUE_SET_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET_URI])) { - $this->setValueSetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_SET_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET_URI])) { - $this->setValueSetUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_SET_URI]))); - } + if (isset($data[self::FIELD_VALUE_SET_URI]) || isset($data[self::FIELD_VALUE_SET_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_SET_URI])) { + $value = $data[self::FIELD_VALUE_SET_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_SET_URI_EXT]) && is_array($data[self::FIELD_VALUE_SET_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_URI_EXT]; } else { - $this->setValueSetUri(new FHIRUri($data[self::FIELD_VALUE_SET_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueSetUri($value); + } else if (is_array($value)) { + $this->setValueSetUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueSetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSetUri(new FHIRUri($ext)); } } } @@ -410,8 +431,8 @@ public function setValueSetUri($valueSetUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -519,15 +540,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getStrength())) { $a[self::FIELD_STRENGTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBindingStrength::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBindingStrength::FIELD_VALUE]); $a[self::FIELD_STRENGTH_EXT] = $enc; } } @@ -536,11 +561,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueSetUri())) { $a[self::FIELD_VALUE_SET_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php index 4818d53282..c9e54621d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -98,7 +98,7 @@ class FHIRElementDefinitionConstraint extends FHIRElement const FIELD_XPATH_EXT = '_xpath'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -207,116 +207,165 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); - } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); - } - } - if (isset($data[self::FIELD_HUMAN])) { - $ext = (isset($data[self::FIELD_HUMAN_EXT]) && is_array($data[self::FIELD_HUMAN_EXT])) - ? $data[self::FIELD_HUMAN_EXT] - : null; - if ($data[self::FIELD_HUMAN] instanceof FHIRString) { - $this->setHuman($data[self::FIELD_HUMAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HUMAN])) { - $this->setHuman(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HUMAN]] + $ext)); - } else if (is_array($data[self::FIELD_HUMAN])) { - $this->setHuman(new FHIRString(array_merge($ext, $data[self::FIELD_HUMAN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_HUMAN]) || isset($data[self::FIELD_HUMAN_EXT])) { + if (isset($data[self::FIELD_HUMAN])) { + $value = $data[self::FIELD_HUMAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HUMAN_EXT]) && is_array($data[self::FIELD_HUMAN_EXT])) { + $ext = $data[self::FIELD_HUMAN_EXT]; } else { - $this->setHuman(new FHIRString($data[self::FIELD_HUMAN])); - } - } - if (isset($data[self::FIELD_KEY])) { - $ext = (isset($data[self::FIELD_KEY_EXT]) && is_array($data[self::FIELD_KEY_EXT])) - ? $data[self::FIELD_KEY_EXT] - : null; - if ($data[self::FIELD_KEY] instanceof FHIRId) { - $this->setKey($data[self::FIELD_KEY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KEY])) { - $this->setKey(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_KEY]] + $ext)); - } else if (is_array($data[self::FIELD_KEY])) { - $this->setKey(new FHIRId(array_merge($ext, $data[self::FIELD_KEY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setHuman($value); + } else if (is_array($value)) { + $this->setHuman(new FHIRString(array_merge($ext, $value))); + } else { + $this->setHuman(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setHuman(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_KEY]) || isset($data[self::FIELD_KEY_EXT])) { + if (isset($data[self::FIELD_KEY])) { + $value = $data[self::FIELD_KEY]; } else { - $this->setKey(new FHIRId($data[self::FIELD_KEY])); - } - } - if (isset($data[self::FIELD_REQUIREMENTS])) { - $ext = (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) - ? $data[self::FIELD_REQUIREMENTS_EXT] - : null; - if ($data[self::FIELD_REQUIREMENTS] instanceof FHIRString) { - $this->setRequirements($data[self::FIELD_REQUIREMENTS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REQUIREMENTS]] + $ext)); - } else if (is_array($data[self::FIELD_REQUIREMENTS])) { - $this->setRequirements(new FHIRString(array_merge($ext, $data[self::FIELD_REQUIREMENTS]))); + $value = null; + } + if (isset($data[self::FIELD_KEY_EXT]) && is_array($data[self::FIELD_KEY_EXT])) { + $ext = $data[self::FIELD_KEY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setKey($value); + } else if (is_array($value)) { + $this->setKey(new FHIRId(array_merge($ext, $value))); + } else { + $this->setKey(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKey(new FHIRId($ext)); + } + } + if (isset($data[self::FIELD_REQUIREMENTS]) || isset($data[self::FIELD_REQUIREMENTS_EXT])) { + if (isset($data[self::FIELD_REQUIREMENTS])) { + $value = $data[self::FIELD_REQUIREMENTS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUIREMENTS_EXT]) && is_array($data[self::FIELD_REQUIREMENTS_EXT])) { + $ext = $data[self::FIELD_REQUIREMENTS_EXT]; } else { - $this->setRequirements(new FHIRString($data[self::FIELD_REQUIREMENTS])); - } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRConstraintSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRConstraintSeverity([FHIRConstraintSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRConstraintSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRequirements($value); + } else if (is_array($value)) { + $this->setRequirements(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRequirements(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRequirements(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; } else { - $this->setSeverity(new FHIRConstraintSeverity($data[self::FIELD_SEVERITY])); - } - } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConstraintSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRConstraintSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRConstraintSeverity([FHIRConstraintSeverity::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRConstraintSeverity($ext)); + } + } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); - } - } - if (isset($data[self::FIELD_XPATH])) { - $ext = (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) - ? $data[self::FIELD_XPATH_EXT] - : null; - if ($data[self::FIELD_XPATH] instanceof FHIRString) { - $this->setXpath($data[self::FIELD_XPATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_XPATH]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString(array_merge($ext, $data[self::FIELD_XPATH]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_XPATH]) || isset($data[self::FIELD_XPATH_EXT])) { + if (isset($data[self::FIELD_XPATH])) { + $value = $data[self::FIELD_XPATH]; } else { - $this->setXpath(new FHIRString($data[self::FIELD_XPATH])); + $value = null; + } + if (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) { + $ext = $data[self::FIELD_XPATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setXpath($value); + } else if (is_array($value)) { + $this->setXpath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setXpath(new FHIRString($ext)); } } } @@ -620,8 +669,8 @@ public function setXpath($xpath = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -779,53 +828,70 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if (null !== ($v = $this->getHuman())) { $a[self::FIELD_HUMAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_HUMAN_EXT] = $enc; } } if (null !== ($v = $this->getKey())) { $a[self::FIELD_KEY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_KEY_EXT] = $enc; } } if (null !== ($v = $this->getRequirements())) { $a[self::FIELD_REQUIREMENTS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REQUIREMENTS_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConstraintSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConstraintSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getXpath())) { $a[self::FIELD_XPATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_XPATH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php index d7e812f196..cc992f4c9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRElementDefinitionDiscriminator extends FHIRElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -132,36 +132,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_PATH])) { - $ext = (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) - ? $data[self::FIELD_PATH_EXT] - : null; - if ($data[self::FIELD_PATH] instanceof FHIRString) { - $this->setPath($data[self::FIELD_PATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PATH]] + $ext)); - } else if (is_array($data[self::FIELD_PATH])) { - $this->setPath(new FHIRString(array_merge($ext, $data[self::FIELD_PATH]))); - } + if (isset($data[self::FIELD_PATH]) || isset($data[self::FIELD_PATH_EXT])) { + if (isset($data[self::FIELD_PATH])) { + $value = $data[self::FIELD_PATH]; } else { - $this->setPath(new FHIRString($data[self::FIELD_PATH])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRDiscriminatorType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDiscriminatorType([FHIRDiscriminatorType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDiscriminatorType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_PATH_EXT]) && is_array($data[self::FIELD_PATH_EXT])) { + $ext = $data[self::FIELD_PATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPath($value); + } else if (is_array($value)) { + $this->setPath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRDiscriminatorType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiscriminatorType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRDiscriminatorType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRDiscriminatorType([FHIRDiscriminatorType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRDiscriminatorType($ext)); } } } @@ -259,8 +273,8 @@ public function setType(FHIRDiscriminatorType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -348,18 +362,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getPath())) { $a[self::FIELD_PATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PATH_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiscriminatorType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiscriminatorType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExample.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExample.php index 332e48f15a..175fa2e439 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExample.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExample.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -174,7 +174,7 @@ class FHIRElementDefinitionExample extends FHIRElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -703,20 +703,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LABEL])) { - $ext = (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) - ? $data[self::FIELD_LABEL_EXT] - : null; - if ($data[self::FIELD_LABEL] instanceof FHIRString) { - $this->setLabel($data[self::FIELD_LABEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LABEL]] + $ext)); - } else if (is_array($data[self::FIELD_LABEL])) { - $this->setLabel(new FHIRString(array_merge($ext, $data[self::FIELD_LABEL]))); - } + if (isset($data[self::FIELD_LABEL]) || isset($data[self::FIELD_LABEL_EXT])) { + if (isset($data[self::FIELD_LABEL])) { + $value = $data[self::FIELD_LABEL]; } else { - $this->setLabel(new FHIRString($data[self::FIELD_LABEL])); + $value = null; + } + if (isset($data[self::FIELD_LABEL_EXT]) && is_array($data[self::FIELD_LABEL_EXT])) { + $ext = $data[self::FIELD_LABEL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLabel($value); + } else if (is_array($value)) { + $this->setLabel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLabel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLabel(new FHIRString($ext)); } } if (isset($data[self::FIELD_VALUE_ADDRESS])) { @@ -747,52 +754,73 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -823,52 +851,73 @@ public function __construct($data = null) $this->setValueCount(new FHIRCount($data[self::FIELD_VALUE_COUNT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -892,20 +941,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -915,52 +971,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -977,20 +1054,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -1000,20 +1084,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1058,36 +1149,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1097,36 +1202,50 @@ public function __construct($data = null) $this->setValueTiming(new FHIRTiming($data[self::FIELD_VALUE_TIMING])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -2614,8 +2733,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -3053,8 +3172,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLabel())) { $a[self::FIELD_LABEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LABEL_EXT] = $enc; } } @@ -3072,22 +3193,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -3105,22 +3232,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -3135,8 +3268,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -3145,22 +3280,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -3172,8 +3313,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -3182,8 +3325,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -3207,15 +3352,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -3224,18 +3373,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php index 55844f9a5c..9df925532f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMapping.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRElementDefinitionMapping extends FHIRElement const FIELD_MAP_EXT = '_map'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -163,68 +163,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_IDENTITY])) { - $ext = (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) - ? $data[self::FIELD_IDENTITY_EXT] - : null; - if ($data[self::FIELD_IDENTITY] instanceof FHIRId) { - $this->setIdentity($data[self::FIELD_IDENTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_IDENTITY]] + $ext)); - } else if (is_array($data[self::FIELD_IDENTITY])) { - $this->setIdentity(new FHIRId(array_merge($ext, $data[self::FIELD_IDENTITY]))); - } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setIdentity(new FHIRId($data[self::FIELD_IDENTITY])); + $ext = []; } - } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_IDENTITY]) || isset($data[self::FIELD_IDENTITY_EXT])) { + if (isset($data[self::FIELD_IDENTITY])) { + $value = $data[self::FIELD_IDENTITY]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $value = null; + } + if (isset($data[self::FIELD_IDENTITY_EXT]) && is_array($data[self::FIELD_IDENTITY_EXT])) { + $ext = $data[self::FIELD_IDENTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setIdentity($value); + } else if (is_array($value)) { + $this->setIdentity(new FHIRId(array_merge($ext, $value))); + } else { + $this->setIdentity(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIdentity(new FHIRId($ext)); } } - if (isset($data[self::FIELD_MAP])) { - $ext = (isset($data[self::FIELD_MAP_EXT]) && is_array($data[self::FIELD_MAP_EXT])) - ? $data[self::FIELD_MAP_EXT] - : null; - if ($data[self::FIELD_MAP] instanceof FHIRString) { - $this->setMap($data[self::FIELD_MAP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAP])) { - $this->setMap(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAP]] + $ext)); - } else if (is_array($data[self::FIELD_MAP])) { - $this->setMap(new FHIRString(array_merge($ext, $data[self::FIELD_MAP]))); + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_MAP]) || isset($data[self::FIELD_MAP_EXT])) { + if (isset($data[self::FIELD_MAP])) { + $value = $data[self::FIELD_MAP]; } else { - $this->setMap(new FHIRString($data[self::FIELD_MAP])); + $value = null; + } + if (isset($data[self::FIELD_MAP_EXT]) && is_array($data[self::FIELD_MAP_EXT])) { + $ext = $data[self::FIELD_MAP_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMap($value); + } else if (is_array($value)) { + $this->setMap(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMap(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMap(new FHIRString($ext)); } } } @@ -414,8 +442,8 @@ public function setMap($map = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -539,32 +567,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getIdentity())) { $a[self::FIELD_IDENTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_IDENTITY_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getMap())) { $a[self::FIELD_MAP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php index 6a3bacd010..1ed8e3fbc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicing.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRElementDefinitionSlicing extends FHIRElement const FIELD_RULES_EXT = '_rules'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -164,20 +164,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_DISCRIMINATOR])) { @@ -198,36 +205,50 @@ public function __construct($data = null) $this->addDiscriminator(new FHIRElementDefinitionDiscriminator($data[self::FIELD_DISCRIMINATOR])); } } - if (isset($data[self::FIELD_ORDERED])) { - $ext = (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) - ? $data[self::FIELD_ORDERED_EXT] - : null; - if ($data[self::FIELD_ORDERED] instanceof FHIRBoolean) { - $this->setOrdered($data[self::FIELD_ORDERED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ORDERED]] + $ext)); - } else if (is_array($data[self::FIELD_ORDERED])) { - $this->setOrdered(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ORDERED]))); - } + if (isset($data[self::FIELD_ORDERED]) || isset($data[self::FIELD_ORDERED_EXT])) { + if (isset($data[self::FIELD_ORDERED])) { + $value = $data[self::FIELD_ORDERED]; } else { - $this->setOrdered(new FHIRBoolean($data[self::FIELD_ORDERED])); + $value = null; } - } - if (isset($data[self::FIELD_RULES])) { - $ext = (isset($data[self::FIELD_RULES_EXT]) && is_array($data[self::FIELD_RULES_EXT])) - ? $data[self::FIELD_RULES_EXT] - : null; - if ($data[self::FIELD_RULES] instanceof FHIRSlicingRules) { - $this->setRules($data[self::FIELD_RULES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RULES])) { - $this->setRules(new FHIRSlicingRules([FHIRSlicingRules::FIELD_VALUE => $data[self::FIELD_RULES]] + $ext)); - } else if (is_array($data[self::FIELD_RULES])) { - $this->setRules(new FHIRSlicingRules(array_merge($ext, $data[self::FIELD_RULES]))); + if (isset($data[self::FIELD_ORDERED_EXT]) && is_array($data[self::FIELD_ORDERED_EXT])) { + $ext = $data[self::FIELD_ORDERED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOrdered($value); + } else if (is_array($value)) { + $this->setOrdered(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOrdered(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOrdered(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_RULES]) || isset($data[self::FIELD_RULES_EXT])) { + if (isset($data[self::FIELD_RULES])) { + $value = $data[self::FIELD_RULES]; } else { - $this->setRules(new FHIRSlicingRules($data[self::FIELD_RULES])); + $value = null; + } + if (isset($data[self::FIELD_RULES_EXT]) && is_array($data[self::FIELD_RULES_EXT])) { + $ext = $data[self::FIELD_RULES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSlicingRules) { + $this->setRules($value); + } else if (is_array($value)) { + $this->setRules(new FHIRSlicingRules(array_merge($ext, $value))); + } else { + $this->setRules(new FHIRSlicingRules([FHIRSlicingRules::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRules(new FHIRSlicingRules($ext)); } } } @@ -435,8 +456,8 @@ public function setRules(FHIRSlicingRules $rules = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -551,28 +572,43 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDiscriminator())) { - $a[self::FIELD_DISCRIMINATOR] = $vs; + $a[self::FIELD_DISCRIMINATOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DISCRIMINATOR][] = $v; + } } if (null !== ($v = $this->getOrdered())) { $a[self::FIELD_ORDERED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ORDERED_EXT] = $enc; } } if (null !== ($v = $this->getRules())) { $a[self::FIELD_RULES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSlicingRules::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSlicingRules::FIELD_VALUE]); $a[self::FIELD_RULES_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php index 3471f5ebee..8330c97ad3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRElementDefinitionType extends FHIRElement const FIELD_VERSIONING_EXT = '_versioning'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * How resource references can be aggregated. @@ -187,97 +187,134 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AGGREGATION])) { - $ext = (isset($data[self::FIELD_AGGREGATION_EXT]) && is_array($data[self::FIELD_AGGREGATION_EXT])) - ? $data[self::FIELD_AGGREGATION_EXT] - : null; - if (is_array($data[self::FIELD_AGGREGATION])) { - foreach($data[self::FIELD_AGGREGATION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRAggregationMode) { - $this->addAggregation($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAggregation(new FHIRAggregationMode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_AGGREGATION]) || isset($data[self::FIELD_AGGREGATION_EXT])) { + if (isset($data[self::FIELD_AGGREGATION])) { + $value = $data[self::FIELD_AGGREGATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AGGREGATION_EXT]) && is_array($data[self::FIELD_AGGREGATION_EXT])) { + $ext = $data[self::FIELD_AGGREGATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAggregationMode) { + $this->addAggregation($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRAggregationMode) { + $this->addAggregation($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAggregation(new FHIRAggregationMode(array_merge($v, $iext))); + } else { + $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAggregation(new FHIRAggregationMode($v)); } + } elseif (is_array($value)) { + $this->addAggregation(new FHIRAggregationMode(array_merge($ext, $value))); + } else { + $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAggregation(new FHIRAggregationMode($iext)); } - } elseif ($data[self::FIELD_AGGREGATION] instanceof FHIRAggregationMode) { - $this->addAggregation($data[self::FIELD_AGGREGATION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_AGGREGATION])) { - $this->addAggregation(new FHIRAggregationMode([FHIRAggregationMode::FIELD_VALUE => $data[self::FIELD_AGGREGATION]] + $ext)); - } else { - $this->addAggregation(new FHIRAggregationMode($data[self::FIELD_AGGREGATION])); } } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRUri) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRUri(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRUri($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRUri) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRUri(array_merge($ext, $data[self::FIELD_PROFILE]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setProfile(new FHIRUri($data[self::FIELD_PROFILE])); + $ext = []; } - } - if (isset($data[self::FIELD_TARGET_PROFILE])) { - $ext = (isset($data[self::FIELD_TARGET_PROFILE_EXT]) && is_array($data[self::FIELD_TARGET_PROFILE_EXT])) - ? $data[self::FIELD_TARGET_PROFILE_EXT] - : null; - if ($data[self::FIELD_TARGET_PROFILE] instanceof FHIRUri) { - $this->setTargetProfile($data[self::FIELD_TARGET_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_PROFILE])) { - $this->setTargetProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_TARGET_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_PROFILE])) { - $this->setTargetProfile(new FHIRUri(array_merge($ext, $data[self::FIELD_TARGET_PROFILE]))); + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; } else { - $this->setTargetProfile(new FHIRUri($data[self::FIELD_TARGET_PROFILE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setProfile(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VERSIONING])) { - $ext = (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) - ? $data[self::FIELD_VERSIONING_EXT] - : null; - if ($data[self::FIELD_VERSIONING] instanceof FHIRReferenceVersionRules) { - $this->setVersioning($data[self::FIELD_VERSIONING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRReferenceVersionRules([FHIRReferenceVersionRules::FIELD_VALUE => $data[self::FIELD_VERSIONING]] + $ext)); - } else if (is_array($data[self::FIELD_VERSIONING])) { - $this->setVersioning(new FHIRReferenceVersionRules(array_merge($ext, $data[self::FIELD_VERSIONING]))); + if (isset($data[self::FIELD_TARGET_PROFILE]) || isset($data[self::FIELD_TARGET_PROFILE_EXT])) { + if (isset($data[self::FIELD_TARGET_PROFILE])) { + $value = $data[self::FIELD_TARGET_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_PROFILE_EXT]) && is_array($data[self::FIELD_TARGET_PROFILE_EXT])) { + $ext = $data[self::FIELD_TARGET_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setTargetProfile($value); + } else if (is_array($value)) { + $this->setTargetProfile(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setTargetProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTargetProfile(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSIONING]) || isset($data[self::FIELD_VERSIONING_EXT])) { + if (isset($data[self::FIELD_VERSIONING])) { + $value = $data[self::FIELD_VERSIONING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSIONING_EXT]) && is_array($data[self::FIELD_VERSIONING_EXT])) { + $ext = $data[self::FIELD_VERSIONING_EXT]; } else { - $this->setVersioning(new FHIRReferenceVersionRules($data[self::FIELD_VERSIONING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRReferenceVersionRules) { + $this->setVersioning($value); + } else if (is_array($value)) { + $this->setVersioning(new FHIRReferenceVersionRules(array_merge($ext, $value))); + } else { + $this->setVersioning(new FHIRReferenceVersionRules([FHIRReferenceVersionRules::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersioning(new FHIRReferenceVersionRules($ext)); } } } @@ -538,8 +575,8 @@ public function setVersioning(FHIRReferenceVersionRules $versioning = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -668,47 +705,66 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAggregation())) { $a[self::FIELD_AGGREGATION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_AGGREGATION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_AGGREGATION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRAggregationMode::FIELD_VALUE]) || array_key_exists(FHIRAggregationMode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_AGGREGATION_EXT][] = null; + unset($enc[FHIRAggregationMode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_AGGREGATION_EXT] = $encs; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getTargetProfile())) { $a[self::FIELD_TARGET_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_TARGET_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getVersioning())) { $a[self::FIELD_VERSIONING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRReferenceVersionRules::FIELD_VALUE, $enc)))) { + unset($enc[FHIRReferenceVersionRules::FIELD_VALUE]); $a[self::FIELD_VERSIONING_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterLocationStatus.php index c92c04cbb5..28f0d8db7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREncounterLocationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_LOCATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIREncounterLocationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterStatus.php index 2daf73f9bf..eaec43d614 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREncounterStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREncounterStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENCOUNTER_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIREncounterStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREndpointStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREndpointStatus.php index 45dc7b12c2..caf5909500 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREndpointStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREndpointStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREndpointStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ENDPOINT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIREndpointStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREpisodeOfCareStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREpisodeOfCareStatus.php index 45052d9617..bc9eb2192e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREpisodeOfCareStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREpisodeOfCareStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREpisodeOfCareStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EPISODE_OF_CARE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIREpisodeOfCareStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventCapabilityMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventCapabilityMode.php index 93c6a849fe..18f23ee714 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventCapabilityMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventCapabilityMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREventCapabilityMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_CAPABILITY_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIREventCapabilityModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventStatus.php index b46245a507..35cb507a78 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREventStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIREventStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventTiming.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventTiming.php index 1cc98e4745..ad4ea59450 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIREventTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIREventTiming extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EVENT_TIMING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIREventTimingList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExplanationOfBenefitStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExplanationOfBenefitStatus.php index bc959f3970..de7bc8efd6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExplanationOfBenefitStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExplanationOfBenefitStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRExplanationOfBenefitStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXPLANATION_OF_BENEFIT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRExplanationOfBenefitStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtension.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtension.php index 68e3c0a9dd..f4ac3bfb0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtension.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtension.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,6 @@ class FHIRExtension extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION; const FIELD_URL = 'url'; - const FIELD_URL_EXT = '_url'; const FIELD_VALUE_ADDRESS = 'valueAddress'; const FIELD_VALUE_AGE = 'valueAge'; const FIELD_VALUE_ANNOTATION = 'valueAnnotation'; @@ -142,7 +141,7 @@ class FHIRExtension extends FHIRElement const FIELD_VALUE_URI_EXT = '_valueUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRUriPrimitive @@ -696,52 +695,73 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { - $ext = (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) - ? $data[self::FIELD_VALUE_BASE_64BINARY_EXT] - : null; - if ($data[self::FIELD_VALUE_BASE_64BINARY] instanceof FHIRBase64Binary) { - $this->setValueBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_VALUE_BASE_64BINARY]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BASE_64BINARY])) { - $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_VALUE_BASE_64BINARY]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY]) || isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + if (isset($data[self::FIELD_VALUE_BASE_64BINARY])) { + $value = $data[self::FIELD_VALUE_BASE_64BINARY]; } else { - $this->setValueBase64Binary(new FHIRBase64Binary($data[self::FIELD_VALUE_BASE_64BINARY])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BASE_64BINARY_EXT]) && is_array($data[self::FIELD_VALUE_BASE_64BINARY_EXT])) { + $ext = $data[self::FIELD_VALUE_BASE_64BINARY_EXT]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setValueBase64Binary($value); + } else if (is_array($value)) { + $this->setValueBase64Binary(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setValueBase64Binary(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBase64Binary(new FHIRBase64Binary($ext)); } } - if (isset($data[self::FIELD_VALUE_CODE])) { - $ext = (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) - ? $data[self::FIELD_VALUE_CODE_EXT] - : null; - if ($data[self::FIELD_VALUE_CODE] instanceof FHIRCode) { - $this->setValueCode($data[self::FIELD_VALUE_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_VALUE_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_CODE])) { - $this->setValueCode(new FHIRCode(array_merge($ext, $data[self::FIELD_VALUE_CODE]))); + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_VALUE_CODE]) || isset($data[self::FIELD_VALUE_CODE_EXT])) { + if (isset($data[self::FIELD_VALUE_CODE])) { + $value = $data[self::FIELD_VALUE_CODE]; } else { - $this->setValueCode(new FHIRCode($data[self::FIELD_VALUE_CODE])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_CODE_EXT]) && is_array($data[self::FIELD_VALUE_CODE_EXT])) { + $ext = $data[self::FIELD_VALUE_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setValueCode($value); + } else if (is_array($value)) { + $this->setValueCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setValueCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueCode(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -772,52 +792,73 @@ public function __construct($data = null) $this->setValueCount(new FHIRCount($data[self::FIELD_VALUE_COUNT])); } } - if (isset($data[self::FIELD_VALUE_DATE])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) - ? $data[self::FIELD_VALUE_DATE_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE] instanceof FHIRDate) { - $this->setValueDate($data[self::FIELD_VALUE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_VALUE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE])) { - $this->setValueDate(new FHIRDate(array_merge($ext, $data[self::FIELD_VALUE_DATE]))); - } + if (isset($data[self::FIELD_VALUE_DATE]) || isset($data[self::FIELD_VALUE_DATE_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE])) { + $value = $data[self::FIELD_VALUE_DATE]; } else { - $this->setValueDate(new FHIRDate($data[self::FIELD_VALUE_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_EXT]) && is_array($data[self::FIELD_VALUE_DATE_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_EXT]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setValueDate($value); + } else if (is_array($value)) { + $this->setValueDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setValueDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDate(new FHIRDate($ext)); } } - if (isset($data[self::FIELD_VALUE_DECIMAL])) { - $ext = (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) - ? $data[self::FIELD_VALUE_DECIMAL_EXT] - : null; - if ($data[self::FIELD_VALUE_DECIMAL] instanceof FHIRDecimal) { - $this->setValueDecimal($data[self::FIELD_VALUE_DECIMAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE_DECIMAL]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DECIMAL])) { - $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE_DECIMAL]))); + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_VALUE_DECIMAL]) || isset($data[self::FIELD_VALUE_DECIMAL_EXT])) { + if (isset($data[self::FIELD_VALUE_DECIMAL])) { + $value = $data[self::FIELD_VALUE_DECIMAL]; } else { - $this->setValueDecimal(new FHIRDecimal($data[self::FIELD_VALUE_DECIMAL])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DECIMAL_EXT]) && is_array($data[self::FIELD_VALUE_DECIMAL_EXT])) { + $ext = $data[self::FIELD_VALUE_DECIMAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValueDecimal($value); + } else if (is_array($value)) { + $this->setValueDecimal(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValueDecimal(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDecimal(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_VALUE_DISTANCE])) { @@ -841,20 +882,27 @@ public function __construct($data = null) $this->setValueHumanName(new FHIRHumanName($data[self::FIELD_VALUE_HUMAN_NAME])); } } - if (isset($data[self::FIELD_VALUE_ID])) { - $ext = (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) - ? $data[self::FIELD_VALUE_ID_EXT] - : null; - if ($data[self::FIELD_VALUE_ID] instanceof FHIRId) { - $this->setValueId($data[self::FIELD_VALUE_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VALUE_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_ID])) { - $this->setValueId(new FHIRId(array_merge($ext, $data[self::FIELD_VALUE_ID]))); - } + if (isset($data[self::FIELD_VALUE_ID]) || isset($data[self::FIELD_VALUE_ID_EXT])) { + if (isset($data[self::FIELD_VALUE_ID])) { + $value = $data[self::FIELD_VALUE_ID]; } else { - $this->setValueId(new FHIRId($data[self::FIELD_VALUE_ID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_ID_EXT]) && is_array($data[self::FIELD_VALUE_ID_EXT])) { + $ext = $data[self::FIELD_VALUE_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setValueId($value); + } else if (is_array($value)) { + $this->setValueId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setValueId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueId(new FHIRId($ext)); } } if (isset($data[self::FIELD_VALUE_IDENTIFIER])) { @@ -864,52 +912,73 @@ public function __construct($data = null) $this->setValueIdentifier(new FHIRIdentifier($data[self::FIELD_VALUE_IDENTIFIER])); } } - if (isset($data[self::FIELD_VALUE_INSTANT])) { - $ext = (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) - ? $data[self::FIELD_VALUE_INSTANT_EXT] - : null; - if ($data[self::FIELD_VALUE_INSTANT] instanceof FHIRInstant) { - $this->setValueInstant($data[self::FIELD_VALUE_INSTANT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_VALUE_INSTANT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INSTANT])) { - $this->setValueInstant(new FHIRInstant(array_merge($ext, $data[self::FIELD_VALUE_INSTANT]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT]) || isset($data[self::FIELD_VALUE_INSTANT_EXT])) { + if (isset($data[self::FIELD_VALUE_INSTANT])) { + $value = $data[self::FIELD_VALUE_INSTANT]; } else { - $this->setValueInstant(new FHIRInstant($data[self::FIELD_VALUE_INSTANT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_INTEGER])) { - $ext = (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) - ? $data[self::FIELD_VALUE_INTEGER_EXT] - : null; - if ($data[self::FIELD_VALUE_INTEGER] instanceof FHIRInteger) { - $this->setValueInteger($data[self::FIELD_VALUE_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_VALUE_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_INTEGER])) { - $this->setValueInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_VALUE_INTEGER]))); - } + if (isset($data[self::FIELD_VALUE_INSTANT_EXT]) && is_array($data[self::FIELD_VALUE_INSTANT_EXT])) { + $ext = $data[self::FIELD_VALUE_INSTANT_EXT]; } else { - $this->setValueInteger(new FHIRInteger($data[self::FIELD_VALUE_INTEGER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setValueInstant($value); + } else if (is_array($value)) { + $this->setValueInstant(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setValueInstant(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueInstant(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_VALUE_MARKDOWN])) { - $ext = (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) - ? $data[self::FIELD_VALUE_MARKDOWN_EXT] - : null; - if ($data[self::FIELD_VALUE_MARKDOWN] instanceof FHIRMarkdown) { - $this->setValueMarkdown($data[self::FIELD_VALUE_MARKDOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_VALUE_MARKDOWN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_MARKDOWN])) { - $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_VALUE_MARKDOWN]))); + if (isset($data[self::FIELD_VALUE_INTEGER]) || isset($data[self::FIELD_VALUE_INTEGER_EXT])) { + if (isset($data[self::FIELD_VALUE_INTEGER])) { + $value = $data[self::FIELD_VALUE_INTEGER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_INTEGER_EXT]) && is_array($data[self::FIELD_VALUE_INTEGER_EXT])) { + $ext = $data[self::FIELD_VALUE_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setValueInteger($value); + } else if (is_array($value)) { + $this->setValueInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setValueInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueInteger(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_VALUE_MARKDOWN]) || isset($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + if (isset($data[self::FIELD_VALUE_MARKDOWN])) { + $value = $data[self::FIELD_VALUE_MARKDOWN]; } else { - $this->setValueMarkdown(new FHIRMarkdown($data[self::FIELD_VALUE_MARKDOWN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_MARKDOWN_EXT]) && is_array($data[self::FIELD_VALUE_MARKDOWN_EXT])) { + $ext = $data[self::FIELD_VALUE_MARKDOWN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setValueMarkdown($value); + } else if (is_array($value)) { + $this->setValueMarkdown(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setValueMarkdown(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueMarkdown(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_VALUE_META])) { @@ -926,20 +995,27 @@ public function __construct($data = null) $this->setValueMoney(new FHIRMoney($data[self::FIELD_VALUE_MONEY])); } } - if (isset($data[self::FIELD_VALUE_OID])) { - $ext = (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) - ? $data[self::FIELD_VALUE_OID_EXT] - : null; - if ($data[self::FIELD_VALUE_OID] instanceof FHIROid) { - $this->setValueOid($data[self::FIELD_VALUE_OID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_VALUE_OID]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_OID])) { - $this->setValueOid(new FHIROid(array_merge($ext, $data[self::FIELD_VALUE_OID]))); - } + if (isset($data[self::FIELD_VALUE_OID]) || isset($data[self::FIELD_VALUE_OID_EXT])) { + if (isset($data[self::FIELD_VALUE_OID])) { + $value = $data[self::FIELD_VALUE_OID]; } else { - $this->setValueOid(new FHIROid($data[self::FIELD_VALUE_OID])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_OID_EXT]) && is_array($data[self::FIELD_VALUE_OID_EXT])) { + $ext = $data[self::FIELD_VALUE_OID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setValueOid($value); + } else if (is_array($value)) { + $this->setValueOid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setValueOid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueOid(new FHIROid($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -949,20 +1025,27 @@ public function __construct($data = null) $this->setValuePeriod(new FHIRPeriod($data[self::FIELD_VALUE_PERIOD])); } } - if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { - $ext = (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) - ? $data[self::FIELD_VALUE_POSITIVE_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_POSITIVE_INT] instanceof FHIRPositiveInt) { - $this->setValuePositiveInt($data[self::FIELD_VALUE_POSITIVE_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_VALUE_POSITIVE_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_POSITIVE_INT])) { - $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_VALUE_POSITIVE_INT]))); - } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT]) || isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_POSITIVE_INT])) { + $value = $data[self::FIELD_VALUE_POSITIVE_INT]; } else { - $this->setValuePositiveInt(new FHIRPositiveInt($data[self::FIELD_VALUE_POSITIVE_INT])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_POSITIVE_INT_EXT]) && is_array($data[self::FIELD_VALUE_POSITIVE_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_POSITIVE_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setValuePositiveInt($value); + } else if (is_array($value)) { + $this->setValuePositiveInt(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setValuePositiveInt(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValuePositiveInt(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_VALUE_QUANTITY])) { @@ -1007,36 +1090,50 @@ public function __construct($data = null) $this->setValueSignature(new FHIRSignature($data[self::FIELD_VALUE_SIGNATURE])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } if (isset($data[self::FIELD_VALUE_TIMING])) { @@ -1046,36 +1143,50 @@ public function __construct($data = null) $this->setValueTiming(new FHIRTiming($data[self::FIELD_VALUE_TIMING])); } } - if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $ext = (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) - ? $data[self::FIELD_VALUE_UNSIGNED_INT_EXT] - : null; - if ($data[self::FIELD_VALUE_UNSIGNED_INT] instanceof FHIRUnsignedInt) { - $this->setValueUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_VALUE_UNSIGNED_INT]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_UNSIGNED_INT])) { - $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_VALUE_UNSIGNED_INT]))); - } + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT]) || isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT])) { + $value = $data[self::FIELD_VALUE_UNSIGNED_INT]; } else { - $this->setValueUnsignedInt(new FHIRUnsignedInt($data[self::FIELD_VALUE_UNSIGNED_INT])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE_URI])) { - $ext = (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) - ? $data[self::FIELD_VALUE_URI_EXT] - : null; - if ($data[self::FIELD_VALUE_URI] instanceof FHIRUri) { - $this->setValueUri($data[self::FIELD_VALUE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_URI])) { - $this->setValueUri(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_URI]))); + if (isset($data[self::FIELD_VALUE_UNSIGNED_INT_EXT]) && is_array($data[self::FIELD_VALUE_UNSIGNED_INT_EXT])) { + $ext = $data[self::FIELD_VALUE_UNSIGNED_INT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setValueUnsignedInt($value); + } else if (is_array($value)) { + $this->setValueUnsignedInt(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setValueUnsignedInt(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueUnsignedInt(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_VALUE_URI]) || isset($data[self::FIELD_VALUE_URI_EXT])) { + if (isset($data[self::FIELD_VALUE_URI])) { + $value = $data[self::FIELD_VALUE_URI]; } else { - $this->setValueUri(new FHIRUri($data[self::FIELD_VALUE_URI])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_URI_EXT]) && is_array($data[self::FIELD_VALUE_URI_EXT])) { + $ext = $data[self::FIELD_VALUE_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueUri($value); + } else if (is_array($value)) { + $this->setValueUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueUri(new FHIRUri($ext)); } } } @@ -2551,8 +2662,8 @@ public function setValueUri($valueUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -3005,22 +3116,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBase64Binary())) { $a[self::FIELD_VALUE_BASE_64BINARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_VALUE_BASE_64BINARY_EXT] = $enc; } } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getValueCode())) { $a[self::FIELD_VALUE_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_VALUE_CODE_EXT] = $enc; } } @@ -3038,22 +3155,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDate())) { $a[self::FIELD_VALUE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getValueDecimal())) { $a[self::FIELD_VALUE_DECIMAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_DECIMAL_EXT] = $enc; } } @@ -3068,8 +3191,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueId())) { $a[self::FIELD_VALUE_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VALUE_ID_EXT] = $enc; } } @@ -3078,22 +3203,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueInstant())) { $a[self::FIELD_VALUE_INSTANT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_VALUE_INSTANT_EXT] = $enc; } } if (null !== ($v = $this->getValueInteger())) { $a[self::FIELD_VALUE_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_VALUE_INTEGER_EXT] = $enc; } } if (null !== ($v = $this->getValueMarkdown())) { $a[self::FIELD_VALUE_MARKDOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_VALUE_MARKDOWN_EXT] = $enc; } } @@ -3105,8 +3236,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueOid())) { $a[self::FIELD_VALUE_OID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_VALUE_OID_EXT] = $enc; } } @@ -3115,8 +3248,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValuePositiveInt())) { $a[self::FIELD_VALUE_POSITIVE_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_VALUE_POSITIVE_INT_EXT] = $enc; } } @@ -3140,15 +3275,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } @@ -3157,18 +3296,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueUnsignedInt())) { $a[self::FIELD_VALUE_UNSIGNED_INT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_VALUE_UNSIGNED_INT_EXT] = $enc; } } if (null !== ($v = $this->getValueUri())) { $a[self::FIELD_VALUE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtensionContext.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtensionContext.php index 33f1424fd9..99b07cf9f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtensionContext.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRExtensionContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRExtensionContext extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_EXTENSION_CONTEXT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRExtensionContextList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRAllTypes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRAllTypes.php index b69e925193..b44c85a37c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRAllTypes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRAllTypes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRFHIRAllTypes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRALL_TYPES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRFHIRAllTypesList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDefinedType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDefinedType.php index 11e9ef46c2..61c0129379 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDefinedType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDefinedType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRFHIRDefinedType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRDEFINED_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRFHIRDefinedTypeList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDeviceStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDeviceStatus.php index bfb67affa8..5920015bb6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDeviceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRDeviceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFHIRDeviceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRDEVICE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRFHIRDeviceStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRSubstanceStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRSubstanceStatus.php index 68a758464b..d60fff99b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRSubstanceStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFHIRSubstanceStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFHIRSubstanceStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FHIRSUBSTANCE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRFHIRSubstanceStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFamilyHistoryStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFamilyHistoryStatus.php index b54acb3888..e98a95a1c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFamilyHistoryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFamilyHistoryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFamilyHistoryStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FAMILY_HISTORY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRFamilyHistoryStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFilterOperator.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFilterOperator.php index 281b82b904..7a89cbcd08 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFilterOperator.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFilterOperator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFilterOperator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FILTER_OPERATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRFilterOperatorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFinancialResourceStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFinancialResourceStatusCodes.php index d13b84b8ee..e03c254b63 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFinancialResourceStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFinancialResourceStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRFinancialResourceStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FINANCIAL_RESOURCE_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRFinancialResourceStatusCodesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFlagStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFlagStatus.php index 1ec7dd3476..c504a04183 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFlagStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRFlagStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRFlagStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_FLAG_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRFlagStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGoalStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGoalStatus.php index aff60eea8a..4e79c3423c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGoalStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGoalStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGoalStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GOAL_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRGoalStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGraphCompartmentRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGraphCompartmentRule.php index 1d351b27eb..d7697abe75 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGraphCompartmentRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGraphCompartmentRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGraphCompartmentRule extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GRAPH_COMPARTMENT_RULE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRGraphCompartmentRuleList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGroupType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGroupType.php index bd53c09711..a1af432bc1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGroupType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGroupType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGroupType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GROUP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRGroupTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidanceResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidanceResponseStatus.php index c8604313b0..ff1b9a5628 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidanceResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidanceResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGuidanceResponseStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRGuidanceResponseStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuideDependencyType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuideDependencyType.php index ccd50aee84..ccea41c2c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuideDependencyType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuideDependencyType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGuideDependencyType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_DEPENDENCY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRGuideDependencyTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidePageKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidePageKind.php index 286ee43c5a..86d51194a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidePageKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRGuidePageKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRGuidePageKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_GUIDE_PAGE_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRGuidePageKindList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHTTPVerb.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHTTPVerb.php index fc9d836459..27e911c9ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHTTPVerb.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHTTPVerb.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRHTTPVerb extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_HTTPVERB; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRHTTPVerbList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHumanName.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHumanName.php index 63508ed08f..b6ca95f70a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHumanName.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRHumanName.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -93,7 +93,7 @@ class FHIRHumanName extends FHIRElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -196,49 +196,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_FAMILY])) { - $ext = (isset($data[self::FIELD_FAMILY_EXT]) && is_array($data[self::FIELD_FAMILY_EXT])) - ? $data[self::FIELD_FAMILY_EXT] - : null; - if ($data[self::FIELD_FAMILY] instanceof FHIRString) { - $this->setFamily($data[self::FIELD_FAMILY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FAMILY])) { - $this->setFamily(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_FAMILY]] + $ext)); - } else if (is_array($data[self::FIELD_FAMILY])) { - $this->setFamily(new FHIRString(array_merge($ext, $data[self::FIELD_FAMILY]))); - } + if (isset($data[self::FIELD_FAMILY]) || isset($data[self::FIELD_FAMILY_EXT])) { + if (isset($data[self::FIELD_FAMILY])) { + $value = $data[self::FIELD_FAMILY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FAMILY_EXT]) && is_array($data[self::FIELD_FAMILY_EXT])) { + $ext = $data[self::FIELD_FAMILY_EXT]; } else { - $this->setFamily(new FHIRString($data[self::FIELD_FAMILY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setFamily($value); + } else if (is_array($value)) { + $this->setFamily(new FHIRString(array_merge($ext, $value))); + } else { + $this->setFamily(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFamily(new FHIRString($ext)); } } - if (isset($data[self::FIELD_GIVEN])) { - $ext = (isset($data[self::FIELD_GIVEN_EXT]) && is_array($data[self::FIELD_GIVEN_EXT])) - ? $data[self::FIELD_GIVEN_EXT] - : null; - if (is_array($data[self::FIELD_GIVEN])) { - foreach($data[self::FIELD_GIVEN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addGiven($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addGiven(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_GIVEN]) || isset($data[self::FIELD_GIVEN_EXT])) { + if (isset($data[self::FIELD_GIVEN])) { + $value = $data[self::FIELD_GIVEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GIVEN_EXT]) && is_array($data[self::FIELD_GIVEN_EXT])) { + $ext = $data[self::FIELD_GIVEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addGiven($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addGiven($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addGiven(new FHIRString(array_merge($v, $iext))); + } else { + $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addGiven(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addGiven(new FHIRString(array_merge($ext, $value))); + } else { + $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addGiven(new FHIRString($iext)); } - } elseif ($data[self::FIELD_GIVEN] instanceof FHIRString) { - $this->addGiven($data[self::FIELD_GIVEN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_GIVEN])) { - $this->addGiven(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_GIVEN]] + $ext)); - } else { - $this->addGiven(new FHIRString($data[self::FIELD_GIVEN])); } } if (isset($data[self::FIELD_PERIOD])) { @@ -248,94 +264,126 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_PREFIX])) { - $ext = (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) - ? $data[self::FIELD_PREFIX_EXT] - : null; - if (is_array($data[self::FIELD_PREFIX])) { - foreach($data[self::FIELD_PREFIX] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addPrefix($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPrefix(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PREFIX]) || isset($data[self::FIELD_PREFIX_EXT])) { + if (isset($data[self::FIELD_PREFIX])) { + $value = $data[self::FIELD_PREFIX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PREFIX_EXT]) && is_array($data[self::FIELD_PREFIX_EXT])) { + $ext = $data[self::FIELD_PREFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addPrefix($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addPrefix($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPrefix(new FHIRString(array_merge($v, $iext))); + } else { + $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPrefix(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addPrefix(new FHIRString(array_merge($ext, $value))); + } else { + $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPrefix(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PREFIX] instanceof FHIRString) { - $this->addPrefix($data[self::FIELD_PREFIX]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PREFIX])) { - $this->addPrefix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PREFIX]] + $ext)); - } else { - $this->addPrefix(new FHIRString($data[self::FIELD_PREFIX])); } } - if (isset($data[self::FIELD_SUFFIX])) { - $ext = (isset($data[self::FIELD_SUFFIX_EXT]) && is_array($data[self::FIELD_SUFFIX_EXT])) - ? $data[self::FIELD_SUFFIX_EXT] - : null; - if (is_array($data[self::FIELD_SUFFIX])) { - foreach($data[self::FIELD_SUFFIX] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addSuffix($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSuffix(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUFFIX]) || isset($data[self::FIELD_SUFFIX_EXT])) { + if (isset($data[self::FIELD_SUFFIX])) { + $value = $data[self::FIELD_SUFFIX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUFFIX_EXT]) && is_array($data[self::FIELD_SUFFIX_EXT])) { + $ext = $data[self::FIELD_SUFFIX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addSuffix($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addSuffix($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSuffix(new FHIRString(array_merge($v, $iext))); + } else { + $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSuffix(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addSuffix(new FHIRString(array_merge($ext, $value))); + } else { + $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_SUFFIX] instanceof FHIRString) { - $this->addSuffix($data[self::FIELD_SUFFIX]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUFFIX])) { - $this->addSuffix(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUFFIX]] + $ext)); - } else { - $this->addSuffix(new FHIRString($data[self::FIELD_SUFFIX])); - } - } - if (isset($data[self::FIELD_TEXT])) { - $ext = (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) - ? $data[self::FIELD_TEXT_EXT] - : null; - if ($data[self::FIELD_TEXT] instanceof FHIRString) { - $this->setText($data[self::FIELD_TEXT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TEXT]] + $ext)); - } else if (is_array($data[self::FIELD_TEXT])) { - $this->setText(new FHIRString(array_merge($ext, $data[self::FIELD_TEXT]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSuffix(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_TEXT]) || isset($data[self::FIELD_TEXT_EXT])) { + if (isset($data[self::FIELD_TEXT])) { + $value = $data[self::FIELD_TEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TEXT_EXT]) && is_array($data[self::FIELD_TEXT_EXT])) { + $ext = $data[self::FIELD_TEXT_EXT]; } else { - $this->setText(new FHIRString($data[self::FIELD_TEXT])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRNameUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRNameUse([FHIRNameUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRNameUse(array_merge($ext, $data[self::FIELD_USE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setText($value); + } else if (is_array($value)) { + $this->setText(new FHIRString(array_merge($ext, $value))); + } else { + $this->setText(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setText(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIRNameUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNameUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRNameUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRNameUse([FHIRNameUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRNameUse($ext)); } } } @@ -699,8 +747,8 @@ public function setUse(FHIRNameUse $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -847,73 +895,106 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getFamily())) { $a[self::FIELD_FAMILY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_FAMILY_EXT] = $enc; } } if ([] !== ($vs = $this->getGiven())) { $a[self::FIELD_GIVEN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_GIVEN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_GIVEN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_GIVEN_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_GIVEN_EXT] = $encs; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPrefix())) { $a[self::FIELD_PREFIX] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PREFIX][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PREFIX_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PREFIX_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PREFIX_EXT] = $encs; + } } if ([] !== ($vs = $this->getSuffix())) { $a[self::FIELD_SUFFIX] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUFFIX][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUFFIX_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUFFIX_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUFFIX_EXT] = $encs; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TEXT_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNameUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNameUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRId.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRId.php index caeef8cf50..50e6111845 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRId.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRId.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,10 +83,9 @@ class FHIRId extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRIdPrimitive @@ -179,8 +178,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -263,6 +262,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifier.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifier.php index 749580ce43..48c2f2b280 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifier.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifier.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRIdentifier extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -196,20 +196,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); - } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -219,36 +226,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRIdentifierUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRIdentifierUse([FHIRIdentifierUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRIdentifierUse(array_merge($ext, $data[self::FIELD_USE]))); - } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; } else { - $this->setUse(new FHIRIdentifierUse($data[self::FIELD_USE])); + $value = null; } - } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRString) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRIdentifierUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRIdentifierUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRIdentifierUse([FHIRIdentifierUse::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUse(new FHIRIdentifierUse($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRString($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRString($ext)); } } } @@ -480,8 +501,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -608,8 +629,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } @@ -618,18 +641,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRIdentifierUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRIdentifierUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifierUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifierUse.php index 8594bb8321..70c3bc0281 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifierUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentifierUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRIdentifierUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTIFIER_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRIdentifierUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentityAssuranceLevel.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentityAssuranceLevel.php index 81d5c74854..fbbc456ffc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentityAssuranceLevel.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIdentityAssuranceLevel.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRIdentityAssuranceLevel extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IDENTITY_ASSURANCE_LEVEL; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRIdentityAssuranceLevelList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRImmunizationStatusCodes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRImmunizationStatusCodes.php index cd07c28ea6..859d7f0ea2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRImmunizationStatusCodes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRImmunizationStatusCodes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRImmunizationStatusCodes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_IMMUNIZATION_STATUS_CODES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRImmunizationStatusCodesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstanceAvailability.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstanceAvailability.php index 5b594732f2..80df322886 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstanceAvailability.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstanceAvailability.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRInstanceAvailability extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANCE_AVAILABILITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRInstanceAvailabilityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstant.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstant.php index b2c4770980..1c8470bfa6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstant.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInstant.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,10 +82,9 @@ class FHIRInstant extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INSTANT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRInstantPrimitive @@ -178,8 +177,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -262,6 +261,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInteger.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInteger.php index 8dcadf7211..8b7ba924ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInteger.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRInteger.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRInteger extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_INTEGER; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRIntegerPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueSeverity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueSeverity.php index 89e3e809a4..149ea71c98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueSeverity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueSeverity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRIssueSeverity extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_SEVERITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRIssueSeverityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueType.php index 31864f53ac..b8cfd4ee22 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRIssueType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRIssueType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_ISSUE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRIssueTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkType.php index d591e1d888..12e36f0bf9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRLinkType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINK_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRLinkTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkageType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkageType.php index b9037617c4..ba753e4fe0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkageType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLinkageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRLinkageType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LINKAGE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRLinkageTypeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListMode.php index 763e9bcb21..cd3ee57a5e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRListMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRListModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListStatus.php index a8170fa2f3..3019f2cccb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRListStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRListStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LIST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRListStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationMode.php index f719c91e60..0106f8707c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRLocationMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRLocationModeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationStatus.php index fa01050a18..220544e4bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRLocationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRLocationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_LOCATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRLocationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMarkdown.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMarkdown.php index 37529f4792..d7560339b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMarkdown.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMarkdown.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,10 +86,9 @@ class FHIRMarkdown extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MARKDOWN; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRMarkdownPrimitive @@ -182,8 +181,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -266,6 +265,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasmntPrinciple.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasmntPrinciple.php index 0e0c79479e..4e5125ef0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasmntPrinciple.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasmntPrinciple.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMeasmntPrinciple extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASMNT_PRINCIPLE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMeasmntPrincipleList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportStatus.php index 6294f93084..e20c730924 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMeasureReportStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMeasureReportStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportType.php index d543d626a8..7a722c4ec6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeasureReportType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMeasureReportType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEASURE_REPORT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMeasureReportTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationAdministrationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationAdministrationStatus.php index 2f2627c519..cee8299646 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationAdministrationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationAdministrationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationAdministrationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_ADMINISTRATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMedicationAdministrationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationDispenseStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationDispenseStatus.php index 687b07c54d..042d2d8815 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationDispenseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationDispenseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationDispenseStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_DISPENSE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMedicationDispenseStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestIntent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestIntent.php index b51a7e52f3..793aedfaf5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationRequestIntent extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_INTENT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMedicationRequestIntentList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestPriority.php index 29d50fec0f..d4e1f9edaf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationRequestPriority extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_PRIORITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMedicationRequestPriorityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestStatus.php index 1d4885bc0d..3781ee759a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRMedicationRequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_REQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMedicationRequestStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementStatus.php index 33f235ff9e..b633250eae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationStatementStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMedicationStatementStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementTaken.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementTaken.php index c830714f02..5eafc33a84 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementTaken.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatementTaken.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRMedicationStatementTaken extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATEMENT_TAKEN; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMedicationStatementTakenList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatus.php index c89200c915..5f8ab84b99 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMedicationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMedicationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MEDICATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMedicationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMessageSignificanceCategory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMessageSignificanceCategory.php index 03b79c4bbb..7356e0a6cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMessageSignificanceCategory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMessageSignificanceCategory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRMessageSignificanceCategory extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MESSAGE_SIGNIFICANCE_CATEGORY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRMessageSignificanceCategoryList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeta.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeta.php index ced75c1baa..cdfcb454eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeta.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRMeta.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -90,7 +90,7 @@ class FHIRMeta extends FHIRElement const FIELD_VERSION_ID_EXT = '_versionId'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An instant in time - known at least to the second @@ -180,49 +180,65 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_LAST_UPDATED])) { - $ext = (isset($data[self::FIELD_LAST_UPDATED_EXT]) && is_array($data[self::FIELD_LAST_UPDATED_EXT])) - ? $data[self::FIELD_LAST_UPDATED_EXT] - : null; - if ($data[self::FIELD_LAST_UPDATED] instanceof FHIRInstant) { - $this->setLastUpdated($data[self::FIELD_LAST_UPDATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_UPDATED])) { - $this->setLastUpdated(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_LAST_UPDATED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_UPDATED])) { - $this->setLastUpdated(new FHIRInstant(array_merge($ext, $data[self::FIELD_LAST_UPDATED]))); - } + if (isset($data[self::FIELD_LAST_UPDATED]) || isset($data[self::FIELD_LAST_UPDATED_EXT])) { + if (isset($data[self::FIELD_LAST_UPDATED])) { + $value = $data[self::FIELD_LAST_UPDATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_UPDATED_EXT]) && is_array($data[self::FIELD_LAST_UPDATED_EXT])) { + $ext = $data[self::FIELD_LAST_UPDATED_EXT]; } else { - $this->setLastUpdated(new FHIRInstant($data[self::FIELD_LAST_UPDATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setLastUpdated($value); + } else if (is_array($value)) { + $this->setLastUpdated(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setLastUpdated(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastUpdated(new FHIRInstant($ext)); } } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if (is_array($data[self::FIELD_PROFILE])) { - foreach($data[self::FIELD_PROFILE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addProfile($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProfile(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addProfile($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addProfile($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProfile(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProfile(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addProfile(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProfile(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_PROFILE] instanceof FHIRUri) { - $this->addProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROFILE])) { - $this->addProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else { - $this->addProfile(new FHIRUri($data[self::FIELD_PROFILE])); } } if (isset($data[self::FIELD_SECURITY])) { @@ -261,20 +277,27 @@ public function __construct($data = null) $this->addTag(new FHIRCoding($data[self::FIELD_TAG])); } } - if (isset($data[self::FIELD_VERSION_ID])) { - $ext = (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) - ? $data[self::FIELD_VERSION_ID_EXT] - : null; - if ($data[self::FIELD_VERSION_ID] instanceof FHIRId) { - $this->setVersionId($data[self::FIELD_VERSION_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_VERSION_ID]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION_ID])) { - $this->setVersionId(new FHIRId(array_merge($ext, $data[self::FIELD_VERSION_ID]))); - } + if (isset($data[self::FIELD_VERSION_ID]) || isset($data[self::FIELD_VERSION_ID_EXT])) { + if (isset($data[self::FIELD_VERSION_ID])) { + $value = $data[self::FIELD_VERSION_ID]; } else { - $this->setVersionId(new FHIRId($data[self::FIELD_VERSION_ID])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_ID_EXT]) && is_array($data[self::FIELD_VERSION_ID_EXT])) { + $ext = $data[self::FIELD_VERSION_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setVersionId($value); + } else if (is_array($value)) { + $this->setVersionId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setVersionId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersionId(new FHIRId($ext)); } } } @@ -583,8 +606,8 @@ public function setVersionId($versionId = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -719,39 +742,66 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getLastUpdated())) { $a[self::FIELD_LAST_UPDATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_LAST_UPDATED_EXT] = $enc; } } if ([] !== ($vs = $this->getProfile())) { $a[self::FIELD_PROFILE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROFILE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROFILE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROFILE_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROFILE_EXT] = $encs; + } } if ([] !== ($vs = $this->getSecurity())) { - $a[self::FIELD_SECURITY] = $vs; + $a[self::FIELD_SECURITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY][] = $v; + } } if ([] !== ($vs = $this->getTag())) { - $a[self::FIELD_TAG] = $vs; + $a[self::FIELD_TAG] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TAG][] = $v; + } } if (null !== ($v = $this->getVersionId())) { $a[self::FIELD_VERSION_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_VERSION_ID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNameUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNameUse.php index b61571d0bd..24c6322d42 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNameUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNameUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNameUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAME_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRNameUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemIdentifierType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemIdentifierType.php index 1ba70773ca..50da55c493 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemIdentifierType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemIdentifierType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNamingSystemIdentifierType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_IDENTIFIER_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRNamingSystemIdentifierTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemType.php index 5c2c045d3e..15b1d82c1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNamingSystemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNamingSystemType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NAMING_SYSTEM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRNamingSystemTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrative.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrative.php index befd88f92c..fcca3dda87 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrative.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrative.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,12 +80,11 @@ class FHIRNarrative extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE; const FIELD_DIV = 'div'; - const FIELD_DIV_EXT = '_div'; const FIELD_STATUS = 'status'; const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The actual narrative content, a stripped down version of XHTML. @@ -131,20 +130,27 @@ public function __construct($data = null) if (isset($data[self::FIELD_DIV])) { $this->setDiv($data[self::FIELD_DIV]); } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRNarrativeStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNarrativeStatus([FHIRNarrativeStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNarrativeStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRNarrativeStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNarrativeStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRNarrativeStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRNarrativeStatus([FHIRNarrativeStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRNarrativeStatus($ext)); } } } @@ -236,8 +242,8 @@ public function setStatus(FHIRNarrativeStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -328,11 +334,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNarrativeStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNarrativeStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrativeStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrativeStatus.php index d39c81e969..9b98d97e13 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrativeStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNarrativeStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRNarrativeStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NARRATIVE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRNarrativeStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNoteType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNoteType.php index 90f597b3ce..58f7daacc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNoteType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNoteType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRNoteType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NOTE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRNoteTypeList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNutritionOrderStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNutritionOrderStatus.php index 5272a614a7..5a632cb218 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNutritionOrderStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRNutritionOrderStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRNutritionOrderStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_NUTRITION_ORDER_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRNutritionOrderStatusList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationRelationshipType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationRelationshipType.php index db5526db7d..69f0ee3369 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationRelationshipType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationRelationshipType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRObservationRelationshipType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_RELATIONSHIP_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRObservationRelationshipTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationStatus.php index 2b71be0dd3..cad0b82286 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRObservationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRObservationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OBSERVATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRObservationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROid.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROid.php index 446234f614..76fcc6d1c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROid.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIROid extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIROidPrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationKind.php index 3371afadbc..baf12c3b9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIROperationKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIROperationKindList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationParameterUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationParameterUse.php index b1addbb81e..abe19795ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationParameterUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIROperationParameterUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIROperationParameterUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_OPERATION_PARAMETER_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIROperationParameterUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParameterDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParameterDefinition.php index 99eb3a7ec2..5ffbb3a00b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParameterDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParameterDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRParameterDefinition extends FHIRElement const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -204,68 +204,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DOCUMENTATION])) { - $ext = (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) - ? $data[self::FIELD_DOCUMENTATION_EXT] - : null; - if ($data[self::FIELD_DOCUMENTATION] instanceof FHIRString) { - $this->setDocumentation($data[self::FIELD_DOCUMENTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DOCUMENTATION]] + $ext)); - } else if (is_array($data[self::FIELD_DOCUMENTATION])) { - $this->setDocumentation(new FHIRString(array_merge($ext, $data[self::FIELD_DOCUMENTATION]))); - } + if (isset($data[self::FIELD_DOCUMENTATION]) || isset($data[self::FIELD_DOCUMENTATION_EXT])) { + if (isset($data[self::FIELD_DOCUMENTATION])) { + $value = $data[self::FIELD_DOCUMENTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOCUMENTATION_EXT]) && is_array($data[self::FIELD_DOCUMENTATION_EXT])) { + $ext = $data[self::FIELD_DOCUMENTATION_EXT]; } else { - $this->setDocumentation(new FHIRString($data[self::FIELD_DOCUMENTATION])); - } - } - if (isset($data[self::FIELD_MAX])) { - $ext = (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) - ? $data[self::FIELD_MAX_EXT] - : null; - if ($data[self::FIELD_MAX] instanceof FHIRString) { - $this->setMax($data[self::FIELD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_MAX])) { - $this->setMax(new FHIRString(array_merge($ext, $data[self::FIELD_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDocumentation($value); + } else if (is_array($value)) { + $this->setDocumentation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDocumentation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDocumentation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MAX]) || isset($data[self::FIELD_MAX_EXT])) { + if (isset($data[self::FIELD_MAX])) { + $value = $data[self::FIELD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MAX_EXT]) && is_array($data[self::FIELD_MAX_EXT])) { + $ext = $data[self::FIELD_MAX_EXT]; } else { - $this->setMax(new FHIRString($data[self::FIELD_MAX])); - } - } - if (isset($data[self::FIELD_MIN])) { - $ext = (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) - ? $data[self::FIELD_MIN_EXT] - : null; - if ($data[self::FIELD_MIN] instanceof FHIRInteger) { - $this->setMin($data[self::FIELD_MIN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MIN]] + $ext)); - } else if (is_array($data[self::FIELD_MIN])) { - $this->setMin(new FHIRInteger(array_merge($ext, $data[self::FIELD_MIN]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMax($value); + } else if (is_array($value)) { + $this->setMax(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMax(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMax(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MIN]) || isset($data[self::FIELD_MIN_EXT])) { + if (isset($data[self::FIELD_MIN])) { + $value = $data[self::FIELD_MIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MIN_EXT]) && is_array($data[self::FIELD_MIN_EXT])) { + $ext = $data[self::FIELD_MIN_EXT]; } else { - $this->setMin(new FHIRInteger($data[self::FIELD_MIN])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRCode) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRCode(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMin($value); + } else if (is_array($value)) { + $this->setMin(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMin(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMin(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRCode($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setName(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRCode($ext)); } } if (isset($data[self::FIELD_PROFILE])) { @@ -275,36 +303,50 @@ public function __construct($data = null) $this->setProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRCode) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRCode(array_merge($ext, $data[self::FIELD_USE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIRCode($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRCode($ext)); } } } @@ -608,8 +650,8 @@ public function setUse($use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -767,29 +809,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDocumentation())) { $a[self::FIELD_DOCUMENTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DOCUMENTATION_EXT] = $enc; } } if (null !== ($v = $this->getMax())) { $a[self::FIELD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getMin())) { $a[self::FIELD_MIN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MIN_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -798,18 +848,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipantRequired.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipantRequired.php index f267ada833..f7634c2fd2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipantRequired.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipantRequired.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRParticipantRequired extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPANT_REQUIRED; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRParticipantRequiredList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipationStatus.php index 86208421d6..e1b58fa2b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRParticipationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRParticipationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PARTICIPATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRParticipationStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPeriod.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPeriod.php index f41b12b9b5..1621a73ca1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPeriod.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPeriod.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRPeriod extends FHIRElement const FIELD_START_EXT = '_start'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -138,36 +138,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRDateTime) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRDateTime(array_merge($ext, $data[self::FIELD_END]))); - } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRDateTime($data[self::FIELD_END])); + $value = null; } - } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRDateTime) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRDateTime(array_merge($ext, $data[self::FIELD_START]))); + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRDateTime($data[self::FIELD_START])); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRDateTime($ext)); } } } @@ -289,8 +303,8 @@ public function setStart($start = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -386,18 +400,25 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPositiveInt.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPositiveInt.php index 9fbff55c69..ae19f5fd7b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPositiveInt.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPositiveInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRPositiveInt extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_POSITIVE_INT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRPositiveIntPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyRepresentation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyRepresentation.php index 1cc1dfdb4e..7bbc76b28c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyRepresentation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyRepresentation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRPropertyRepresentation extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_REPRESENTATION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRPropertyRepresentationList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyType.php index 624d1e5e37..2f51b5d413 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPropertyType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRPropertyType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROPERTY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRPropertyTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRProvenanceEntityRole.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRProvenanceEntityRole.php index 013c8ec6a3..8f7f82d978 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRProvenanceEntityRole.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRProvenanceEntityRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRProvenanceEntityRole extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PROVENANCE_ENTITY_ROLE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRProvenanceEntityRoleList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPublicationStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPublicationStatus.php index 9a5274efb9..a5ac6e4c2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPublicationStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRPublicationStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRPublicationStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_PUBLICATION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRPublicationStatusList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQualityType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQualityType.php index ea6539c089..d4fdbdc20f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQualityType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQualityType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQualityType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUALITY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRQualityTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity.php index 89e6e6caed..95b4a0442e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRQuantity extends FHIRElement const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A string which has at least one character and no leading or trailing whitespace @@ -175,84 +175,119 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; } - } - if (isset($data[self::FIELD_COMPARATOR])) { - $ext = (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) - ? $data[self::FIELD_COMPARATOR_EXT] - : null; - if ($data[self::FIELD_COMPARATOR] instanceof FHIRQuantityComparator) { - $this->setComparator($data[self::FIELD_COMPARATOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPARATOR])) { - $this->setComparator(new FHIRQuantityComparator([FHIRQuantityComparator::FIELD_VALUE => $data[self::FIELD_COMPARATOR]] + $ext)); - } else if (is_array($data[self::FIELD_COMPARATOR])) { - $this->setComparator(new FHIRQuantityComparator(array_merge($ext, $data[self::FIELD_COMPARATOR]))); - } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setComparator(new FHIRQuantityComparator($data[self::FIELD_COMPARATOR])); + $ext = []; } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRUri) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRUri(array_merge($ext, $data[self::FIELD_SYSTEM]))); + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setSystem(new FHIRUri($data[self::FIELD_SYSTEM])); + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_UNIT])) { - $ext = (isset($data[self::FIELD_UNIT_EXT]) && is_array($data[self::FIELD_UNIT_EXT])) - ? $data[self::FIELD_UNIT_EXT] - : null; - if ($data[self::FIELD_UNIT] instanceof FHIRString) { - $this->setUnit($data[self::FIELD_UNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UNIT])) { - $this->setUnit(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_UNIT]] + $ext)); - } else if (is_array($data[self::FIELD_UNIT])) { - $this->setUnit(new FHIRString(array_merge($ext, $data[self::FIELD_UNIT]))); + if (isset($data[self::FIELD_COMPARATOR]) || isset($data[self::FIELD_COMPARATOR_EXT])) { + if (isset($data[self::FIELD_COMPARATOR])) { + $value = $data[self::FIELD_COMPARATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) { + $ext = $data[self::FIELD_COMPARATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuantityComparator) { + $this->setComparator($value); + } else if (is_array($value)) { + $this->setComparator(new FHIRQuantityComparator(array_merge($ext, $value))); + } else { + $this->setComparator(new FHIRQuantityComparator([FHIRQuantityComparator::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComparator(new FHIRQuantityComparator($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; } else { - $this->setUnit(new FHIRString($data[self::FIELD_UNIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSystem(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VALUE])) { - $ext = (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) - ? $data[self::FIELD_VALUE_EXT] - : null; - if ($data[self::FIELD_VALUE] instanceof FHIRDecimal) { - $this->setValue($data[self::FIELD_VALUE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_VALUE]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE])) { - $this->setValue(new FHIRDecimal(array_merge($ext, $data[self::FIELD_VALUE]))); + if (isset($data[self::FIELD_UNIT]) || isset($data[self::FIELD_UNIT_EXT])) { + if (isset($data[self::FIELD_UNIT])) { + $value = $data[self::FIELD_UNIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UNIT_EXT]) && is_array($data[self::FIELD_UNIT_EXT])) { + $ext = $data[self::FIELD_UNIT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUnit($value); + } else if (is_array($value)) { + $this->setUnit(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUnit(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUnit(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE]) || isset($data[self::FIELD_VALUE_EXT])) { + if (isset($data[self::FIELD_VALUE])) { + $value = $data[self::FIELD_VALUE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_EXT]) && is_array($data[self::FIELD_VALUE_EXT])) { + $ext = $data[self::FIELD_VALUE_EXT]; } else { - $this->setValue(new FHIRDecimal($data[self::FIELD_VALUE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setValue($value); + } else if (is_array($value)) { + $this->setValue(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setValue(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValue(new FHIRDecimal($ext)); } } } @@ -472,8 +507,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -604,39 +639,52 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getComparator())) { $a[self::FIELD_COMPARATOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuantityComparator::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuantityComparator::FIELD_VALUE]); $a[self::FIELD_COMPARATOR_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_UNIT_EXT] = $enc; } } if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_VALUE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRAge.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRAge.php index d082f7f6a6..9b53733159 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRAge.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRAge.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRAge extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_AGE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Age @@ -131,8 +131,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRCount.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRCount.php index afc23c0c16..bffd02474d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRCount.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRCount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRCount extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_COUNT; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Count @@ -133,8 +133,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDistance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDistance.php index 337d5d64e4..1b407b6c59 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDistance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDistance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRDistance extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DISTANCE; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Distance @@ -131,8 +131,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDuration.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDuration.php index 8d3488e888..06d8c4c6a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDuration.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRDuration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRDuration extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DURATION; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Duration @@ -131,8 +131,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRMoney.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRMoney.php index 85282bc043..ee2b3cf7ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRMoney.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantity/FHIRMoney.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,7 +80,7 @@ class FHIRMoney extends FHIRQuantity const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_MONEY; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Validation map for fields in type Money @@ -131,8 +131,8 @@ public function _getFHIRXMLElementDefinition() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantityComparator.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantityComparator.php index c6c270d8c0..31993da0fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantityComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuantityComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQuantityComparator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUANTITY_COMPARATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRQuantityComparatorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireItemType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireItemType.php index c24f8e0ead..aec3727912 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireItemType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireItemType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRQuestionnaireItemType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_ITEM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRQuestionnaireItemTypeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireResponseStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireResponseStatus.php index 873726516d..9c45bdbc7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireResponseStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRQuestionnaireResponseStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRQuestionnaireResponseStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_QUESTIONNAIRE_RESPONSE_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRQuestionnaireResponseStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRange.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRange.php index ae3df52fde..f85040e07f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRange.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRange.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -82,7 +82,7 @@ class FHIRRange extends FHIRElement const FIELD_LOW = 'low'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -241,8 +241,8 @@ public function setLow(FHIRQuantity $low = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -326,6 +326,9 @@ public function jsonSerialize() if (null !== ($v = $this->getLow())) { $a[self::FIELD_LOW] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRatio.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRatio.php index 2c12ef189d..05c1d8b710 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRatio.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRatio.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIRRatio extends FHIRElement const FIELD_NUMERATOR = 'numerator'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A measured amount (or an amount that can potentially be measured). Note that @@ -242,8 +242,8 @@ public function setNumerator(FHIRQuantity $numerator = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -327,6 +327,9 @@ public function jsonSerialize() if (null !== ($v = $this->getNumerator())) { $a[self::FIELD_NUMERATOR] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReference.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReference.php index 3bf22bc9f9..6d78b4545c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReference.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -85,7 +85,7 @@ class FHIRReference extends FHIRElement const FIELD_REFERENCE_EXT = '_reference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -155,20 +155,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); - } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -178,20 +185,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRString) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE]))); - } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRString($data[self::FIELD_REFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRString($ext)); } } } @@ -353,8 +367,8 @@ public function setReference($reference = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -456,8 +470,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } @@ -466,11 +482,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceHandlingPolicy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceHandlingPolicy.php index 25c6ca3be5..d87ea2d585 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceHandlingPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceHandlingPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRReferenceHandlingPolicy extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERENCE_HANDLING_POLICY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRReferenceHandlingPolicyList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceVersionRules.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceVersionRules.php index 18a97810da..60f9640a12 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceVersionRules.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRReferenceVersionRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRReferenceVersionRules extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REFERENCE_VERSION_RULES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRReferenceVersionRulesList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifact.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifact.php index a90b51bea2..dd64b213a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifact.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifact.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRRelatedArtifact extends FHIRElement const FIELD_URL_EXT = '_url'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -184,36 +184,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CITATION])) { - $ext = (isset($data[self::FIELD_CITATION_EXT]) && is_array($data[self::FIELD_CITATION_EXT])) - ? $data[self::FIELD_CITATION_EXT] - : null; - if ($data[self::FIELD_CITATION] instanceof FHIRString) { - $this->setCitation($data[self::FIELD_CITATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CITATION])) { - $this->setCitation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CITATION]] + $ext)); - } else if (is_array($data[self::FIELD_CITATION])) { - $this->setCitation(new FHIRString(array_merge($ext, $data[self::FIELD_CITATION]))); - } + if (isset($data[self::FIELD_CITATION]) || isset($data[self::FIELD_CITATION_EXT])) { + if (isset($data[self::FIELD_CITATION])) { + $value = $data[self::FIELD_CITATION]; } else { - $this->setCitation(new FHIRString($data[self::FIELD_CITATION])); + $value = null; } - } - if (isset($data[self::FIELD_DISPLAY])) { - $ext = (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) - ? $data[self::FIELD_DISPLAY_EXT] - : null; - if ($data[self::FIELD_DISPLAY] instanceof FHIRString) { - $this->setDisplay($data[self::FIELD_DISPLAY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPLAY]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY])) { - $this->setDisplay(new FHIRString(array_merge($ext, $data[self::FIELD_DISPLAY]))); + if (isset($data[self::FIELD_CITATION_EXT]) && is_array($data[self::FIELD_CITATION_EXT])) { + $ext = $data[self::FIELD_CITATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCitation($value); + } else if (is_array($value)) { + $this->setCitation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCitation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCitation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DISPLAY]) || isset($data[self::FIELD_DISPLAY_EXT])) { + if (isset($data[self::FIELD_DISPLAY])) { + $value = $data[self::FIELD_DISPLAY]; } else { - $this->setDisplay(new FHIRString($data[self::FIELD_DISPLAY])); + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_EXT]) && is_array($data[self::FIELD_DISPLAY_EXT])) { + $ext = $data[self::FIELD_DISPLAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisplay($value); + } else if (is_array($value)) { + $this->setDisplay(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisplay(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisplay(new FHIRString($ext)); } } if (isset($data[self::FIELD_DOCUMENT])) { @@ -230,36 +244,50 @@ public function __construct($data = null) $this->setResource(new FHIRReference($data[self::FIELD_RESOURCE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRRelatedArtifactType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRRelatedArtifactType([FHIRRelatedArtifactType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRRelatedArtifactType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRRelatedArtifactType($data[self::FIELD_TYPE])); + $value = null; } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRelatedArtifactType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRRelatedArtifactType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRRelatedArtifactType([FHIRRelatedArtifactType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRRelatedArtifactType($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } } @@ -499,8 +527,8 @@ public function setUrl($url = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -628,15 +656,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCitation())) { $a[self::FIELD_CITATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CITATION_EXT] = $enc; } } if (null !== ($v = $this->getDisplay())) { $a[self::FIELD_DISPLAY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPLAY_EXT] = $enc; } } @@ -648,18 +680,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRelatedArtifactType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRelatedArtifactType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifactType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifactType.php index 05453f5698..c4c55f0137 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifactType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRelatedArtifactType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRelatedArtifactType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RELATED_ARTIFACT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRRelatedArtifactTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRemittanceOutcome.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRemittanceOutcome.php index 6668f6e4ef..5975462c0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRemittanceOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRemittanceOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRRemittanceOutcome extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REMITTANCE_OUTCOME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRRemittanceOutcomeList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRepositoryType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRepositoryType.php index 1b96534aae..46077f3bbf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRepositoryType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRepositoryType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRepositoryType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REPOSITORY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRRepositoryTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestIntent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestIntent.php index 50d20238d5..33d403460b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestIntent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestIntent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRequestIntent extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_INTENT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRRequestIntentList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestPriority.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestPriority.php index 23c51a51f3..039aab148d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestPriority.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestPriority.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRequestPriority extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_PRIORITY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRRequestPriorityList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestStatus.php index 771352c007..5330811915 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_REQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRRequestStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchStudyStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchStudyStatus.php index 8dd23c5355..a615590e35 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchStudyStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchStudyStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResearchStudyStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_STUDY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRResearchStudyStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchSubjectStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchSubjectStatus.php index 738de4a197..2ffd928ed5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchSubjectStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResearchSubjectStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResearchSubjectStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESEARCH_SUBJECT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRResearchSubjectStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceType.php index d961b42d08..1b91bdc276 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResourceType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRResourceTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceVersionPolicy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceVersionPolicy.php index a1ee655aa0..2b4eb79ece 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceVersionPolicy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResourceVersionPolicy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResourceVersionPolicy extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESOURCE_VERSION_POLICY; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRResourceVersionPolicyList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResponseType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResponseType.php index 0a5ebfcfd3..d159c45758 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResponseType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRResponseType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRResponseType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESPONSE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRResponseTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRestfulCapabilityMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRestfulCapabilityMode.php index 405c75bc5e..482b48dba8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRestfulCapabilityMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRRestfulCapabilityMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRRestfulCapabilityMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_RESTFUL_CAPABILITY_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRRestfulCapabilityModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledData.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledData.php index f680cad06e..b4de1b88e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledData.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledData.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRSampledData extends FHIRElement const FIELD_UPPER_LIMIT_EXT = '_upperLimit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A series of data points which are decimal values separated by a single space @@ -205,68 +205,96 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATA])) { - $ext = (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) - ? $data[self::FIELD_DATA_EXT] - : null; - if ($data[self::FIELD_DATA] instanceof FHIRSampledDataDataType) { - $this->setData($data[self::FIELD_DATA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATA])) { - $this->setData(new FHIRSampledDataDataType([FHIRSampledDataDataType::FIELD_VALUE => $data[self::FIELD_DATA]] + $ext)); - } else if (is_array($data[self::FIELD_DATA])) { - $this->setData(new FHIRSampledDataDataType(array_merge($ext, $data[self::FIELD_DATA]))); - } + if (isset($data[self::FIELD_DATA]) || isset($data[self::FIELD_DATA_EXT])) { + if (isset($data[self::FIELD_DATA])) { + $value = $data[self::FIELD_DATA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATA_EXT]) && is_array($data[self::FIELD_DATA_EXT])) { + $ext = $data[self::FIELD_DATA_EXT]; } else { - $this->setData(new FHIRSampledDataDataType($data[self::FIELD_DATA])); - } - } - if (isset($data[self::FIELD_DIMENSIONS])) { - $ext = (isset($data[self::FIELD_DIMENSIONS_EXT]) && is_array($data[self::FIELD_DIMENSIONS_EXT])) - ? $data[self::FIELD_DIMENSIONS_EXT] - : null; - if ($data[self::FIELD_DIMENSIONS] instanceof FHIRPositiveInt) { - $this->setDimensions($data[self::FIELD_DIMENSIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DIMENSIONS])) { - $this->setDimensions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_DIMENSIONS]] + $ext)); - } else if (is_array($data[self::FIELD_DIMENSIONS])) { - $this->setDimensions(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_DIMENSIONS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSampledDataDataType) { + $this->setData($value); + } else if (is_array($value)) { + $this->setData(new FHIRSampledDataDataType(array_merge($ext, $value))); + } else { + $this->setData(new FHIRSampledDataDataType([FHIRSampledDataDataType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setData(new FHIRSampledDataDataType($ext)); + } + } + if (isset($data[self::FIELD_DIMENSIONS]) || isset($data[self::FIELD_DIMENSIONS_EXT])) { + if (isset($data[self::FIELD_DIMENSIONS])) { + $value = $data[self::FIELD_DIMENSIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DIMENSIONS_EXT]) && is_array($data[self::FIELD_DIMENSIONS_EXT])) { + $ext = $data[self::FIELD_DIMENSIONS_EXT]; } else { - $this->setDimensions(new FHIRPositiveInt($data[self::FIELD_DIMENSIONS])); - } - } - if (isset($data[self::FIELD_FACTOR])) { - $ext = (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) - ? $data[self::FIELD_FACTOR_EXT] - : null; - if ($data[self::FIELD_FACTOR] instanceof FHIRDecimal) { - $this->setFactor($data[self::FIELD_FACTOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR])) { - $this->setFactor(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setDimensions($value); + } else if (is_array($value)) { + $this->setDimensions(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setDimensions(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDimensions(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_FACTOR]) || isset($data[self::FIELD_FACTOR_EXT])) { + if (isset($data[self::FIELD_FACTOR])) { + $value = $data[self::FIELD_FACTOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_EXT]) && is_array($data[self::FIELD_FACTOR_EXT])) { + $ext = $data[self::FIELD_FACTOR_EXT]; } else { - $this->setFactor(new FHIRDecimal($data[self::FIELD_FACTOR])); - } - } - if (isset($data[self::FIELD_LOWER_LIMIT])) { - $ext = (isset($data[self::FIELD_LOWER_LIMIT_EXT]) && is_array($data[self::FIELD_LOWER_LIMIT_EXT])) - ? $data[self::FIELD_LOWER_LIMIT_EXT] - : null; - if ($data[self::FIELD_LOWER_LIMIT] instanceof FHIRDecimal) { - $this->setLowerLimit($data[self::FIELD_LOWER_LIMIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOWER_LIMIT])) { - $this->setLowerLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_LOWER_LIMIT]] + $ext)); - } else if (is_array($data[self::FIELD_LOWER_LIMIT])) { - $this->setLowerLimit(new FHIRDecimal(array_merge($ext, $data[self::FIELD_LOWER_LIMIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactor($value); + } else if (is_array($value)) { + $this->setFactor(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactor(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFactor(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_LOWER_LIMIT]) || isset($data[self::FIELD_LOWER_LIMIT_EXT])) { + if (isset($data[self::FIELD_LOWER_LIMIT])) { + $value = $data[self::FIELD_LOWER_LIMIT]; } else { - $this->setLowerLimit(new FHIRDecimal($data[self::FIELD_LOWER_LIMIT])); + $value = null; + } + if (isset($data[self::FIELD_LOWER_LIMIT_EXT]) && is_array($data[self::FIELD_LOWER_LIMIT_EXT])) { + $ext = $data[self::FIELD_LOWER_LIMIT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setLowerLimit($value); + } else if (is_array($value)) { + $this->setLowerLimit(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setLowerLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLowerLimit(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_ORIGIN])) { @@ -276,36 +304,50 @@ public function __construct($data = null) $this->setOrigin(new FHIRQuantity($data[self::FIELD_ORIGIN])); } } - if (isset($data[self::FIELD_PERIOD])) { - $ext = (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) - ? $data[self::FIELD_PERIOD_EXT] - : null; - if ($data[self::FIELD_PERIOD] instanceof FHIRDecimal) { - $this->setPeriod($data[self::FIELD_PERIOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD]))); - } + if (isset($data[self::FIELD_PERIOD]) || isset($data[self::FIELD_PERIOD_EXT])) { + if (isset($data[self::FIELD_PERIOD])) { + $value = $data[self::FIELD_PERIOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) { + $ext = $data[self::FIELD_PERIOD_EXT]; } else { - $this->setPeriod(new FHIRDecimal($data[self::FIELD_PERIOD])); - } - } - if (isset($data[self::FIELD_UPPER_LIMIT])) { - $ext = (isset($data[self::FIELD_UPPER_LIMIT_EXT]) && is_array($data[self::FIELD_UPPER_LIMIT_EXT])) - ? $data[self::FIELD_UPPER_LIMIT_EXT] - : null; - if ($data[self::FIELD_UPPER_LIMIT] instanceof FHIRDecimal) { - $this->setUpperLimit($data[self::FIELD_UPPER_LIMIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UPPER_LIMIT])) { - $this->setUpperLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_UPPER_LIMIT]] + $ext)); - } else if (is_array($data[self::FIELD_UPPER_LIMIT])) { - $this->setUpperLimit(new FHIRDecimal(array_merge($ext, $data[self::FIELD_UPPER_LIMIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriod($value); + } else if (is_array($value)) { + $this->setPeriod(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriod(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_UPPER_LIMIT]) || isset($data[self::FIELD_UPPER_LIMIT_EXT])) { + if (isset($data[self::FIELD_UPPER_LIMIT])) { + $value = $data[self::FIELD_UPPER_LIMIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UPPER_LIMIT_EXT]) && is_array($data[self::FIELD_UPPER_LIMIT_EXT])) { + $ext = $data[self::FIELD_UPPER_LIMIT_EXT]; } else { - $this->setUpperLimit(new FHIRDecimal($data[self::FIELD_UPPER_LIMIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setUpperLimit($value); + } else if (is_array($value)) { + $this->setUpperLimit(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setUpperLimit(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUpperLimit(new FHIRDecimal($ext)); } } } @@ -613,8 +655,8 @@ public function setUpperLimit($upperLimit = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -772,29 +814,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getData())) { $a[self::FIELD_DATA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSampledDataDataType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSampledDataDataType::FIELD_VALUE]); $a[self::FIELD_DATA_EXT] = $enc; } } if (null !== ($v = $this->getDimensions())) { $a[self::FIELD_DIMENSIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_DIMENSIONS_EXT] = $enc; } } if (null !== ($v = $this->getFactor())) { $a[self::FIELD_FACTOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_EXT] = $enc; } } if (null !== ($v = $this->getLowerLimit())) { $a[self::FIELD_LOWER_LIMIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_LOWER_LIMIT_EXT] = $enc; } } @@ -803,18 +853,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_EXT] = $enc; } } if (null !== ($v = $this->getUpperLimit())) { $a[self::FIELD_UPPER_LIMIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_UPPER_LIMIT_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledDataDataType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledDataDataType.php index 8c666a7f2b..3f54acaf7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledDataDataType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSampledDataDataType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -76,10 +76,9 @@ class FHIRSampledDataDataType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SAMPLED_DATA_DATA_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRSampledDataDataTypePrimitive @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchComparator.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchComparator.php index f8ebe384bd..8fe0afa2b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchComparator.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchComparator.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSearchComparator extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_COMPARATOR; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSearchComparatorList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchEntryMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchEntryMode.php index e793f0feb9..d1f20815a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchEntryMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchEntryMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRSearchEntryMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_ENTRY_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSearchEntryModeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchModifierCode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchModifierCode.php index 844497dfbd..a823aca2ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchModifierCode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchModifierCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSearchModifierCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_MODIFIER_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSearchModifierCodeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchParamType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchParamType.php index efcfc01278..fb0d07c2c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchParamType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSearchParamType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -78,10 +78,9 @@ class FHIRSearchParamType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SEARCH_PARAM_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSearchParamTypeList @@ -170,8 +169,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -254,6 +253,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSignature.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSignature.php index 9e8d4ac2d3..e2e2db283f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSignature.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSignature.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRSignature extends FHIRElement const FIELD_WHO_URI_EXT = '_whoUri'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -224,36 +224,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BLOB])) { - $ext = (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) - ? $data[self::FIELD_BLOB_EXT] - : null; - if ($data[self::FIELD_BLOB] instanceof FHIRBase64Binary) { - $this->setBlob($data[self::FIELD_BLOB]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_BLOB]] + $ext)); - } else if (is_array($data[self::FIELD_BLOB])) { - $this->setBlob(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_BLOB]))); - } + if (isset($data[self::FIELD_BLOB]) || isset($data[self::FIELD_BLOB_EXT])) { + if (isset($data[self::FIELD_BLOB])) { + $value = $data[self::FIELD_BLOB]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BLOB_EXT]) && is_array($data[self::FIELD_BLOB_EXT])) { + $ext = $data[self::FIELD_BLOB_EXT]; } else { - $this->setBlob(new FHIRBase64Binary($data[self::FIELD_BLOB])); - } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setBlob($value); + } else if (is_array($value)) { + $this->setBlob(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setBlob(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBlob(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); } } if (isset($data[self::FIELD_ON_BEHALF_OF_REFERENCE])) { @@ -263,20 +277,27 @@ public function __construct($data = null) $this->setOnBehalfOfReference(new FHIRReference($data[self::FIELD_ON_BEHALF_OF_REFERENCE])); } } - if (isset($data[self::FIELD_ON_BEHALF_OF_URI])) { - $ext = (isset($data[self::FIELD_ON_BEHALF_OF_URI_EXT]) && is_array($data[self::FIELD_ON_BEHALF_OF_URI_EXT])) - ? $data[self::FIELD_ON_BEHALF_OF_URI_EXT] - : null; - if ($data[self::FIELD_ON_BEHALF_OF_URI] instanceof FHIRUri) { - $this->setOnBehalfOfUri($data[self::FIELD_ON_BEHALF_OF_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ON_BEHALF_OF_URI])) { - $this->setOnBehalfOfUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ON_BEHALF_OF_URI]] + $ext)); - } else if (is_array($data[self::FIELD_ON_BEHALF_OF_URI])) { - $this->setOnBehalfOfUri(new FHIRUri(array_merge($ext, $data[self::FIELD_ON_BEHALF_OF_URI]))); - } + if (isset($data[self::FIELD_ON_BEHALF_OF_URI]) || isset($data[self::FIELD_ON_BEHALF_OF_URI_EXT])) { + if (isset($data[self::FIELD_ON_BEHALF_OF_URI])) { + $value = $data[self::FIELD_ON_BEHALF_OF_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ON_BEHALF_OF_URI_EXT]) && is_array($data[self::FIELD_ON_BEHALF_OF_URI_EXT])) { + $ext = $data[self::FIELD_ON_BEHALF_OF_URI_EXT]; } else { - $this->setOnBehalfOfUri(new FHIRUri($data[self::FIELD_ON_BEHALF_OF_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setOnBehalfOfUri($value); + } else if (is_array($value)) { + $this->setOnBehalfOfUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setOnBehalfOfUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnBehalfOfUri(new FHIRUri($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -297,20 +318,27 @@ public function __construct($data = null) $this->addType(new FHIRCoding($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_WHEN])) { - $ext = (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) - ? $data[self::FIELD_WHEN_EXT] - : null; - if ($data[self::FIELD_WHEN] instanceof FHIRInstant) { - $this->setWhen($data[self::FIELD_WHEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_WHEN]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN])) { - $this->setWhen(new FHIRInstant(array_merge($ext, $data[self::FIELD_WHEN]))); - } + if (isset($data[self::FIELD_WHEN]) || isset($data[self::FIELD_WHEN_EXT])) { + if (isset($data[self::FIELD_WHEN])) { + $value = $data[self::FIELD_WHEN]; } else { - $this->setWhen(new FHIRInstant($data[self::FIELD_WHEN])); + $value = null; + } + if (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) { + $ext = $data[self::FIELD_WHEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setWhen($value); + } else if (is_array($value)) { + $this->setWhen(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setWhen(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhen(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_WHO_REFERENCE])) { @@ -320,20 +348,27 @@ public function __construct($data = null) $this->setWhoReference(new FHIRReference($data[self::FIELD_WHO_REFERENCE])); } } - if (isset($data[self::FIELD_WHO_URI])) { - $ext = (isset($data[self::FIELD_WHO_URI_EXT]) && is_array($data[self::FIELD_WHO_URI_EXT])) - ? $data[self::FIELD_WHO_URI_EXT] - : null; - if ($data[self::FIELD_WHO_URI] instanceof FHIRUri) { - $this->setWhoUri($data[self::FIELD_WHO_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHO_URI])) { - $this->setWhoUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_WHO_URI]] + $ext)); - } else if (is_array($data[self::FIELD_WHO_URI])) { - $this->setWhoUri(new FHIRUri(array_merge($ext, $data[self::FIELD_WHO_URI]))); - } + if (isset($data[self::FIELD_WHO_URI]) || isset($data[self::FIELD_WHO_URI_EXT])) { + if (isset($data[self::FIELD_WHO_URI])) { + $value = $data[self::FIELD_WHO_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHO_URI_EXT]) && is_array($data[self::FIELD_WHO_URI_EXT])) { + $ext = $data[self::FIELD_WHO_URI_EXT]; } else { - $this->setWhoUri(new FHIRUri($data[self::FIELD_WHO_URI])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setWhoUri($value); + } else if (is_array($value)) { + $this->setWhoUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setWhoUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhoUri(new FHIRUri($ext)); } } } @@ -695,8 +730,8 @@ public function setWhoUri($whoUri = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -859,15 +894,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getBlob())) { $a[self::FIELD_BLOB] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_BLOB_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } @@ -876,18 +915,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnBehalfOfUri())) { $a[self::FIELD_ON_BEHALF_OF_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ON_BEHALF_OF_URI_EXT] = $enc; } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if (null !== ($v = $this->getWhen())) { $a[self::FIELD_WHEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_WHEN_EXT] = $enc; } } @@ -896,11 +945,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getWhoUri())) { $a[self::FIELD_WHO_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_WHO_URI_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlicingRules.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlicingRules.php index 2775684386..44470ad3ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlicingRules.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlicingRules.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSlicingRules extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLICING_RULES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSlicingRulesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlotStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlotStatus.php index 83efe6c68b..a3c94371fa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlotStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSlotStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSlotStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SLOT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSlotStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSpecimenStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSpecimenStatus.php index 25e7a3ba5b..dfa39e93e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSpecimenStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSpecimenStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSpecimenStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SPECIMEN_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSpecimenStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRString.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRString.php index 4db1446548..a92aca3e4d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRString.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRString.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRString extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRING; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRStringPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureDefinitionKind.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureDefinitionKind.php index b8bae67c73..46f94da939 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureDefinitionKind.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureDefinitionKind.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureDefinitionKind extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION_KIND; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRStructureDefinitionKindList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapContextType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapContextType.php index abb3fce54e..cb595f17bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapContextType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapContextType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapContextType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_CONTEXT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRStructureMapContextTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapGroupTypeMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapGroupTypeMode.php index 59d66d969b..28b23fdf91 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapGroupTypeMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapGroupTypeMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRStructureMapGroupTypeMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_GROUP_TYPE_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRStructureMapGroupTypeModeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapInputMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapInputMode.php index b5250e3c04..ca479cd7b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapInputMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapInputMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapInputMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_INPUT_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRStructureMapInputModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapModelMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapModelMode.php index e27f9489e1..23c32de973 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapModelMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapModelMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapModelMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_MODEL_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRStructureMapModelModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapSourceListMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapSourceListMode.php index d015fd263a..c636f80f80 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapSourceListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapSourceListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapSourceListMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_SOURCE_LIST_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRStructureMapSourceListModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTargetListMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTargetListMode.php index 8f7f8f6f69..63da001743 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTargetListMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTargetListMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapTargetListMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TARGET_LIST_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRStructureMapTargetListModeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTransform.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTransform.php index 1c517f5fe3..8b96bdc627 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTransform.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRStructureMapTransform.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRStructureMapTransform extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_STRUCTURE_MAP_TRANSFORM; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRStructureMapTransformList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionChannelType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionChannelType.php index beba05b388..ada47c61dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionChannelType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionChannelType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSubscriptionChannelType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_CHANNEL_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSubscriptionChannelTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionStatus.php index cbc4fb2704..bebe78da3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSubscriptionStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSubscriptionStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUBSCRIPTION_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSubscriptionStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyDeliveryStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyDeliveryStatus.php index 5a763a7297..aae504de35 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyDeliveryStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyDeliveryStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSupplyDeliveryStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_DELIVERY_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSupplyDeliveryStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyRequestStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyRequestStatus.php index 6e4af11b33..3cb7fd4252 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyRequestStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSupplyRequestStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSupplyRequestStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SUPPLY_REQUEST_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSupplyRequestStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemRestfulInteraction.php index e6b93b42a0..3d84c7a274 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRSystemRestfulInteraction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SYSTEM_RESTFUL_INTERACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSystemRestfulInteractionList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemVersionProcessingMode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemVersionProcessingMode.php index e9ac7c384d..0c5f57fa32 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemVersionProcessingMode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRSystemVersionProcessingMode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRSystemVersionProcessingMode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SYSTEM_VERSION_PROCESSING_MODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRSystemVersionProcessingModeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTaskStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTaskStatus.php index 5bfcd73fe3..5e933af66e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTaskStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTaskStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTaskStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TASK_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRTaskStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportActionResult.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportActionResult.php index ad82103331..29b128d9c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportActionResult.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportActionResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestReportActionResult extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_ACTION_RESULT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRTestReportActionResultList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportParticipantType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportParticipantType.php index 414822506f..935dd92765 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportParticipantType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportParticipantType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestReportParticipantType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_PARTICIPANT_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRTestReportParticipantTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportResult.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportResult.php index df818efbe3..398a68f7be 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportResult.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportResult.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestReportResult extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_RESULT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRTestReportResultList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportStatus.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportStatus.php index d2475966b2..f76b3ff3c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportStatus.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestReportStatus.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestReportStatus extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_REPORT_STATUS; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRTestReportStatusList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestScriptRequestMethodCode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestScriptRequestMethodCode.php index da3ef2bc75..59c69be262 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestScriptRequestMethodCode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTestScriptRequestMethodCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTestScriptRequestMethodCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TEST_SCRIPT_REQUEST_METHOD_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRTestScriptRequestMethodCodeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTime.php index 05cf25491a..c7d9d83a07 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRTimePrimitive @@ -175,8 +174,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -259,6 +258,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming.php index b2195d9e00..84e17123b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRTiming extends FHIRElement const FIELD_REPEAT = 'repeat'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -166,33 +166,42 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_EVENT])) { - $ext = (isset($data[self::FIELD_EVENT_EXT]) && is_array($data[self::FIELD_EVENT_EXT])) - ? $data[self::FIELD_EVENT_EXT] - : null; - if (is_array($data[self::FIELD_EVENT])) { - foreach($data[self::FIELD_EVENT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRDateTime) { - $this->addEvent($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addEvent(new FHIRDateTime(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_EVENT]) || isset($data[self::FIELD_EVENT_EXT])) { + if (isset($data[self::FIELD_EVENT])) { + $value = $data[self::FIELD_EVENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EVENT_EXT]) && is_array($data[self::FIELD_EVENT_EXT])) { + $ext = $data[self::FIELD_EVENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->addEvent($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRDateTime) { + $this->addEvent($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addEvent(new FHIRDateTime(array_merge($v, $iext))); + } else { + $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addEvent(new FHIRDateTime($v)); } + } elseif (is_array($value)) { + $this->addEvent(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addEvent(new FHIRDateTime($iext)); } - } elseif ($data[self::FIELD_EVENT] instanceof FHIRDateTime) { - $this->addEvent($data[self::FIELD_EVENT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_EVENT])) { - $this->addEvent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EVENT]] + $ext)); - } else { - $this->addEvent(new FHIRDateTime($data[self::FIELD_EVENT])); } } if (isset($data[self::FIELD_REPEAT])) { @@ -382,8 +391,8 @@ public function setRepeat(FHIRTimingRepeat $repeat = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -479,22 +488,33 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getEvent())) { $a[self::FIELD_EVENT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_EVENT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_EVENT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRDateTime::FIELD_VALUE]) || array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_EVENT_EXT][] = null; + unset($enc[FHIRDateTime::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_EVENT_EXT] = $encs; + } } if (null !== ($v = $this->getRepeat())) { $a[self::FIELD_REPEAT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming/FHIRTimingRepeat.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming/FHIRTimingRepeat.php index 25a61b5fff..711b3850e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming/FHIRTimingRepeat.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTiming/FHIRTimingRepeat.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRTimingRepeat extends FHIRElement const FIELD_WHEN_EXT = '_when'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A length of time. @@ -370,267 +370,371 @@ public function __construct($data = null) $this->setBoundsRange(new FHIRRange($data[self::FIELD_BOUNDS_RANGE])); } } - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRInteger) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRInteger(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; } else { - $this->setCount(new FHIRInteger($data[self::FIELD_COUNT])); - } - } - if (isset($data[self::FIELD_COUNT_MAX])) { - $ext = (isset($data[self::FIELD_COUNT_MAX_EXT]) && is_array($data[self::FIELD_COUNT_MAX_EXT])) - ? $data[self::FIELD_COUNT_MAX_EXT] - : null; - if ($data[self::FIELD_COUNT_MAX] instanceof FHIRInteger) { - $this->setCountMax($data[self::FIELD_COUNT_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT_MAX])) { - $this->setCountMax(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COUNT_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT_MAX])) { - $this->setCountMax(new FHIRInteger(array_merge($ext, $data[self::FIELD_COUNT_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCount(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_COUNT_MAX]) || isset($data[self::FIELD_COUNT_MAX_EXT])) { + if (isset($data[self::FIELD_COUNT_MAX])) { + $value = $data[self::FIELD_COUNT_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_MAX_EXT]) && is_array($data[self::FIELD_COUNT_MAX_EXT])) { + $ext = $data[self::FIELD_COUNT_MAX_EXT]; } else { - $this->setCountMax(new FHIRInteger($data[self::FIELD_COUNT_MAX])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCountMax($value); + } else if (is_array($value)) { + $this->setCountMax(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCountMax(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCountMax(new FHIRInteger($ext)); } } - if (isset($data[self::FIELD_DAY_OF_WEEK])) { - $ext = (isset($data[self::FIELD_DAY_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAY_OF_WEEK_EXT])) - ? $data[self::FIELD_DAY_OF_WEEK_EXT] - : null; - if (is_array($data[self::FIELD_DAY_OF_WEEK])) { - foreach($data[self::FIELD_DAY_OF_WEEK] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addDayOfWeek($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDayOfWeek(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDayOfWeek(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DAY_OF_WEEK]) || isset($data[self::FIELD_DAY_OF_WEEK_EXT])) { + if (isset($data[self::FIELD_DAY_OF_WEEK])) { + $value = $data[self::FIELD_DAY_OF_WEEK]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DAY_OF_WEEK_EXT]) && is_array($data[self::FIELD_DAY_OF_WEEK_EXT])) { + $ext = $data[self::FIELD_DAY_OF_WEEK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addDayOfWeek($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addDayOfWeek($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDayOfWeek(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addDayOfWeek(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDayOfWeek(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addDayOfWeek(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addDayOfWeek(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DAY_OF_WEEK] instanceof FHIRCode) { - $this->addDayOfWeek($data[self::FIELD_DAY_OF_WEEK]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DAY_OF_WEEK])) { - $this->addDayOfWeek(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_DAY_OF_WEEK]] + $ext)); - } else { - $this->addDayOfWeek(new FHIRCode($data[self::FIELD_DAY_OF_WEEK])); - } - } - if (isset($data[self::FIELD_DURATION])) { - $ext = (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) - ? $data[self::FIELD_DURATION_EXT] - : null; - if ($data[self::FIELD_DURATION] instanceof FHIRDecimal) { - $this->setDuration($data[self::FIELD_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DURATION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDayOfWeek(new FHIRCode($iext)); } + } + } + if (isset($data[self::FIELD_DURATION]) || isset($data[self::FIELD_DURATION_EXT])) { + if (isset($data[self::FIELD_DURATION])) { + $value = $data[self::FIELD_DURATION]; } else { - $this->setDuration(new FHIRDecimal($data[self::FIELD_DURATION])); - } - } - if (isset($data[self::FIELD_DURATION_MAX])) { - $ext = (isset($data[self::FIELD_DURATION_MAX_EXT]) && is_array($data[self::FIELD_DURATION_MAX_EXT])) - ? $data[self::FIELD_DURATION_MAX_EXT] - : null; - if ($data[self::FIELD_DURATION_MAX] instanceof FHIRDecimal) { - $this->setDurationMax($data[self::FIELD_DURATION_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION_MAX])) { - $this->setDurationMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_DURATION_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION_MAX])) { - $this->setDurationMax(new FHIRDecimal(array_merge($ext, $data[self::FIELD_DURATION_MAX]))); + $value = null; + } + if (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) { + $ext = $data[self::FIELD_DURATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDuration($value); + } else if (is_array($value)) { + $this->setDuration(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDuration(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDuration(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_DURATION_MAX]) || isset($data[self::FIELD_DURATION_MAX_EXT])) { + if (isset($data[self::FIELD_DURATION_MAX])) { + $value = $data[self::FIELD_DURATION_MAX]; } else { - $this->setDurationMax(new FHIRDecimal($data[self::FIELD_DURATION_MAX])); - } - } - if (isset($data[self::FIELD_DURATION_UNIT])) { - $ext = (isset($data[self::FIELD_DURATION_UNIT_EXT]) && is_array($data[self::FIELD_DURATION_UNIT_EXT])) - ? $data[self::FIELD_DURATION_UNIT_EXT] - : null; - if ($data[self::FIELD_DURATION_UNIT] instanceof FHIRUnitsOfTime) { - $this->setDurationUnit($data[self::FIELD_DURATION_UNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION_UNIT])) { - $this->setDurationUnit(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $data[self::FIELD_DURATION_UNIT]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION_UNIT])) { - $this->setDurationUnit(new FHIRUnitsOfTime(array_merge($ext, $data[self::FIELD_DURATION_UNIT]))); + $value = null; + } + if (isset($data[self::FIELD_DURATION_MAX_EXT]) && is_array($data[self::FIELD_DURATION_MAX_EXT])) { + $ext = $data[self::FIELD_DURATION_MAX_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setDurationMax($value); + } else if (is_array($value)) { + $this->setDurationMax(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setDurationMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDurationMax(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_DURATION_UNIT]) || isset($data[self::FIELD_DURATION_UNIT_EXT])) { + if (isset($data[self::FIELD_DURATION_UNIT])) { + $value = $data[self::FIELD_DURATION_UNIT]; } else { - $this->setDurationUnit(new FHIRUnitsOfTime($data[self::FIELD_DURATION_UNIT])); - } - } - if (isset($data[self::FIELD_FREQUENCY])) { - $ext = (isset($data[self::FIELD_FREQUENCY_EXT]) && is_array($data[self::FIELD_FREQUENCY_EXT])) - ? $data[self::FIELD_FREQUENCY_EXT] - : null; - if ($data[self::FIELD_FREQUENCY] instanceof FHIRInteger) { - $this->setFrequency($data[self::FIELD_FREQUENCY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FREQUENCY])) { - $this->setFrequency(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_FREQUENCY]] + $ext)); - } else if (is_array($data[self::FIELD_FREQUENCY])) { - $this->setFrequency(new FHIRInteger(array_merge($ext, $data[self::FIELD_FREQUENCY]))); + $value = null; + } + if (isset($data[self::FIELD_DURATION_UNIT_EXT]) && is_array($data[self::FIELD_DURATION_UNIT_EXT])) { + $ext = $data[self::FIELD_DURATION_UNIT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnitsOfTime) { + $this->setDurationUnit($value); + } else if (is_array($value)) { + $this->setDurationUnit(new FHIRUnitsOfTime(array_merge($ext, $value))); + } else { + $this->setDurationUnit(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDurationUnit(new FHIRUnitsOfTime($ext)); + } + } + if (isset($data[self::FIELD_FREQUENCY]) || isset($data[self::FIELD_FREQUENCY_EXT])) { + if (isset($data[self::FIELD_FREQUENCY])) { + $value = $data[self::FIELD_FREQUENCY]; } else { - $this->setFrequency(new FHIRInteger($data[self::FIELD_FREQUENCY])); - } - } - if (isset($data[self::FIELD_FREQUENCY_MAX])) { - $ext = (isset($data[self::FIELD_FREQUENCY_MAX_EXT]) && is_array($data[self::FIELD_FREQUENCY_MAX_EXT])) - ? $data[self::FIELD_FREQUENCY_MAX_EXT] - : null; - if ($data[self::FIELD_FREQUENCY_MAX] instanceof FHIRInteger) { - $this->setFrequencyMax($data[self::FIELD_FREQUENCY_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FREQUENCY_MAX])) { - $this->setFrequencyMax(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_FREQUENCY_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_FREQUENCY_MAX])) { - $this->setFrequencyMax(new FHIRInteger(array_merge($ext, $data[self::FIELD_FREQUENCY_MAX]))); + $value = null; + } + if (isset($data[self::FIELD_FREQUENCY_EXT]) && is_array($data[self::FIELD_FREQUENCY_EXT])) { + $ext = $data[self::FIELD_FREQUENCY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setFrequency($value); + } else if (is_array($value)) { + $this->setFrequency(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setFrequency(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFrequency(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_FREQUENCY_MAX]) || isset($data[self::FIELD_FREQUENCY_MAX_EXT])) { + if (isset($data[self::FIELD_FREQUENCY_MAX])) { + $value = $data[self::FIELD_FREQUENCY_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FREQUENCY_MAX_EXT]) && is_array($data[self::FIELD_FREQUENCY_MAX_EXT])) { + $ext = $data[self::FIELD_FREQUENCY_MAX_EXT]; } else { - $this->setFrequencyMax(new FHIRInteger($data[self::FIELD_FREQUENCY_MAX])); - } - } - if (isset($data[self::FIELD_OFFSET])) { - $ext = (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) - ? $data[self::FIELD_OFFSET_EXT] - : null; - if ($data[self::FIELD_OFFSET] instanceof FHIRUnsignedInt) { - $this->setOffset($data[self::FIELD_OFFSET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_OFFSET]] + $ext)); - } else if (is_array($data[self::FIELD_OFFSET])) { - $this->setOffset(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_OFFSET]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setFrequencyMax($value); + } else if (is_array($value)) { + $this->setFrequencyMax(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setFrequencyMax(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFrequencyMax(new FHIRInteger($ext)); + } + } + if (isset($data[self::FIELD_OFFSET]) || isset($data[self::FIELD_OFFSET_EXT])) { + if (isset($data[self::FIELD_OFFSET])) { + $value = $data[self::FIELD_OFFSET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OFFSET_EXT]) && is_array($data[self::FIELD_OFFSET_EXT])) { + $ext = $data[self::FIELD_OFFSET_EXT]; } else { - $this->setOffset(new FHIRUnsignedInt($data[self::FIELD_OFFSET])); - } - } - if (isset($data[self::FIELD_PERIOD])) { - $ext = (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) - ? $data[self::FIELD_PERIOD_EXT] - : null; - if ($data[self::FIELD_PERIOD] instanceof FHIRDecimal) { - $this->setPeriod($data[self::FIELD_PERIOD]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD])) { - $this->setPeriod(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setOffset($value); + } else if (is_array($value)) { + $this->setOffset(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setOffset(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOffset(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_PERIOD]) || isset($data[self::FIELD_PERIOD_EXT])) { + if (isset($data[self::FIELD_PERIOD])) { + $value = $data[self::FIELD_PERIOD]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_EXT]) && is_array($data[self::FIELD_PERIOD_EXT])) { + $ext = $data[self::FIELD_PERIOD_EXT]; } else { - $this->setPeriod(new FHIRDecimal($data[self::FIELD_PERIOD])); - } - } - if (isset($data[self::FIELD_PERIOD_MAX])) { - $ext = (isset($data[self::FIELD_PERIOD_MAX_EXT]) && is_array($data[self::FIELD_PERIOD_MAX_EXT])) - ? $data[self::FIELD_PERIOD_MAX_EXT] - : null; - if ($data[self::FIELD_PERIOD_MAX] instanceof FHIRDecimal) { - $this->setPeriodMax($data[self::FIELD_PERIOD_MAX]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD_MAX])) { - $this->setPeriodMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_PERIOD_MAX]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD_MAX])) { - $this->setPeriodMax(new FHIRDecimal(array_merge($ext, $data[self::FIELD_PERIOD_MAX]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriod($value); + } else if (is_array($value)) { + $this->setPeriod(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriod(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriod(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_PERIOD_MAX]) || isset($data[self::FIELD_PERIOD_MAX_EXT])) { + if (isset($data[self::FIELD_PERIOD_MAX])) { + $value = $data[self::FIELD_PERIOD_MAX]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_MAX_EXT]) && is_array($data[self::FIELD_PERIOD_MAX_EXT])) { + $ext = $data[self::FIELD_PERIOD_MAX_EXT]; } else { - $this->setPeriodMax(new FHIRDecimal($data[self::FIELD_PERIOD_MAX])); - } - } - if (isset($data[self::FIELD_PERIOD_UNIT])) { - $ext = (isset($data[self::FIELD_PERIOD_UNIT_EXT]) && is_array($data[self::FIELD_PERIOD_UNIT_EXT])) - ? $data[self::FIELD_PERIOD_UNIT_EXT] - : null; - if ($data[self::FIELD_PERIOD_UNIT] instanceof FHIRUnitsOfTime) { - $this->setPeriodUnit($data[self::FIELD_PERIOD_UNIT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERIOD_UNIT])) { - $this->setPeriodUnit(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $data[self::FIELD_PERIOD_UNIT]] + $ext)); - } else if (is_array($data[self::FIELD_PERIOD_UNIT])) { - $this->setPeriodUnit(new FHIRUnitsOfTime(array_merge($ext, $data[self::FIELD_PERIOD_UNIT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setPeriodMax($value); + } else if (is_array($value)) { + $this->setPeriodMax(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setPeriodMax(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPeriodMax(new FHIRDecimal($ext)); + } + } + if (isset($data[self::FIELD_PERIOD_UNIT]) || isset($data[self::FIELD_PERIOD_UNIT_EXT])) { + if (isset($data[self::FIELD_PERIOD_UNIT])) { + $value = $data[self::FIELD_PERIOD_UNIT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERIOD_UNIT_EXT]) && is_array($data[self::FIELD_PERIOD_UNIT_EXT])) { + $ext = $data[self::FIELD_PERIOD_UNIT_EXT]; } else { - $this->setPeriodUnit(new FHIRUnitsOfTime($data[self::FIELD_PERIOD_UNIT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnitsOfTime) { + $this->setPeriodUnit($value); + } else if (is_array($value)) { + $this->setPeriodUnit(new FHIRUnitsOfTime(array_merge($ext, $value))); + } else { + $this->setPeriodUnit(new FHIRUnitsOfTime([FHIRUnitsOfTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPeriodUnit(new FHIRUnitsOfTime($ext)); } } - if (isset($data[self::FIELD_TIME_OF_DAY])) { - $ext = (isset($data[self::FIELD_TIME_OF_DAY_EXT]) && is_array($data[self::FIELD_TIME_OF_DAY_EXT])) - ? $data[self::FIELD_TIME_OF_DAY_EXT] - : null; - if (is_array($data[self::FIELD_TIME_OF_DAY])) { - foreach($data[self::FIELD_TIME_OF_DAY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRTime) { - $this->addTimeOfDay($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTimeOfDay(new FHIRTime([FHIRTime::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTimeOfDay(new FHIRTime(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TIME_OF_DAY]) || isset($data[self::FIELD_TIME_OF_DAY_EXT])) { + if (isset($data[self::FIELD_TIME_OF_DAY])) { + $value = $data[self::FIELD_TIME_OF_DAY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIME_OF_DAY_EXT]) && is_array($data[self::FIELD_TIME_OF_DAY_EXT])) { + $ext = $data[self::FIELD_TIME_OF_DAY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->addTimeOfDay($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRTime) { + $this->addTimeOfDay($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTimeOfDay(new FHIRTime(array_merge($v, $iext))); + } else { + $this->addTimeOfDay(new FHIRTime([FHIRTime::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTimeOfDay(new FHIRTime($v)); } + } elseif (is_array($value)) { + $this->addTimeOfDay(new FHIRTime(array_merge($ext, $value))); + } else { + $this->addTimeOfDay(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTimeOfDay(new FHIRTime($iext)); } - } elseif ($data[self::FIELD_TIME_OF_DAY] instanceof FHIRTime) { - $this->addTimeOfDay($data[self::FIELD_TIME_OF_DAY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TIME_OF_DAY])) { - $this->addTimeOfDay(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_TIME_OF_DAY]] + $ext)); - } else { - $this->addTimeOfDay(new FHIRTime($data[self::FIELD_TIME_OF_DAY])); } } - if (isset($data[self::FIELD_WHEN])) { - $ext = (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) - ? $data[self::FIELD_WHEN_EXT] - : null; - if (is_array($data[self::FIELD_WHEN])) { - foreach($data[self::FIELD_WHEN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIREventTiming) { - $this->addWhen($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addWhen(new FHIREventTiming(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_WHEN]) || isset($data[self::FIELD_WHEN_EXT])) { + if (isset($data[self::FIELD_WHEN])) { + $value = $data[self::FIELD_WHEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_WHEN_EXT]) && is_array($data[self::FIELD_WHEN_EXT])) { + $ext = $data[self::FIELD_WHEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventTiming) { + $this->addWhen($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIREventTiming) { + $this->addWhen($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addWhen(new FHIREventTiming(array_merge($v, $iext))); + } else { + $this->addWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addWhen(new FHIREventTiming($v)); } + } elseif (is_array($value)) { + $this->addWhen(new FHIREventTiming(array_merge($ext, $value))); + } else { + $this->addWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addWhen(new FHIREventTiming($iext)); } - } elseif ($data[self::FIELD_WHEN] instanceof FHIREventTiming) { - $this->addWhen($data[self::FIELD_WHEN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_WHEN])) { - $this->addWhen(new FHIREventTiming([FHIREventTiming::FIELD_VALUE => $data[self::FIELD_WHEN]] + $ext)); - } else { - $this->addWhen(new FHIREventTiming($data[self::FIELD_WHEN])); } } } @@ -1362,8 +1466,8 @@ public function setWhen(array $when = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1635,125 +1739,174 @@ public function jsonSerialize() } if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } if (null !== ($v = $this->getCountMax())) { $a[self::FIELD_COUNT_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COUNT_MAX_EXT] = $enc; } } if ([] !== ($vs = $this->getDayOfWeek())) { $a[self::FIELD_DAY_OF_WEEK] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DAY_OF_WEEK][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DAY_OF_WEEK_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DAY_OF_WEEK_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DAY_OF_WEEK_EXT] = $encs; + } } if (null !== ($v = $this->getDuration())) { $a[self::FIELD_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DURATION_EXT] = $enc; } } if (null !== ($v = $this->getDurationMax())) { $a[self::FIELD_DURATION_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_DURATION_MAX_EXT] = $enc; } } if (null !== ($v = $this->getDurationUnit())) { $a[self::FIELD_DURATION_UNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnitsOfTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnitsOfTime::FIELD_VALUE]); $a[self::FIELD_DURATION_UNIT_EXT] = $enc; } } if (null !== ($v = $this->getFrequency())) { $a[self::FIELD_FREQUENCY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_FREQUENCY_EXT] = $enc; } } if (null !== ($v = $this->getFrequencyMax())) { $a[self::FIELD_FREQUENCY_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_FREQUENCY_MAX_EXT] = $enc; } } if (null !== ($v = $this->getOffset())) { $a[self::FIELD_OFFSET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_OFFSET_EXT] = $enc; } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_EXT] = $enc; } } if (null !== ($v = $this->getPeriodMax())) { $a[self::FIELD_PERIOD_MAX] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_PERIOD_MAX_EXT] = $enc; } } if (null !== ($v = $this->getPeriodUnit())) { $a[self::FIELD_PERIOD_UNIT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnitsOfTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnitsOfTime::FIELD_VALUE]); $a[self::FIELD_PERIOD_UNIT_EXT] = $enc; } } if ([] !== ($vs = $this->getTimeOfDay())) { $a[self::FIELD_TIME_OF_DAY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TIME_OF_DAY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TIME_OF_DAY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRTime::FIELD_VALUE]) || array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TIME_OF_DAY_EXT][] = null; + unset($enc[FHIRTime::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TIME_OF_DAY_EXT] = $encs; + } } if ([] !== ($vs = $this->getWhen())) { $a[self::FIELD_WHEN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_WHEN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_WHEN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIREventTiming::FIELD_VALUE]) || array_key_exists(FHIREventTiming::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_WHEN_EXT][] = null; + unset($enc[FHIREventTiming::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_WHEN_EXT] = $encs; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerDefinition.php index 208f710d8e..cd89aa18d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -91,7 +91,7 @@ class FHIRTriggerDefinition extends FHIRElement const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes a required data item for evaluation in terms of the type of data, and @@ -207,52 +207,73 @@ public function __construct($data = null) $this->setEventData(new FHIRDataRequirement($data[self::FIELD_EVENT_DATA])); } } - if (isset($data[self::FIELD_EVENT_NAME])) { - $ext = (isset($data[self::FIELD_EVENT_NAME_EXT]) && is_array($data[self::FIELD_EVENT_NAME_EXT])) - ? $data[self::FIELD_EVENT_NAME_EXT] - : null; - if ($data[self::FIELD_EVENT_NAME] instanceof FHIRString) { - $this->setEventName($data[self::FIELD_EVENT_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EVENT_NAME])) { - $this->setEventName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EVENT_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_EVENT_NAME])) { - $this->setEventName(new FHIRString(array_merge($ext, $data[self::FIELD_EVENT_NAME]))); - } + if (isset($data[self::FIELD_EVENT_NAME]) || isset($data[self::FIELD_EVENT_NAME_EXT])) { + if (isset($data[self::FIELD_EVENT_NAME])) { + $value = $data[self::FIELD_EVENT_NAME]; } else { - $this->setEventName(new FHIRString($data[self::FIELD_EVENT_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_EVENT_TIMING_DATE])) { - $ext = (isset($data[self::FIELD_EVENT_TIMING_DATE_EXT]) && is_array($data[self::FIELD_EVENT_TIMING_DATE_EXT])) - ? $data[self::FIELD_EVENT_TIMING_DATE_EXT] - : null; - if ($data[self::FIELD_EVENT_TIMING_DATE] instanceof FHIRDate) { - $this->setEventTimingDate($data[self::FIELD_EVENT_TIMING_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EVENT_TIMING_DATE])) { - $this->setEventTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_EVENT_TIMING_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EVENT_TIMING_DATE])) { - $this->setEventTimingDate(new FHIRDate(array_merge($ext, $data[self::FIELD_EVENT_TIMING_DATE]))); - } + if (isset($data[self::FIELD_EVENT_NAME_EXT]) && is_array($data[self::FIELD_EVENT_NAME_EXT])) { + $ext = $data[self::FIELD_EVENT_NAME_EXT]; } else { - $this->setEventTimingDate(new FHIRDate($data[self::FIELD_EVENT_TIMING_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setEventName($value); + } else if (is_array($value)) { + $this->setEventName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setEventName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEventName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_EVENT_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EVENT_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_EVENT_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_EVENT_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EVENT_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setEventTimingDateTime($data[self::FIELD_EVENT_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EVENT_TIMING_DATE_TIME])) { - $this->setEventTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EVENT_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EVENT_TIMING_DATE_TIME])) { - $this->setEventTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EVENT_TIMING_DATE_TIME]))); + if (isset($data[self::FIELD_EVENT_TIMING_DATE]) || isset($data[self::FIELD_EVENT_TIMING_DATE_EXT])) { + if (isset($data[self::FIELD_EVENT_TIMING_DATE])) { + $value = $data[self::FIELD_EVENT_TIMING_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EVENT_TIMING_DATE_EXT]) && is_array($data[self::FIELD_EVENT_TIMING_DATE_EXT])) { + $ext = $data[self::FIELD_EVENT_TIMING_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setEventTimingDate($value); + } else if (is_array($value)) { + $this->setEventTimingDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setEventTimingDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEventTimingDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_EVENT_TIMING_DATE_TIME]) || isset($data[self::FIELD_EVENT_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EVENT_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_EVENT_TIMING_DATE_TIME]; } else { - $this->setEventTimingDateTime(new FHIRDateTime($data[self::FIELD_EVENT_TIMING_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_EVENT_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_EVENT_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EVENT_TIMING_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEventTimingDateTime($value); + } else if (is_array($value)) { + $this->setEventTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEventTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEventTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EVENT_TIMING_REFERENCE])) { @@ -269,20 +290,27 @@ public function __construct($data = null) $this->setEventTimingTiming(new FHIRTiming($data[self::FIELD_EVENT_TIMING_TIMING])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRTriggerType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRTriggerType([FHIRTriggerType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRTriggerType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRTriggerType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTriggerType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRTriggerType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRTriggerType([FHIRTriggerType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRTriggerType($ext)); } } } @@ -562,8 +590,8 @@ public function setType(FHIRTriggerType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -700,22 +728,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getEventName())) { $a[self::FIELD_EVENT_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EVENT_NAME_EXT] = $enc; } } if (null !== ($v = $this->getEventTimingDate())) { $a[self::FIELD_EVENT_TIMING_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_EVENT_TIMING_DATE_EXT] = $enc; } } if (null !== ($v = $this->getEventTimingDateTime())) { $a[self::FIELD_EVENT_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EVENT_TIMING_DATE_TIME_EXT] = $enc; } } @@ -727,11 +761,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTriggerType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTriggerType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerType.php index 5e885f375f..8e5b16a8ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTriggerType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTriggerType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TRIGGER_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRTriggerTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeDerivationRule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeDerivationRule.php index 65cbb53a03..33ef1218f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeDerivationRule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeDerivationRule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTypeDerivationRule extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_DERIVATION_RULE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRTypeDerivationRuleList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeRestfulInteraction.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeRestfulInteraction.php index ac9b1fa045..863569c942 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeRestfulInteraction.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRTypeRestfulInteraction.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRTypeRestfulInteraction extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_TYPE_RESTFUL_INTERACTION; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRTypeRestfulInteractionList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUDIEntryType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUDIEntryType.php index 0b9c3d8842..3828d930fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUDIEntryType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUDIEntryType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRUDIEntryType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UDIENTRY_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRUDIEntryTypeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnitsOfTime.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnitsOfTime.php index 01ee95dc4b..19b137ca98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnitsOfTime.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnitsOfTime.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRUnitsOfTime extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNITS_OF_TIME; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRUnitsOfTimeList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnknownContentCode.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnknownContentCode.php index 98578341f6..16deaf295b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnknownContentCode.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnknownContentCode.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRUnknownContentCode extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNKNOWN_CONTENT_CODE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRUnknownContentCodeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnsignedInt.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnsignedInt.php index 613cf424f4..d41615d322 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnsignedInt.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUnsignedInt.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRUnsignedInt extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UNSIGNED_INT; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRUnsignedIntPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUri.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUri.php index cba0fa495e..00f5b54687 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUri.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUri.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRUri extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_URI; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRUriPrimitive @@ -176,8 +175,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -260,6 +259,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUsageContext.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUsageContext.php index 80d5553107..e8d375a257 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUsageContext.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUsageContext.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -87,7 +87,7 @@ class FHIRUsageContext extends FHIRElement const FIELD_VALUE_RANGE = 'valueRange'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -351,8 +351,8 @@ public function setValueRange(FHIRRange $valueRange = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -454,6 +454,9 @@ public function jsonSerialize() if (null !== ($v = $this->getValueRange())) { $a[self::FIELD_VALUE_RANGE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUse.php index 415dba805f..a53ef617ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRUse extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_USE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRUseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUuid.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUuid.php index 1246b67444..fc58b2cdf2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUuid.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRUuid.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -81,10 +81,9 @@ class FHIRUuid extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_UUID; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRUuidPrimitive @@ -177,8 +176,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -261,6 +260,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionBase.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionBase.php index 0ad2bcec2d..77a9f11359 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionBase.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionBase.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRVisionBase extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_BASE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRVisionBaseList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionEyes.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionEyes.php index 81d67607d9..f44570a279 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionEyes.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRVisionEyes.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -79,10 +79,9 @@ class FHIRVisionEyes extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_VISION_EYES; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRVisionEyesList @@ -171,8 +170,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -255,6 +254,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRXPathUsageType.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRXPathUsageType.php index 1f2f7bfafa..4c1d86e5bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRXPathUsageType.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRElement/FHIRXPathUsageType.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -80,10 +80,9 @@ class FHIRXPathUsageType extends FHIRElement // name of FHIR type this class describes const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_XPATH_USAGE_TYPE; const FIELD_VALUE = 'value'; - const FIELD_VALUE_EXT = '_value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|\DCarbone\PHPFHIRGenerated\STU3\FHIRCodePrimitive\FHIRXPathUsageTypeList @@ -172,8 +171,8 @@ public function setValue($value = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -256,6 +255,7 @@ public function jsonSerialize() if (null !== ($v = $this->getValue())) { $a[self::FIELD_VALUE] = $v; } + return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIdPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIdPrimitive.php index aa1f7068da..334534e25d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIdPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIdPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRIdPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -174,8 +174,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRInstantPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRInstantPrimitive.php index 8c7e3f7326..10deeb6f8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRInstantPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRInstantPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRInstantPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -188,8 +188,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIntegerPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIntegerPrimitive.php index 3001d15a87..fca82f8d67 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIntegerPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRIntegerPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRIntegerPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|integer @@ -185,8 +185,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRMarkdownPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRMarkdownPrimitive.php index d778bf97fd..1e67117c71 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRMarkdownPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRMarkdownPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRMarkdownPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -172,8 +172,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIROidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIROidPrimitive.php index 6ce11287b8..35d8603393 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIROidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIROidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIROidPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -173,8 +173,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRPositiveIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRPositiveIntPrimitive.php index afe6a73181..6a4265e2f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRPositiveIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRPositiveIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRPositiveIntPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|integer @@ -185,8 +185,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource.php index c0013d50dd..79d74f38ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRResource implements PHPFHIRCommentContainerInterface, PHPFHIRTypeInter const FIELD_META = 'meta'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Any combination of letters, numerals, "-" and ".", with a length limit of 64 @@ -173,52 +173,73 @@ public function __construct($data = null) $this->_addFHIRComment($data[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS]); } } - if (isset($data[self::FIELD_ID])) { - $ext = (isset($data[self::FIELD_ID_EXT]) && is_array($data[self::FIELD_ID_EXT])) - ? $data[self::FIELD_ID_EXT] - : null; - if ($data[self::FIELD_ID] instanceof FHIRId) { - $this->setId($data[self::FIELD_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ID])) { - $this->setId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_ID]] + $ext)); - } else if (is_array($data[self::FIELD_ID])) { - $this->setId(new FHIRId(array_merge($ext, $data[self::FIELD_ID]))); - } + if (isset($data[self::FIELD_ID]) || isset($data[self::FIELD_ID_EXT])) { + if (isset($data[self::FIELD_ID])) { + $value = $data[self::FIELD_ID]; } else { - $this->setId(new FHIRId($data[self::FIELD_ID])); + $value = null; } - } - if (isset($data[self::FIELD_IMPLICIT_RULES])) { - $ext = (isset($data[self::FIELD_IMPLICIT_RULES_EXT]) && is_array($data[self::FIELD_IMPLICIT_RULES_EXT])) - ? $data[self::FIELD_IMPLICIT_RULES_EXT] - : null; - if ($data[self::FIELD_IMPLICIT_RULES] instanceof FHIRUri) { - $this->setImplicitRules($data[self::FIELD_IMPLICIT_RULES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IMPLICIT_RULES])) { - $this->setImplicitRules(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IMPLICIT_RULES]] + $ext)); - } else if (is_array($data[self::FIELD_IMPLICIT_RULES])) { - $this->setImplicitRules(new FHIRUri(array_merge($ext, $data[self::FIELD_IMPLICIT_RULES]))); - } + if (isset($data[self::FIELD_ID_EXT]) && is_array($data[self::FIELD_ID_EXT])) { + $ext = $data[self::FIELD_ID_EXT]; } else { - $this->setImplicitRules(new FHIRUri($data[self::FIELD_IMPLICIT_RULES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setId($value); + } else if (is_array($value)) { + $this->setId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setId(new FHIRId($ext)); } } - if (isset($data[self::FIELD_LANGUAGE])) { - $ext = (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) - ? $data[self::FIELD_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_LANGUAGE] instanceof FHIRCode) { - $this->setLanguage($data[self::FIELD_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_LANGUAGE])) { - $this->setLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_LANGUAGE]))); + if (isset($data[self::FIELD_IMPLICIT_RULES]) || isset($data[self::FIELD_IMPLICIT_RULES_EXT])) { + if (isset($data[self::FIELD_IMPLICIT_RULES])) { + $value = $data[self::FIELD_IMPLICIT_RULES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPLICIT_RULES_EXT]) && is_array($data[self::FIELD_IMPLICIT_RULES_EXT])) { + $ext = $data[self::FIELD_IMPLICIT_RULES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setImplicitRules($value); + } else if (is_array($value)) { + $this->setImplicitRules(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setImplicitRules(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setImplicitRules(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_LANGUAGE]) || isset($data[self::FIELD_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_LANGUAGE])) { + $value = $data[self::FIELD_LANGUAGE]; } else { - $this->setLanguage(new FHIRCode($data[self::FIELD_LANGUAGE])); + $value = null; + } + if (isset($data[self::FIELD_LANGUAGE_EXT]) && is_array($data[self::FIELD_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_LANGUAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setLanguage($value); + } else if (is_array($value)) { + $this->setLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLanguage(new FHIRCode($ext)); } } if (isset($data[self::FIELD_META])) { @@ -443,8 +464,8 @@ public function setMeta(FHIRMeta $meta = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** @@ -561,28 +582,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getId())) { $a[self::FIELD_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_ID_EXT] = $enc; } } if (null !== ($v = $this->getImplicitRules())) { $a[self::FIELD_IMPLICIT_RULES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_IMPLICIT_RULES_EXT] = $enc; } } if (null !== ($v = $this->getLanguage())) { $a[self::FIELD_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getMeta())) { $a[self::FIELD_META] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBinary.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBinary.php index 8a81310686..3091928d11 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBinary.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBinary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -89,7 +89,7 @@ class FHIRBinary extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_SECURITY_CONTEXT = 'securityContext'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A stream of bytes @@ -147,36 +147,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CONTENT])) { - $ext = (isset($data[self::FIELD_CONTENT_EXT]) && is_array($data[self::FIELD_CONTENT_EXT])) - ? $data[self::FIELD_CONTENT_EXT] - : null; - if ($data[self::FIELD_CONTENT] instanceof FHIRBase64Binary) { - $this->setContent($data[self::FIELD_CONTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT])) { - $this->setContent(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $data[self::FIELD_CONTENT]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT])) { - $this->setContent(new FHIRBase64Binary(array_merge($ext, $data[self::FIELD_CONTENT]))); - } + if (isset($data[self::FIELD_CONTENT]) || isset($data[self::FIELD_CONTENT_EXT])) { + if (isset($data[self::FIELD_CONTENT])) { + $value = $data[self::FIELD_CONTENT]; } else { - $this->setContent(new FHIRBase64Binary($data[self::FIELD_CONTENT])); + $value = null; } - } - if (isset($data[self::FIELD_CONTENT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) - ? $data[self::FIELD_CONTENT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTENT_TYPE] instanceof FHIRCode) { - $this->setContentType($data[self::FIELD_CONTENT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CONTENT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT_TYPE])) { - $this->setContentType(new FHIRCode(array_merge($ext, $data[self::FIELD_CONTENT_TYPE]))); + if (isset($data[self::FIELD_CONTENT_EXT]) && is_array($data[self::FIELD_CONTENT_EXT])) { + $ext = $data[self::FIELD_CONTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBase64Binary) { + $this->setContent($value); + } else if (is_array($value)) { + $this->setContent(new FHIRBase64Binary(array_merge($ext, $value))); + } else { + $this->setContent(new FHIRBase64Binary([FHIRBase64Binary::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setContent(new FHIRBase64Binary($ext)); + } + } + if (isset($data[self::FIELD_CONTENT_TYPE]) || isset($data[self::FIELD_CONTENT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTENT_TYPE])) { + $value = $data[self::FIELD_CONTENT_TYPE]; } else { - $this->setContentType(new FHIRCode($data[self::FIELD_CONTENT_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_CONTENT_TYPE_EXT]) && is_array($data[self::FIELD_CONTENT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTENT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setContentType($value); + } else if (is_array($value)) { + $this->setContentType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setContentType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContentType(new FHIRCode($ext)); } } if (isset($data[self::FIELD_SECURITY_CONTEXT])) { @@ -329,8 +343,8 @@ public function setSecurityContext(FHIRReference $securityContext = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -432,21 +446,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getContent())) { $a[self::FIELD_CONTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBase64Binary::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBase64Binary::FIELD_VALUE]); $a[self::FIELD_CONTENT_EXT] = $enc; } } if (null !== ($v = $this->getContentType())) { $a[self::FIELD_CONTENT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CONTENT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getSecurityContext())) { $a[self::FIELD_SECURITY_CONTEXT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBundle.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBundle.php index b5fdde354b..0849554e47 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBundle.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRBundle.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRBundle extends FHIRResource implements PHPFHIRContainedTypeInterface const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A container for a collection of resources. @@ -235,36 +235,50 @@ public function __construct($data = null) $this->setSignature(new FHIRSignature($data[self::FIELD_SIGNATURE])); } } - if (isset($data[self::FIELD_TOTAL])) { - $ext = (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) - ? $data[self::FIELD_TOTAL_EXT] - : null; - if ($data[self::FIELD_TOTAL] instanceof FHIRUnsignedInt) { - $this->setTotal($data[self::FIELD_TOTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_TOTAL]] + $ext)); - } else if (is_array($data[self::FIELD_TOTAL])) { - $this->setTotal(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_TOTAL]))); - } + if (isset($data[self::FIELD_TOTAL]) || isset($data[self::FIELD_TOTAL_EXT])) { + if (isset($data[self::FIELD_TOTAL])) { + $value = $data[self::FIELD_TOTAL]; } else { - $this->setTotal(new FHIRUnsignedInt($data[self::FIELD_TOTAL])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRBundleType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBundleType([FHIRBundleType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBundleType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_TOTAL_EXT]) && is_array($data[self::FIELD_TOTAL_EXT])) { + $ext = $data[self::FIELD_TOTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setTotal($value); + } else if (is_array($value)) { + $this->setTotal(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setTotal(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTotal(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRBundleType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBundleType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRBundleType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRBundleType([FHIRBundleType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRBundleType($ext)); } } } @@ -541,8 +555,8 @@ public function setType(FHIRBundleType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -667,31 +681,50 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getSignature())) { $a[self::FIELD_SIGNATURE] = $v; } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_TOTAL_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBundleType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBundleType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource.php index 3969be3109..26396bf9b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -86,7 +86,7 @@ class FHIRDomainResource extends FHIRResource const FIELD_TEXT = 'text'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * These resources do not have an independent existence apart from the resource @@ -517,8 +517,8 @@ public function setText(FHIRNarrative $text = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -633,17 +633,38 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContained())) { - $a[self::FIELD_CONTAINED] = $vs; + $a[self::FIELD_CONTAINED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINED][] = $v; + } } if ([] !== ($vs = $this->getExtension())) { - $a[self::FIELD_EXTENSION] = $vs; + $a[self::FIELD_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXTENSION][] = $v; + } } if ([] !== ($vs = $this->getModifierExtension())) { - $a[self::FIELD_MODIFIER_EXTENSION] = $vs; + $a[self::FIELD_MODIFIER_EXTENSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODIFIER_EXTENSION][] = $v; + } } if (null !== ($v = $this->getText())) { $a[self::FIELD_TEXT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAccount.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAccount.php index 1560b444fa..43774bea26 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAccount.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAccount.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRAccount extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A time period defined by a start and end date and optionally time. @@ -300,20 +300,27 @@ public function __construct($data = null) $this->addCoverage(new FHIRAccountCoverage($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_GUARANTOR])) { @@ -352,20 +359,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OWNER])) { @@ -382,20 +396,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRAccountStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAccountStatus([FHIRAccountStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAccountStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRAccountStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAccountStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRAccountStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRAccountStatus([FHIRAccountStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRAccountStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -915,8 +936,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1098,25 +1119,47 @@ public function jsonSerialize() $a[self::FIELD_BALANCE] = $v; } if ([] !== ($vs = $this->getCoverage())) { - $a[self::FIELD_COVERAGE] = $vs; + $a[self::FIELD_COVERAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getGuarantor())) { - $a[self::FIELD_GUARANTOR] = $vs; + $a[self::FIELD_GUARANTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GUARANTOR][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1128,8 +1171,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAccountStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAccountStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1139,6 +1184,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php index ee740b0ac9..297769ddd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRActivityDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRActivityDefinition extends FHIRDomainResource implements PHPFHIRContai const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -690,20 +690,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_BODY_SITE])) { @@ -767,52 +774,73 @@ public function __construct($data = null) $this->addContributor(new FHIRContributor($data[self::FIELD_CONTRIBUTOR])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DOSAGE])) { @@ -858,20 +886,27 @@ public function __construct($data = null) $this->setEffectivePeriod(new FHIRPeriod($data[self::FIELD_EFFECTIVE_PERIOD])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -910,36 +945,50 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRResourceType) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRResourceType(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRResourceType($data[self::FIELD_KIND])); + $value = null; } - } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKind(new FHIRResourceType($ext)); + } + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_LIBRARY])) { @@ -967,20 +1016,27 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARTICIPANT])) { @@ -1015,36 +1071,50 @@ public function __construct($data = null) $this->setProductReference(new FHIRReference($data[self::FIELD_PRODUCT_REFERENCE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_QUANTITY])) { @@ -1072,36 +1142,50 @@ public function __construct($data = null) $this->addRelatedArtifact(new FHIRRelatedArtifact($data[self::FIELD_RELATED_ARTIFACT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -1125,20 +1209,27 @@ public function __construct($data = null) $this->setTimingTiming(new FHIRTiming($data[self::FIELD_TIMING_TIMING])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1166,36 +1257,50 @@ public function __construct($data = null) $this->setTransform(new FHIRReference($data[self::FIELD_TRANSFORM])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1216,20 +1321,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -3035,8 +3147,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -3528,95 +3640,165 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getContributor())) { - $a[self::FIELD_CONTRIBUTOR] = $vs; + $a[self::FIELD_CONTRIBUTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRIBUTOR][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if ([] !== ($vs = $this->getDynamicValue())) { - $a[self::FIELD_DYNAMIC_VALUE] = $vs; + $a[self::FIELD_DYNAMIC_VALUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DYNAMIC_VALUE][] = $v; + } } if (null !== ($v = $this->getEffectivePeriod())) { $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceType::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getLibrary())) { - $a[self::FIELD_LIBRARY] = $vs; + $a[self::FIELD_LIBRARY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LIBRARY][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getProductCodeableConcept())) { $a[self::FIELD_PRODUCT_CODEABLE_CONCEPT] = $v; @@ -3626,15 +3808,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } @@ -3642,19 +3828,29 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -3669,41 +3865,64 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getTransform())) { $a[self::FIELD_TRANSFORM] = $v; } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php index 1bd87329a5..b5a872d89e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAdverseEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRAdverseEvent extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Overall categorization of the event, e.g. real or potential @@ -326,52 +326,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRAdverseEventCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRAdverseEventCategory([FHIRAdverseEventCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRAdverseEventCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; } else { - $this->setCategory(new FHIRAdverseEventCategory($data[self::FIELD_CATEGORY])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdverseEventCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRAdverseEventCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRAdverseEventCategory([FHIRAdverseEventCategory::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCategory(new FHIRAdverseEventCategory($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_EVENT_PARTICIPANT])) { @@ -1217,8 +1238,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1433,22 +1454,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdverseEventCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdverseEventCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1465,32 +1492,65 @@ public function jsonSerialize() $a[self::FIELD_OUTCOME] = $v; } if ([] !== ($vs = $this->getReaction())) { - $a[self::FIELD_REACTION] = $vs; + $a[self::FIELD_REACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REACTION][] = $v; + } } if (null !== ($v = $this->getRecorder())) { $a[self::FIELD_RECORDER] = $v; } if ([] !== ($vs = $this->getReferenceDocument())) { - $a[self::FIELD_REFERENCE_DOCUMENT] = $vs; + $a[self::FIELD_REFERENCE_DOCUMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_DOCUMENT][] = $v; + } } if (null !== ($v = $this->getSeriousness())) { $a[self::FIELD_SERIOUSNESS] = $v; } if ([] !== ($vs = $this->getStudy())) { - $a[self::FIELD_STUDY] = $vs; + $a[self::FIELD_STUDY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STUDY][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSubjectMedicalHistory())) { - $a[self::FIELD_SUBJECT_MEDICAL_HISTORY] = $vs; + $a[self::FIELD_SUBJECT_MEDICAL_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT_MEDICAL_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getSuspectEntity())) { - $a[self::FIELD_SUSPECT_ENTITY] = $vs; + $a[self::FIELD_SUSPECT_ENTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUSPECT_ENTITY][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php index d6182c2628..e28fce65ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAllergyIntolerance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRAllergyIntolerance extends FHIRDomainResource implements PHPFHIRContai const FIELD_VERIFICATION_STATUS_EXT = '_verificationStatus'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -384,20 +384,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ASSERTED_DATE])) { - $ext = (isset($data[self::FIELD_ASSERTED_DATE_EXT]) && is_array($data[self::FIELD_ASSERTED_DATE_EXT])) - ? $data[self::FIELD_ASSERTED_DATE_EXT] - : null; - if ($data[self::FIELD_ASSERTED_DATE] instanceof FHIRDateTime) { - $this->setAssertedDate($data[self::FIELD_ASSERTED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ASSERTED_DATE])) { - $this->setAssertedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ASSERTED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_ASSERTED_DATE])) { - $this->setAssertedDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ASSERTED_DATE]))); - } + if (isset($data[self::FIELD_ASSERTED_DATE]) || isset($data[self::FIELD_ASSERTED_DATE_EXT])) { + if (isset($data[self::FIELD_ASSERTED_DATE])) { + $value = $data[self::FIELD_ASSERTED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ASSERTED_DATE_EXT]) && is_array($data[self::FIELD_ASSERTED_DATE_EXT])) { + $ext = $data[self::FIELD_ASSERTED_DATE_EXT]; } else { - $this->setAssertedDate(new FHIRDateTime($data[self::FIELD_ASSERTED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAssertedDate($value); + } else if (is_array($value)) { + $this->setAssertedDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAssertedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAssertedDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ASSERTER])) { @@ -407,49 +414,65 @@ public function __construct($data = null) $this->setAsserter(new FHIRReference($data[self::FIELD_ASSERTER])); } } - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if (is_array($data[self::FIELD_CATEGORY])) { - foreach($data[self::FIELD_CATEGORY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRAllergyIntoleranceCategory) { - $this->addCategory($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addCategory(new FHIRAllergyIntoleranceCategory(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceCategory) { + $this->addCategory($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRAllergyIntoleranceCategory) { + $this->addCategory($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addCategory(new FHIRAllergyIntoleranceCategory(array_merge($v, $iext))); + } else { + $this->addCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addCategory(new FHIRAllergyIntoleranceCategory($v)); } + } elseif (is_array($value)) { + $this->addCategory(new FHIRAllergyIntoleranceCategory(array_merge($ext, $value))); + } else { + $this->addCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_CATEGORY] instanceof FHIRAllergyIntoleranceCategory) { - $this->addCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CATEGORY])) { - $this->addCategory(new FHIRAllergyIntoleranceCategory([FHIRAllergyIntoleranceCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else { - $this->addCategory(new FHIRAllergyIntoleranceCategory($data[self::FIELD_CATEGORY])); - } - } - if (isset($data[self::FIELD_CLINICAL_STATUS])) { - $ext = (isset($data[self::FIELD_CLINICAL_STATUS_EXT]) && is_array($data[self::FIELD_CLINICAL_STATUS_EXT])) - ? $data[self::FIELD_CLINICAL_STATUS_EXT] - : null; - if ($data[self::FIELD_CLINICAL_STATUS] instanceof FHIRAllergyIntoleranceClinicalStatus) { - $this->setClinicalStatus($data[self::FIELD_CLINICAL_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLINICAL_STATUS])) { - $this->setClinicalStatus(new FHIRAllergyIntoleranceClinicalStatus([FHIRAllergyIntoleranceClinicalStatus::FIELD_VALUE => $data[self::FIELD_CLINICAL_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_CLINICAL_STATUS])) { - $this->setClinicalStatus(new FHIRAllergyIntoleranceClinicalStatus(array_merge($ext, $data[self::FIELD_CLINICAL_STATUS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addCategory(new FHIRAllergyIntoleranceCategory($iext)); } + } + } + if (isset($data[self::FIELD_CLINICAL_STATUS]) || isset($data[self::FIELD_CLINICAL_STATUS_EXT])) { + if (isset($data[self::FIELD_CLINICAL_STATUS])) { + $value = $data[self::FIELD_CLINICAL_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CLINICAL_STATUS_EXT]) && is_array($data[self::FIELD_CLINICAL_STATUS_EXT])) { + $ext = $data[self::FIELD_CLINICAL_STATUS_EXT]; } else { - $this->setClinicalStatus(new FHIRAllergyIntoleranceClinicalStatus($data[self::FIELD_CLINICAL_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceClinicalStatus) { + $this->setClinicalStatus($value); + } else if (is_array($value)) { + $this->setClinicalStatus(new FHIRAllergyIntoleranceClinicalStatus(array_merge($ext, $value))); + } else { + $this->setClinicalStatus(new FHIRAllergyIntoleranceClinicalStatus([FHIRAllergyIntoleranceClinicalStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setClinicalStatus(new FHIRAllergyIntoleranceClinicalStatus($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -459,20 +482,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CRITICALITY])) { - $ext = (isset($data[self::FIELD_CRITICALITY_EXT]) && is_array($data[self::FIELD_CRITICALITY_EXT])) - ? $data[self::FIELD_CRITICALITY_EXT] - : null; - if ($data[self::FIELD_CRITICALITY] instanceof FHIRAllergyIntoleranceCriticality) { - $this->setCriticality($data[self::FIELD_CRITICALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITICALITY])) { - $this->setCriticality(new FHIRAllergyIntoleranceCriticality([FHIRAllergyIntoleranceCriticality::FIELD_VALUE => $data[self::FIELD_CRITICALITY]] + $ext)); - } else if (is_array($data[self::FIELD_CRITICALITY])) { - $this->setCriticality(new FHIRAllergyIntoleranceCriticality(array_merge($ext, $data[self::FIELD_CRITICALITY]))); - } + if (isset($data[self::FIELD_CRITICALITY]) || isset($data[self::FIELD_CRITICALITY_EXT])) { + if (isset($data[self::FIELD_CRITICALITY])) { + $value = $data[self::FIELD_CRITICALITY]; } else { - $this->setCriticality(new FHIRAllergyIntoleranceCriticality($data[self::FIELD_CRITICALITY])); + $value = null; + } + if (isset($data[self::FIELD_CRITICALITY_EXT]) && is_array($data[self::FIELD_CRITICALITY_EXT])) { + $ext = $data[self::FIELD_CRITICALITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceCriticality) { + $this->setCriticality($value); + } else if (is_array($value)) { + $this->setCriticality(new FHIRAllergyIntoleranceCriticality(array_merge($ext, $value))); + } else { + $this->setCriticality(new FHIRAllergyIntoleranceCriticality([FHIRAllergyIntoleranceCriticality::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCriticality(new FHIRAllergyIntoleranceCriticality($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -493,20 +523,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_LAST_OCCURRENCE])) { - $ext = (isset($data[self::FIELD_LAST_OCCURRENCE_EXT]) && is_array($data[self::FIELD_LAST_OCCURRENCE_EXT])) - ? $data[self::FIELD_LAST_OCCURRENCE_EXT] - : null; - if ($data[self::FIELD_LAST_OCCURRENCE] instanceof FHIRDateTime) { - $this->setLastOccurrence($data[self::FIELD_LAST_OCCURRENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_OCCURRENCE])) { - $this->setLastOccurrence(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_LAST_OCCURRENCE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_OCCURRENCE])) { - $this->setLastOccurrence(new FHIRDateTime(array_merge($ext, $data[self::FIELD_LAST_OCCURRENCE]))); - } + if (isset($data[self::FIELD_LAST_OCCURRENCE]) || isset($data[self::FIELD_LAST_OCCURRENCE_EXT])) { + if (isset($data[self::FIELD_LAST_OCCURRENCE])) { + $value = $data[self::FIELD_LAST_OCCURRENCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_OCCURRENCE_EXT]) && is_array($data[self::FIELD_LAST_OCCURRENCE_EXT])) { + $ext = $data[self::FIELD_LAST_OCCURRENCE_EXT]; } else { - $this->setLastOccurrence(new FHIRDateTime($data[self::FIELD_LAST_OCCURRENCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setLastOccurrence($value); + } else if (is_array($value)) { + $this->setLastOccurrence(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setLastOccurrence(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastOccurrence(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -534,20 +571,27 @@ public function __construct($data = null) $this->setOnsetAge(new FHIRAge($data[self::FIELD_ONSET_AGE])); } } - if (isset($data[self::FIELD_ONSET_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) - ? $data[self::FIELD_ONSET_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ONSET_DATE_TIME] instanceof FHIRDateTime) { - $this->setOnsetDateTime($data[self::FIELD_ONSET_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ONSET_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ONSET_DATE_TIME]))); - } + if (isset($data[self::FIELD_ONSET_DATE_TIME]) || isset($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ONSET_DATE_TIME])) { + $value = $data[self::FIELD_ONSET_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ONSET_DATE_TIME_EXT]; } else { - $this->setOnsetDateTime(new FHIRDateTime($data[self::FIELD_ONSET_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOnsetDateTime($value); + } else if (is_array($value)) { + $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ONSET_PERIOD])) { @@ -564,20 +608,27 @@ public function __construct($data = null) $this->setOnsetRange(new FHIRRange($data[self::FIELD_ONSET_RANGE])); } } - if (isset($data[self::FIELD_ONSET_STRING])) { - $ext = (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) - ? $data[self::FIELD_ONSET_STRING_EXT] - : null; - if ($data[self::FIELD_ONSET_STRING] instanceof FHIRString) { - $this->setOnsetString($data[self::FIELD_ONSET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ONSET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString(array_merge($ext, $data[self::FIELD_ONSET_STRING]))); - } + if (isset($data[self::FIELD_ONSET_STRING]) || isset($data[self::FIELD_ONSET_STRING_EXT])) { + if (isset($data[self::FIELD_ONSET_STRING])) { + $value = $data[self::FIELD_ONSET_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) { + $ext = $data[self::FIELD_ONSET_STRING_EXT]; } else { - $this->setOnsetString(new FHIRString($data[self::FIELD_ONSET_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOnsetString($value); + } else if (is_array($value)) { + $this->setOnsetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetString(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -612,36 +663,50 @@ public function __construct($data = null) $this->setRecorder(new FHIRReference($data[self::FIELD_RECORDER])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRAllergyIntoleranceType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAllergyIntoleranceType([FHIRAllergyIntoleranceType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRAllergyIntoleranceType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRAllergyIntoleranceType($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_VERIFICATION_STATUS])) { - $ext = (isset($data[self::FIELD_VERIFICATION_STATUS_EXT]) && is_array($data[self::FIELD_VERIFICATION_STATUS_EXT])) - ? $data[self::FIELD_VERIFICATION_STATUS_EXT] - : null; - if ($data[self::FIELD_VERIFICATION_STATUS] instanceof FHIRAllergyIntoleranceVerificationStatus) { - $this->setVerificationStatus($data[self::FIELD_VERIFICATION_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERIFICATION_STATUS])) { - $this->setVerificationStatus(new FHIRAllergyIntoleranceVerificationStatus([FHIRAllergyIntoleranceVerificationStatus::FIELD_VALUE => $data[self::FIELD_VERIFICATION_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_VERIFICATION_STATUS])) { - $this->setVerificationStatus(new FHIRAllergyIntoleranceVerificationStatus(array_merge($ext, $data[self::FIELD_VERIFICATION_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRAllergyIntoleranceType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRAllergyIntoleranceType([FHIRAllergyIntoleranceType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRAllergyIntoleranceType($ext)); + } + } + if (isset($data[self::FIELD_VERIFICATION_STATUS]) || isset($data[self::FIELD_VERIFICATION_STATUS_EXT])) { + if (isset($data[self::FIELD_VERIFICATION_STATUS])) { + $value = $data[self::FIELD_VERIFICATION_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERIFICATION_STATUS_EXT]) && is_array($data[self::FIELD_VERIFICATION_STATUS_EXT])) { + $ext = $data[self::FIELD_VERIFICATION_STATUS_EXT]; } else { - $this->setVerificationStatus(new FHIRAllergyIntoleranceVerificationStatus($data[self::FIELD_VERIFICATION_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAllergyIntoleranceVerificationStatus) { + $this->setVerificationStatus($value); + } else if (is_array($value)) { + $this->setVerificationStatus(new FHIRAllergyIntoleranceVerificationStatus(array_merge($ext, $value))); + } else { + $this->setVerificationStatus(new FHIRAllergyIntoleranceVerificationStatus([FHIRAllergyIntoleranceVerificationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVerificationStatus(new FHIRAllergyIntoleranceVerificationStatus($ext)); } } } @@ -1443,8 +1508,8 @@ public function setVerificationStatus(FHIRAllergyIntoleranceVerificationStatus $ */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1686,8 +1751,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAssertedDate())) { $a[self::FIELD_ASSERTED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ASSERTED_DATE_EXT] = $enc; } } @@ -1696,23 +1763,33 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getCategory())) { $a[self::FIELD_CATEGORY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CATEGORY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CATEGORY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRAllergyIntoleranceCategory::FIELD_VALUE]) || array_key_exists(FHIRAllergyIntoleranceCategory::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CATEGORY_EXT][] = null; + unset($enc[FHIRAllergyIntoleranceCategory::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CATEGORY_EXT] = $encs; + } } if (null !== ($v = $this->getClinicalStatus())) { $a[self::FIELD_CLINICAL_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceClinicalStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceClinicalStatus::FIELD_VALUE]); $a[self::FIELD_CLINICAL_STATUS_EXT] = $enc; } } @@ -1721,31 +1798,49 @@ public function jsonSerialize() } if (null !== ($v = $this->getCriticality())) { $a[self::FIELD_CRITICALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceCriticality::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceCriticality::FIELD_VALUE]); $a[self::FIELD_CRITICALITY_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLastOccurrence())) { $a[self::FIELD_LAST_OCCURRENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_LAST_OCCURRENCE_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOnsetAge())) { $a[self::FIELD_ONSET_AGE] = $v; } if (null !== ($v = $this->getOnsetDateTime())) { $a[self::FIELD_ONSET_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ONSET_DATE_TIME_EXT] = $enc; } } @@ -1757,8 +1852,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetString())) { $a[self::FIELD_ONSET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ONSET_STRING_EXT] = $enc; } } @@ -1766,25 +1863,38 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getReaction())) { - $a[self::FIELD_REACTION] = $vs; + $a[self::FIELD_REACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REACTION][] = $v; + } } if (null !== ($v = $this->getRecorder())) { $a[self::FIELD_RECORDER] = $v; } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getVerificationStatus())) { $a[self::FIELD_VERIFICATION_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAllergyIntoleranceVerificationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAllergyIntoleranceVerificationStatus::FIELD_VALUE]); $a[self::FIELD_VERIFICATION_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointment.php index ac04a4296d..c04c6850e3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRAppointment extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_SUPPORTING_INFORMATION = 'supportingInformation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -415,68 +415,96 @@ public function __construct($data = null) $this->setAppointmentType(new FHIRCodeableConcept($data[self::FIELD_APPOINTMENT_TYPE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); - } - } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -533,20 +561,27 @@ public function __construct($data = null) $this->addIndication(new FHIRReference($data[self::FIELD_INDICATION])); } } - if (isset($data[self::FIELD_MINUTES_DURATION])) { - $ext = (isset($data[self::FIELD_MINUTES_DURATION_EXT]) && is_array($data[self::FIELD_MINUTES_DURATION_EXT])) - ? $data[self::FIELD_MINUTES_DURATION_EXT] - : null; - if ($data[self::FIELD_MINUTES_DURATION] instanceof FHIRPositiveInt) { - $this->setMinutesDuration($data[self::FIELD_MINUTES_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MINUTES_DURATION])) { - $this->setMinutesDuration(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_MINUTES_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_MINUTES_DURATION])) { - $this->setMinutesDuration(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_MINUTES_DURATION]))); - } + if (isset($data[self::FIELD_MINUTES_DURATION]) || isset($data[self::FIELD_MINUTES_DURATION_EXT])) { + if (isset($data[self::FIELD_MINUTES_DURATION])) { + $value = $data[self::FIELD_MINUTES_DURATION]; } else { - $this->setMinutesDuration(new FHIRPositiveInt($data[self::FIELD_MINUTES_DURATION])); + $value = null; + } + if (isset($data[self::FIELD_MINUTES_DURATION_EXT]) && is_array($data[self::FIELD_MINUTES_DURATION_EXT])) { + $ext = $data[self::FIELD_MINUTES_DURATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setMinutesDuration($value); + } else if (is_array($value)) { + $this->setMinutesDuration(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setMinutesDuration(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMinutesDuration(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PARTICIPANT])) { @@ -567,20 +602,27 @@ public function __construct($data = null) $this->addParticipant(new FHIRAppointmentParticipant($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRUnsignedInt) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRUnsignedInt($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_REASON])) { @@ -680,36 +722,50 @@ public function __construct($data = null) $this->addSpecialty(new FHIRCodeableConcept($data[self::FIELD_SPECIALTY])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInstant) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; + } else { + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; } else { - $this->setStart(new FHIRInstant($data[self::FIELD_START])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRAppointmentStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAppointmentStatus([FHIRAppointmentStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRAppointmentStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStart(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRAppointmentStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAppointmentStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRAppointmentStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRAppointmentStatus([FHIRAppointmentStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRAppointmentStatus($ext)); } } if (isset($data[self::FIELD_SUPPORTING_INFORMATION])) { @@ -1777,8 +1833,8 @@ public function setSupportingInformation(array $supportingInformation = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2095,92 +2151,171 @@ public function jsonSerialize() } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIncomingReferral())) { - $a[self::FIELD_INCOMING_REFERRAL] = $vs; + $a[self::FIELD_INCOMING_REFERRAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INCOMING_REFERRAL][] = $v; + } } if ([] !== ($vs = $this->getIndication())) { - $a[self::FIELD_INDICATION] = $vs; + $a[self::FIELD_INDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INDICATION][] = $v; + } } if (null !== ($v = $this->getMinutesDuration())) { $a[self::FIELD_MINUTES_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_MINUTES_DURATION_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if ([] !== ($vs = $this->getRequestedPeriod())) { - $a[self::FIELD_REQUESTED_PERIOD] = $vs; + $a[self::FIELD_REQUESTED_PERIOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUESTED_PERIOD][] = $v; + } } if (null !== ($v = $this->getServiceCategory())) { $a[self::FIELD_SERVICE_CATEGORY] = $v; } if ([] !== ($vs = $this->getServiceType())) { - $a[self::FIELD_SERVICE_TYPE] = $vs; + $a[self::FIELD_SERVICE_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_TYPE][] = $v; + } } if ([] !== ($vs = $this->getSlot())) { - $a[self::FIELD_SLOT] = $vs; + $a[self::FIELD_SLOT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SLOT][] = $v; + } } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAppointmentStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAppointmentStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php index c66bc460f3..90b67475a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAppointmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRAppointmentResponse extends FHIRDomainResource implements PHPFHIRConta const FIELD_START_EXT = '_start'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -238,36 +238,50 @@ public function __construct($data = null) $this->setAppointment(new FHIRReference($data[self::FIELD_APPOINTMENT])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); - } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -288,20 +302,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_PARTICIPANT_STATUS])) { - $ext = (isset($data[self::FIELD_PARTICIPANT_STATUS_EXT]) && is_array($data[self::FIELD_PARTICIPANT_STATUS_EXT])) - ? $data[self::FIELD_PARTICIPANT_STATUS_EXT] - : null; - if ($data[self::FIELD_PARTICIPANT_STATUS] instanceof FHIRParticipationStatus) { - $this->setParticipantStatus($data[self::FIELD_PARTICIPANT_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PARTICIPANT_STATUS])) { - $this->setParticipantStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $data[self::FIELD_PARTICIPANT_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_PARTICIPANT_STATUS])) { - $this->setParticipantStatus(new FHIRParticipationStatus(array_merge($ext, $data[self::FIELD_PARTICIPANT_STATUS]))); - } + if (isset($data[self::FIELD_PARTICIPANT_STATUS]) || isset($data[self::FIELD_PARTICIPANT_STATUS_EXT])) { + if (isset($data[self::FIELD_PARTICIPANT_STATUS])) { + $value = $data[self::FIELD_PARTICIPANT_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PARTICIPANT_STATUS_EXT]) && is_array($data[self::FIELD_PARTICIPANT_STATUS_EXT])) { + $ext = $data[self::FIELD_PARTICIPANT_STATUS_EXT]; } else { - $this->setParticipantStatus(new FHIRParticipationStatus($data[self::FIELD_PARTICIPANT_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRParticipationStatus) { + $this->setParticipantStatus($value); + } else if (is_array($value)) { + $this->setParticipantStatus(new FHIRParticipationStatus(array_merge($ext, $value))); + } else { + $this->setParticipantStatus(new FHIRParticipationStatus([FHIRParticipationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setParticipantStatus(new FHIRParticipationStatus($ext)); } } if (isset($data[self::FIELD_PARTICIPANT_TYPE])) { @@ -322,20 +343,27 @@ public function __construct($data = null) $this->addParticipantType(new FHIRCodeableConcept($data[self::FIELD_PARTICIPANT_TYPE])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInstant) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInstant($data[self::FIELD_START])); + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStart(new FHIRInstant($ext)); } } } @@ -718,8 +746,8 @@ public function setStart($start = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -879,38 +907,61 @@ public function jsonSerialize() } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getParticipantStatus())) { $a[self::FIELD_PARTICIPANT_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRParticipationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRParticipationStatus::FIELD_VALUE]); $a[self::FIELD_PARTICIPANT_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipantType())) { - $a[self::FIELD_PARTICIPANT_TYPE] = $vs; + $a[self::FIELD_PARTICIPANT_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT_TYPE][] = $v; + } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php index de0ac9b483..fac3d19845 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRAuditEvent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRAuditEvent extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Indicator for type of action performed during the event that generated the event @@ -247,20 +247,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION])) { - $ext = (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) - ? $data[self::FIELD_ACTION_EXT] - : null; - if ($data[self::FIELD_ACTION] instanceof FHIRAuditEventAction) { - $this->setAction($data[self::FIELD_ACTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRAuditEventAction([FHIRAuditEventAction::FIELD_VALUE => $data[self::FIELD_ACTION]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRAuditEventAction(array_merge($ext, $data[self::FIELD_ACTION]))); - } + if (isset($data[self::FIELD_ACTION]) || isset($data[self::FIELD_ACTION_EXT])) { + if (isset($data[self::FIELD_ACTION])) { + $value = $data[self::FIELD_ACTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) { + $ext = $data[self::FIELD_ACTION_EXT]; } else { - $this->setAction(new FHIRAuditEventAction($data[self::FIELD_ACTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAuditEventAction) { + $this->setAction($value); + } else if (is_array($value)) { + $this->setAction(new FHIRAuditEventAction(array_merge($ext, $value))); + } else { + $this->setAction(new FHIRAuditEventAction([FHIRAuditEventAction::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAction(new FHIRAuditEventAction($ext)); } } if (isset($data[self::FIELD_AGENT])) { @@ -299,36 +306,50 @@ public function __construct($data = null) $this->addEntity(new FHIRAuditEventEntity($data[self::FIELD_ENTITY])); } } - if (isset($data[self::FIELD_OUTCOME])) { - $ext = (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) - ? $data[self::FIELD_OUTCOME_EXT] - : null; - if ($data[self::FIELD_OUTCOME] instanceof FHIRAuditEventOutcome) { - $this->setOutcome($data[self::FIELD_OUTCOME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRAuditEventOutcome([FHIRAuditEventOutcome::FIELD_VALUE => $data[self::FIELD_OUTCOME]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME])) { - $this->setOutcome(new FHIRAuditEventOutcome(array_merge($ext, $data[self::FIELD_OUTCOME]))); - } + if (isset($data[self::FIELD_OUTCOME]) || isset($data[self::FIELD_OUTCOME_EXT])) { + if (isset($data[self::FIELD_OUTCOME])) { + $value = $data[self::FIELD_OUTCOME]; } else { - $this->setOutcome(new FHIRAuditEventOutcome($data[self::FIELD_OUTCOME])); + $value = null; } - } - if (isset($data[self::FIELD_OUTCOME_DESC])) { - $ext = (isset($data[self::FIELD_OUTCOME_DESC_EXT]) && is_array($data[self::FIELD_OUTCOME_DESC_EXT])) - ? $data[self::FIELD_OUTCOME_DESC_EXT] - : null; - if ($data[self::FIELD_OUTCOME_DESC] instanceof FHIRString) { - $this->setOutcomeDesc($data[self::FIELD_OUTCOME_DESC]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OUTCOME_DESC])) { - $this->setOutcomeDesc(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OUTCOME_DESC]] + $ext)); - } else if (is_array($data[self::FIELD_OUTCOME_DESC])) { - $this->setOutcomeDesc(new FHIRString(array_merge($ext, $data[self::FIELD_OUTCOME_DESC]))); + if (isset($data[self::FIELD_OUTCOME_EXT]) && is_array($data[self::FIELD_OUTCOME_EXT])) { + $ext = $data[self::FIELD_OUTCOME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAuditEventOutcome) { + $this->setOutcome($value); + } else if (is_array($value)) { + $this->setOutcome(new FHIRAuditEventOutcome(array_merge($ext, $value))); + } else { + $this->setOutcome(new FHIRAuditEventOutcome([FHIRAuditEventOutcome::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setOutcome(new FHIRAuditEventOutcome($ext)); + } + } + if (isset($data[self::FIELD_OUTCOME_DESC]) || isset($data[self::FIELD_OUTCOME_DESC_EXT])) { + if (isset($data[self::FIELD_OUTCOME_DESC])) { + $value = $data[self::FIELD_OUTCOME_DESC]; } else { - $this->setOutcomeDesc(new FHIRString($data[self::FIELD_OUTCOME_DESC])); + $value = null; + } + if (isset($data[self::FIELD_OUTCOME_DESC_EXT]) && is_array($data[self::FIELD_OUTCOME_DESC_EXT])) { + $ext = $data[self::FIELD_OUTCOME_DESC_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOutcomeDesc($value); + } else if (is_array($value)) { + $this->setOutcomeDesc(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOutcomeDesc(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOutcomeDesc(new FHIRString($ext)); } } if (isset($data[self::FIELD_PURPOSE_OF_EVENT])) { @@ -349,20 +370,27 @@ public function __construct($data = null) $this->addPurposeOfEvent(new FHIRCodeableConcept($data[self::FIELD_PURPOSE_OF_EVENT])); } } - if (isset($data[self::FIELD_RECORDED])) { - $ext = (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) - ? $data[self::FIELD_RECORDED_EXT] - : null; - if ($data[self::FIELD_RECORDED] instanceof FHIRInstant) { - $this->setRecorded($data[self::FIELD_RECORDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_RECORDED]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant(array_merge($ext, $data[self::FIELD_RECORDED]))); - } + if (isset($data[self::FIELD_RECORDED]) || isset($data[self::FIELD_RECORDED_EXT])) { + if (isset($data[self::FIELD_RECORDED])) { + $value = $data[self::FIELD_RECORDED]; } else { - $this->setRecorded(new FHIRInstant($data[self::FIELD_RECORDED])); + $value = null; + } + if (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) { + $ext = $data[self::FIELD_RECORDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setRecorded($value); + } else if (is_array($value)) { + $this->setRecorded(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecorded(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -861,8 +889,8 @@ public function setType(FHIRCoding $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1034,38 +1062,64 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAction())) { $a[self::FIELD_ACTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAuditEventAction::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAuditEventAction::FIELD_VALUE]); $a[self::FIELD_ACTION_EXT] = $enc; } } if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if ([] !== ($vs = $this->getEntity())) { - $a[self::FIELD_ENTITY] = $vs; + $a[self::FIELD_ENTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTITY][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAuditEventOutcome::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAuditEventOutcome::FIELD_VALUE]); $a[self::FIELD_OUTCOME_EXT] = $enc; } } if (null !== ($v = $this->getOutcomeDesc())) { $a[self::FIELD_OUTCOME_DESC] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OUTCOME_DESC_EXT] = $enc; } } if ([] !== ($vs = $this->getPurposeOfEvent())) { - $a[self::FIELD_PURPOSE_OF_EVENT] = $vs; + $a[self::FIELD_PURPOSE_OF_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PURPOSE_OF_EVENT][] = $v; + } } if (null !== ($v = $this->getRecorded())) { $a[self::FIELD_RECORDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_RECORDED_EXT] = $enc; } } @@ -1073,11 +1127,20 @@ public function jsonSerialize() $a[self::FIELD_SOURCE] = $v; } if ([] !== ($vs = $this->getSubtype())) { - $a[self::FIELD_SUBTYPE] = $vs; + $a[self::FIELD_SUBTYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBTYPE][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBasic.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBasic.php index 819b0ac629..cb7672ae89 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBasic.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBasic.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -92,7 +92,7 @@ class FHIRBasic extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -190,20 +190,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDate) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDate(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDate($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDate($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -461,8 +468,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -581,17 +588,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBodySite.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBodySite.php index f8894bdc9b..820828ef59 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBodySite.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRBodySite.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRBodySite extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_QUALIFIER = 'qualifier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -200,20 +200,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -223,20 +230,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -645,8 +659,8 @@ public function setQualifier(array $qualifier = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -793,8 +807,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } @@ -803,22 +819,45 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getImage())) { - $a[self::FIELD_IMAGE] = $vs; + $a[self::FIELD_IMAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGE][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getQualifier())) { - $a[self::FIELD_QUALIFIER] = $vs; + $a[self::FIELD_QUALIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUALIFIER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php index 899d1b09be..c03849895b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCapabilityStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -146,7 +146,7 @@ class FHIRCapabilityStatement extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A code that indicates whether an application accepts unknown elements or @@ -546,20 +546,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACCEPT_UNKNOWN])) { - $ext = (isset($data[self::FIELD_ACCEPT_UNKNOWN_EXT]) && is_array($data[self::FIELD_ACCEPT_UNKNOWN_EXT])) - ? $data[self::FIELD_ACCEPT_UNKNOWN_EXT] - : null; - if ($data[self::FIELD_ACCEPT_UNKNOWN] instanceof FHIRUnknownContentCode) { - $this->setAcceptUnknown($data[self::FIELD_ACCEPT_UNKNOWN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACCEPT_UNKNOWN])) { - $this->setAcceptUnknown(new FHIRUnknownContentCode([FHIRUnknownContentCode::FIELD_VALUE => $data[self::FIELD_ACCEPT_UNKNOWN]] + $ext)); - } else if (is_array($data[self::FIELD_ACCEPT_UNKNOWN])) { - $this->setAcceptUnknown(new FHIRUnknownContentCode(array_merge($ext, $data[self::FIELD_ACCEPT_UNKNOWN]))); - } + if (isset($data[self::FIELD_ACCEPT_UNKNOWN]) || isset($data[self::FIELD_ACCEPT_UNKNOWN_EXT])) { + if (isset($data[self::FIELD_ACCEPT_UNKNOWN])) { + $value = $data[self::FIELD_ACCEPT_UNKNOWN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACCEPT_UNKNOWN_EXT]) && is_array($data[self::FIELD_ACCEPT_UNKNOWN_EXT])) { + $ext = $data[self::FIELD_ACCEPT_UNKNOWN_EXT]; } else { - $this->setAcceptUnknown(new FHIRUnknownContentCode($data[self::FIELD_ACCEPT_UNKNOWN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnknownContentCode) { + $this->setAcceptUnknown($value); + } else if (is_array($value)) { + $this->setAcceptUnknown(new FHIRUnknownContentCode(array_merge($ext, $value))); + } else { + $this->setAcceptUnknown(new FHIRUnknownContentCode([FHIRUnknownContentCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAcceptUnknown(new FHIRUnknownContentCode($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -580,52 +587,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DOCUMENT])) { @@ -646,65 +674,88 @@ public function __construct($data = null) $this->addDocument(new FHIRCapabilityStatementDocument($data[self::FIELD_DOCUMENT])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; } - } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRId) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; } else { - $this->setFhirVersion(new FHIRId($data[self::FIELD_FHIR_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRId($ext)); } } - if (isset($data[self::FIELD_FORMAT])) { - $ext = (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) - ? $data[self::FIELD_FORMAT_EXT] - : null; - if (is_array($data[self::FIELD_FORMAT])) { - foreach($data[self::FIELD_FORMAT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addFormat($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addFormat(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_FORMAT]) || isset($data[self::FIELD_FORMAT_EXT])) { + if (isset($data[self::FIELD_FORMAT])) { + $value = $data[self::FIELD_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FORMAT_EXT]) && is_array($data[self::FIELD_FORMAT_EXT])) { + $ext = $data[self::FIELD_FORMAT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addFormat($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addFormat($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addFormat(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addFormat(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addFormat(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_FORMAT] instanceof FHIRCode) { - $this->addFormat($data[self::FIELD_FORMAT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_FORMAT])) { - $this->addFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_FORMAT]] + $ext)); - } else { - $this->addFormat(new FHIRCode($data[self::FIELD_FORMAT])); } } if (isset($data[self::FIELD_IMPLEMENTATION])) { @@ -714,62 +765,80 @@ public function __construct($data = null) $this->setImplementation(new FHIRCapabilityStatementImplementation($data[self::FIELD_IMPLEMENTATION])); } } - if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE])) { - $ext = (isset($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT]) && is_array($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT])) - ? $data[self::FIELD_IMPLEMENTATION_GUIDE_EXT] - : null; - if (is_array($data[self::FIELD_IMPLEMENTATION_GUIDE])) { - foreach($data[self::FIELD_IMPLEMENTATION_GUIDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addImplementationGuide($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addImplementationGuide(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addImplementationGuide(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE]) || isset($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT])) { + if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE])) { + $value = $data[self::FIELD_IMPLEMENTATION_GUIDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT]) && is_array($data[self::FIELD_IMPLEMENTATION_GUIDE_EXT])) { + $ext = $data[self::FIELD_IMPLEMENTATION_GUIDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addImplementationGuide($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addImplementationGuide($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addImplementationGuide(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addImplementationGuide(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addImplementationGuide(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addImplementationGuide(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addImplementationGuide(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addImplementationGuide(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_IMPLEMENTATION_GUIDE] instanceof FHIRUri) { - $this->addImplementationGuide($data[self::FIELD_IMPLEMENTATION_GUIDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_IMPLEMENTATION_GUIDE])) { - $this->addImplementationGuide(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IMPLEMENTATION_GUIDE]] + $ext)); - } else { - $this->addImplementationGuide(new FHIRUri($data[self::FIELD_IMPLEMENTATION_GUIDE])); } } - if (isset($data[self::FIELD_INSTANTIATES])) { - $ext = (isset($data[self::FIELD_INSTANTIATES_EXT]) && is_array($data[self::FIELD_INSTANTIATES_EXT])) - ? $data[self::FIELD_INSTANTIATES_EXT] - : null; - if (is_array($data[self::FIELD_INSTANTIATES])) { - foreach($data[self::FIELD_INSTANTIATES] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addInstantiates($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInstantiates(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INSTANTIATES]) || isset($data[self::FIELD_INSTANTIATES_EXT])) { + if (isset($data[self::FIELD_INSTANTIATES])) { + $value = $data[self::FIELD_INSTANTIATES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANTIATES_EXT]) && is_array($data[self::FIELD_INSTANTIATES_EXT])) { + $ext = $data[self::FIELD_INSTANTIATES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addInstantiates($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addInstantiates($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInstantiates(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInstantiates(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addInstantiates(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInstantiates(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_INSTANTIATES] instanceof FHIRUri) { - $this->addInstantiates($data[self::FIELD_INSTANTIATES]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INSTANTIATES])) { - $this->addInstantiates(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_INSTANTIATES]] + $ext)); - } else { - $this->addInstantiates(new FHIRUri($data[self::FIELD_INSTANTIATES])); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -790,20 +859,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRCapabilityStatementKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRCapabilityStatementKind([FHIRCapabilityStatementKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRCapabilityStatementKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRCapabilityStatementKind($data[self::FIELD_KIND])); + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCapabilityStatementKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRCapabilityStatementKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRCapabilityStatementKind([FHIRCapabilityStatementKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRCapabilityStatementKind($ext)); } } if (isset($data[self::FIELD_MESSAGING])) { @@ -824,49 +900,65 @@ public function __construct($data = null) $this->addMessaging(new FHIRCapabilityStatementMessaging($data[self::FIELD_MESSAGING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PATCH_FORMAT])) { - $ext = (isset($data[self::FIELD_PATCH_FORMAT_EXT]) && is_array($data[self::FIELD_PATCH_FORMAT_EXT])) - ? $data[self::FIELD_PATCH_FORMAT_EXT] - : null; - if (is_array($data[self::FIELD_PATCH_FORMAT])) { - foreach($data[self::FIELD_PATCH_FORMAT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addPatchFormat($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPatchFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPatchFormat(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PATCH_FORMAT]) || isset($data[self::FIELD_PATCH_FORMAT_EXT])) { + if (isset($data[self::FIELD_PATCH_FORMAT])) { + $value = $data[self::FIELD_PATCH_FORMAT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PATCH_FORMAT_EXT]) && is_array($data[self::FIELD_PATCH_FORMAT_EXT])) { + $ext = $data[self::FIELD_PATCH_FORMAT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addPatchFormat($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addPatchFormat($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPatchFormat(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addPatchFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPatchFormat(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addPatchFormat(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addPatchFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPatchFormat(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_PATCH_FORMAT] instanceof FHIRCode) { - $this->addPatchFormat($data[self::FIELD_PATCH_FORMAT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PATCH_FORMAT])) { - $this->addPatchFormat(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PATCH_FORMAT]] + $ext)); - } else { - $this->addPatchFormat(new FHIRCode($data[self::FIELD_PATCH_FORMAT])); } } if (isset($data[self::FIELD_PROFILE])) { @@ -887,36 +979,50 @@ public function __construct($data = null) $this->addProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_REST])) { @@ -944,52 +1050,73 @@ public function __construct($data = null) $this->setSoftware(new FHIRCapabilityStatementSoftware($data[self::FIELD_SOFTWARE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1010,20 +1137,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2449,8 +2583,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2845,189 +2979,294 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAcceptUnknown())) { $a[self::FIELD_ACCEPT_UNKNOWN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnknownContentCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnknownContentCode::FIELD_VALUE]); $a[self::FIELD_ACCEPT_UNKNOWN_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDocument())) { - $a[self::FIELD_DOCUMENT] = $vs; + $a[self::FIELD_DOCUMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOCUMENT][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getFormat())) { $a[self::FIELD_FORMAT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_FORMAT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_FORMAT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_FORMAT_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_FORMAT_EXT] = $encs; + } } if (null !== ($v = $this->getImplementation())) { $a[self::FIELD_IMPLEMENTATION] = $v; } if ([] !== ($vs = $this->getImplementationGuide())) { $a[self::FIELD_IMPLEMENTATION_GUIDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_IMPLEMENTATION_GUIDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_IMPLEMENTATION_GUIDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_IMPLEMENTATION_GUIDE_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_IMPLEMENTATION_GUIDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getInstantiates())) { $a[self::FIELD_INSTANTIATES] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INSTANTIATES][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INSTANTIATES_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INSTANTIATES_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INSTANTIATES_EXT] = $encs; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCapabilityStatementKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCapabilityStatementKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if ([] !== ($vs = $this->getMessaging())) { - $a[self::FIELD_MESSAGING] = $vs; + $a[self::FIELD_MESSAGING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MESSAGING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPatchFormat())) { $a[self::FIELD_PATCH_FORMAT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PATCH_FORMAT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PATCH_FORMAT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PATCH_FORMAT_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PATCH_FORMAT_EXT] = $encs; + } } if ([] !== ($vs = $this->getProfile())) { - $a[self::FIELD_PROFILE] = $vs; + $a[self::FIELD_PROFILE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROFILE][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRest())) { - $a[self::FIELD_REST] = $vs; + $a[self::FIELD_REST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REST][] = $v; + } } if (null !== ($v = $this->getSoftware())) { $a[self::FIELD_SOFTWARE] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCarePlan.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCarePlan.php index d7f2ee90fd..95261b66ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCarePlan.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCarePlan.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRCarePlan extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes the intention of how one or more practitioners intend to deliver care @@ -508,20 +508,27 @@ public function __construct($data = null) $this->addDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_GOAL])) { @@ -560,20 +567,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRCarePlanIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRCarePlanIntent([FHIRCarePlanIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRCarePlanIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; } else { - $this->setIntent(new FHIRCarePlanIntent($data[self::FIELD_INTENT])); + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRCarePlanIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRCarePlanIntent([FHIRCarePlanIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRCarePlanIntent($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -637,20 +651,27 @@ public function __construct($data = null) $this->addReplaces(new FHIRReference($data[self::FIELD_REPLACES])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCarePlanStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanStatus([FHIRCarePlanStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCarePlanStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCarePlanStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCarePlanStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCarePlanStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCarePlanStatus([FHIRCarePlanStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCarePlanStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -678,20 +699,27 @@ public function __construct($data = null) $this->addSupportingInfo(new FHIRReference($data[self::FIELD_SUPPORTING_INFO])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -1729,8 +1757,8 @@ public function setTitle($title = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2024,65 +2052,143 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getActivity())) { - $a[self::FIELD_ACTIVITY] = $vs; + $a[self::FIELD_ACTIVITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTIVITY][] = $v; + } } if ([] !== ($vs = $this->getAddresses())) { - $a[self::FIELD_ADDRESSES] = $vs; + $a[self::FIELD_ADDRESSES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESSES][] = $v; + } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getCareTeam())) { - $a[self::FIELD_CARE_TEAM] = $vs; + $a[self::FIELD_CARE_TEAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CARE_TEAM][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getGoal())) { - $a[self::FIELD_GOAL] = $vs; + $a[self::FIELD_GOAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GOAL][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCarePlanStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCarePlanStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2090,15 +2196,26 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCareTeam.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCareTeam.php index 631928149b..18cc51483c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCareTeam.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCareTeam.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRCareTeam extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -328,20 +328,27 @@ public function __construct($data = null) $this->addManagingOrganization(new FHIRReference($data[self::FIELD_MANAGING_ORGANIZATION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -423,20 +430,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCareTeamStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCareTeamStatus([FHIRCareTeamStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCareTeamStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCareTeamStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCareTeamStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCareTeamStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCareTeamStatus([FHIRCareTeamStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCareTeamStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1054,8 +1068,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1251,49 +1265,98 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getManagingOrganization())) { - $a[self::FIELD_MANAGING_ORGANIZATION] = $vs; + $a[self::FIELD_MANAGING_ORGANIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MANAGING_ORGANIZATION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCareTeamStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCareTeamStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRChargeItem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRChargeItem.php index f437f37cf6..7dbd8d4b2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRChargeItem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRChargeItem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRChargeItem extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_SUPPORTING_INFORMATION = 'supportingInformation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -499,49 +499,65 @@ public function __construct($data = null) $this->setContext(new FHIRReference($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if (is_array($data[self::FIELD_DEFINITION])) { - foreach($data[self::FIELD_DEFINITION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addDefinition($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDefinition(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addDefinition($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addDefinition($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDefinition(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDefinition(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DEFINITION] instanceof FHIRUri) { - $this->addDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DEFINITION])) { - $this->addDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else { - $this->addDefinition(new FHIRUri($data[self::FIELD_DEFINITION])); - } - } - if (isset($data[self::FIELD_ENTERED_DATE])) { - $ext = (isset($data[self::FIELD_ENTERED_DATE_EXT]) && is_array($data[self::FIELD_ENTERED_DATE_EXT])) - ? $data[self::FIELD_ENTERED_DATE_EXT] - : null; - if ($data[self::FIELD_ENTERED_DATE] instanceof FHIRDateTime) { - $this->setEnteredDate($data[self::FIELD_ENTERED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ENTERED_DATE])) { - $this->setEnteredDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ENTERED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_ENTERED_DATE])) { - $this->setEnteredDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ENTERED_DATE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDefinition(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_ENTERED_DATE]) || isset($data[self::FIELD_ENTERED_DATE_EXT])) { + if (isset($data[self::FIELD_ENTERED_DATE])) { + $value = $data[self::FIELD_ENTERED_DATE]; } else { - $this->setEnteredDate(new FHIRDateTime($data[self::FIELD_ENTERED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_ENTERED_DATE_EXT]) && is_array($data[self::FIELD_ENTERED_DATE_EXT])) { + $ext = $data[self::FIELD_ENTERED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEnteredDate($value); + } else if (is_array($value)) { + $this->setEnteredDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEnteredDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnteredDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENTERER])) { @@ -551,20 +567,27 @@ public function __construct($data = null) $this->setEnterer(new FHIRReference($data[self::FIELD_ENTERER])); } } - if (isset($data[self::FIELD_FACTOR_OVERRIDE])) { - $ext = (isset($data[self::FIELD_FACTOR_OVERRIDE_EXT]) && is_array($data[self::FIELD_FACTOR_OVERRIDE_EXT])) - ? $data[self::FIELD_FACTOR_OVERRIDE_EXT] - : null; - if ($data[self::FIELD_FACTOR_OVERRIDE] instanceof FHIRDecimal) { - $this->setFactorOverride($data[self::FIELD_FACTOR_OVERRIDE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FACTOR_OVERRIDE])) { - $this->setFactorOverride(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_FACTOR_OVERRIDE]] + $ext)); - } else if (is_array($data[self::FIELD_FACTOR_OVERRIDE])) { - $this->setFactorOverride(new FHIRDecimal(array_merge($ext, $data[self::FIELD_FACTOR_OVERRIDE]))); - } + if (isset($data[self::FIELD_FACTOR_OVERRIDE]) || isset($data[self::FIELD_FACTOR_OVERRIDE_EXT])) { + if (isset($data[self::FIELD_FACTOR_OVERRIDE])) { + $value = $data[self::FIELD_FACTOR_OVERRIDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FACTOR_OVERRIDE_EXT]) && is_array($data[self::FIELD_FACTOR_OVERRIDE_EXT])) { + $ext = $data[self::FIELD_FACTOR_OVERRIDE_EXT]; } else { - $this->setFactorOverride(new FHIRDecimal($data[self::FIELD_FACTOR_OVERRIDE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setFactorOverride($value); + } else if (is_array($value)) { + $this->setFactorOverride(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setFactorOverride(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFactorOverride(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -592,20 +615,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -622,20 +652,27 @@ public function __construct($data = null) $this->setOccurrenceTiming(new FHIRTiming($data[self::FIELD_OCCURRENCE_TIMING])); } } - if (isset($data[self::FIELD_OVERRIDE_REASON])) { - $ext = (isset($data[self::FIELD_OVERRIDE_REASON_EXT]) && is_array($data[self::FIELD_OVERRIDE_REASON_EXT])) - ? $data[self::FIELD_OVERRIDE_REASON_EXT] - : null; - if ($data[self::FIELD_OVERRIDE_REASON] instanceof FHIRString) { - $this->setOverrideReason($data[self::FIELD_OVERRIDE_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OVERRIDE_REASON])) { - $this->setOverrideReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OVERRIDE_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_OVERRIDE_REASON])) { - $this->setOverrideReason(new FHIRString(array_merge($ext, $data[self::FIELD_OVERRIDE_REASON]))); - } + if (isset($data[self::FIELD_OVERRIDE_REASON]) || isset($data[self::FIELD_OVERRIDE_REASON_EXT])) { + if (isset($data[self::FIELD_OVERRIDE_REASON])) { + $value = $data[self::FIELD_OVERRIDE_REASON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OVERRIDE_REASON_EXT]) && is_array($data[self::FIELD_OVERRIDE_REASON_EXT])) { + $ext = $data[self::FIELD_OVERRIDE_REASON_EXT]; } else { - $this->setOverrideReason(new FHIRString($data[self::FIELD_OVERRIDE_REASON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOverrideReason($value); + } else if (is_array($value)) { + $this->setOverrideReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOverrideReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOverrideReason(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART_OF])) { @@ -738,20 +775,27 @@ public function __construct($data = null) $this->addService(new FHIRReference($data[self::FIELD_SERVICE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRChargeItemStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRChargeItemStatus([FHIRChargeItemStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRChargeItemStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRChargeItemStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRChargeItemStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRChargeItemStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRChargeItemStatus([FHIRChargeItemStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRChargeItemStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1886,8 +1930,8 @@ public function setSupportingInformation(array $supportingInformation = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2199,10 +2243,22 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAccount())) { - $a[self::FIELD_ACCOUNT] = $vs; + $a[self::FIELD_ACCOUNT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACCOUNT][] = $v; + } } if ([] !== ($vs = $this->getBodysite())) { - $a[self::FIELD_BODYSITE] = $vs; + $a[self::FIELD_BODYSITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODYSITE][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -2212,23 +2268,33 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DEFINITION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DEFINITION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DEFINITION_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DEFINITION_EXT] = $encs; + } } if (null !== ($v = $this->getEnteredDate())) { $a[self::FIELD_ENTERED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ENTERED_DATE_EXT] = $enc; } } @@ -2237,8 +2303,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getFactorOverride())) { $a[self::FIELD_FACTOR_OVERRIDE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_FACTOR_OVERRIDE_EXT] = $enc; } } @@ -2246,12 +2314,20 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -2263,16 +2339,30 @@ public function jsonSerialize() } if (null !== ($v = $this->getOverrideReason())) { $a[self::FIELD_OVERRIDE_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OVERRIDE_REASON_EXT] = $enc; } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPerformingOrganization())) { $a[self::FIELD_PERFORMING_ORGANIZATION] = $v; @@ -2284,18 +2374,32 @@ public function jsonSerialize() $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if (null !== ($v = $this->getRequestingOrganization())) { $a[self::FIELD_REQUESTING_ORGANIZATION] = $v; } if ([] !== ($vs = $this->getService())) { - $a[self::FIELD_SERVICE] = $vs; + $a[self::FIELD_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRChargeItemStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRChargeItemStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2303,7 +2407,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaim.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaim.php index c91f1745ab..3ce31e8532 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaim.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaim.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -131,7 +131,7 @@ class FHIRClaim extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_USE_EXT = '_use'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A provider issued list of services and products provided, or to be provided, to @@ -534,20 +534,27 @@ public function __construct($data = null) $this->addCareTeam(new FHIRClaimCareTeam($data[self::FIELD_CARE_TEAM])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DIAGNOSIS])) { @@ -774,20 +781,27 @@ public function __construct($data = null) $this->addRelated(new FHIRClaimRelated($data[self::FIELD_RELATED])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_SUB_TYPE])) { @@ -822,20 +836,27 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_USE])) { - $ext = (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) - ? $data[self::FIELD_USE_EXT] - : null; - if ($data[self::FIELD_USE] instanceof FHIRUse) { - $this->setUse($data[self::FIELD_USE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $data[self::FIELD_USE]] + $ext)); - } else if (is_array($data[self::FIELD_USE])) { - $this->setUse(new FHIRUse(array_merge($ext, $data[self::FIELD_USE]))); - } + if (isset($data[self::FIELD_USE]) || isset($data[self::FIELD_USE_EXT])) { + if (isset($data[self::FIELD_USE])) { + $value = $data[self::FIELD_USE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USE_EXT]) && is_array($data[self::FIELD_USE_EXT])) { + $ext = $data[self::FIELD_USE_EXT]; } else { - $this->setUse(new FHIRUse($data[self::FIELD_USE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUse) { + $this->setUse($value); + } else if (is_array($value)) { + $this->setUse(new FHIRUse(array_merge($ext, $value))); + } else { + $this->setUse(new FHIRUse([FHIRUse::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUse(new FHIRUse($ext)); } } } @@ -2049,8 +2070,8 @@ public function setUse(FHIRUse $use = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2374,17 +2395,31 @@ public function jsonSerialize() $a[self::FIELD_BILLABLE_PERIOD] = $v; } if ([] !== ($vs = $this->getCareTeam())) { - $a[self::FIELD_CARE_TEAM] = $vs; + $a[self::FIELD_CARE_TEAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CARE_TEAM][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getEmploymentImpacted())) { $a[self::FIELD_EMPLOYMENT_IMPACTED] = $v; @@ -2402,19 +2437,43 @@ public function jsonSerialize() $a[self::FIELD_HOSPITALIZATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInformation())) { - $a[self::FIELD_INFORMATION] = $vs; + $a[self::FIELD_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INFORMATION][] = $v; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -2435,7 +2494,13 @@ public function jsonSerialize() $a[self::FIELD_PRIORITY] = $v; } if ([] !== ($vs = $this->getProcedure())) { - $a[self::FIELD_PROCEDURE] = $vs; + $a[self::FIELD_PROCEDURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCEDURE][] = $v; + } } if (null !== ($v = $this->getProvider())) { $a[self::FIELD_PROVIDER] = $v; @@ -2444,17 +2509,31 @@ public function jsonSerialize() $a[self::FIELD_REFERRAL] = $v; } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSubType())) { - $a[self::FIELD_SUB_TYPE] = $vs; + $a[self::FIELD_SUB_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_TYPE][] = $v; + } } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v; @@ -2464,11 +2543,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getUse())) { $a[self::FIELD_USE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUse::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUse::FIELD_VALUE]); $a[self::FIELD_USE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php index 764324d0c3..bbc535b4b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClaimResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRClaimResponse extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_UNALLOC_DEDUCTABLE = 'unallocDeductable'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides the adjudication details from the processing of a Claim @@ -436,36 +436,50 @@ public function __construct($data = null) $this->addCommunicationRequest(new FHIRReference($data[self::FIELD_COMMUNICATION_REQUEST])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); - } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_ERROR])) { @@ -628,20 +642,27 @@ public function __construct($data = null) $this->setReserved(new FHIRCoding($data[self::FIELD_RESERVED])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_TOTAL_BENEFIT])) { @@ -1588,8 +1609,8 @@ public function setUnallocDeductable(FHIRMoney $unallocDeductable = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1859,42 +1880,82 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAddItem())) { - $a[self::FIELD_ADD_ITEM] = $vs; + $a[self::FIELD_ADD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getCommunicationRequest())) { - $a[self::FIELD_COMMUNICATION_REQUEST] = $vs; + $a[self::FIELD_COMMUNICATION_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION_REQUEST][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getError())) { - $a[self::FIELD_ERROR] = $vs; + $a[self::FIELD_ERROR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ERROR][] = $v; + } } if (null !== ($v = $this->getForm())) { $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v; @@ -1909,7 +1970,13 @@ public function jsonSerialize() $a[self::FIELD_PAYMENT] = $v; } if ([] !== ($vs = $this->getProcessNote())) { - $a[self::FIELD_PROCESS_NOTE] = $vs; + $a[self::FIELD_PROCESS_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESS_NOTE][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -1925,8 +1992,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1939,6 +2008,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnallocDeductable())) { $a[self::FIELD_UNALLOC_DEDUCTABLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php index 6ebda67ce5..6bb878319a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRClinicalImpression.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRClinicalImpression extends FHIRDomainResource implements PHPFHIRContai const FIELD_SUMMARY_EXT = '_summary'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -434,52 +434,73 @@ public function __construct($data = null) $this->setContext(new FHIRReference($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -622,49 +643,65 @@ public function __construct($data = null) $this->addPrognosisReference(new FHIRReference($data[self::FIELD_PROGNOSIS_REFERENCE])); } } - if (isset($data[self::FIELD_PROTOCOL])) { - $ext = (isset($data[self::FIELD_PROTOCOL_EXT]) && is_array($data[self::FIELD_PROTOCOL_EXT])) - ? $data[self::FIELD_PROTOCOL_EXT] - : null; - if (is_array($data[self::FIELD_PROTOCOL])) { - foreach($data[self::FIELD_PROTOCOL] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addProtocol($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProtocol(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROTOCOL]) || isset($data[self::FIELD_PROTOCOL_EXT])) { + if (isset($data[self::FIELD_PROTOCOL])) { + $value = $data[self::FIELD_PROTOCOL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROTOCOL_EXT]) && is_array($data[self::FIELD_PROTOCOL_EXT])) { + $ext = $data[self::FIELD_PROTOCOL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addProtocol($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addProtocol($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProtocol(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProtocol(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addProtocol(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_PROTOCOL] instanceof FHIRUri) { - $this->addProtocol($data[self::FIELD_PROTOCOL]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROTOCOL])) { - $this->addProtocol(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROTOCOL]] + $ext)); - } else { - $this->addProtocol(new FHIRUri($data[self::FIELD_PROTOCOL])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRClinicalImpressionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRClinicalImpressionStatus([FHIRClinicalImpressionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRClinicalImpressionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProtocol(new FHIRUri($iext)); } + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRClinicalImpressionStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRClinicalImpressionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRClinicalImpressionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRClinicalImpressionStatus([FHIRClinicalImpressionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRClinicalImpressionStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -674,20 +711,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_SUMMARY])) { - $ext = (isset($data[self::FIELD_SUMMARY_EXT]) && is_array($data[self::FIELD_SUMMARY_EXT])) - ? $data[self::FIELD_SUMMARY_EXT] - : null; - if ($data[self::FIELD_SUMMARY] instanceof FHIRString) { - $this->setSummary($data[self::FIELD_SUMMARY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUMMARY])) { - $this->setSummary(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUMMARY]] + $ext)); - } else if (is_array($data[self::FIELD_SUMMARY])) { - $this->setSummary(new FHIRString(array_merge($ext, $data[self::FIELD_SUMMARY]))); - } + if (isset($data[self::FIELD_SUMMARY]) || isset($data[self::FIELD_SUMMARY_EXT])) { + if (isset($data[self::FIELD_SUMMARY])) { + $value = $data[self::FIELD_SUMMARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUMMARY_EXT]) && is_array($data[self::FIELD_SUMMARY_EXT])) { + $ext = $data[self::FIELD_SUMMARY_EXT]; } else { - $this->setSummary(new FHIRString($data[self::FIELD_SUMMARY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSummary($value); + } else if (is_array($value)) { + $this->setSummary(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSummary(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSummary(new FHIRString($ext)); } } } @@ -1673,8 +1717,8 @@ public function setSummary($summary = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1956,7 +2000,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getAssessor())) { $a[self::FIELD_ASSESSOR] = $v; @@ -1969,22 +2019,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -1992,48 +2048,100 @@ public function jsonSerialize() $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getFinding())) { - $a[self::FIELD_FINDING] = $vs; + $a[self::FIELD_FINDING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FINDING][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInvestigation())) { - $a[self::FIELD_INVESTIGATION] = $vs; + $a[self::FIELD_INVESTIGATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INVESTIGATION][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPrevious())) { $a[self::FIELD_PREVIOUS] = $v; } if ([] !== ($vs = $this->getProblem())) { - $a[self::FIELD_PROBLEM] = $vs; + $a[self::FIELD_PROBLEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROBLEM][] = $v; + } } if ([] !== ($vs = $this->getPrognosisCodeableConcept())) { - $a[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] = $vs; + $a[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getPrognosisReference())) { - $a[self::FIELD_PROGNOSIS_REFERENCE] = $vs; + $a[self::FIELD_PROGNOSIS_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROGNOSIS_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getProtocol())) { $a[self::FIELD_PROTOCOL] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROTOCOL][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROTOCOL_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROTOCOL_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROTOCOL_EXT] = $encs; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRClinicalImpressionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRClinicalImpressionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2042,11 +2150,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getSummary())) { $a[self::FIELD_SUMMARY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUMMARY_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php index c1747be30b..8a7380deda 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCodeSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRCodeSystem extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_VERSION_NEEDED_EXT = '_versionNeeded'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -491,36 +491,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CASE_SENSITIVE])) { - $ext = (isset($data[self::FIELD_CASE_SENSITIVE_EXT]) && is_array($data[self::FIELD_CASE_SENSITIVE_EXT])) - ? $data[self::FIELD_CASE_SENSITIVE_EXT] - : null; - if ($data[self::FIELD_CASE_SENSITIVE] instanceof FHIRBoolean) { - $this->setCaseSensitive($data[self::FIELD_CASE_SENSITIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CASE_SENSITIVE])) { - $this->setCaseSensitive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_CASE_SENSITIVE]] + $ext)); - } else if (is_array($data[self::FIELD_CASE_SENSITIVE])) { - $this->setCaseSensitive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_CASE_SENSITIVE]))); - } + if (isset($data[self::FIELD_CASE_SENSITIVE]) || isset($data[self::FIELD_CASE_SENSITIVE_EXT])) { + if (isset($data[self::FIELD_CASE_SENSITIVE])) { + $value = $data[self::FIELD_CASE_SENSITIVE]; } else { - $this->setCaseSensitive(new FHIRBoolean($data[self::FIELD_CASE_SENSITIVE])); + $value = null; } - } - if (isset($data[self::FIELD_COMPOSITIONAL])) { - $ext = (isset($data[self::FIELD_COMPOSITIONAL_EXT]) && is_array($data[self::FIELD_COMPOSITIONAL_EXT])) - ? $data[self::FIELD_COMPOSITIONAL_EXT] - : null; - if ($data[self::FIELD_COMPOSITIONAL] instanceof FHIRBoolean) { - $this->setCompositional($data[self::FIELD_COMPOSITIONAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMPOSITIONAL])) { - $this->setCompositional(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_COMPOSITIONAL]] + $ext)); - } else if (is_array($data[self::FIELD_COMPOSITIONAL])) { - $this->setCompositional(new FHIRBoolean(array_merge($ext, $data[self::FIELD_COMPOSITIONAL]))); + if (isset($data[self::FIELD_CASE_SENSITIVE_EXT]) && is_array($data[self::FIELD_CASE_SENSITIVE_EXT])) { + $ext = $data[self::FIELD_CASE_SENSITIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCaseSensitive($value); + } else if (is_array($value)) { + $this->setCaseSensitive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCaseSensitive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCaseSensitive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_COMPOSITIONAL]) || isset($data[self::FIELD_COMPOSITIONAL_EXT])) { + if (isset($data[self::FIELD_COMPOSITIONAL])) { + $value = $data[self::FIELD_COMPOSITIONAL]; } else { - $this->setCompositional(new FHIRBoolean($data[self::FIELD_COMPOSITIONAL])); + $value = null; + } + if (isset($data[self::FIELD_COMPOSITIONAL_EXT]) && is_array($data[self::FIELD_COMPOSITIONAL_EXT])) { + $ext = $data[self::FIELD_COMPOSITIONAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setCompositional($value); + } else if (is_array($value)) { + $this->setCompositional(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setCompositional(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCompositional(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CONCEPT])) { @@ -559,100 +573,142 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_CONTENT])) { - $ext = (isset($data[self::FIELD_CONTENT_EXT]) && is_array($data[self::FIELD_CONTENT_EXT])) - ? $data[self::FIELD_CONTENT_EXT] - : null; - if ($data[self::FIELD_CONTENT] instanceof FHIRCodeSystemContentMode) { - $this->setContent($data[self::FIELD_CONTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTENT])) { - $this->setContent(new FHIRCodeSystemContentMode([FHIRCodeSystemContentMode::FIELD_VALUE => $data[self::FIELD_CONTENT]] + $ext)); - } else if (is_array($data[self::FIELD_CONTENT])) { - $this->setContent(new FHIRCodeSystemContentMode(array_merge($ext, $data[self::FIELD_CONTENT]))); - } + if (isset($data[self::FIELD_CONTENT]) || isset($data[self::FIELD_CONTENT_EXT])) { + if (isset($data[self::FIELD_CONTENT])) { + $value = $data[self::FIELD_CONTENT]; } else { - $this->setContent(new FHIRCodeSystemContentMode($data[self::FIELD_CONTENT])); + $value = null; } - } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_CONTENT_EXT]) && is_array($data[self::FIELD_CONTENT_EXT])) { + $ext = $data[self::FIELD_CONTENT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCodeSystemContentMode) { + $this->setContent($value); + } else if (is_array($value)) { + $this->setContent(new FHIRCodeSystemContentMode(array_merge($ext, $value))); + } else { + $this->setContent(new FHIRCodeSystemContentMode([FHIRCodeSystemContentMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContent(new FHIRCodeSystemContentMode($ext)); } } - if (isset($data[self::FIELD_COUNT])) { - $ext = (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) - ? $data[self::FIELD_COUNT_EXT] - : null; - if ($data[self::FIELD_COUNT] instanceof FHIRUnsignedInt) { - $this->setCount($data[self::FIELD_COUNT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_COUNT]] + $ext)); - } else if (is_array($data[self::FIELD_COUNT])) { - $this->setCount(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_COUNT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCount(new FHIRUnsignedInt($data[self::FIELD_COUNT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_COUNT]) || isset($data[self::FIELD_COUNT_EXT])) { + if (isset($data[self::FIELD_COUNT])) { + $value = $data[self::FIELD_COUNT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COUNT_EXT]) && is_array($data[self::FIELD_COUNT_EXT])) { + $ext = $data[self::FIELD_COUNT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setCount($value); + } else if (is_array($value)) { + $this->setCount(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setCount(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCount(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FILTER])) { @@ -673,20 +729,27 @@ public function __construct($data = null) $this->addFilter(new FHIRCodeSystemFilter($data[self::FIELD_FILTER])); } } - if (isset($data[self::FIELD_HIERARCHY_MEANING])) { - $ext = (isset($data[self::FIELD_HIERARCHY_MEANING_EXT]) && is_array($data[self::FIELD_HIERARCHY_MEANING_EXT])) - ? $data[self::FIELD_HIERARCHY_MEANING_EXT] - : null; - if ($data[self::FIELD_HIERARCHY_MEANING] instanceof FHIRCodeSystemHierarchyMeaning) { - $this->setHierarchyMeaning($data[self::FIELD_HIERARCHY_MEANING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HIERARCHY_MEANING])) { - $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning([FHIRCodeSystemHierarchyMeaning::FIELD_VALUE => $data[self::FIELD_HIERARCHY_MEANING]] + $ext)); - } else if (is_array($data[self::FIELD_HIERARCHY_MEANING])) { - $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning(array_merge($ext, $data[self::FIELD_HIERARCHY_MEANING]))); - } + if (isset($data[self::FIELD_HIERARCHY_MEANING]) || isset($data[self::FIELD_HIERARCHY_MEANING_EXT])) { + if (isset($data[self::FIELD_HIERARCHY_MEANING])) { + $value = $data[self::FIELD_HIERARCHY_MEANING]; } else { - $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning($data[self::FIELD_HIERARCHY_MEANING])); + $value = null; + } + if (isset($data[self::FIELD_HIERARCHY_MEANING_EXT]) && is_array($data[self::FIELD_HIERARCHY_MEANING_EXT])) { + $ext = $data[self::FIELD_HIERARCHY_MEANING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCodeSystemHierarchyMeaning) { + $this->setHierarchyMeaning($value); + } else if (is_array($value)) { + $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning(array_merge($ext, $value))); + } else { + $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning([FHIRCodeSystemHierarchyMeaning::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHierarchyMeaning(new FHIRCodeSystemHierarchyMeaning($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -714,20 +777,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PROPERTY])) { @@ -748,84 +818,119 @@ public function __construct($data = null) $this->addProperty(new FHIRCodeSystemProperty($data[self::FIELD_PROPERTY])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); - } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -846,52 +951,73 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VALUE_SET])) { - $ext = (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) - ? $data[self::FIELD_VALUE_SET_EXT] - : null; - if ($data[self::FIELD_VALUE_SET] instanceof FHIRUri) { - $this->setValueSet($data[self::FIELD_VALUE_SET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_VALUE_SET]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_SET])) { - $this->setValueSet(new FHIRUri(array_merge($ext, $data[self::FIELD_VALUE_SET]))); - } + if (isset($data[self::FIELD_VALUE_SET]) || isset($data[self::FIELD_VALUE_SET_EXT])) { + if (isset($data[self::FIELD_VALUE_SET])) { + $value = $data[self::FIELD_VALUE_SET]; } else { - $this->setValueSet(new FHIRUri($data[self::FIELD_VALUE_SET])); + $value = null; } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VALUE_SET_EXT]) && is_array($data[self::FIELD_VALUE_SET_EXT])) { + $ext = $data[self::FIELD_VALUE_SET_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setValueSet($value); + } else if (is_array($value)) { + $this->setValueSet(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setValueSet(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueSet(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_VERSION_NEEDED])) { - $ext = (isset($data[self::FIELD_VERSION_NEEDED_EXT]) && is_array($data[self::FIELD_VERSION_NEEDED_EXT])) - ? $data[self::FIELD_VERSION_NEEDED_EXT] - : null; - if ($data[self::FIELD_VERSION_NEEDED] instanceof FHIRBoolean) { - $this->setVersionNeeded($data[self::FIELD_VERSION_NEEDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION_NEEDED])) { - $this->setVersionNeeded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VERSION_NEEDED]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION_NEEDED])) { - $this->setVersionNeeded(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VERSION_NEEDED]))); + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VERSION_NEEDED]) || isset($data[self::FIELD_VERSION_NEEDED_EXT])) { + if (isset($data[self::FIELD_VERSION_NEEDED])) { + $value = $data[self::FIELD_VERSION_NEEDED]; } else { - $this->setVersionNeeded(new FHIRBoolean($data[self::FIELD_VERSION_NEEDED])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_NEEDED_EXT]) && is_array($data[self::FIELD_VERSION_NEEDED_EXT])) { + $ext = $data[self::FIELD_VERSION_NEEDED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setVersionNeeded($value); + } else if (is_array($value)) { + $this->setVersionNeeded(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setVersionNeeded(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersionNeeded(new FHIRBoolean($ext)); } } } @@ -2067,8 +2193,8 @@ public function setVersionNeeded($versionNeeded = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2448,73 +2574,109 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCaseSensitive())) { $a[self::FIELD_CASE_SENSITIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_CASE_SENSITIVE_EXT] = $enc; } } if (null !== ($v = $this->getCompositional())) { $a[self::FIELD_COMPOSITIONAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_COMPOSITIONAL_EXT] = $enc; } } if ([] !== ($vs = $this->getConcept())) { - $a[self::FIELD_CONCEPT] = $vs; + $a[self::FIELD_CONCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONCEPT][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getContent())) { $a[self::FIELD_CONTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCodeSystemContentMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCodeSystemContentMode::FIELD_VALUE]); $a[self::FIELD_CONTENT_EXT] = $enc; } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getCount())) { $a[self::FIELD_COUNT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_COUNT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFilter())) { - $a[self::FIELD_FILTER] = $vs; + $a[self::FIELD_FILTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FILTER][] = $v; + } } if (null !== ($v = $this->getHierarchyMeaning())) { $a[self::FIELD_HIERARCHY_MEANING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCodeSystemHierarchyMeaning::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCodeSystemHierarchyMeaning::FIELD_VALUE]); $a[self::FIELD_HIERARCHY_MEANING_EXT] = $enc; } } @@ -2522,77 +2684,116 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getProperty())) { - $a[self::FIELD_PROPERTY] = $vs; + $a[self::FIELD_PROPERTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROPERTY][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getValueSet())) { $a[self::FIELD_VALUE_SET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_VALUE_SET_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } if (null !== ($v = $this->getVersionNeeded())) { $a[self::FIELD_VERSION_NEEDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VERSION_NEEDED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunication.php index f8369e4b5c..f268c9c802 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRCommunication extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TOPIC = 'topic'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -479,20 +479,27 @@ public function __construct($data = null) $this->addMedium(new FHIRCodeableConcept($data[self::FIELD_MEDIUM])); } } - if (isset($data[self::FIELD_NOT_DONE])) { - $ext = (isset($data[self::FIELD_NOT_DONE_EXT]) && is_array($data[self::FIELD_NOT_DONE_EXT])) - ? $data[self::FIELD_NOT_DONE_EXT] - : null; - if ($data[self::FIELD_NOT_DONE] instanceof FHIRBoolean) { - $this->setNotDone($data[self::FIELD_NOT_DONE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOT_DONE])) { - $this->setNotDone(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NOT_DONE]] + $ext)); - } else if (is_array($data[self::FIELD_NOT_DONE])) { - $this->setNotDone(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NOT_DONE]))); - } + if (isset($data[self::FIELD_NOT_DONE]) || isset($data[self::FIELD_NOT_DONE_EXT])) { + if (isset($data[self::FIELD_NOT_DONE])) { + $value = $data[self::FIELD_NOT_DONE]; } else { - $this->setNotDone(new FHIRBoolean($data[self::FIELD_NOT_DONE])); + $value = null; + } + if (isset($data[self::FIELD_NOT_DONE_EXT]) && is_array($data[self::FIELD_NOT_DONE_EXT])) { + $ext = $data[self::FIELD_NOT_DONE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNotDone($value); + } else if (is_array($value)) { + $this->setNotDone(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNotDone(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotDone(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_NOT_DONE_REASON])) { @@ -592,20 +599,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_RECEIVED])) { - $ext = (isset($data[self::FIELD_RECEIVED_EXT]) && is_array($data[self::FIELD_RECEIVED_EXT])) - ? $data[self::FIELD_RECEIVED_EXT] - : null; - if ($data[self::FIELD_RECEIVED] instanceof FHIRDateTime) { - $this->setReceived($data[self::FIELD_RECEIVED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECEIVED])) { - $this->setReceived(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECEIVED]] + $ext)); - } else if (is_array($data[self::FIELD_RECEIVED])) { - $this->setReceived(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECEIVED]))); - } + if (isset($data[self::FIELD_RECEIVED]) || isset($data[self::FIELD_RECEIVED_EXT])) { + if (isset($data[self::FIELD_RECEIVED])) { + $value = $data[self::FIELD_RECEIVED]; } else { - $this->setReceived(new FHIRDateTime($data[self::FIELD_RECEIVED])); + $value = null; + } + if (isset($data[self::FIELD_RECEIVED_EXT]) && is_array($data[self::FIELD_RECEIVED_EXT])) { + $ext = $data[self::FIELD_RECEIVED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReceived($value); + } else if (is_array($value)) { + $this->setReceived(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReceived(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReceived(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_RECIPIENT])) { @@ -633,36 +647,50 @@ public function __construct($data = null) $this->setSender(new FHIRReference($data[self::FIELD_SENDER])); } } - if (isset($data[self::FIELD_SENT])) { - $ext = (isset($data[self::FIELD_SENT_EXT]) && is_array($data[self::FIELD_SENT_EXT])) - ? $data[self::FIELD_SENT_EXT] - : null; - if ($data[self::FIELD_SENT] instanceof FHIRDateTime) { - $this->setSent($data[self::FIELD_SENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SENT])) { - $this->setSent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_SENT]] + $ext)); - } else if (is_array($data[self::FIELD_SENT])) { - $this->setSent(new FHIRDateTime(array_merge($ext, $data[self::FIELD_SENT]))); - } + if (isset($data[self::FIELD_SENT]) || isset($data[self::FIELD_SENT_EXT])) { + if (isset($data[self::FIELD_SENT])) { + $value = $data[self::FIELD_SENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SENT_EXT]) && is_array($data[self::FIELD_SENT_EXT])) { + $ext = $data[self::FIELD_SENT_EXT]; } else { - $this->setSent(new FHIRDateTime($data[self::FIELD_SENT])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREventStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setSent($value); + } else if (is_array($value)) { + $this->setSent(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setSent(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSent(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREventStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREventStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREventStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1725,8 +1753,8 @@ public function setTopic(array $topic = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2021,27 +2049,59 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getMedium())) { - $a[self::FIELD_MEDIUM] = $vs; + $a[self::FIELD_MEDIUM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEDIUM][] = $v; + } } if (null !== ($v = $this->getNotDone())) { $a[self::FIELD_NOT_DONE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NOT_DONE_EXT] = $enc; } } @@ -2049,44 +2109,86 @@ public function jsonSerialize() $a[self::FIELD_NOT_DONE_REASON] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPayload())) { - $a[self::FIELD_PAYLOAD] = $vs; + $a[self::FIELD_PAYLOAD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYLOAD][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getReceived())) { $a[self::FIELD_RECEIVED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECEIVED_EXT] = $enc; } } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if (null !== ($v = $this->getSender())) { $a[self::FIELD_SENDER] = $v; } if (null !== ($v = $this->getSent())) { $a[self::FIELD_SENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_SENT_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2094,7 +2196,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php index 625ffb1d8b..8f689920be 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCommunicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRCommunicationRequest extends FHIRDomainResource implements PHPFHIRCont const FIELD_TOPIC = 'topic'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -392,20 +392,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -512,20 +519,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -553,20 +567,27 @@ public function __construct($data = null) $this->addPayload(new FHIRCommunicationRequestPayload($data[self::FIELD_PAYLOAD])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -655,20 +676,27 @@ public function __construct($data = null) $this->setSender(new FHIRReference($data[self::FIELD_SENDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1712,8 +1740,8 @@ public function setTopic(array $topic = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2000,16 +2028,30 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; @@ -2018,18 +2060,38 @@ public function jsonSerialize() $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getMedium())) { - $a[self::FIELD_MEDIUM] = $vs; + $a[self::FIELD_MEDIUM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEDIUM][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -2037,26 +2099,58 @@ public function jsonSerialize() $a[self::FIELD_OCCURRENCE_PERIOD] = $v; } if ([] !== ($vs = $this->getPayload())) { - $a[self::FIELD_PAYLOAD] = $vs; + $a[self::FIELD_PAYLOAD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYLOAD][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; @@ -2066,8 +2160,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2075,7 +2171,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php index 79cc9ed9bb..16fddf6487 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRCompartmentDefinition extends FHIRDomainResource implements PHPFHIRCon const FIELD_USE_CONTEXT = 'useContext'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Which compartment a compartment definition describes @@ -338,20 +338,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCompartmentType) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCompartmentType([FHIRCompartmentType::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCompartmentType(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCompartmentType($data[self::FIELD_CODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompartmentType) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCompartmentType(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCompartmentType([FHIRCompartmentType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCompartmentType($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -372,52 +379,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -438,52 +466,73 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RESOURCE])) { @@ -504,68 +553,96 @@ public function __construct($data = null) $this->addResource(new FHIRCompartmentDefinitionResource($data[self::FIELD_RESOURCE])); } } - if (isset($data[self::FIELD_SEARCH])) { - $ext = (isset($data[self::FIELD_SEARCH_EXT]) && is_array($data[self::FIELD_SEARCH_EXT])) - ? $data[self::FIELD_SEARCH_EXT] - : null; - if ($data[self::FIELD_SEARCH] instanceof FHIRBoolean) { - $this->setSearch($data[self::FIELD_SEARCH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEARCH])) { - $this->setSearch(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_SEARCH]] + $ext)); - } else if (is_array($data[self::FIELD_SEARCH])) { - $this->setSearch(new FHIRBoolean(array_merge($ext, $data[self::FIELD_SEARCH]))); - } + if (isset($data[self::FIELD_SEARCH]) || isset($data[self::FIELD_SEARCH_EXT])) { + if (isset($data[self::FIELD_SEARCH])) { + $value = $data[self::FIELD_SEARCH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEARCH_EXT]) && is_array($data[self::FIELD_SEARCH_EXT])) { + $ext = $data[self::FIELD_SEARCH_EXT]; } else { - $this->setSearch(new FHIRBoolean($data[self::FIELD_SEARCH])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setSearch($value); + } else if (is_array($value)) { + $this->setSearch(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setSearch(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSearch(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1317,8 +1394,8 @@ public function setUseContext(array $useContext = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1576,92 +1653,141 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompartmentType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompartmentType::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getResource())) { - $a[self::FIELD_RESOURCE] = $vs; + $a[self::FIELD_RESOURCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESOURCE][] = $v; + } } if (null !== ($v = $this->getSearch())) { $a[self::FIELD_SEARCH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_SEARCH_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRComposition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRComposition.php index e45b65d22d..ab7cc50d69 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRComposition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRComposition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -115,7 +115,7 @@ class FHIRComposition extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A set of healthcare-related information that is assembled together into a single @@ -381,20 +381,27 @@ public function __construct($data = null) $this->setClass(new FHIRCodeableConcept($data[self::FIELD_CLASS])); } } - if (isset($data[self::FIELD_CONFIDENTIALITY])) { - $ext = (isset($data[self::FIELD_CONFIDENTIALITY_EXT]) && is_array($data[self::FIELD_CONFIDENTIALITY_EXT])) - ? $data[self::FIELD_CONFIDENTIALITY_EXT] - : null; - if ($data[self::FIELD_CONFIDENTIALITY] instanceof FHIRConfidentialityClassification) { - $this->setConfidentiality($data[self::FIELD_CONFIDENTIALITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONFIDENTIALITY])) { - $this->setConfidentiality(new FHIRConfidentialityClassification([FHIRConfidentialityClassification::FIELD_VALUE => $data[self::FIELD_CONFIDENTIALITY]] + $ext)); - } else if (is_array($data[self::FIELD_CONFIDENTIALITY])) { - $this->setConfidentiality(new FHIRConfidentialityClassification(array_merge($ext, $data[self::FIELD_CONFIDENTIALITY]))); - } + if (isset($data[self::FIELD_CONFIDENTIALITY]) || isset($data[self::FIELD_CONFIDENTIALITY_EXT])) { + if (isset($data[self::FIELD_CONFIDENTIALITY])) { + $value = $data[self::FIELD_CONFIDENTIALITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONFIDENTIALITY_EXT]) && is_array($data[self::FIELD_CONFIDENTIALITY_EXT])) { + $ext = $data[self::FIELD_CONFIDENTIALITY_EXT]; } else { - $this->setConfidentiality(new FHIRConfidentialityClassification($data[self::FIELD_CONFIDENTIALITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConfidentialityClassification) { + $this->setConfidentiality($value); + } else if (is_array($value)) { + $this->setConfidentiality(new FHIRConfidentialityClassification(array_merge($ext, $value))); + } else { + $this->setConfidentiality(new FHIRConfidentialityClassification([FHIRConfidentialityClassification::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConfidentiality(new FHIRConfidentialityClassification($ext)); } } if (isset($data[self::FIELD_CUSTODIAN])) { @@ -404,20 +411,27 @@ public function __construct($data = null) $this->setCustodian(new FHIRReference($data[self::FIELD_CUSTODIAN])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -488,20 +502,27 @@ public function __construct($data = null) $this->addSection(new FHIRCompositionSection($data[self::FIELD_SECTION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRCompositionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRCompositionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRCompositionStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRCompositionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRCompositionStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -511,20 +532,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1240,8 +1268,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1449,18 +1477,32 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAttester())) { - $a[self::FIELD_ATTESTER] = $vs; + $a[self::FIELD_ATTESTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ATTESTER][] = $v; + } } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v; } if (null !== ($v = $this->getConfidentiality())) { $a[self::FIELD_CONFIDENTIALITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConfidentialityClassification::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConfidentialityClassification::FIELD_VALUE]); $a[self::FIELD_CONFIDENTIALITY_EXT] = $enc; } } @@ -1469,8 +1511,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1478,21 +1522,41 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEvent())) { - $a[self::FIELD_EVENT] = $vs; + $a[self::FIELD_EVENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getRelatesTo())) { - $a[self::FIELD_RELATES_TO] = $vs; + $a[self::FIELD_RELATES_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATES_TO][] = $v; + } } if ([] !== ($vs = $this->getSection())) { - $a[self::FIELD_SECTION] = $vs; + $a[self::FIELD_SECTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECTION][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompositionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompositionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1501,14 +1565,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConceptMap.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConceptMap.php index 3210c7d755..db29b281f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConceptMap.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConceptMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -126,7 +126,7 @@ class FHIRConceptMap extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -438,68 +438,96 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_GROUP])) { @@ -545,52 +573,73 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_SOURCE_REFERENCE])) { @@ -600,36 +649,50 @@ public function __construct($data = null) $this->setSourceReference(new FHIRReference($data[self::FIELD_SOURCE_REFERENCE])); } } - if (isset($data[self::FIELD_SOURCE_URI])) { - $ext = (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) - ? $data[self::FIELD_SOURCE_URI_EXT] - : null; - if ($data[self::FIELD_SOURCE_URI] instanceof FHIRUri) { - $this->setSourceUri($data[self::FIELD_SOURCE_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE_URI]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE_URI])) { - $this->setSourceUri(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE_URI]))); - } + if (isset($data[self::FIELD_SOURCE_URI]) || isset($data[self::FIELD_SOURCE_URI_EXT])) { + if (isset($data[self::FIELD_SOURCE_URI])) { + $value = $data[self::FIELD_SOURCE_URI]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SOURCE_URI_EXT]) && is_array($data[self::FIELD_SOURCE_URI_EXT])) { + $ext = $data[self::FIELD_SOURCE_URI_EXT]; } else { - $this->setSourceUri(new FHIRUri($data[self::FIELD_SOURCE_URI])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSourceUri($value); + } else if (is_array($value)) { + $this->setSourceUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSourceUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSourceUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_TARGET_REFERENCE])) { @@ -639,52 +702,73 @@ public function __construct($data = null) $this->setTargetReference(new FHIRReference($data[self::FIELD_TARGET_REFERENCE])); } } - if (isset($data[self::FIELD_TARGET_URI])) { - $ext = (isset($data[self::FIELD_TARGET_URI_EXT]) && is_array($data[self::FIELD_TARGET_URI_EXT])) - ? $data[self::FIELD_TARGET_URI_EXT] - : null; - if ($data[self::FIELD_TARGET_URI] instanceof FHIRUri) { - $this->setTargetUri($data[self::FIELD_TARGET_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TARGET_URI])) { - $this->setTargetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_TARGET_URI]] + $ext)); - } else if (is_array($data[self::FIELD_TARGET_URI])) { - $this->setTargetUri(new FHIRUri(array_merge($ext, $data[self::FIELD_TARGET_URI]))); - } + if (isset($data[self::FIELD_TARGET_URI]) || isset($data[self::FIELD_TARGET_URI_EXT])) { + if (isset($data[self::FIELD_TARGET_URI])) { + $value = $data[self::FIELD_TARGET_URI]; } else { - $this->setTargetUri(new FHIRUri($data[self::FIELD_TARGET_URI])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_TARGET_URI_EXT]) && is_array($data[self::FIELD_TARGET_URI_EXT])) { + $ext = $data[self::FIELD_TARGET_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setTargetUri($value); + } else if (is_array($value)) { + $this->setTargetUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setTargetUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTargetUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -705,20 +789,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1662,8 +1753,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1974,63 +2065,95 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } @@ -2039,15 +2162,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSourceUri())) { $a[self::FIELD_SOURCE_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_URI_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2056,35 +2183,52 @@ public function jsonSerialize() } if (null !== ($v = $this->getTargetUri())) { $a[self::FIELD_TARGET_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_TARGET_URI_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCondition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCondition.php index 7527bdf174..8dd448851a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCondition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCondition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -128,7 +128,7 @@ class FHIRCondition extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_VERIFICATION_STATUS_EXT = '_verificationStatus'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A duration of time during which an organism (or a process) has existed. @@ -474,36 +474,50 @@ public function __construct($data = null) $this->setAbatementAge(new FHIRAge($data[self::FIELD_ABATEMENT_AGE])); } } - if (isset($data[self::FIELD_ABATEMENT_BOOLEAN])) { - $ext = (isset($data[self::FIELD_ABATEMENT_BOOLEAN_EXT]) && is_array($data[self::FIELD_ABATEMENT_BOOLEAN_EXT])) - ? $data[self::FIELD_ABATEMENT_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_BOOLEAN] instanceof FHIRBoolean) { - $this->setAbatementBoolean($data[self::FIELD_ABATEMENT_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_BOOLEAN])) { - $this->setAbatementBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABATEMENT_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_BOOLEAN])) { - $this->setAbatementBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABATEMENT_BOOLEAN]))); - } + if (isset($data[self::FIELD_ABATEMENT_BOOLEAN]) || isset($data[self::FIELD_ABATEMENT_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_BOOLEAN])) { + $value = $data[self::FIELD_ABATEMENT_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABATEMENT_BOOLEAN_EXT]) && is_array($data[self::FIELD_ABATEMENT_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_BOOLEAN_EXT]; } else { - $this->setAbatementBoolean(new FHIRBoolean($data[self::FIELD_ABATEMENT_BOOLEAN])); - } - } - if (isset($data[self::FIELD_ABATEMENT_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ABATEMENT_DATE_TIME_EXT]) && is_array($data[self::FIELD_ABATEMENT_DATE_TIME_EXT])) - ? $data[self::FIELD_ABATEMENT_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_DATE_TIME] instanceof FHIRDateTime) { - $this->setAbatementDateTime($data[self::FIELD_ABATEMENT_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_DATE_TIME])) { - $this->setAbatementDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ABATEMENT_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_DATE_TIME])) { - $this->setAbatementDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ABATEMENT_DATE_TIME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbatementBoolean($value); + } else if (is_array($value)) { + $this->setAbatementBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbatementBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbatementBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_ABATEMENT_DATE_TIME]) || isset($data[self::FIELD_ABATEMENT_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_DATE_TIME])) { + $value = $data[self::FIELD_ABATEMENT_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABATEMENT_DATE_TIME_EXT]) && is_array($data[self::FIELD_ABATEMENT_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_DATE_TIME_EXT]; } else { - $this->setAbatementDateTime(new FHIRDateTime($data[self::FIELD_ABATEMENT_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAbatementDateTime($value); + } else if (is_array($value)) { + $this->setAbatementDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAbatementDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAbatementDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ABATEMENT_PERIOD])) { @@ -520,36 +534,50 @@ public function __construct($data = null) $this->setAbatementRange(new FHIRRange($data[self::FIELD_ABATEMENT_RANGE])); } } - if (isset($data[self::FIELD_ABATEMENT_STRING])) { - $ext = (isset($data[self::FIELD_ABATEMENT_STRING_EXT]) && is_array($data[self::FIELD_ABATEMENT_STRING_EXT])) - ? $data[self::FIELD_ABATEMENT_STRING_EXT] - : null; - if ($data[self::FIELD_ABATEMENT_STRING] instanceof FHIRString) { - $this->setAbatementString($data[self::FIELD_ABATEMENT_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABATEMENT_STRING])) { - $this->setAbatementString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ABATEMENT_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ABATEMENT_STRING])) { - $this->setAbatementString(new FHIRString(array_merge($ext, $data[self::FIELD_ABATEMENT_STRING]))); - } + if (isset($data[self::FIELD_ABATEMENT_STRING]) || isset($data[self::FIELD_ABATEMENT_STRING_EXT])) { + if (isset($data[self::FIELD_ABATEMENT_STRING])) { + $value = $data[self::FIELD_ABATEMENT_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ABATEMENT_STRING_EXT]) && is_array($data[self::FIELD_ABATEMENT_STRING_EXT])) { + $ext = $data[self::FIELD_ABATEMENT_STRING_EXT]; } else { - $this->setAbatementString(new FHIRString($data[self::FIELD_ABATEMENT_STRING])); - } - } - if (isset($data[self::FIELD_ASSERTED_DATE])) { - $ext = (isset($data[self::FIELD_ASSERTED_DATE_EXT]) && is_array($data[self::FIELD_ASSERTED_DATE_EXT])) - ? $data[self::FIELD_ASSERTED_DATE_EXT] - : null; - if ($data[self::FIELD_ASSERTED_DATE] instanceof FHIRDateTime) { - $this->setAssertedDate($data[self::FIELD_ASSERTED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ASSERTED_DATE])) { - $this->setAssertedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ASSERTED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_ASSERTED_DATE])) { - $this->setAssertedDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ASSERTED_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAbatementString($value); + } else if (is_array($value)) { + $this->setAbatementString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAbatementString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbatementString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ASSERTED_DATE]) || isset($data[self::FIELD_ASSERTED_DATE_EXT])) { + if (isset($data[self::FIELD_ASSERTED_DATE])) { + $value = $data[self::FIELD_ASSERTED_DATE]; } else { - $this->setAssertedDate(new FHIRDateTime($data[self::FIELD_ASSERTED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_ASSERTED_DATE_EXT]) && is_array($data[self::FIELD_ASSERTED_DATE_EXT])) { + $ext = $data[self::FIELD_ASSERTED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAssertedDate($value); + } else if (is_array($value)) { + $this->setAssertedDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAssertedDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAssertedDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ASSERTER])) { @@ -595,20 +623,27 @@ public function __construct($data = null) $this->addCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_CLINICAL_STATUS])) { - $ext = (isset($data[self::FIELD_CLINICAL_STATUS_EXT]) && is_array($data[self::FIELD_CLINICAL_STATUS_EXT])) - ? $data[self::FIELD_CLINICAL_STATUS_EXT] - : null; - if ($data[self::FIELD_CLINICAL_STATUS] instanceof FHIRConditionClinicalStatusCodes) { - $this->setClinicalStatus($data[self::FIELD_CLINICAL_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLINICAL_STATUS])) { - $this->setClinicalStatus(new FHIRConditionClinicalStatusCodes([FHIRConditionClinicalStatusCodes::FIELD_VALUE => $data[self::FIELD_CLINICAL_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_CLINICAL_STATUS])) { - $this->setClinicalStatus(new FHIRConditionClinicalStatusCodes(array_merge($ext, $data[self::FIELD_CLINICAL_STATUS]))); - } + if (isset($data[self::FIELD_CLINICAL_STATUS]) || isset($data[self::FIELD_CLINICAL_STATUS_EXT])) { + if (isset($data[self::FIELD_CLINICAL_STATUS])) { + $value = $data[self::FIELD_CLINICAL_STATUS]; } else { - $this->setClinicalStatus(new FHIRConditionClinicalStatusCodes($data[self::FIELD_CLINICAL_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_CLINICAL_STATUS_EXT]) && is_array($data[self::FIELD_CLINICAL_STATUS_EXT])) { + $ext = $data[self::FIELD_CLINICAL_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionClinicalStatusCodes) { + $this->setClinicalStatus($value); + } else if (is_array($value)) { + $this->setClinicalStatus(new FHIRConditionClinicalStatusCodes(array_merge($ext, $value))); + } else { + $this->setClinicalStatus(new FHIRConditionClinicalStatusCodes([FHIRConditionClinicalStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setClinicalStatus(new FHIRConditionClinicalStatusCodes($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -686,20 +721,27 @@ public function __construct($data = null) $this->setOnsetAge(new FHIRAge($data[self::FIELD_ONSET_AGE])); } } - if (isset($data[self::FIELD_ONSET_DATE_TIME])) { - $ext = (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) - ? $data[self::FIELD_ONSET_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_ONSET_DATE_TIME] instanceof FHIRDateTime) { - $this->setOnsetDateTime($data[self::FIELD_ONSET_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ONSET_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_DATE_TIME])) { - $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ONSET_DATE_TIME]))); - } + if (isset($data[self::FIELD_ONSET_DATE_TIME]) || isset($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_ONSET_DATE_TIME])) { + $value = $data[self::FIELD_ONSET_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_DATE_TIME_EXT]) && is_array($data[self::FIELD_ONSET_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_ONSET_DATE_TIME_EXT]; } else { - $this->setOnsetDateTime(new FHIRDateTime($data[self::FIELD_ONSET_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOnsetDateTime($value); + } else if (is_array($value)) { + $this->setOnsetDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOnsetDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ONSET_PERIOD])) { @@ -716,20 +758,27 @@ public function __construct($data = null) $this->setOnsetRange(new FHIRRange($data[self::FIELD_ONSET_RANGE])); } } - if (isset($data[self::FIELD_ONSET_STRING])) { - $ext = (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) - ? $data[self::FIELD_ONSET_STRING_EXT] - : null; - if ($data[self::FIELD_ONSET_STRING] instanceof FHIRString) { - $this->setOnsetString($data[self::FIELD_ONSET_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ONSET_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_ONSET_STRING])) { - $this->setOnsetString(new FHIRString(array_merge($ext, $data[self::FIELD_ONSET_STRING]))); - } + if (isset($data[self::FIELD_ONSET_STRING]) || isset($data[self::FIELD_ONSET_STRING_EXT])) { + if (isset($data[self::FIELD_ONSET_STRING])) { + $value = $data[self::FIELD_ONSET_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ONSET_STRING_EXT]) && is_array($data[self::FIELD_ONSET_STRING_EXT])) { + $ext = $data[self::FIELD_ONSET_STRING_EXT]; } else { - $this->setOnsetString(new FHIRString($data[self::FIELD_ONSET_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setOnsetString($value); + } else if (is_array($value)) { + $this->setOnsetString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setOnsetString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOnsetString(new FHIRString($ext)); } } if (isset($data[self::FIELD_SEVERITY])) { @@ -753,20 +802,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_VERIFICATION_STATUS])) { - $ext = (isset($data[self::FIELD_VERIFICATION_STATUS_EXT]) && is_array($data[self::FIELD_VERIFICATION_STATUS_EXT])) - ? $data[self::FIELD_VERIFICATION_STATUS_EXT] - : null; - if ($data[self::FIELD_VERIFICATION_STATUS] instanceof FHIRConditionVerificationStatus) { - $this->setVerificationStatus($data[self::FIELD_VERIFICATION_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERIFICATION_STATUS])) { - $this->setVerificationStatus(new FHIRConditionVerificationStatus([FHIRConditionVerificationStatus::FIELD_VALUE => $data[self::FIELD_VERIFICATION_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_VERIFICATION_STATUS])) { - $this->setVerificationStatus(new FHIRConditionVerificationStatus(array_merge($ext, $data[self::FIELD_VERIFICATION_STATUS]))); - } + if (isset($data[self::FIELD_VERIFICATION_STATUS]) || isset($data[self::FIELD_VERIFICATION_STATUS_EXT])) { + if (isset($data[self::FIELD_VERIFICATION_STATUS])) { + $value = $data[self::FIELD_VERIFICATION_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERIFICATION_STATUS_EXT]) && is_array($data[self::FIELD_VERIFICATION_STATUS_EXT])) { + $ext = $data[self::FIELD_VERIFICATION_STATUS_EXT]; } else { - $this->setVerificationStatus(new FHIRConditionVerificationStatus($data[self::FIELD_VERIFICATION_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConditionVerificationStatus) { + $this->setVerificationStatus($value); + } else if (is_array($value)) { + $this->setVerificationStatus(new FHIRConditionVerificationStatus(array_merge($ext, $value))); + } else { + $this->setVerificationStatus(new FHIRConditionVerificationStatus([FHIRConditionVerificationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVerificationStatus(new FHIRConditionVerificationStatus($ext)); } } } @@ -1819,8 +1875,8 @@ public function setVerificationStatus(FHIRConditionVerificationStatus $verificat */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2124,15 +2180,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAbatementBoolean())) { $a[self::FIELD_ABATEMENT_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getAbatementDateTime())) { $a[self::FIELD_ABATEMENT_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_DATE_TIME_EXT] = $enc; } } @@ -2144,15 +2204,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAbatementString())) { $a[self::FIELD_ABATEMENT_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ABATEMENT_STRING_EXT] = $enc; } } if (null !== ($v = $this->getAssertedDate())) { $a[self::FIELD_ASSERTED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ASSERTED_DATE_EXT] = $enc; } } @@ -2160,15 +2224,29 @@ public function jsonSerialize() $a[self::FIELD_ASSERTER] = $v; } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getClinicalStatus())) { $a[self::FIELD_CLINICAL_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionClinicalStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionClinicalStatusCodes::FIELD_VALUE]); $a[self::FIELD_CLINICAL_STATUS_EXT] = $enc; } } @@ -2179,21 +2257,41 @@ public function jsonSerialize() $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getEvidence())) { - $a[self::FIELD_EVIDENCE] = $vs; + $a[self::FIELD_EVIDENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVIDENCE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOnsetAge())) { $a[self::FIELD_ONSET_AGE] = $v; } if (null !== ($v = $this->getOnsetDateTime())) { $a[self::FIELD_ONSET_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ONSET_DATE_TIME_EXT] = $enc; } } @@ -2205,8 +2303,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOnsetString())) { $a[self::FIELD_ONSET_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ONSET_STRING_EXT] = $enc; } } @@ -2221,11 +2321,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getVerificationStatus())) { $a[self::FIELD_VERIFICATION_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConditionVerificationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConditionVerificationStatus::FIELD_VALUE]); $a[self::FIELD_VERIFICATION_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConsent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConsent.php index 6233fdf372..691c6ad2bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConsent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRConsent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -118,7 +118,7 @@ class FHIRConsent extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -484,20 +484,27 @@ public function __construct($data = null) $this->setDataPeriod(new FHIRPeriod($data[self::FIELD_DATA_PERIOD])); } } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EXCEPT])) { @@ -575,20 +582,27 @@ public function __construct($data = null) $this->addPolicy(new FHIRConsentPolicy($data[self::FIELD_POLICY])); } } - if (isset($data[self::FIELD_POLICY_RULE])) { - $ext = (isset($data[self::FIELD_POLICY_RULE_EXT]) && is_array($data[self::FIELD_POLICY_RULE_EXT])) - ? $data[self::FIELD_POLICY_RULE_EXT] - : null; - if ($data[self::FIELD_POLICY_RULE] instanceof FHIRUri) { - $this->setPolicyRule($data[self::FIELD_POLICY_RULE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_POLICY_RULE])) { - $this->setPolicyRule(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_POLICY_RULE]] + $ext)); - } else if (is_array($data[self::FIELD_POLICY_RULE])) { - $this->setPolicyRule(new FHIRUri(array_merge($ext, $data[self::FIELD_POLICY_RULE]))); - } + if (isset($data[self::FIELD_POLICY_RULE]) || isset($data[self::FIELD_POLICY_RULE_EXT])) { + if (isset($data[self::FIELD_POLICY_RULE])) { + $value = $data[self::FIELD_POLICY_RULE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POLICY_RULE_EXT]) && is_array($data[self::FIELD_POLICY_RULE_EXT])) { + $ext = $data[self::FIELD_POLICY_RULE_EXT]; } else { - $this->setPolicyRule(new FHIRUri($data[self::FIELD_POLICY_RULE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setPolicyRule($value); + } else if (is_array($value)) { + $this->setPolicyRule(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setPolicyRule(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPolicyRule(new FHIRUri($ext)); } } if (isset($data[self::FIELD_PURPOSE])) { @@ -648,20 +662,27 @@ public function __construct($data = null) $this->setSourceReference(new FHIRReference($data[self::FIELD_SOURCE_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRConsentState) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRConsentState([FHIRConsentState::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRConsentState(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRConsentState($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRConsentState) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRConsentState(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRConsentState([FHIRConsentState::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRConsentState($ext)); } } } @@ -1638,8 +1659,8 @@ public function setStatus(FHIRConsentState $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1912,38 +1933,82 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if ([] !== ($vs = $this->getActor())) { - $a[self::FIELD_ACTOR] = $vs; + $a[self::FIELD_ACTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTOR][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getConsentingParty())) { - $a[self::FIELD_CONSENTING_PARTY] = $vs; + $a[self::FIELD_CONSENTING_PARTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONSENTING_PARTY][] = $v; + } } if ([] !== ($vs = $this->getData())) { - $a[self::FIELD_DATA] = $vs; + $a[self::FIELD_DATA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA][] = $v; + } } if (null !== ($v = $this->getDataPeriod())) { $a[self::FIELD_DATA_PERIOD] = $v; } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getExcept())) { - $a[self::FIELD_EXCEPT] = $vs; + $a[self::FIELD_EXCEPT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCEPT][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getOrganization())) { - $a[self::FIELD_ORGANIZATION] = $vs; + $a[self::FIELD_ORGANIZATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ORGANIZATION][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -1952,20 +2017,40 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPolicy())) { - $a[self::FIELD_POLICY] = $vs; + $a[self::FIELD_POLICY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POLICY][] = $v; + } } if (null !== ($v = $this->getPolicyRule())) { $a[self::FIELD_POLICY_RULE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_POLICY_RULE_EXT] = $enc; } } if ([] !== ($vs = $this->getPurpose())) { - $a[self::FIELD_PURPOSE] = $vs; + $a[self::FIELD_PURPOSE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PURPOSE][] = $v; + } } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getSourceAttachment())) { $a[self::FIELD_SOURCE_ATTACHMENT] = $v; @@ -1978,11 +2063,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRConsentState::FIELD_VALUE, $enc)))) { + unset($enc[FHIRConsentState::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRContract.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRContract.php index 49fd259fdd..93d2c87d5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRContract.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRContract.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRContract extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_VALUED_ITEM = 'valuedItem'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -590,20 +590,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRDateTime) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRDateTime($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_LEGAL])) { @@ -678,20 +685,27 @@ public function __construct($data = null) $this->addSigner(new FHIRContractSigner($data[self::FIELD_SIGNER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRContractResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRContractResourceStatusCodes([FHIRContractResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRContractResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRContractResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRContractResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRContractResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRContractResourceStatusCodes([FHIRContractResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRContractResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_SUB_TYPE])) { @@ -2020,8 +2034,8 @@ public function setValuedItem(array $valuedItem = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2345,19 +2359,43 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if ([] !== ($vs = $this->getActionReason())) { - $a[self::FIELD_ACTION_REASON] = $vs; + $a[self::FIELD_ACTION_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION_REASON][] = $v; + } } if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if (null !== ($v = $this->getApplies())) { $a[self::FIELD_APPLIES] = $v; } if ([] !== ($vs = $this->getAuthority())) { - $a[self::FIELD_AUTHORITY] = $vs; + $a[self::FIELD_AUTHORITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHORITY][] = $v; + } } if (null !== ($v = $this->getBindingAttachment())) { $a[self::FIELD_BINDING_ATTACHMENT] = $v; @@ -2372,57 +2410,130 @@ public function jsonSerialize() $a[self::FIELD_DECISION_TYPE] = $v; } if ([] !== ($vs = $this->getDomain())) { - $a[self::FIELD_DOMAIN] = $vs; + $a[self::FIELD_DOMAIN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOMAIN][] = $v; + } } if ([] !== ($vs = $this->getFriendly())) { - $a[self::FIELD_FRIENDLY] = $vs; + $a[self::FIELD_FRIENDLY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FRIENDLY][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } if ([] !== ($vs = $this->getLegal())) { - $a[self::FIELD_LEGAL] = $vs; + $a[self::FIELD_LEGAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LEGAL][] = $v; + } } if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if ([] !== ($vs = $this->getSigner())) { - $a[self::FIELD_SIGNER] = $vs; + $a[self::FIELD_SIGNER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SIGNER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRContractResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRContractResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSubType())) { - $a[self::FIELD_SUB_TYPE] = $vs; + $a[self::FIELD_SUB_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_TYPE][] = $v; + } } if ([] !== ($vs = $this->getSubject())) { - $a[self::FIELD_SUBJECT] = $vs; + $a[self::FIELD_SUBJECT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUBJECT][] = $v; + } } if ([] !== ($vs = $this->getTerm())) { - $a[self::FIELD_TERM] = $vs; + $a[self::FIELD_TERM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TERM][] = $v; + } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getValuedItem())) { - $a[self::FIELD_VALUED_ITEM] = $vs; + $a[self::FIELD_VALUED_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VALUED_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCoverage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCoverage.php index 1c0662fd09..e272b210ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCoverage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRCoverage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRCoverage extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -356,20 +356,27 @@ public function __construct($data = null) $this->addContract(new FHIRReference($data[self::FIELD_CONTRACT])); } } - if (isset($data[self::FIELD_DEPENDENT])) { - $ext = (isset($data[self::FIELD_DEPENDENT_EXT]) && is_array($data[self::FIELD_DEPENDENT_EXT])) - ? $data[self::FIELD_DEPENDENT_EXT] - : null; - if ($data[self::FIELD_DEPENDENT] instanceof FHIRString) { - $this->setDependent($data[self::FIELD_DEPENDENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEPENDENT])) { - $this->setDependent(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DEPENDENT]] + $ext)); - } else if (is_array($data[self::FIELD_DEPENDENT])) { - $this->setDependent(new FHIRString(array_merge($ext, $data[self::FIELD_DEPENDENT]))); - } + if (isset($data[self::FIELD_DEPENDENT]) || isset($data[self::FIELD_DEPENDENT_EXT])) { + if (isset($data[self::FIELD_DEPENDENT])) { + $value = $data[self::FIELD_DEPENDENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEPENDENT_EXT]) && is_array($data[self::FIELD_DEPENDENT_EXT])) { + $ext = $data[self::FIELD_DEPENDENT_EXT]; } else { - $this->setDependent(new FHIRString($data[self::FIELD_DEPENDENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDependent($value); + } else if (is_array($value)) { + $this->setDependent(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDependent(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDependent(new FHIRString($ext)); } } if (isset($data[self::FIELD_GROUPING])) { @@ -397,36 +404,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NETWORK])) { - $ext = (isset($data[self::FIELD_NETWORK_EXT]) && is_array($data[self::FIELD_NETWORK_EXT])) - ? $data[self::FIELD_NETWORK_EXT] - : null; - if ($data[self::FIELD_NETWORK] instanceof FHIRString) { - $this->setNetwork($data[self::FIELD_NETWORK]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NETWORK])) { - $this->setNetwork(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NETWORK]] + $ext)); - } else if (is_array($data[self::FIELD_NETWORK])) { - $this->setNetwork(new FHIRString(array_merge($ext, $data[self::FIELD_NETWORK]))); - } + if (isset($data[self::FIELD_NETWORK]) || isset($data[self::FIELD_NETWORK_EXT])) { + if (isset($data[self::FIELD_NETWORK])) { + $value = $data[self::FIELD_NETWORK]; } else { - $this->setNetwork(new FHIRString($data[self::FIELD_NETWORK])); + $value = null; } - } - if (isset($data[self::FIELD_ORDER])) { - $ext = (isset($data[self::FIELD_ORDER_EXT]) && is_array($data[self::FIELD_ORDER_EXT])) - ? $data[self::FIELD_ORDER_EXT] - : null; - if ($data[self::FIELD_ORDER] instanceof FHIRPositiveInt) { - $this->setOrder($data[self::FIELD_ORDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ORDER])) { - $this->setOrder(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_ORDER]] + $ext)); - } else if (is_array($data[self::FIELD_ORDER])) { - $this->setOrder(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_ORDER]))); + if (isset($data[self::FIELD_NETWORK_EXT]) && is_array($data[self::FIELD_NETWORK_EXT])) { + $ext = $data[self::FIELD_NETWORK_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setNetwork($value); + } else if (is_array($value)) { + $this->setNetwork(new FHIRString(array_merge($ext, $value))); + } else { + $this->setNetwork(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNetwork(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ORDER]) || isset($data[self::FIELD_ORDER_EXT])) { + if (isset($data[self::FIELD_ORDER])) { + $value = $data[self::FIELD_ORDER]; } else { - $this->setOrder(new FHIRPositiveInt($data[self::FIELD_ORDER])); + $value = null; + } + if (isset($data[self::FIELD_ORDER_EXT]) && is_array($data[self::FIELD_ORDER_EXT])) { + $ext = $data[self::FIELD_ORDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setOrder($value); + } else if (is_array($value)) { + $this->setOrder(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setOrder(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOrder(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PAYOR])) { @@ -468,36 +489,50 @@ public function __construct($data = null) $this->setRelationship(new FHIRCodeableConcept($data[self::FIELD_RELATIONSHIP])); } } - if (isset($data[self::FIELD_SEQUENCE])) { - $ext = (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) - ? $data[self::FIELD_SEQUENCE_EXT] - : null; - if ($data[self::FIELD_SEQUENCE] instanceof FHIRString) { - $this->setSequence($data[self::FIELD_SEQUENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SEQUENCE]] + $ext)); - } else if (is_array($data[self::FIELD_SEQUENCE])) { - $this->setSequence(new FHIRString(array_merge($ext, $data[self::FIELD_SEQUENCE]))); - } + if (isset($data[self::FIELD_SEQUENCE]) || isset($data[self::FIELD_SEQUENCE_EXT])) { + if (isset($data[self::FIELD_SEQUENCE])) { + $value = $data[self::FIELD_SEQUENCE]; } else { - $this->setSequence(new FHIRString($data[self::FIELD_SEQUENCE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SEQUENCE_EXT]) && is_array($data[self::FIELD_SEQUENCE_EXT])) { + $ext = $data[self::FIELD_SEQUENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSequence($value); + } else if (is_array($value)) { + $this->setSequence(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSequence(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSequence(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_SUBSCRIBER])) { @@ -507,20 +542,27 @@ public function __construct($data = null) $this->setSubscriber(new FHIRReference($data[self::FIELD_SUBSCRIBER])); } } - if (isset($data[self::FIELD_SUBSCRIBER_ID])) { - $ext = (isset($data[self::FIELD_SUBSCRIBER_ID_EXT]) && is_array($data[self::FIELD_SUBSCRIBER_ID_EXT])) - ? $data[self::FIELD_SUBSCRIBER_ID_EXT] - : null; - if ($data[self::FIELD_SUBSCRIBER_ID] instanceof FHIRString) { - $this->setSubscriberId($data[self::FIELD_SUBSCRIBER_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SUBSCRIBER_ID])) { - $this->setSubscriberId(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SUBSCRIBER_ID]] + $ext)); - } else if (is_array($data[self::FIELD_SUBSCRIBER_ID])) { - $this->setSubscriberId(new FHIRString(array_merge($ext, $data[self::FIELD_SUBSCRIBER_ID]))); - } + if (isset($data[self::FIELD_SUBSCRIBER_ID]) || isset($data[self::FIELD_SUBSCRIBER_ID_EXT])) { + if (isset($data[self::FIELD_SUBSCRIBER_ID])) { + $value = $data[self::FIELD_SUBSCRIBER_ID]; } else { - $this->setSubscriberId(new FHIRString($data[self::FIELD_SUBSCRIBER_ID])); + $value = null; + } + if (isset($data[self::FIELD_SUBSCRIBER_ID_EXT]) && is_array($data[self::FIELD_SUBSCRIBER_ID_EXT])) { + $ext = $data[self::FIELD_SUBSCRIBER_ID_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSubscriberId($value); + } else if (is_array($value)) { + $this->setSubscriberId(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSubscriberId(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setSubscriberId(new FHIRString($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -1209,8 +1251,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1437,12 +1479,20 @@ public function jsonSerialize() $a[self::FIELD_BENEFICIARY] = $v; } if ([] !== ($vs = $this->getContract())) { - $a[self::FIELD_CONTRACT] = $vs; + $a[self::FIELD_CONTRACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRACT][] = $v; + } } if (null !== ($v = $this->getDependent())) { $a[self::FIELD_DEPENDENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DEPENDENT_EXT] = $enc; } } @@ -1450,24 +1500,40 @@ public function jsonSerialize() $a[self::FIELD_GROUPING] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getNetwork())) { $a[self::FIELD_NETWORK] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NETWORK_EXT] = $enc; } } if (null !== ($v = $this->getOrder())) { $a[self::FIELD_ORDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_ORDER_EXT] = $enc; } } if ([] !== ($vs = $this->getPayor())) { - $a[self::FIELD_PAYOR] = $vs; + $a[self::FIELD_PAYOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYOR][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; @@ -1480,15 +1546,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSequence())) { $a[self::FIELD_SEQUENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SEQUENCE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1497,14 +1567,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getSubscriberId())) { $a[self::FIELD_SUBSCRIBER_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SUBSCRIBER_ID_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDataElement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDataElement.php index 4c912b09ad..6ca72e7628 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDataElement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDataElement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -120,7 +120,7 @@ class FHIRDataElement extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -375,36 +375,50 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ELEMENT])) { @@ -425,20 +439,27 @@ public function __construct($data = null) $this->addElement(new FHIRElementDefinition($data[self::FIELD_ELEMENT])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -495,100 +516,142 @@ public function __construct($data = null) $this->addMapping(new FHIRDataElementMapping($data[self::FIELD_MAPPING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_STRINGENCY])) { - $ext = (isset($data[self::FIELD_STRINGENCY_EXT]) && is_array($data[self::FIELD_STRINGENCY_EXT])) - ? $data[self::FIELD_STRINGENCY_EXT] - : null; - if ($data[self::FIELD_STRINGENCY] instanceof FHIRDataElementStringency) { - $this->setStringency($data[self::FIELD_STRINGENCY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STRINGENCY])) { - $this->setStringency(new FHIRDataElementStringency([FHIRDataElementStringency::FIELD_VALUE => $data[self::FIELD_STRINGENCY]] + $ext)); - } else if (is_array($data[self::FIELD_STRINGENCY])) { - $this->setStringency(new FHIRDataElementStringency(array_merge($ext, $data[self::FIELD_STRINGENCY]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_STRINGENCY]) || isset($data[self::FIELD_STRINGENCY_EXT])) { + if (isset($data[self::FIELD_STRINGENCY])) { + $value = $data[self::FIELD_STRINGENCY]; } else { - $this->setStringency(new FHIRDataElementStringency($data[self::FIELD_STRINGENCY])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_STRINGENCY_EXT]) && is_array($data[self::FIELD_STRINGENCY_EXT])) { + $ext = $data[self::FIELD_STRINGENCY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDataElementStringency) { + $this->setStringency($value); + } else if (is_array($value)) { + $this->setStringency(new FHIRDataElementStringency(array_merge($ext, $value))); + } else { + $this->setStringency(new FHIRDataElementStringency([FHIRDataElementStringency::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStringency(new FHIRDataElementStringency($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -609,20 +672,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1436,8 +1506,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1706,93 +1776,152 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getElement())) { - $a[self::FIELD_ELEMENT] = $vs; + $a[self::FIELD_ELEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ELEMENT][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStringency())) { $a[self::FIELD_STRINGENCY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDataElementStringency::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDataElementStringency::FIELD_VALUE]); $a[self::FIELD_STRINGENCY_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php index 6b35e62c37..62bec13daf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDetectedIssue.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRDetectedIssue extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -275,36 +275,50 @@ public function __construct($data = null) $this->setCategory(new FHIRCodeableConcept($data[self::FIELD_CATEGORY])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DETAIL])) { - $ext = (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) - ? $data[self::FIELD_DETAIL_EXT] - : null; - if ($data[self::FIELD_DETAIL] instanceof FHIRString) { - $this->setDetail($data[self::FIELD_DETAIL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DETAIL]] + $ext)); - } else if (is_array($data[self::FIELD_DETAIL])) { - $this->setDetail(new FHIRString(array_merge($ext, $data[self::FIELD_DETAIL]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DETAIL]) || isset($data[self::FIELD_DETAIL_EXT])) { + if (isset($data[self::FIELD_DETAIL])) { + $value = $data[self::FIELD_DETAIL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DETAIL_EXT]) && is_array($data[self::FIELD_DETAIL_EXT])) { + $ext = $data[self::FIELD_DETAIL_EXT]; } else { - $this->setDetail(new FHIRString($data[self::FIELD_DETAIL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDetail($value); + } else if (is_array($value)) { + $this->setDetail(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDetail(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDetail(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -357,52 +371,73 @@ public function __construct($data = null) $this->setPatient(new FHIRReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRUri) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRUri(array_merge($ext, $data[self::FIELD_REFERENCE]))); - } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRUri($data[self::FIELD_REFERENCE])); + $value = null; } - } - if (isset($data[self::FIELD_SEVERITY])) { - $ext = (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) - ? $data[self::FIELD_SEVERITY_EXT] - : null; - if ($data[self::FIELD_SEVERITY] instanceof FHIRDetectedIssueSeverity) { - $this->setSeverity($data[self::FIELD_SEVERITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRDetectedIssueSeverity([FHIRDetectedIssueSeverity::FIELD_VALUE => $data[self::FIELD_SEVERITY]] + $ext)); - } else if (is_array($data[self::FIELD_SEVERITY])) { - $this->setSeverity(new FHIRDetectedIssueSeverity(array_merge($ext, $data[self::FIELD_SEVERITY]))); - } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; } else { - $this->setSeverity(new FHIRDetectedIssueSeverity($data[self::FIELD_SEVERITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRUri($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRObservationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SEVERITY]) || isset($data[self::FIELD_SEVERITY_EXT])) { + if (isset($data[self::FIELD_SEVERITY])) { + $value = $data[self::FIELD_SEVERITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SEVERITY_EXT]) && is_array($data[self::FIELD_SEVERITY_EXT])) { + $ext = $data[self::FIELD_SEVERITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDetectedIssueSeverity) { + $this->setSeverity($value); + } else if (is_array($value)) { + $this->setSeverity(new FHIRDetectedIssueSeverity(array_merge($ext, $value))); + } else { + $this->setSeverity(new FHIRDetectedIssueSeverity([FHIRDetectedIssueSeverity::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSeverity(new FHIRDetectedIssueSeverity($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRObservationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRObservationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRObservationStatus($ext)); } } } @@ -868,8 +903,8 @@ public function setStatus(FHIRObservationStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1047,15 +1082,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDetail())) { $a[self::FIELD_DETAIL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DETAIL_EXT] = $enc; } } @@ -1063,35 +1102,56 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getImplicated())) { - $a[self::FIELD_IMPLICATED] = $vs; + $a[self::FIELD_IMPLICATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMPLICATED][] = $v; + } } if ([] !== ($vs = $this->getMitigation())) { - $a[self::FIELD_MITIGATION] = $vs; + $a[self::FIELD_MITIGATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MITIGATION][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } if (null !== ($v = $this->getSeverity())) { $a[self::FIELD_SEVERITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDetectedIssueSeverity::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDetectedIssueSeverity::FIELD_VALUE]); $a[self::FIELD_SEVERITY_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDevice.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDevice.php index bf3c61fe70..29514d19b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDevice.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDevice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRDevice extends FHIRDomainResource implements PHPFHIRContainedTypeInter const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Details for all kinds of technology mediated contact points for a person or @@ -373,20 +373,27 @@ public function __construct($data = null) $this->addContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_EXPIRATION_DATE])) { - $ext = (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) - ? $data[self::FIELD_EXPIRATION_DATE_EXT] - : null; - if ($data[self::FIELD_EXPIRATION_DATE] instanceof FHIRDateTime) { - $this->setExpirationDate($data[self::FIELD_EXPIRATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EXPIRATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EXPIRATION_DATE]))); - } + if (isset($data[self::FIELD_EXPIRATION_DATE]) || isset($data[self::FIELD_EXPIRATION_DATE_EXT])) { + if (isset($data[self::FIELD_EXPIRATION_DATE])) { + $value = $data[self::FIELD_EXPIRATION_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) { + $ext = $data[self::FIELD_EXPIRATION_DATE_EXT]; } else { - $this->setExpirationDate(new FHIRDateTime($data[self::FIELD_EXPIRATION_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setExpirationDate($value); + } else if (is_array($value)) { + $this->setExpirationDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setExpirationDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpirationDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -414,68 +421,96 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); - } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); - } - } - if (isset($data[self::FIELD_MANUFACTURE_DATE])) { - $ext = (isset($data[self::FIELD_MANUFACTURE_DATE_EXT]) && is_array($data[self::FIELD_MANUFACTURE_DATE_EXT])) - ? $data[self::FIELD_MANUFACTURE_DATE_EXT] - : null; - if ($data[self::FIELD_MANUFACTURE_DATE] instanceof FHIRDateTime) { - $this->setManufactureDate($data[self::FIELD_MANUFACTURE_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MANUFACTURE_DATE])) { - $this->setManufactureDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_MANUFACTURE_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_MANUFACTURE_DATE])) { - $this->setManufactureDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_MANUFACTURE_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MANUFACTURE_DATE]) || isset($data[self::FIELD_MANUFACTURE_DATE_EXT])) { + if (isset($data[self::FIELD_MANUFACTURE_DATE])) { + $value = $data[self::FIELD_MANUFACTURE_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MANUFACTURE_DATE_EXT]) && is_array($data[self::FIELD_MANUFACTURE_DATE_EXT])) { + $ext = $data[self::FIELD_MANUFACTURE_DATE_EXT]; } else { - $this->setManufactureDate(new FHIRDateTime($data[self::FIELD_MANUFACTURE_DATE])); - } - } - if (isset($data[self::FIELD_MANUFACTURER])) { - $ext = (isset($data[self::FIELD_MANUFACTURER_EXT]) && is_array($data[self::FIELD_MANUFACTURER_EXT])) - ? $data[self::FIELD_MANUFACTURER_EXT] - : null; - if ($data[self::FIELD_MANUFACTURER] instanceof FHIRString) { - $this->setManufacturer($data[self::FIELD_MANUFACTURER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MANUFACTURER])) { - $this->setManufacturer(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MANUFACTURER]] + $ext)); - } else if (is_array($data[self::FIELD_MANUFACTURER])) { - $this->setManufacturer(new FHIRString(array_merge($ext, $data[self::FIELD_MANUFACTURER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setManufactureDate($value); + } else if (is_array($value)) { + $this->setManufactureDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setManufactureDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setManufactureDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_MANUFACTURER]) || isset($data[self::FIELD_MANUFACTURER_EXT])) { + if (isset($data[self::FIELD_MANUFACTURER])) { + $value = $data[self::FIELD_MANUFACTURER]; } else { - $this->setManufacturer(new FHIRString($data[self::FIELD_MANUFACTURER])); - } - } - if (isset($data[self::FIELD_MODEL])) { - $ext = (isset($data[self::FIELD_MODEL_EXT]) && is_array($data[self::FIELD_MODEL_EXT])) - ? $data[self::FIELD_MODEL_EXT] - : null; - if ($data[self::FIELD_MODEL] instanceof FHIRString) { - $this->setModel($data[self::FIELD_MODEL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODEL])) { - $this->setModel(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MODEL]] + $ext)); - } else if (is_array($data[self::FIELD_MODEL])) { - $this->setModel(new FHIRString(array_merge($ext, $data[self::FIELD_MODEL]))); + $value = null; + } + if (isset($data[self::FIELD_MANUFACTURER_EXT]) && is_array($data[self::FIELD_MANUFACTURER_EXT])) { + $ext = $data[self::FIELD_MANUFACTURER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setManufacturer($value); + } else if (is_array($value)) { + $this->setManufacturer(new FHIRString(array_merge($ext, $value))); + } else { + $this->setManufacturer(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setManufacturer(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_MODEL]) || isset($data[self::FIELD_MODEL_EXT])) { + if (isset($data[self::FIELD_MODEL])) { + $value = $data[self::FIELD_MODEL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODEL_EXT]) && is_array($data[self::FIELD_MODEL_EXT])) { + $ext = $data[self::FIELD_MODEL_EXT]; } else { - $this->setModel(new FHIRString($data[self::FIELD_MODEL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setModel($value); + } else if (is_array($value)) { + $this->setModel(new FHIRString(array_merge($ext, $value))); + } else { + $this->setModel(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setModel(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -528,20 +563,27 @@ public function __construct($data = null) $this->addSafety(new FHIRCodeableConcept($data[self::FIELD_SAFETY])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFHIRDeviceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFHIRDeviceStatus([FHIRFHIRDeviceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFHIRDeviceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFHIRDeviceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRDeviceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFHIRDeviceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFHIRDeviceStatus([FHIRFHIRDeviceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFHIRDeviceStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -558,36 +600,50 @@ public function __construct($data = null) $this->setUdi(new FHIRDeviceUdi($data[self::FIELD_UDI])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1348,8 +1404,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1602,51 +1658,79 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getExpirationDate())) { $a[self::FIELD_EXPIRATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EXPIRATION_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } if (null !== ($v = $this->getManufactureDate())) { $a[self::FIELD_MANUFACTURE_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_MANUFACTURE_DATE_EXT] = $enc; } } if (null !== ($v = $this->getManufacturer())) { $a[self::FIELD_MANUFACTURER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MANUFACTURER_EXT] = $enc; } } if (null !== ($v = $this->getModel())) { $a[self::FIELD_MODEL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MODEL_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOwner())) { $a[self::FIELD_OWNER] = $v; @@ -1655,12 +1739,20 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getSafety())) { - $a[self::FIELD_SAFETY] = $vs; + $a[self::FIELD_SAFETY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SAFETY][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFHIRDeviceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFHIRDeviceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1672,18 +1764,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php index 88e526bc40..baead09982 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceComponent.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIRDeviceComponent extends FHIRDomainResource implements PHPFHIRContained const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -260,36 +260,50 @@ public function __construct($data = null) $this->setLanguageCode(new FHIRCodeableConcept($data[self::FIELD_LANGUAGE_CODE])); } } - if (isset($data[self::FIELD_LAST_SYSTEM_CHANGE])) { - $ext = (isset($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT]) && is_array($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT])) - ? $data[self::FIELD_LAST_SYSTEM_CHANGE_EXT] - : null; - if ($data[self::FIELD_LAST_SYSTEM_CHANGE] instanceof FHIRInstant) { - $this->setLastSystemChange($data[self::FIELD_LAST_SYSTEM_CHANGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_SYSTEM_CHANGE])) { - $this->setLastSystemChange(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_LAST_SYSTEM_CHANGE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_SYSTEM_CHANGE])) { - $this->setLastSystemChange(new FHIRInstant(array_merge($ext, $data[self::FIELD_LAST_SYSTEM_CHANGE]))); - } + if (isset($data[self::FIELD_LAST_SYSTEM_CHANGE]) || isset($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT])) { + if (isset($data[self::FIELD_LAST_SYSTEM_CHANGE])) { + $value = $data[self::FIELD_LAST_SYSTEM_CHANGE]; } else { - $this->setLastSystemChange(new FHIRInstant($data[self::FIELD_LAST_SYSTEM_CHANGE])); + $value = null; } - } - if (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE])) { - $ext = (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT]) && is_array($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT])) - ? $data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT] - : null; - if ($data[self::FIELD_MEASUREMENT_PRINCIPLE] instanceof FHIRMeasmntPrinciple) { - $this->setMeasurementPrinciple($data[self::FIELD_MEASUREMENT_PRINCIPLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MEASUREMENT_PRINCIPLE])) { - $this->setMeasurementPrinciple(new FHIRMeasmntPrinciple([FHIRMeasmntPrinciple::FIELD_VALUE => $data[self::FIELD_MEASUREMENT_PRINCIPLE]] + $ext)); - } else if (is_array($data[self::FIELD_MEASUREMENT_PRINCIPLE])) { - $this->setMeasurementPrinciple(new FHIRMeasmntPrinciple(array_merge($ext, $data[self::FIELD_MEASUREMENT_PRINCIPLE]))); + if (isset($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT]) && is_array($data[self::FIELD_LAST_SYSTEM_CHANGE_EXT])) { + $ext = $data[self::FIELD_LAST_SYSTEM_CHANGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setLastSystemChange($value); + } else if (is_array($value)) { + $this->setLastSystemChange(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setLastSystemChange(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastSystemChange(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE]) || isset($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT])) { + if (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE])) { + $value = $data[self::FIELD_MEASUREMENT_PRINCIPLE]; } else { - $this->setMeasurementPrinciple(new FHIRMeasmntPrinciple($data[self::FIELD_MEASUREMENT_PRINCIPLE])); + $value = null; + } + if (isset($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT]) && is_array($data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT])) { + $ext = $data[self::FIELD_MEASUREMENT_PRINCIPLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMeasmntPrinciple) { + $this->setMeasurementPrinciple($value); + } else if (is_array($value)) { + $this->setMeasurementPrinciple(new FHIRMeasmntPrinciple(array_merge($ext, $value))); + } else { + $this->setMeasurementPrinciple(new FHIRMeasmntPrinciple([FHIRMeasmntPrinciple::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMeasurementPrinciple(new FHIRMeasmntPrinciple($ext)); } } if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { @@ -778,8 +792,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -935,20 +949,30 @@ public function jsonSerialize() } if (null !== ($v = $this->getLastSystemChange())) { $a[self::FIELD_LAST_SYSTEM_CHANGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_LAST_SYSTEM_CHANGE_EXT] = $enc; } } if (null !== ($v = $this->getMeasurementPrinciple())) { $a[self::FIELD_MEASUREMENT_PRINCIPLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMeasmntPrinciple::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMeasmntPrinciple::FIELD_VALUE]); $a[self::FIELD_MEASUREMENT_PRINCIPLE_EXT] = $enc; } } if ([] !== ($vs = $this->getOperationalStatus())) { - $a[self::FIELD_OPERATIONAL_STATUS] = $vs; + $a[self::FIELD_OPERATIONAL_STATUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OPERATIONAL_STATUS][] = $v; + } } if (null !== ($v = $this->getParameterGroup())) { $a[self::FIELD_PARAMETER_GROUP] = $v; @@ -957,7 +981,13 @@ public function jsonSerialize() $a[self::FIELD_PARENT] = $v; } if ([] !== ($vs = $this->getProductionSpecification())) { - $a[self::FIELD_PRODUCTION_SPECIFICATION] = $vs; + $a[self::FIELD_PRODUCTION_SPECIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRODUCTION_SPECIFICATION][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v; @@ -965,6 +995,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php index 4557ddde5c..d56d3286d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceMetric.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRDeviceMetric extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_UNIT = 'unit'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Describes a measurement, calculation or setting capability of a medical device. @@ -279,36 +279,50 @@ public function __construct($data = null) $this->addCalibration(new FHIRDeviceMetricCalibration($data[self::FIELD_CALIBRATION])); } } - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRDeviceMetricCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRDeviceMetricCategory([FHIRDeviceMetricCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRDeviceMetricCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; } else { - $this->setCategory(new FHIRDeviceMetricCategory($data[self::FIELD_CATEGORY])); + $value = null; } - } - if (isset($data[self::FIELD_COLOR])) { - $ext = (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) - ? $data[self::FIELD_COLOR_EXT] - : null; - if ($data[self::FIELD_COLOR] instanceof FHIRDeviceMetricColor) { - $this->setColor($data[self::FIELD_COLOR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRDeviceMetricColor([FHIRDeviceMetricColor::FIELD_VALUE => $data[self::FIELD_COLOR]] + $ext)); - } else if (is_array($data[self::FIELD_COLOR])) { - $this->setColor(new FHIRDeviceMetricColor(array_merge($ext, $data[self::FIELD_COLOR]))); + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRDeviceMetricCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRDeviceMetricCategory([FHIRDeviceMetricCategory::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCategory(new FHIRDeviceMetricCategory($ext)); + } + } + if (isset($data[self::FIELD_COLOR]) || isset($data[self::FIELD_COLOR_EXT])) { + if (isset($data[self::FIELD_COLOR])) { + $value = $data[self::FIELD_COLOR]; } else { - $this->setColor(new FHIRDeviceMetricColor($data[self::FIELD_COLOR])); + $value = null; + } + if (isset($data[self::FIELD_COLOR_EXT]) && is_array($data[self::FIELD_COLOR_EXT])) { + $ext = $data[self::FIELD_COLOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricColor) { + $this->setColor($value); + } else if (is_array($value)) { + $this->setColor(new FHIRDeviceMetricColor(array_merge($ext, $value))); + } else { + $this->setColor(new FHIRDeviceMetricColor([FHIRDeviceMetricColor::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setColor(new FHIRDeviceMetricColor($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -325,20 +339,27 @@ public function __construct($data = null) $this->setMeasurementPeriod(new FHIRTiming($data[self::FIELD_MEASUREMENT_PERIOD])); } } - if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { - $ext = (isset($data[self::FIELD_OPERATIONAL_STATUS_EXT]) && is_array($data[self::FIELD_OPERATIONAL_STATUS_EXT])) - ? $data[self::FIELD_OPERATIONAL_STATUS_EXT] - : null; - if ($data[self::FIELD_OPERATIONAL_STATUS] instanceof FHIRDeviceMetricOperationalStatus) { - $this->setOperationalStatus($data[self::FIELD_OPERATIONAL_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OPERATIONAL_STATUS])) { - $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus([FHIRDeviceMetricOperationalStatus::FIELD_VALUE => $data[self::FIELD_OPERATIONAL_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_OPERATIONAL_STATUS])) { - $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus(array_merge($ext, $data[self::FIELD_OPERATIONAL_STATUS]))); - } + if (isset($data[self::FIELD_OPERATIONAL_STATUS]) || isset($data[self::FIELD_OPERATIONAL_STATUS_EXT])) { + if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { + $value = $data[self::FIELD_OPERATIONAL_STATUS]; } else { - $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus($data[self::FIELD_OPERATIONAL_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_OPERATIONAL_STATUS_EXT]) && is_array($data[self::FIELD_OPERATIONAL_STATUS_EXT])) { + $ext = $data[self::FIELD_OPERATIONAL_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceMetricOperationalStatus) { + $this->setOperationalStatus($value); + } else if (is_array($value)) { + $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus(array_merge($ext, $value))); + } else { + $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus([FHIRDeviceMetricOperationalStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOperationalStatus(new FHIRDeviceMetricOperationalStatus($ext)); } } if (isset($data[self::FIELD_PARENT])) { @@ -781,8 +802,8 @@ public function setUnit(FHIRCodeableConcept $unit = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -916,19 +937,29 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCalibration())) { - $a[self::FIELD_CALIBRATION] = $vs; + $a[self::FIELD_CALIBRATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CALIBRATION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } if (null !== ($v = $this->getColor())) { $a[self::FIELD_COLOR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricColor::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricColor::FIELD_VALUE]); $a[self::FIELD_COLOR_EXT] = $enc; } } @@ -940,8 +971,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOperationalStatus())) { $a[self::FIELD_OPERATIONAL_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceMetricOperationalStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceMetricOperationalStatus::FIELD_VALUE]); $a[self::FIELD_OPERATIONAL_STATUS_EXT] = $enc; } } @@ -957,6 +990,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnit())) { $a[self::FIELD_UNIT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php index a894a03182..8c3444ea32 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRDeviceRequest extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_SUPPORTING_INFO = 'supportingInfo'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -437,20 +437,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -560,20 +567,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -622,20 +636,27 @@ public function __construct($data = null) $this->addPriorRequest(new FHIRReference($data[self::FIELD_PRIOR_REQUEST])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -699,20 +720,27 @@ public function __construct($data = null) $this->setRequester(new FHIRDeviceRequestRequester($data[self::FIELD_REQUESTER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1814,8 +1842,8 @@ public function setSupportingInfo(array $supportingInfo = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2106,13 +2134,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getCodeCodeableConcept())) { $a[self::FIELD_CODE_CODEABLE_CONCEPT] = $v; @@ -2124,24 +2160,44 @@ public function jsonSerialize() $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if (null !== ($v = $this->getGroupIdentifier())) { $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -2158,31 +2214,59 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER_TYPE] = $v; } if ([] !== ($vs = $this->getPriorRequest())) { - $a[self::FIELD_PRIOR_REQUEST] = $vs; + $a[self::FIELD_PRIOR_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRIOR_REQUEST][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getRelevantHistory())) { - $a[self::FIELD_RELEVANT_HISTORY] = $vs; + $a[self::FIELD_RELEVANT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELEVANT_HISTORY][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2190,7 +2274,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php index 9c63e6a4d6..a3024bd254 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -105,7 +105,7 @@ class FHIRDeviceUseStatement extends FHIRDomainResource implements PHPFHIRContai const FIELD_WHEN_USED = 'whenUsed'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -357,20 +357,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_RECORDED_ON])) { - $ext = (isset($data[self::FIELD_RECORDED_ON_EXT]) && is_array($data[self::FIELD_RECORDED_ON_EXT])) - ? $data[self::FIELD_RECORDED_ON_EXT] - : null; - if ($data[self::FIELD_RECORDED_ON] instanceof FHIRDateTime) { - $this->setRecordedOn($data[self::FIELD_RECORDED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED_ON])) { - $this->setRecordedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECORDED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED_ON])) { - $this->setRecordedOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECORDED_ON]))); - } + if (isset($data[self::FIELD_RECORDED_ON]) || isset($data[self::FIELD_RECORDED_ON_EXT])) { + if (isset($data[self::FIELD_RECORDED_ON])) { + $value = $data[self::FIELD_RECORDED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_ON_EXT]) && is_array($data[self::FIELD_RECORDED_ON_EXT])) { + $ext = $data[self::FIELD_RECORDED_ON_EXT]; } else { - $this->setRecordedOn(new FHIRDateTime($data[self::FIELD_RECORDED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setRecordedOn($value); + } else if (is_array($value)) { + $this->setRecordedOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setRecordedOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecordedOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_SOURCE])) { @@ -380,20 +387,27 @@ public function __construct($data = null) $this->setSource(new FHIRReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDeviceUseStatementStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDeviceUseStatementStatus([FHIRDeviceUseStatementStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDeviceUseStatementStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDeviceUseStatementStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDeviceUseStatementStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDeviceUseStatementStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDeviceUseStatementStatus([FHIRDeviceUseStatementStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDeviceUseStatementStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -403,20 +417,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TIMING_DATE_TIME])) { - $ext = (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) - ? $data[self::FIELD_TIMING_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_TIMING_DATE_TIME] instanceof FHIRDateTime) { - $this->setTimingDateTime($data[self::FIELD_TIMING_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_TIMING_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_TIMING_DATE_TIME])) { - $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_TIMING_DATE_TIME]))); - } + if (isset($data[self::FIELD_TIMING_DATE_TIME]) || isset($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_TIMING_DATE_TIME])) { + $value = $data[self::FIELD_TIMING_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMING_DATE_TIME_EXT]) && is_array($data[self::FIELD_TIMING_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_TIMING_DATE_TIME_EXT]; } else { - $this->setTimingDateTime(new FHIRDateTime($data[self::FIELD_TIMING_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setTimingDateTime($value); + } else if (is_array($value)) { + $this->setTimingDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setTimingDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimingDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_TIMING_PERIOD])) { @@ -997,8 +1018,8 @@ public function setWhenUsed(FHIRPeriod $whenUsed = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1186,18 +1207,38 @@ public function jsonSerialize() $a[self::FIELD_DEVICE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIndication())) { - $a[self::FIELD_INDICATION] = $vs; + $a[self::FIELD_INDICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INDICATION][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getRecordedOn())) { $a[self::FIELD_RECORDED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECORDED_ON_EXT] = $enc; } } @@ -1206,8 +1247,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDeviceUseStatementStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDeviceUseStatementStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1216,8 +1259,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimingDateTime())) { $a[self::FIELD_TIMING_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_TIMING_DATE_TIME_EXT] = $enc; } } @@ -1230,6 +1275,9 @@ public function jsonSerialize() if (null !== ($v = $this->getWhenUsed())) { $a[self::FIELD_WHEN_USED] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php index 171bb944f7..5617c841bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDiagnosticReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -117,7 +117,7 @@ class FHIRDiagnosticReport extends FHIRDomainResource implements PHPFHIRContaine const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -421,20 +421,27 @@ public function __construct($data = null) $this->addCodedDiagnosis(new FHIRCodeableConcept($data[self::FIELD_CODED_DIAGNOSIS])); } } - if (isset($data[self::FIELD_CONCLUSION])) { - $ext = (isset($data[self::FIELD_CONCLUSION_EXT]) && is_array($data[self::FIELD_CONCLUSION_EXT])) - ? $data[self::FIELD_CONCLUSION_EXT] - : null; - if ($data[self::FIELD_CONCLUSION] instanceof FHIRString) { - $this->setConclusion($data[self::FIELD_CONCLUSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONCLUSION])) { - $this->setConclusion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONCLUSION]] + $ext)); - } else if (is_array($data[self::FIELD_CONCLUSION])) { - $this->setConclusion(new FHIRString(array_merge($ext, $data[self::FIELD_CONCLUSION]))); - } + if (isset($data[self::FIELD_CONCLUSION]) || isset($data[self::FIELD_CONCLUSION_EXT])) { + if (isset($data[self::FIELD_CONCLUSION])) { + $value = $data[self::FIELD_CONCLUSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONCLUSION_EXT]) && is_array($data[self::FIELD_CONCLUSION_EXT])) { + $ext = $data[self::FIELD_CONCLUSION_EXT]; } else { - $this->setConclusion(new FHIRString($data[self::FIELD_CONCLUSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setConclusion($value); + } else if (is_array($value)) { + $this->setConclusion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setConclusion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setConclusion(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONTEXT])) { @@ -444,20 +451,27 @@ public function __construct($data = null) $this->setContext(new FHIRReference($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -521,20 +535,27 @@ public function __construct($data = null) $this->addImagingStudy(new FHIRReference($data[self::FIELD_IMAGING_STUDY])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRInstant) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; } else { - $this->setIssued(new FHIRInstant($data[self::FIELD_ISSUED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_PERFORMER])) { @@ -609,20 +630,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDiagnosticReportStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticReportStatus([FHIRDiagnosticReportStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDiagnosticReportStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRDiagnosticReportStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDiagnosticReportStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDiagnosticReportStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDiagnosticReportStatus([FHIRDiagnosticReportStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDiagnosticReportStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1542,8 +1570,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1805,7 +1833,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -1814,12 +1848,20 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getCodedDiagnosis())) { - $a[self::FIELD_CODED_DIAGNOSIS] = $vs; + $a[self::FIELD_CODED_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODED_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getConclusion())) { $a[self::FIELD_CONCLUSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CONCLUSION_EXT] = $enc; } } @@ -1828,8 +1870,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -1837,43 +1881,92 @@ public function jsonSerialize() $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getImage())) { - $a[self::FIELD_IMAGE] = $vs; + $a[self::FIELD_IMAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGE][] = $v; + } } if ([] !== ($vs = $this->getImagingStudy())) { - $a[self::FIELD_IMAGING_STUDY] = $vs; + $a[self::FIELD_IMAGING_STUDY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGING_STUDY][] = $v; + } } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getPresentedForm())) { - $a[self::FIELD_PRESENTED_FORM] = $vs; + $a[self::FIELD_PRESENTED_FORM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRESENTED_FORM][] = $v; + } } if ([] !== ($vs = $this->getResult())) { - $a[self::FIELD_RESULT] = $vs; + $a[self::FIELD_RESULT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RESULT][] = $v; + } } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDiagnosticReportStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDiagnosticReportStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php index fb371c5ddb..8caf7223d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRDocumentManifest extends FHIRDomainResource implements PHPFHIRContaine const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -317,36 +317,50 @@ public function __construct($data = null) $this->addContent(new FHIRDocumentManifestContent($data[self::FIELD_CONTENT])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -410,36 +424,50 @@ public function __construct($data = null) $this->addRelated(new FHIRDocumentManifestRelated($data[self::FIELD_RELATED])); } } - if (isset($data[self::FIELD_SOURCE])) { - $ext = (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) - ? $data[self::FIELD_SOURCE_EXT] - : null; - if ($data[self::FIELD_SOURCE] instanceof FHIRUri) { - $this->setSource($data[self::FIELD_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_SOURCE])) { - $this->setSource(new FHIRUri(array_merge($ext, $data[self::FIELD_SOURCE]))); - } + if (isset($data[self::FIELD_SOURCE]) || isset($data[self::FIELD_SOURCE_EXT])) { + if (isset($data[self::FIELD_SOURCE])) { + $value = $data[self::FIELD_SOURCE]; } else { - $this->setSource(new FHIRUri($data[self::FIELD_SOURCE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDocumentReferenceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SOURCE_EXT]) && is_array($data[self::FIELD_SOURCE_EXT])) { + $ext = $data[self::FIELD_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setSource($value); + } else if (is_array($value)) { + $this->setSource(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setSource(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSource(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDocumentReferenceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentReferenceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDocumentReferenceStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1036,8 +1064,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1235,48 +1263,86 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMasterIdentifier())) { $a[self::FIELD_MASTER_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getSource())) { $a[self::FIELD_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_SOURCE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentReferenceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentReferenceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1286,6 +1352,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php index 5530c28e3b..5e25c14209 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRDocumentReference.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -113,7 +113,7 @@ class FHIRDocumentReference extends FHIRDomainResource implements PHPFHIRContain const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -402,20 +402,27 @@ public function __construct($data = null) $this->setContext(new FHIRDocumentReferenceContext($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_CUSTODIAN])) { @@ -425,36 +432,50 @@ public function __construct($data = null) $this->setCustodian(new FHIRReference($data[self::FIELD_CUSTODIAN])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; } - } - if (isset($data[self::FIELD_DOC_STATUS])) { - $ext = (isset($data[self::FIELD_DOC_STATUS_EXT]) && is_array($data[self::FIELD_DOC_STATUS_EXT])) - ? $data[self::FIELD_DOC_STATUS_EXT] - : null; - if ($data[self::FIELD_DOC_STATUS] instanceof FHIRCompositionStatus) { - $this->setDocStatus($data[self::FIELD_DOC_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DOC_STATUS])) { - $this->setDocStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $data[self::FIELD_DOC_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_DOC_STATUS])) { - $this->setDocStatus(new FHIRCompositionStatus(array_merge($ext, $data[self::FIELD_DOC_STATUS]))); + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_DOC_STATUS]) || isset($data[self::FIELD_DOC_STATUS_EXT])) { + if (isset($data[self::FIELD_DOC_STATUS])) { + $value = $data[self::FIELD_DOC_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DOC_STATUS_EXT]) && is_array($data[self::FIELD_DOC_STATUS_EXT])) { + $ext = $data[self::FIELD_DOC_STATUS_EXT]; } else { - $this->setDocStatus(new FHIRCompositionStatus($data[self::FIELD_DOC_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCompositionStatus) { + $this->setDocStatus($value); + } else if (is_array($value)) { + $this->setDocStatus(new FHIRCompositionStatus(array_merge($ext, $value))); + } else { + $this->setDocStatus(new FHIRCompositionStatus([FHIRCompositionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDocStatus(new FHIRCompositionStatus($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -475,20 +496,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INDEXED])) { - $ext = (isset($data[self::FIELD_INDEXED_EXT]) && is_array($data[self::FIELD_INDEXED_EXT])) - ? $data[self::FIELD_INDEXED_EXT] - : null; - if ($data[self::FIELD_INDEXED] instanceof FHIRInstant) { - $this->setIndexed($data[self::FIELD_INDEXED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INDEXED])) { - $this->setIndexed(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_INDEXED]] + $ext)); - } else if (is_array($data[self::FIELD_INDEXED])) { - $this->setIndexed(new FHIRInstant(array_merge($ext, $data[self::FIELD_INDEXED]))); - } + if (isset($data[self::FIELD_INDEXED]) || isset($data[self::FIELD_INDEXED_EXT])) { + if (isset($data[self::FIELD_INDEXED])) { + $value = $data[self::FIELD_INDEXED]; } else { - $this->setIndexed(new FHIRInstant($data[self::FIELD_INDEXED])); + $value = null; + } + if (isset($data[self::FIELD_INDEXED_EXT]) && is_array($data[self::FIELD_INDEXED_EXT])) { + $ext = $data[self::FIELD_INDEXED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIndexed($value); + } else if (is_array($value)) { + $this->setIndexed(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIndexed(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIndexed(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_MASTER_IDENTIFIER])) { @@ -534,20 +562,27 @@ public function __construct($data = null) $this->addSecurityLabel(new FHIRCodeableConcept($data[self::FIELD_SECURITY_LABEL])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRDocumentReferenceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRDocumentReferenceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDocumentReferenceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRDocumentReferenceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRDocumentReferenceStatus([FHIRDocumentReferenceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRDocumentReferenceStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1301,8 +1336,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1533,21 +1568,35 @@ public function jsonSerialize() $a[self::FIELD_AUTHENTICATOR] = $v; } if ([] !== ($vs = $this->getAuthor())) { - $a[self::FIELD_AUTHOR] = $vs; + $a[self::FIELD_AUTHOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHOR][] = $v; + } } if (null !== ($v = $this->getClass())) { $a[self::FIELD_CLASS] = $v; } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } @@ -1556,25 +1605,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDocStatus())) { $a[self::FIELD_DOC_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCompositionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCompositionStatus::FIELD_VALUE]); $a[self::FIELD_DOC_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIndexed())) { $a[self::FIELD_INDEXED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_INDEXED_EXT] = $enc; } } @@ -1582,15 +1643,29 @@ public function jsonSerialize() $a[self::FIELD_MASTER_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getRelatesTo())) { - $a[self::FIELD_RELATES_TO] = $vs; + $a[self::FIELD_RELATES_TO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATES_TO][] = $v; + } } if ([] !== ($vs = $this->getSecurityLabel())) { - $a[self::FIELD_SECURITY_LABEL] = $vs; + $a[self::FIELD_SECURITY_LABEL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SECURITY_LABEL][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDocumentReferenceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDocumentReferenceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1600,6 +1675,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php index fc5ade9eca..75c95396bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIREligibilityRequest extends FHIRDomainResource implements PHPFHIRContai const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -334,20 +334,27 @@ public function __construct($data = null) $this->setBenefitSubCategory(new FHIRCodeableConcept($data[self::FIELD_BENEFIT_SUB_CATEGORY])); } } - if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $ext = (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) - ? $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT] - : null; - if ($data[self::FIELD_BUSINESS_ARRANGEMENT] instanceof FHIRString) { - $this->setBusinessArrangement($data[self::FIELD_BUSINESS_ARRANGEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BUSINESS_ARRANGEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_BUSINESS_ARRANGEMENT])) { - $this->setBusinessArrangement(new FHIRString(array_merge($ext, $data[self::FIELD_BUSINESS_ARRANGEMENT]))); - } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT]) || isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT])) { + $value = $data[self::FIELD_BUSINESS_ARRANGEMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]) && is_array($data[self::FIELD_BUSINESS_ARRANGEMENT_EXT])) { + $ext = $data[self::FIELD_BUSINESS_ARRANGEMENT_EXT]; } else { - $this->setBusinessArrangement(new FHIRString($data[self::FIELD_BUSINESS_ARRANGEMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBusinessArrangement($value); + } else if (is_array($value)) { + $this->setBusinessArrangement(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBusinessArrangement(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBusinessArrangement(new FHIRString($ext)); } } if (isset($data[self::FIELD_COVERAGE])) { @@ -357,20 +364,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENTERER])) { @@ -440,20 +454,27 @@ public function __construct($data = null) $this->setProvider(new FHIRReference($data[self::FIELD_PROVIDER])); } } - if (isset($data[self::FIELD_SERVICED_DATE])) { - $ext = (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) - ? $data[self::FIELD_SERVICED_DATE_EXT] - : null; - if ($data[self::FIELD_SERVICED_DATE] instanceof FHIRDate) { - $this->setServicedDate($data[self::FIELD_SERVICED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_SERVICED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_SERVICED_DATE])) { - $this->setServicedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_SERVICED_DATE]))); - } + if (isset($data[self::FIELD_SERVICED_DATE]) || isset($data[self::FIELD_SERVICED_DATE_EXT])) { + if (isset($data[self::FIELD_SERVICED_DATE])) { + $value = $data[self::FIELD_SERVICED_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SERVICED_DATE_EXT]) && is_array($data[self::FIELD_SERVICED_DATE_EXT])) { + $ext = $data[self::FIELD_SERVICED_DATE_EXT]; } else { - $this->setServicedDate(new FHIRDate($data[self::FIELD_SERVICED_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setServicedDate($value); + } else if (is_array($value)) { + $this->setServicedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setServicedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setServicedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_SERVICED_PERIOD])) { @@ -463,20 +484,27 @@ public function __construct($data = null) $this->setServicedPeriod(new FHIRPeriod($data[self::FIELD_SERVICED_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -1062,8 +1090,8 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1264,8 +1292,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getBusinessArrangement())) { $a[self::FIELD_BUSINESS_ARRANGEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BUSINESS_ARRANGEMENT_EXT] = $enc; } } @@ -1274,8 +1304,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } @@ -1286,7 +1318,13 @@ public function jsonSerialize() $a[self::FIELD_FACILITY] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; @@ -1305,8 +1343,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getServicedDate())) { $a[self::FIELD_SERVICED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_SERVICED_DATE_EXT] = $enc; } } @@ -1315,11 +1355,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php index f7a20649aa..182127cbf3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREligibilityResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIREligibilityResponse extends FHIRDomainResource implements PHPFHIRConta const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -277,36 +277,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_ERROR])) { @@ -352,20 +366,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INFORCE])) { - $ext = (isset($data[self::FIELD_INFORCE_EXT]) && is_array($data[self::FIELD_INFORCE_EXT])) - ? $data[self::FIELD_INFORCE_EXT] - : null; - if ($data[self::FIELD_INFORCE] instanceof FHIRBoolean) { - $this->setInforce($data[self::FIELD_INFORCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INFORCE])) { - $this->setInforce(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INFORCE]] + $ext)); - } else if (is_array($data[self::FIELD_INFORCE])) { - $this->setInforce(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INFORCE]))); - } + if (isset($data[self::FIELD_INFORCE]) || isset($data[self::FIELD_INFORCE_EXT])) { + if (isset($data[self::FIELD_INFORCE])) { + $value = $data[self::FIELD_INFORCE]; } else { - $this->setInforce(new FHIRBoolean($data[self::FIELD_INFORCE])); + $value = null; + } + if (isset($data[self::FIELD_INFORCE_EXT]) && is_array($data[self::FIELD_INFORCE_EXT])) { + $ext = $data[self::FIELD_INFORCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInforce($value); + } else if (is_array($value)) { + $this->setInforce(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInforce(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInforce(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_INSURANCE])) { @@ -421,20 +442,27 @@ public function __construct($data = null) $this->setRequestProvider(new FHIRReference($data[self::FIELD_REQUEST_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -969,8 +997,8 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1161,36 +1189,60 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getError())) { - $a[self::FIELD_ERROR] = $vs; + $a[self::FIELD_ERROR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ERROR][] = $v; + } } if (null !== ($v = $this->getForm())) { $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInforce())) { $a[self::FIELD_INFORCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INFORCE_EXT] = $enc; } } if ([] !== ($vs = $this->getInsurance())) { - $a[self::FIELD_INSURANCE] = $vs; + $a[self::FIELD_INSURANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSURANCE][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; @@ -1209,11 +1261,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREncounter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREncounter.php index e6f5c9a30c..dbf34c1dc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREncounter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREncounter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIREncounter extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -607,20 +607,27 @@ public function __construct($data = null) $this->setServiceProvider(new FHIRReference($data[self::FIELD_SERVICE_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREncounterStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterStatus([FHIREncounterStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREncounterStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREncounterStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREncounterStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREncounterStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREncounterStatus([FHIREncounterStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREncounterStatus($ext)); } } if (isset($data[self::FIELD_STATUS_HISTORY])) { @@ -1666,8 +1673,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1937,7 +1944,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAccount())) { - $a[self::FIELD_ACCOUNT] = $vs; + $a[self::FIELD_ACCOUNT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACCOUNT][] = $v; + } } if (null !== ($v = $this->getAppointment())) { $a[self::FIELD_APPOINTMENT] = $v; @@ -1946,34 +1959,76 @@ public function jsonSerialize() $a[self::FIELD_CLASS] = $v; } if ([] !== ($vs = $this->getClassHistory())) { - $a[self::FIELD_CLASS_HISTORY] = $vs; + $a[self::FIELD_CLASS_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CLASS_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if ([] !== ($vs = $this->getEpisodeOfCare())) { - $a[self::FIELD_EPISODE_OF_CARE] = $vs; + $a[self::FIELD_EPISODE_OF_CARE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EPISODE_OF_CARE][] = $v; + } } if (null !== ($v = $this->getHospitalization())) { $a[self::FIELD_HOSPITALIZATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIncomingReferral())) { - $a[self::FIELD_INCOMING_REFERRAL] = $vs; + $a[self::FIELD_INCOMING_REFERRAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INCOMING_REFERRAL][] = $v; + } } if (null !== ($v = $this->getLength())) { $a[self::FIELD_LENGTH] = $v; } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getPartOf())) { $a[self::FIELD_PART_OF] = $v; } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; @@ -1982,26 +2037,49 @@ public function jsonSerialize() $a[self::FIELD_PRIORITY] = $v; } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if (null !== ($v = $this->getServiceProvider())) { $a[self::FIELD_SERVICE_PROVIDER] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREncounterStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREncounterStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStatusHistory())) { - $a[self::FIELD_STATUS_HISTORY] = $vs; + $a[self::FIELD_STATUS_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STATUS_HISTORY][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREndpoint.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREndpoint.php index 7133f1bfe0..63b2e45e31 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREndpoint.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREndpoint.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIREndpoint extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -268,20 +268,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ADDRESS])) { - $ext = (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) - ? $data[self::FIELD_ADDRESS_EXT] - : null; - if ($data[self::FIELD_ADDRESS] instanceof FHIRUri) { - $this->setAddress($data[self::FIELD_ADDRESS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_ADDRESS]] + $ext)); - } else if (is_array($data[self::FIELD_ADDRESS])) { - $this->setAddress(new FHIRUri(array_merge($ext, $data[self::FIELD_ADDRESS]))); - } + if (isset($data[self::FIELD_ADDRESS]) || isset($data[self::FIELD_ADDRESS_EXT])) { + if (isset($data[self::FIELD_ADDRESS])) { + $value = $data[self::FIELD_ADDRESS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ADDRESS_EXT]) && is_array($data[self::FIELD_ADDRESS_EXT])) { + $ext = $data[self::FIELD_ADDRESS_EXT]; } else { - $this->setAddress(new FHIRUri($data[self::FIELD_ADDRESS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setAddress($value); + } else if (is_array($value)) { + $this->setAddress(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setAddress(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAddress(new FHIRUri($ext)); } } if (isset($data[self::FIELD_CONNECTION_TYPE])) { @@ -309,33 +316,42 @@ public function __construct($data = null) $this->addContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_HEADER])) { - $ext = (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) - ? $data[self::FIELD_HEADER_EXT] - : null; - if (is_array($data[self::FIELD_HEADER])) { - foreach($data[self::FIELD_HEADER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addHeader($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addHeader(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_HEADER]) || isset($data[self::FIELD_HEADER_EXT])) { + if (isset($data[self::FIELD_HEADER])) { + $value = $data[self::FIELD_HEADER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HEADER_EXT]) && is_array($data[self::FIELD_HEADER_EXT])) { + $ext = $data[self::FIELD_HEADER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addHeader($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addHeader($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addHeader(new FHIRString(array_merge($v, $iext))); + } else { + $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addHeader(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addHeader(new FHIRString(array_merge($ext, $value))); + } else { + $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addHeader(new FHIRString($iext)); } - } elseif ($data[self::FIELD_HEADER] instanceof FHIRString) { - $this->addHeader($data[self::FIELD_HEADER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_HEADER])) { - $this->addHeader(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_HEADER]] + $ext)); - } else { - $this->addHeader(new FHIRString($data[self::FIELD_HEADER])); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -363,49 +379,65 @@ public function __construct($data = null) $this->setManagingOrganization(new FHIRReference($data[self::FIELD_MANAGING_ORGANIZATION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PAYLOAD_MIME_TYPE])) { - $ext = (isset($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT]) && is_array($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT])) - ? $data[self::FIELD_PAYLOAD_MIME_TYPE_EXT] - : null; - if (is_array($data[self::FIELD_PAYLOAD_MIME_TYPE])) { - foreach($data[self::FIELD_PAYLOAD_MIME_TYPE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRCode) { - $this->addPayloadMimeType($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPayloadMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPayloadMimeType(new FHIRCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PAYLOAD_MIME_TYPE]) || isset($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT])) { + if (isset($data[self::FIELD_PAYLOAD_MIME_TYPE])) { + $value = $data[self::FIELD_PAYLOAD_MIME_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT]) && is_array($data[self::FIELD_PAYLOAD_MIME_TYPE_EXT])) { + $ext = $data[self::FIELD_PAYLOAD_MIME_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->addPayloadMimeType($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRCode) { + $this->addPayloadMimeType($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPayloadMimeType(new FHIRCode(array_merge($v, $iext))); + } else { + $this->addPayloadMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPayloadMimeType(new FHIRCode($v)); } + } elseif (is_array($value)) { + $this->addPayloadMimeType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->addPayloadMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPayloadMimeType(new FHIRCode($iext)); } - } elseif ($data[self::FIELD_PAYLOAD_MIME_TYPE] instanceof FHIRCode) { - $this->addPayloadMimeType($data[self::FIELD_PAYLOAD_MIME_TYPE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PAYLOAD_MIME_TYPE])) { - $this->addPayloadMimeType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_PAYLOAD_MIME_TYPE]] + $ext)); - } else { - $this->addPayloadMimeType(new FHIRCode($data[self::FIELD_PAYLOAD_MIME_TYPE])); } } if (isset($data[self::FIELD_PAYLOAD_TYPE])) { @@ -433,20 +465,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREndpointStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREndpointStatus([FHIREndpointStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREndpointStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREndpointStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREndpointStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREndpointStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREndpointStatus([FHIREndpointStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREndpointStatus($ext)); } } } @@ -1006,8 +1045,8 @@ public function setStatus(FHIREndpointStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1192,8 +1231,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAddress())) { $a[self::FIELD_ADDRESS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_ADDRESS_EXT] = $enc; } } @@ -1201,64 +1242,105 @@ public function jsonSerialize() $a[self::FIELD_CONNECTION_TYPE] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getHeader())) { $a[self::FIELD_HEADER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_HEADER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_HEADER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_HEADER_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_HEADER_EXT] = $encs; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPayloadMimeType())) { $a[self::FIELD_PAYLOAD_MIME_TYPE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PAYLOAD_MIME_TYPE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PAYLOAD_MIME_TYPE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRCode::FIELD_VALUE]) || array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PAYLOAD_MIME_TYPE_EXT][] = null; + unset($enc[FHIRCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PAYLOAD_MIME_TYPE_EXT] = $encs; + } } if ([] !== ($vs = $this->getPayloadType())) { - $a[self::FIELD_PAYLOAD_TYPE] = $vs; + $a[self::FIELD_PAYLOAD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PAYLOAD_TYPE][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREndpointStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREndpointStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php index f43e26f5e5..a27625838b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIREnrollmentRequest extends FHIRDomainResource implements PHPFHIRContain const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -216,20 +216,27 @@ public function __construct($data = null) $this->setCoverage(new FHIRReference($data[self::FIELD_COVERAGE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -271,20 +278,27 @@ public function __construct($data = null) $this->setProvider(new FHIRReference($data[self::FIELD_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -607,8 +621,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -742,13 +756,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInsurer())) { $a[self::FIELD_INSURER] = $v; @@ -761,14 +783,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php index 551a1a3463..9195a51904 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREnrollmentResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -99,7 +99,7 @@ class FHIREnrollmentResponse extends FHIRDomainResource implements PHPFHIRContai const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -225,36 +225,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -310,20 +324,27 @@ public function __construct($data = null) $this->setRequestProvider(new FHIRReference($data[self::FIELD_REQUEST_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -679,8 +700,8 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -825,20 +846,30 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -857,11 +888,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php index b8ddc54765..a5bea6b189 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIREpisodeOfCare.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -102,7 +102,7 @@ class FHIREpisodeOfCare extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -366,20 +366,27 @@ public function __construct($data = null) $this->addReferralRequest(new FHIRReference($data[self::FIELD_REFERRAL_REQUEST])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREpisodeOfCareStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIREpisodeOfCareStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREpisodeOfCareStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREpisodeOfCareStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREpisodeOfCareStatus([FHIREpisodeOfCareStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREpisodeOfCareStatus($ext)); } } if (isset($data[self::FIELD_STATUS_HISTORY])) { @@ -1036,8 +1043,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1225,16 +1232,34 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAccount())) { - $a[self::FIELD_ACCOUNT] = $vs; + $a[self::FIELD_ACCOUNT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACCOUNT][] = $v; + } } if (null !== ($v = $this->getCareManager())) { $a[self::FIELD_CARE_MANAGER] = $v; } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; @@ -1246,23 +1271,52 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getReferralRequest())) { - $a[self::FIELD_REFERRAL_REQUEST] = $vs; + $a[self::FIELD_REFERRAL_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERRAL_REQUEST][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREpisodeOfCareStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREpisodeOfCareStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStatusHistory())) { - $a[self::FIELD_STATUS_HISTORY] = $vs; + $a[self::FIELD_STATUS_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STATUS_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getTeam())) { - $a[self::FIELD_TEAM] = $vs; + $a[self::FIELD_TEAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEAM][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExpansionProfile.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExpansionProfile.php index 46d00308fd..783d4c51c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExpansionProfile.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExpansionProfile.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRExpansionProfile extends FHIRDomainResource implements PHPFHIRContaine const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -444,20 +444,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE_ONLY])) { - $ext = (isset($data[self::FIELD_ACTIVE_ONLY_EXT]) && is_array($data[self::FIELD_ACTIVE_ONLY_EXT])) - ? $data[self::FIELD_ACTIVE_ONLY_EXT] - : null; - if ($data[self::FIELD_ACTIVE_ONLY] instanceof FHIRBoolean) { - $this->setActiveOnly($data[self::FIELD_ACTIVE_ONLY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE_ONLY])) { - $this->setActiveOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE_ONLY]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE_ONLY])) { - $this->setActiveOnly(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE_ONLY]))); - } + if (isset($data[self::FIELD_ACTIVE_ONLY]) || isset($data[self::FIELD_ACTIVE_ONLY_EXT])) { + if (isset($data[self::FIELD_ACTIVE_ONLY])) { + $value = $data[self::FIELD_ACTIVE_ONLY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_ONLY_EXT]) && is_array($data[self::FIELD_ACTIVE_ONLY_EXT])) { + $ext = $data[self::FIELD_ACTIVE_ONLY_EXT]; } else { - $this->setActiveOnly(new FHIRBoolean($data[self::FIELD_ACTIVE_ONLY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActiveOnly($value); + } else if (is_array($value)) { + $this->setActiveOnly(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActiveOnly(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActiveOnly(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -478,36 +485,50 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DESIGNATION])) { @@ -517,68 +538,96 @@ public function __construct($data = null) $this->setDesignation(new FHIRExpansionProfileDesignation($data[self::FIELD_DESIGNATION])); } } - if (isset($data[self::FIELD_DISPLAY_LANGUAGE])) { - $ext = (isset($data[self::FIELD_DISPLAY_LANGUAGE_EXT]) && is_array($data[self::FIELD_DISPLAY_LANGUAGE_EXT])) - ? $data[self::FIELD_DISPLAY_LANGUAGE_EXT] - : null; - if ($data[self::FIELD_DISPLAY_LANGUAGE] instanceof FHIRCode) { - $this->setDisplayLanguage($data[self::FIELD_DISPLAY_LANGUAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPLAY_LANGUAGE])) { - $this->setDisplayLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_DISPLAY_LANGUAGE]] + $ext)); - } else if (is_array($data[self::FIELD_DISPLAY_LANGUAGE])) { - $this->setDisplayLanguage(new FHIRCode(array_merge($ext, $data[self::FIELD_DISPLAY_LANGUAGE]))); - } + if (isset($data[self::FIELD_DISPLAY_LANGUAGE]) || isset($data[self::FIELD_DISPLAY_LANGUAGE_EXT])) { + if (isset($data[self::FIELD_DISPLAY_LANGUAGE])) { + $value = $data[self::FIELD_DISPLAY_LANGUAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPLAY_LANGUAGE_EXT]) && is_array($data[self::FIELD_DISPLAY_LANGUAGE_EXT])) { + $ext = $data[self::FIELD_DISPLAY_LANGUAGE_EXT]; } else { - $this->setDisplayLanguage(new FHIRCode($data[self::FIELD_DISPLAY_LANGUAGE])); - } - } - if (isset($data[self::FIELD_EXCLUDE_NESTED])) { - $ext = (isset($data[self::FIELD_EXCLUDE_NESTED_EXT]) && is_array($data[self::FIELD_EXCLUDE_NESTED_EXT])) - ? $data[self::FIELD_EXCLUDE_NESTED_EXT] - : null; - if ($data[self::FIELD_EXCLUDE_NESTED] instanceof FHIRBoolean) { - $this->setExcludeNested($data[self::FIELD_EXCLUDE_NESTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDE_NESTED])) { - $this->setExcludeNested(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDE_NESTED]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDE_NESTED])) { - $this->setExcludeNested(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDE_NESTED]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setDisplayLanguage($value); + } else if (is_array($value)) { + $this->setDisplayLanguage(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setDisplayLanguage(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDisplayLanguage(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_EXCLUDE_NESTED]) || isset($data[self::FIELD_EXCLUDE_NESTED_EXT])) { + if (isset($data[self::FIELD_EXCLUDE_NESTED])) { + $value = $data[self::FIELD_EXCLUDE_NESTED]; } else { - $this->setExcludeNested(new FHIRBoolean($data[self::FIELD_EXCLUDE_NESTED])); - } - } - if (isset($data[self::FIELD_EXCLUDE_NOT_FOR_UI])) { - $ext = (isset($data[self::FIELD_EXCLUDE_NOT_FOR_UI_EXT]) && is_array($data[self::FIELD_EXCLUDE_NOT_FOR_UI_EXT])) - ? $data[self::FIELD_EXCLUDE_NOT_FOR_UI_EXT] - : null; - if ($data[self::FIELD_EXCLUDE_NOT_FOR_UI] instanceof FHIRBoolean) { - $this->setExcludeNotForUI($data[self::FIELD_EXCLUDE_NOT_FOR_UI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDE_NOT_FOR_UI])) { - $this->setExcludeNotForUI(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDE_NOT_FOR_UI]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDE_NOT_FOR_UI])) { - $this->setExcludeNotForUI(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDE_NOT_FOR_UI]))); + $value = null; + } + if (isset($data[self::FIELD_EXCLUDE_NESTED_EXT]) && is_array($data[self::FIELD_EXCLUDE_NESTED_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_NESTED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExcludeNested($value); + } else if (is_array($value)) { + $this->setExcludeNested(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExcludeNested(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExcludeNested(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXCLUDE_NOT_FOR_UI]) || isset($data[self::FIELD_EXCLUDE_NOT_FOR_UI_EXT])) { + if (isset($data[self::FIELD_EXCLUDE_NOT_FOR_UI])) { + $value = $data[self::FIELD_EXCLUDE_NOT_FOR_UI]; } else { - $this->setExcludeNotForUI(new FHIRBoolean($data[self::FIELD_EXCLUDE_NOT_FOR_UI])); - } - } - if (isset($data[self::FIELD_EXCLUDE_POST_COORDINATED])) { - $ext = (isset($data[self::FIELD_EXCLUDE_POST_COORDINATED_EXT]) && is_array($data[self::FIELD_EXCLUDE_POST_COORDINATED_EXT])) - ? $data[self::FIELD_EXCLUDE_POST_COORDINATED_EXT] - : null; - if ($data[self::FIELD_EXCLUDE_POST_COORDINATED] instanceof FHIRBoolean) { - $this->setExcludePostCoordinated($data[self::FIELD_EXCLUDE_POST_COORDINATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXCLUDE_POST_COORDINATED])) { - $this->setExcludePostCoordinated(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXCLUDE_POST_COORDINATED]] + $ext)); - } else if (is_array($data[self::FIELD_EXCLUDE_POST_COORDINATED])) { - $this->setExcludePostCoordinated(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXCLUDE_POST_COORDINATED]))); + $value = null; + } + if (isset($data[self::FIELD_EXCLUDE_NOT_FOR_UI_EXT]) && is_array($data[self::FIELD_EXCLUDE_NOT_FOR_UI_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_NOT_FOR_UI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExcludeNotForUI($value); + } else if (is_array($value)) { + $this->setExcludeNotForUI(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExcludeNotForUI(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExcludeNotForUI(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXCLUDE_POST_COORDINATED]) || isset($data[self::FIELD_EXCLUDE_POST_COORDINATED_EXT])) { + if (isset($data[self::FIELD_EXCLUDE_POST_COORDINATED])) { + $value = $data[self::FIELD_EXCLUDE_POST_COORDINATED]; } else { - $this->setExcludePostCoordinated(new FHIRBoolean($data[self::FIELD_EXCLUDE_POST_COORDINATED])); + $value = null; + } + if (isset($data[self::FIELD_EXCLUDE_POST_COORDINATED_EXT]) && is_array($data[self::FIELD_EXCLUDE_POST_COORDINATED_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_POST_COORDINATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExcludePostCoordinated($value); + } else if (is_array($value)) { + $this->setExcludePostCoordinated(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExcludePostCoordinated(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExcludePostCoordinated(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_EXCLUDED_SYSTEM])) { @@ -588,20 +637,27 @@ public function __construct($data = null) $this->setExcludedSystem(new FHIRExpansionProfileExcludedSystem($data[self::FIELD_EXCLUDED_SYSTEM])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FIXED_VERSION])) { @@ -629,36 +685,50 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INCLUDE_DEFINITION])) { - $ext = (isset($data[self::FIELD_INCLUDE_DEFINITION_EXT]) && is_array($data[self::FIELD_INCLUDE_DEFINITION_EXT])) - ? $data[self::FIELD_INCLUDE_DEFINITION_EXT] - : null; - if ($data[self::FIELD_INCLUDE_DEFINITION] instanceof FHIRBoolean) { - $this->setIncludeDefinition($data[self::FIELD_INCLUDE_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INCLUDE_DEFINITION])) { - $this->setIncludeDefinition(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INCLUDE_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_INCLUDE_DEFINITION])) { - $this->setIncludeDefinition(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INCLUDE_DEFINITION]))); - } + if (isset($data[self::FIELD_INCLUDE_DEFINITION]) || isset($data[self::FIELD_INCLUDE_DEFINITION_EXT])) { + if (isset($data[self::FIELD_INCLUDE_DEFINITION])) { + $value = $data[self::FIELD_INCLUDE_DEFINITION]; } else { - $this->setIncludeDefinition(new FHIRBoolean($data[self::FIELD_INCLUDE_DEFINITION])); - } - } - if (isset($data[self::FIELD_INCLUDE_DESIGNATIONS])) { - $ext = (isset($data[self::FIELD_INCLUDE_DESIGNATIONS_EXT]) && is_array($data[self::FIELD_INCLUDE_DESIGNATIONS_EXT])) - ? $data[self::FIELD_INCLUDE_DESIGNATIONS_EXT] - : null; - if ($data[self::FIELD_INCLUDE_DESIGNATIONS] instanceof FHIRBoolean) { - $this->setIncludeDesignations($data[self::FIELD_INCLUDE_DESIGNATIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INCLUDE_DESIGNATIONS])) { - $this->setIncludeDesignations(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INCLUDE_DESIGNATIONS]] + $ext)); - } else if (is_array($data[self::FIELD_INCLUDE_DESIGNATIONS])) { - $this->setIncludeDesignations(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INCLUDE_DESIGNATIONS]))); + $value = null; + } + if (isset($data[self::FIELD_INCLUDE_DEFINITION_EXT]) && is_array($data[self::FIELD_INCLUDE_DEFINITION_EXT])) { + $ext = $data[self::FIELD_INCLUDE_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIncludeDefinition($value); + } else if (is_array($value)) { + $this->setIncludeDefinition(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIncludeDefinition(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIncludeDefinition(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_INCLUDE_DESIGNATIONS]) || isset($data[self::FIELD_INCLUDE_DESIGNATIONS_EXT])) { + if (isset($data[self::FIELD_INCLUDE_DESIGNATIONS])) { + $value = $data[self::FIELD_INCLUDE_DESIGNATIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INCLUDE_DESIGNATIONS_EXT]) && is_array($data[self::FIELD_INCLUDE_DESIGNATIONS_EXT])) { + $ext = $data[self::FIELD_INCLUDE_DESIGNATIONS_EXT]; } else { - $this->setIncludeDesignations(new FHIRBoolean($data[self::FIELD_INCLUDE_DESIGNATIONS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIncludeDesignations($value); + } else if (is_array($value)) { + $this->setIncludeDesignations(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIncludeDesignations(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIncludeDesignations(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -679,84 +749,119 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LIMITED_EXPANSION])) { - $ext = (isset($data[self::FIELD_LIMITED_EXPANSION_EXT]) && is_array($data[self::FIELD_LIMITED_EXPANSION_EXT])) - ? $data[self::FIELD_LIMITED_EXPANSION_EXT] - : null; - if ($data[self::FIELD_LIMITED_EXPANSION] instanceof FHIRBoolean) { - $this->setLimitedExpansion($data[self::FIELD_LIMITED_EXPANSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LIMITED_EXPANSION])) { - $this->setLimitedExpansion(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_LIMITED_EXPANSION]] + $ext)); - } else if (is_array($data[self::FIELD_LIMITED_EXPANSION])) { - $this->setLimitedExpansion(new FHIRBoolean(array_merge($ext, $data[self::FIELD_LIMITED_EXPANSION]))); - } + if (isset($data[self::FIELD_LIMITED_EXPANSION]) || isset($data[self::FIELD_LIMITED_EXPANSION_EXT])) { + if (isset($data[self::FIELD_LIMITED_EXPANSION])) { + $value = $data[self::FIELD_LIMITED_EXPANSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LIMITED_EXPANSION_EXT]) && is_array($data[self::FIELD_LIMITED_EXPANSION_EXT])) { + $ext = $data[self::FIELD_LIMITED_EXPANSION_EXT]; } else { - $this->setLimitedExpansion(new FHIRBoolean($data[self::FIELD_LIMITED_EXPANSION])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setLimitedExpansion($value); + } else if (is_array($value)) { + $this->setLimitedExpansion(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setLimitedExpansion(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLimitedExpansion(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -777,20 +882,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1816,8 +1928,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2171,25 +2283,37 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActiveOnly())) { $a[self::FIELD_ACTIVE_ONLY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_ONLY_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2198,29 +2322,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDisplayLanguage())) { $a[self::FIELD_DISPLAY_LANGUAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_DISPLAY_LANGUAGE_EXT] = $enc; } } if (null !== ($v = $this->getExcludeNested())) { $a[self::FIELD_EXCLUDE_NESTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDE_NESTED_EXT] = $enc; } } if (null !== ($v = $this->getExcludeNotForUI())) { $a[self::FIELD_EXCLUDE_NOT_FOR_UI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDE_NOT_FOR_UI_EXT] = $enc; } } if (null !== ($v = $this->getExcludePostCoordinated())) { $a[self::FIELD_EXCLUDE_POST_COORDINATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXCLUDE_POST_COORDINATED_EXT] = $enc; } } @@ -2229,79 +2361,118 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFixedVersion())) { - $a[self::FIELD_FIXED_VERSION] = $vs; + $a[self::FIELD_FIXED_VERSION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FIXED_VERSION][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if (null !== ($v = $this->getIncludeDefinition())) { $a[self::FIELD_INCLUDE_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INCLUDE_DEFINITION_EXT] = $enc; } } if (null !== ($v = $this->getIncludeDesignations())) { $a[self::FIELD_INCLUDE_DESIGNATIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INCLUDE_DESIGNATIONS_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLimitedExpansion())) { $a[self::FIELD_LIMITED_EXPANSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_LIMITED_EXPANSION_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php index 8dda33013e..1cd947af3e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefit.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -147,7 +147,7 @@ class FHIRExplanationOfBenefit extends FHIRDomainResource implements PHPFHIRCont const FIELD_UNALLOC_DEDUCTABLE = 'unallocDeductable'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource provides: the claim details; adjudication details from the @@ -706,20 +706,27 @@ public function __construct($data = null) $this->setClaimResponse(new FHIRReference($data[self::FIELD_CLAIM_RESPONSE])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DIAGNOSIS])) { @@ -740,20 +747,27 @@ public function __construct($data = null) $this->addDiagnosis(new FHIRExplanationOfBenefitDiagnosis($data[self::FIELD_DIAGNOSIS])); } } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); - } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_EMPLOYMENT_IMPACTED])) { @@ -901,20 +915,27 @@ public function __construct($data = null) $this->setPayment(new FHIRExplanationOfBenefitPayment($data[self::FIELD_PAYMENT])); } } - if (isset($data[self::FIELD_PRECEDENCE])) { - $ext = (isset($data[self::FIELD_PRECEDENCE_EXT]) && is_array($data[self::FIELD_PRECEDENCE_EXT])) - ? $data[self::FIELD_PRECEDENCE_EXT] - : null; - if ($data[self::FIELD_PRECEDENCE] instanceof FHIRPositiveInt) { - $this->setPrecedence($data[self::FIELD_PRECEDENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRECEDENCE])) { - $this->setPrecedence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_PRECEDENCE]] + $ext)); - } else if (is_array($data[self::FIELD_PRECEDENCE])) { - $this->setPrecedence(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_PRECEDENCE]))); - } + if (isset($data[self::FIELD_PRECEDENCE]) || isset($data[self::FIELD_PRECEDENCE_EXT])) { + if (isset($data[self::FIELD_PRECEDENCE])) { + $value = $data[self::FIELD_PRECEDENCE]; } else { - $this->setPrecedence(new FHIRPositiveInt($data[self::FIELD_PRECEDENCE])); + $value = null; + } + if (isset($data[self::FIELD_PRECEDENCE_EXT]) && is_array($data[self::FIELD_PRECEDENCE_EXT])) { + $ext = $data[self::FIELD_PRECEDENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setPrecedence($value); + } else if (is_array($value)) { + $this->setPrecedence(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setPrecedence(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrecedence(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_PRESCRIPTION])) { @@ -992,20 +1013,27 @@ public function __construct($data = null) $this->addRelated(new FHIRExplanationOfBenefitRelated($data[self::FIELD_RELATED])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRExplanationOfBenefitStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRExplanationOfBenefitStatus([FHIRExplanationOfBenefitStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRExplanationOfBenefitStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRExplanationOfBenefitStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExplanationOfBenefitStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRExplanationOfBenefitStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRExplanationOfBenefitStatus([FHIRExplanationOfBenefitStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRExplanationOfBenefitStatus($ext)); } } if (isset($data[self::FIELD_SUB_TYPE])) { @@ -2623,8 +2651,8 @@ public function setUnallocDeductable(FHIRMoney $unallocDeductable = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -3029,16 +3057,34 @@ public function jsonSerialize() $a[self::FIELD_ACCIDENT] = $v; } if ([] !== ($vs = $this->getAddItem())) { - $a[self::FIELD_ADD_ITEM] = $vs; + $a[self::FIELD_ADD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getBenefitBalance())) { - $a[self::FIELD_BENEFIT_BALANCE] = $vs; + $a[self::FIELD_BENEFIT_BALANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BENEFIT_BALANCE][] = $v; + } } if (null !== ($v = $this->getBillablePeriod())) { $a[self::FIELD_BILLABLE_PERIOD] = $v; } if ([] !== ($vs = $this->getCareTeam())) { - $a[self::FIELD_CARE_TEAM] = $vs; + $a[self::FIELD_CARE_TEAM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CARE_TEAM][] = $v; + } } if (null !== ($v = $this->getClaim())) { $a[self::FIELD_CLAIM] = $v; @@ -3048,18 +3094,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getDiagnosis())) { - $a[self::FIELD_DIAGNOSIS] = $vs; + $a[self::FIELD_DIAGNOSIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DIAGNOSIS][] = $v; + } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } @@ -3079,10 +3135,22 @@ public function jsonSerialize() $a[self::FIELD_HOSPITALIZATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInformation())) { - $a[self::FIELD_INFORMATION] = $vs; + $a[self::FIELD_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INFORMATION][] = $v; + } } if (null !== ($v = $this->getInsurance())) { $a[self::FIELD_INSURANCE] = $v; @@ -3091,7 +3159,13 @@ public function jsonSerialize() $a[self::FIELD_INSURER] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -3113,8 +3187,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPrecedence())) { $a[self::FIELD_PRECEDENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_PRECEDENCE_EXT] = $enc; } } @@ -3122,10 +3198,22 @@ public function jsonSerialize() $a[self::FIELD_PRESCRIPTION] = $v; } if ([] !== ($vs = $this->getProcedure())) { - $a[self::FIELD_PROCEDURE] = $vs; + $a[self::FIELD_PROCEDURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCEDURE][] = $v; + } } if ([] !== ($vs = $this->getProcessNote())) { - $a[self::FIELD_PROCESS_NOTE] = $vs; + $a[self::FIELD_PROCESS_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESS_NOTE][] = $v; + } } if (null !== ($v = $this->getProvider())) { $a[self::FIELD_PROVIDER] = $v; @@ -3134,17 +3222,31 @@ public function jsonSerialize() $a[self::FIELD_REFERRAL] = $v; } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExplanationOfBenefitStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExplanationOfBenefitStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSubType())) { - $a[self::FIELD_SUB_TYPE] = $vs; + $a[self::FIELD_SUB_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUB_TYPE][] = $v; + } } if (null !== ($v = $this->getTotalBenefit())) { $a[self::FIELD_TOTAL_BENEFIT] = $v; @@ -3158,6 +3260,9 @@ public function jsonSerialize() if (null !== ($v = $this->getUnallocDeductable())) { $a[self::FIELD_UNALLOC_DEDUCTABLE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php index 32dabd8818..ba306e541a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistory.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRFamilyMemberHistory extends FHIRDomainResource implements PHPFHIRConta const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A duration of time during which an organism (or a process) has existed. @@ -480,36 +480,50 @@ public function __construct($data = null) $this->setAgeRange(new FHIRRange($data[self::FIELD_AGE_RANGE])); } } - if (isset($data[self::FIELD_AGE_STRING])) { - $ext = (isset($data[self::FIELD_AGE_STRING_EXT]) && is_array($data[self::FIELD_AGE_STRING_EXT])) - ? $data[self::FIELD_AGE_STRING_EXT] - : null; - if ($data[self::FIELD_AGE_STRING] instanceof FHIRString) { - $this->setAgeString($data[self::FIELD_AGE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AGE_STRING])) { - $this->setAgeString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AGE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_AGE_STRING])) { - $this->setAgeString(new FHIRString(array_merge($ext, $data[self::FIELD_AGE_STRING]))); - } + if (isset($data[self::FIELD_AGE_STRING]) || isset($data[self::FIELD_AGE_STRING_EXT])) { + if (isset($data[self::FIELD_AGE_STRING])) { + $value = $data[self::FIELD_AGE_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AGE_STRING_EXT]) && is_array($data[self::FIELD_AGE_STRING_EXT])) { + $ext = $data[self::FIELD_AGE_STRING_EXT]; } else { - $this->setAgeString(new FHIRString($data[self::FIELD_AGE_STRING])); - } - } - if (isset($data[self::FIELD_BORN_DATE])) { - $ext = (isset($data[self::FIELD_BORN_DATE_EXT]) && is_array($data[self::FIELD_BORN_DATE_EXT])) - ? $data[self::FIELD_BORN_DATE_EXT] - : null; - if ($data[self::FIELD_BORN_DATE] instanceof FHIRDate) { - $this->setBornDate($data[self::FIELD_BORN_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BORN_DATE])) { - $this->setBornDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BORN_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BORN_DATE])) { - $this->setBornDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BORN_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAgeString($value); + } else if (is_array($value)) { + $this->setAgeString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAgeString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAgeString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_BORN_DATE]) || isset($data[self::FIELD_BORN_DATE_EXT])) { + if (isset($data[self::FIELD_BORN_DATE])) { + $value = $data[self::FIELD_BORN_DATE]; } else { - $this->setBornDate(new FHIRDate($data[self::FIELD_BORN_DATE])); + $value = null; + } + if (isset($data[self::FIELD_BORN_DATE_EXT]) && is_array($data[self::FIELD_BORN_DATE_EXT])) { + $ext = $data[self::FIELD_BORN_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBornDate($value); + } else if (is_array($value)) { + $this->setBornDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBornDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBornDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_BORN_PERIOD])) { @@ -519,20 +533,27 @@ public function __construct($data = null) $this->setBornPeriod(new FHIRPeriod($data[self::FIELD_BORN_PERIOD])); } } - if (isset($data[self::FIELD_BORN_STRING])) { - $ext = (isset($data[self::FIELD_BORN_STRING_EXT]) && is_array($data[self::FIELD_BORN_STRING_EXT])) - ? $data[self::FIELD_BORN_STRING_EXT] - : null; - if ($data[self::FIELD_BORN_STRING] instanceof FHIRString) { - $this->setBornString($data[self::FIELD_BORN_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BORN_STRING])) { - $this->setBornString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_BORN_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_BORN_STRING])) { - $this->setBornString(new FHIRString(array_merge($ext, $data[self::FIELD_BORN_STRING]))); - } + if (isset($data[self::FIELD_BORN_STRING]) || isset($data[self::FIELD_BORN_STRING_EXT])) { + if (isset($data[self::FIELD_BORN_STRING])) { + $value = $data[self::FIELD_BORN_STRING]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BORN_STRING_EXT]) && is_array($data[self::FIELD_BORN_STRING_EXT])) { + $ext = $data[self::FIELD_BORN_STRING_EXT]; } else { - $this->setBornString(new FHIRString($data[self::FIELD_BORN_STRING])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setBornString($value); + } else if (is_array($value)) { + $this->setBornString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setBornString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBornString(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONDITION])) { @@ -553,20 +574,27 @@ public function __construct($data = null) $this->addCondition(new FHIRFamilyMemberHistoryCondition($data[self::FIELD_CONDITION])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DECEASED_AGE])) { @@ -576,36 +604,50 @@ public function __construct($data = null) $this->setDeceasedAge(new FHIRAge($data[self::FIELD_DECEASED_AGE])); } } - if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) - ? $data[self::FIELD_DECEASED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DECEASED_BOOLEAN] instanceof FHIRBoolean) { - $this->setDeceasedBoolean($data[self::FIELD_DECEASED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DECEASED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DECEASED_BOOLEAN]))); - } + if (isset($data[self::FIELD_DECEASED_BOOLEAN]) || isset($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { + $value = $data[self::FIELD_DECEASED_BOOLEAN]; } else { - $this->setDeceasedBoolean(new FHIRBoolean($data[self::FIELD_DECEASED_BOOLEAN])); - } - } - if (isset($data[self::FIELD_DECEASED_DATE])) { - $ext = (isset($data[self::FIELD_DECEASED_DATE_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_EXT])) - ? $data[self::FIELD_DECEASED_DATE_EXT] - : null; - if ($data[self::FIELD_DECEASED_DATE] instanceof FHIRDate) { - $this->setDeceasedDate($data[self::FIELD_DECEASED_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_DATE])) { - $this->setDeceasedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_DECEASED_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_DATE])) { - $this->setDeceasedDate(new FHIRDate(array_merge($ext, $data[self::FIELD_DECEASED_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DECEASED_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeceasedBoolean($value); + } else if (is_array($value)) { + $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DECEASED_DATE]) || isset($data[self::FIELD_DECEASED_DATE_EXT])) { + if (isset($data[self::FIELD_DECEASED_DATE])) { + $value = $data[self::FIELD_DECEASED_DATE]; } else { - $this->setDeceasedDate(new FHIRDate($data[self::FIELD_DECEASED_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_DATE_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_EXT])) { + $ext = $data[self::FIELD_DECEASED_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setDeceasedDate($value); + } else if (is_array($value)) { + $this->setDeceasedDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setDeceasedDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeceasedDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_DECEASED_RANGE])) { @@ -615,20 +657,27 @@ public function __construct($data = null) $this->setDeceasedRange(new FHIRRange($data[self::FIELD_DECEASED_RANGE])); } } - if (isset($data[self::FIELD_DECEASED_STRING])) { - $ext = (isset($data[self::FIELD_DECEASED_STRING_EXT]) && is_array($data[self::FIELD_DECEASED_STRING_EXT])) - ? $data[self::FIELD_DECEASED_STRING_EXT] - : null; - if ($data[self::FIELD_DECEASED_STRING] instanceof FHIRString) { - $this->setDeceasedString($data[self::FIELD_DECEASED_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_STRING])) { - $this->setDeceasedString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DECEASED_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_STRING])) { - $this->setDeceasedString(new FHIRString(array_merge($ext, $data[self::FIELD_DECEASED_STRING]))); - } + if (isset($data[self::FIELD_DECEASED_STRING]) || isset($data[self::FIELD_DECEASED_STRING_EXT])) { + if (isset($data[self::FIELD_DECEASED_STRING])) { + $value = $data[self::FIELD_DECEASED_STRING]; } else { - $this->setDeceasedString(new FHIRString($data[self::FIELD_DECEASED_STRING])); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_STRING_EXT]) && is_array($data[self::FIELD_DECEASED_STRING_EXT])) { + $ext = $data[self::FIELD_DECEASED_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDeceasedString($value); + } else if (is_array($value)) { + $this->setDeceasedString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDeceasedString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDeceasedString(new FHIRString($ext)); } } if (isset($data[self::FIELD_DEFINITION])) { @@ -649,36 +698,50 @@ public function __construct($data = null) $this->addDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_ESTIMATED_AGE])) { - $ext = (isset($data[self::FIELD_ESTIMATED_AGE_EXT]) && is_array($data[self::FIELD_ESTIMATED_AGE_EXT])) - ? $data[self::FIELD_ESTIMATED_AGE_EXT] - : null; - if ($data[self::FIELD_ESTIMATED_AGE] instanceof FHIRBoolean) { - $this->setEstimatedAge($data[self::FIELD_ESTIMATED_AGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ESTIMATED_AGE])) { - $this->setEstimatedAge(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ESTIMATED_AGE]] + $ext)); - } else if (is_array($data[self::FIELD_ESTIMATED_AGE])) { - $this->setEstimatedAge(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ESTIMATED_AGE]))); - } + if (isset($data[self::FIELD_ESTIMATED_AGE]) || isset($data[self::FIELD_ESTIMATED_AGE_EXT])) { + if (isset($data[self::FIELD_ESTIMATED_AGE])) { + $value = $data[self::FIELD_ESTIMATED_AGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ESTIMATED_AGE_EXT]) && is_array($data[self::FIELD_ESTIMATED_AGE_EXT])) { + $ext = $data[self::FIELD_ESTIMATED_AGE_EXT]; } else { - $this->setEstimatedAge(new FHIRBoolean($data[self::FIELD_ESTIMATED_AGE])); - } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setEstimatedAge($value); + } else if (is_array($value)) { + $this->setEstimatedAge(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setEstimatedAge(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEstimatedAge(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -699,36 +762,50 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_NOT_DONE])) { - $ext = (isset($data[self::FIELD_NOT_DONE_EXT]) && is_array($data[self::FIELD_NOT_DONE_EXT])) - ? $data[self::FIELD_NOT_DONE_EXT] - : null; - if ($data[self::FIELD_NOT_DONE] instanceof FHIRBoolean) { - $this->setNotDone($data[self::FIELD_NOT_DONE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOT_DONE])) { - $this->setNotDone(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NOT_DONE]] + $ext)); - } else if (is_array($data[self::FIELD_NOT_DONE])) { - $this->setNotDone(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NOT_DONE]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_NOT_DONE]) || isset($data[self::FIELD_NOT_DONE_EXT])) { + if (isset($data[self::FIELD_NOT_DONE])) { + $value = $data[self::FIELD_NOT_DONE]; } else { - $this->setNotDone(new FHIRBoolean($data[self::FIELD_NOT_DONE])); + $value = null; + } + if (isset($data[self::FIELD_NOT_DONE_EXT]) && is_array($data[self::FIELD_NOT_DONE_EXT])) { + $ext = $data[self::FIELD_NOT_DONE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNotDone($value); + } else if (is_array($value)) { + $this->setNotDone(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNotDone(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotDone(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_NOT_DONE_REASON])) { @@ -806,20 +883,27 @@ public function __construct($data = null) $this->setRelationship(new FHIRCodeableConcept($data[self::FIELD_RELATIONSHIP])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFamilyHistoryStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFamilyHistoryStatus([FHIRFamilyHistoryStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFamilyHistoryStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFamilyHistoryStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFamilyHistoryStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFamilyHistoryStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFamilyHistoryStatus([FHIRFamilyHistoryStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFamilyHistoryStatus($ext)); } } } @@ -1930,8 +2014,8 @@ public function setStatus(FHIRFamilyHistoryStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2283,15 +2367,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAgeString())) { $a[self::FIELD_AGE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AGE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getBornDate())) { $a[self::FIELD_BORN_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BORN_DATE_EXT] = $enc; } } @@ -2300,18 +2388,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getBornString())) { $a[self::FIELD_BORN_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_BORN_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getCondition())) { - $a[self::FIELD_CONDITION] = $vs; + $a[self::FIELD_CONDITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONDITION][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -2320,15 +2418,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDeceasedBoolean())) { $a[self::FIELD_DECEASED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DECEASED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDeceasedDate())) { $a[self::FIELD_DECEASED_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_DECEASED_DATE_EXT] = $enc; } } @@ -2337,42 +2439,64 @@ public function jsonSerialize() } if (null !== ($v = $this->getDeceasedString())) { $a[self::FIELD_DECEASED_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DECEASED_STRING_EXT] = $enc; } } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if (null !== ($v = $this->getEstimatedAge())) { $a[self::FIELD_ESTIMATED_AGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ESTIMATED_AGE_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getNotDone())) { $a[self::FIELD_NOT_DONE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NOT_DONE_EXT] = $enc; } } @@ -2380,27 +2504,50 @@ public function jsonSerialize() $a[self::FIELD_NOT_DONE_REASON] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFamilyHistoryStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFamilyHistoryStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFlag.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFlag.php index 5ceaa52580..791f83a5de 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFlag.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRFlag.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRFlag extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -265,20 +265,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFlagStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFlagStatus([FHIRFlagStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFlagStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFlagStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFlagStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFlagStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFlagStatus([FHIRFlagStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFlagStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -601,8 +608,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -736,21 +743,32 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFlagStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFlagStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGoal.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGoal.php index 7e8fab6278..cab9131ab8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGoal.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGoal.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRGoal extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -463,68 +463,96 @@ public function __construct($data = null) $this->setStartCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_START_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_START_DATE])) { - $ext = (isset($data[self::FIELD_START_DATE_EXT]) && is_array($data[self::FIELD_START_DATE_EXT])) - ? $data[self::FIELD_START_DATE_EXT] - : null; - if ($data[self::FIELD_START_DATE] instanceof FHIRDate) { - $this->setStartDate($data[self::FIELD_START_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START_DATE])) { - $this->setStartDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_START_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_START_DATE])) { - $this->setStartDate(new FHIRDate(array_merge($ext, $data[self::FIELD_START_DATE]))); - } + if (isset($data[self::FIELD_START_DATE]) || isset($data[self::FIELD_START_DATE_EXT])) { + if (isset($data[self::FIELD_START_DATE])) { + $value = $data[self::FIELD_START_DATE]; } else { - $this->setStartDate(new FHIRDate($data[self::FIELD_START_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRGoalStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRGoalStatus([FHIRGoalStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRGoalStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_START_DATE_EXT]) && is_array($data[self::FIELD_START_DATE_EXT])) { + $ext = $data[self::FIELD_START_DATE_EXT]; } else { - $this->setStatus(new FHIRGoalStatus($data[self::FIELD_STATUS])); + $ext = []; } - } - if (isset($data[self::FIELD_STATUS_DATE])) { - $ext = (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) - ? $data[self::FIELD_STATUS_DATE_EXT] - : null; - if ($data[self::FIELD_STATUS_DATE] instanceof FHIRDate) { - $this->setStatusDate($data[self::FIELD_STATUS_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_STATUS_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDate(array_merge($ext, $data[self::FIELD_STATUS_DATE]))); + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setStartDate($value); + } else if (is_array($value)) { + $this->setStartDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setStartDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStartDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatusDate(new FHIRDate($data[self::FIELD_STATUS_DATE])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGoalStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRGoalStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRGoalStatus([FHIRGoalStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRGoalStatus($ext)); } } - if (isset($data[self::FIELD_STATUS_REASON])) { - $ext = (isset($data[self::FIELD_STATUS_REASON_EXT]) && is_array($data[self::FIELD_STATUS_REASON_EXT])) - ? $data[self::FIELD_STATUS_REASON_EXT] - : null; - if ($data[self::FIELD_STATUS_REASON] instanceof FHIRString) { - $this->setStatusReason($data[self::FIELD_STATUS_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_REASON])) { - $this->setStatusReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_STATUS_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_REASON])) { - $this->setStatusReason(new FHIRString(array_merge($ext, $data[self::FIELD_STATUS_REASON]))); + if (isset($data[self::FIELD_STATUS_DATE]) || isset($data[self::FIELD_STATUS_DATE_EXT])) { + if (isset($data[self::FIELD_STATUS_DATE])) { + $value = $data[self::FIELD_STATUS_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) { + $ext = $data[self::FIELD_STATUS_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setStatusDate($value); + } else if (is_array($value)) { + $this->setStatusDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setStatusDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatusDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_STATUS_REASON]) || isset($data[self::FIELD_STATUS_REASON_EXT])) { + if (isset($data[self::FIELD_STATUS_REASON])) { + $value = $data[self::FIELD_STATUS_REASON]; } else { - $this->setStatusReason(new FHIRString($data[self::FIELD_STATUS_REASON])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_REASON_EXT]) && is_array($data[self::FIELD_STATUS_REASON_EXT])) { + $ext = $data[self::FIELD_STATUS_REASON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setStatusReason($value); + } else if (is_array($value)) { + $this->setStatusReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setStatusReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatusReason(new FHIRString($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1278,8 +1306,8 @@ public function setTarget(FHIRGoalTarget $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1508,10 +1536,22 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAddresses())) { - $a[self::FIELD_ADDRESSES] = $vs; + $a[self::FIELD_ADDRESSES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESSES][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v; @@ -1520,16 +1560,40 @@ public function jsonSerialize() $a[self::FIELD_EXPRESSED_BY] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getOutcomeCode())) { - $a[self::FIELD_OUTCOME_CODE] = $vs; + $a[self::FIELD_OUTCOME_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME_CODE][] = $v; + } } if ([] !== ($vs = $this->getOutcomeReference())) { - $a[self::FIELD_OUTCOME_REFERENCE] = $vs; + $a[self::FIELD_OUTCOME_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTCOME_REFERENCE][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v; @@ -1539,29 +1603,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getStartDate())) { $a[self::FIELD_START_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_START_DATE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGoalStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGoalStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStatusDate())) { $a[self::FIELD_STATUS_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_STATUS_DATE_EXT] = $enc; } } if (null !== ($v = $this->getStatusReason())) { $a[self::FIELD_STATUS_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_STATUS_REASON_EXT] = $enc; } } @@ -1571,6 +1643,9 @@ public function jsonSerialize() if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php index 5be241c4e0..de53ea28f1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGraphDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRGraphDefinition extends FHIRDomainResource implements PHPFHIRContained const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -365,52 +365,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -449,116 +470,165 @@ public function __construct($data = null) $this->addLink(new FHIRGraphDefinitionLink($data[self::FIELD_LINK])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PROFILE])) { - $ext = (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) - ? $data[self::FIELD_PROFILE_EXT] - : null; - if ($data[self::FIELD_PROFILE] instanceof FHIRUri) { - $this->setProfile($data[self::FIELD_PROFILE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_PROFILE]] + $ext)); - } else if (is_array($data[self::FIELD_PROFILE])) { - $this->setProfile(new FHIRUri(array_merge($ext, $data[self::FIELD_PROFILE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PROFILE]) || isset($data[self::FIELD_PROFILE_EXT])) { + if (isset($data[self::FIELD_PROFILE])) { + $value = $data[self::FIELD_PROFILE]; } else { - $this->setProfile(new FHIRUri($data[self::FIELD_PROFILE])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_PROFILE_EXT]) && is_array($data[self::FIELD_PROFILE_EXT])) { + $ext = $data[self::FIELD_PROFILE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setProfile($value); + } else if (is_array($value)) { + $this->setProfile(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setProfile(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setProfile(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRResourceType) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRResourceType(array_merge($ext, $data[self::FIELD_START]))); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; + } else { + $value = null; + } + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; } else { - $this->setStart(new FHIRResourceType($data[self::FIELD_START])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStart(new FHIRResourceType($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -579,20 +649,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1342,8 +1419,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1600,94 +1677,143 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getProfile())) { $a[self::FIELD_PROFILE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_PROFILE_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResourceType::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGroup.php index 827c09d134..7db83b3a8c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRGroup extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -228,36 +228,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); - } - } - if (isset($data[self::FIELD_ACTUAL])) { - $ext = (isset($data[self::FIELD_ACTUAL_EXT]) && is_array($data[self::FIELD_ACTUAL_EXT])) - ? $data[self::FIELD_ACTUAL_EXT] - : null; - if ($data[self::FIELD_ACTUAL] instanceof FHIRBoolean) { - $this->setActual($data[self::FIELD_ACTUAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTUAL])) { - $this->setActual(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTUAL]] + $ext)); - } else if (is_array($data[self::FIELD_ACTUAL])) { - $this->setActual(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTUAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_ACTUAL]) || isset($data[self::FIELD_ACTUAL_EXT])) { + if (isset($data[self::FIELD_ACTUAL])) { + $value = $data[self::FIELD_ACTUAL]; } else { - $this->setActual(new FHIRBoolean($data[self::FIELD_ACTUAL])); + $value = null; + } + if (isset($data[self::FIELD_ACTUAL_EXT]) && is_array($data[self::FIELD_ACTUAL_EXT])) { + $ext = $data[self::FIELD_ACTUAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActual($value); + } else if (is_array($value)) { + $this->setActual(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActual(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActual(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_CHARACTERISTIC])) { @@ -321,52 +335,73 @@ public function __construct($data = null) $this->addMember(new FHIRGroupMember($data[self::FIELD_MEMBER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_QUANTITY])) { - $ext = (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) - ? $data[self::FIELD_QUANTITY_EXT] - : null; - if ($data[self::FIELD_QUANTITY] instanceof FHIRUnsignedInt) { - $this->setQuantity($data[self::FIELD_QUANTITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_QUANTITY]] + $ext)); - } else if (is_array($data[self::FIELD_QUANTITY])) { - $this->setQuantity(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_QUANTITY]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_QUANTITY]) || isset($data[self::FIELD_QUANTITY_EXT])) { + if (isset($data[self::FIELD_QUANTITY])) { + $value = $data[self::FIELD_QUANTITY]; } else { - $this->setQuantity(new FHIRUnsignedInt($data[self::FIELD_QUANTITY])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRGroupType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGroupType([FHIRGroupType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRGroupType(array_merge($ext, $data[self::FIELD_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_QUANTITY_EXT]) && is_array($data[self::FIELD_QUANTITY_EXT])) { + $ext = $data[self::FIELD_QUANTITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setQuantity($value); + } else if (is_array($value)) { + $this->setQuantity(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setQuantity(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setQuantity(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRGroupType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGroupType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRGroupType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRGroupType([FHIRGroupType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRGroupType($ext)); } } } @@ -786,8 +821,8 @@ public function setType(FHIRGroupType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -962,51 +997,82 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getActual())) { $a[self::FIELD_ACTUAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTUAL_EXT] = $enc; } } if ([] !== ($vs = $this->getCharacteristic())) { - $a[self::FIELD_CHARACTERISTIC] = $vs; + $a[self::FIELD_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTIC][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getMember())) { - $a[self::FIELD_MEMBER] = $vs; + $a[self::FIELD_MEMBER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MEMBER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_QUANTITY_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGroupType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGroupType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php index dbeaf0ff6f..cac9ba3e9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRGuidanceResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRGuidanceResponse extends FHIRDomainResource implements PHPFHIRContaine const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -405,20 +405,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OUTPUT_PARAMETERS])) { @@ -449,20 +456,27 @@ public function __construct($data = null) $this->setReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_REQUEST_ID])) { - $ext = (isset($data[self::FIELD_REQUEST_ID_EXT]) && is_array($data[self::FIELD_REQUEST_ID_EXT])) - ? $data[self::FIELD_REQUEST_ID_EXT] - : null; - if ($data[self::FIELD_REQUEST_ID] instanceof FHIRId) { - $this->setRequestId($data[self::FIELD_REQUEST_ID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REQUEST_ID])) { - $this->setRequestId(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_REQUEST_ID]] + $ext)); - } else if (is_array($data[self::FIELD_REQUEST_ID])) { - $this->setRequestId(new FHIRId(array_merge($ext, $data[self::FIELD_REQUEST_ID]))); - } + if (isset($data[self::FIELD_REQUEST_ID]) || isset($data[self::FIELD_REQUEST_ID_EXT])) { + if (isset($data[self::FIELD_REQUEST_ID])) { + $value = $data[self::FIELD_REQUEST_ID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REQUEST_ID_EXT]) && is_array($data[self::FIELD_REQUEST_ID_EXT])) { + $ext = $data[self::FIELD_REQUEST_ID_EXT]; } else { - $this->setRequestId(new FHIRId($data[self::FIELD_REQUEST_ID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setRequestId($value); + } else if (is_array($value)) { + $this->setRequestId(new FHIRId(array_merge($ext, $value))); + } else { + $this->setRequestId(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRequestId(new FHIRId($ext)); } } if (isset($data[self::FIELD_RESULT])) { @@ -472,20 +486,27 @@ public function __construct($data = null) $this->setResult(new FHIRReference($data[self::FIELD_RESULT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRGuidanceResponseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRGuidanceResponseStatus([FHIRGuidanceResponseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRGuidanceResponseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRGuidanceResponseStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRGuidanceResponseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRGuidanceResponseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRGuidanceResponseStatus([FHIRGuidanceResponseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRGuidanceResponseStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1147,8 +1168,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1345,10 +1366,22 @@ public function jsonSerialize() $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDataRequirement())) { - $a[self::FIELD_DATA_REQUIREMENT] = $vs; + $a[self::FIELD_DATA_REQUIREMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA_REQUIREMENT][] = $v; + } } if ([] !== ($vs = $this->getEvaluationMessage())) { - $a[self::FIELD_EVALUATION_MESSAGE] = $vs; + $a[self::FIELD_EVALUATION_MESSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVALUATION_MESSAGE][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; @@ -1357,12 +1390,20 @@ public function jsonSerialize() $a[self::FIELD_MODULE] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -1380,8 +1421,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getRequestId())) { $a[self::FIELD_REQUEST_ID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_REQUEST_ID_EXT] = $enc; } } @@ -1390,14 +1433,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRGuidanceResponseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRGuidanceResponseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php index 9970f27f24..a70ae7254e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRHealthcareService.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -121,7 +121,7 @@ class FHIRHealthcareService extends FHIRDomainResource implements PHPFHIRContain const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -426,52 +426,73 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); - } - } - if (isset($data[self::FIELD_APPOINTMENT_REQUIRED])) { - $ext = (isset($data[self::FIELD_APPOINTMENT_REQUIRED_EXT]) && is_array($data[self::FIELD_APPOINTMENT_REQUIRED_EXT])) - ? $data[self::FIELD_APPOINTMENT_REQUIRED_EXT] - : null; - if ($data[self::FIELD_APPOINTMENT_REQUIRED] instanceof FHIRBoolean) { - $this->setAppointmentRequired($data[self::FIELD_APPOINTMENT_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPOINTMENT_REQUIRED])) { - $this->setAppointmentRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_APPOINTMENT_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_APPOINTMENT_REQUIRED])) { - $this->setAppointmentRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_APPOINTMENT_REQUIRED]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_APPOINTMENT_REQUIRED]) || isset($data[self::FIELD_APPOINTMENT_REQUIRED_EXT])) { + if (isset($data[self::FIELD_APPOINTMENT_REQUIRED])) { + $value = $data[self::FIELD_APPOINTMENT_REQUIRED]; } else { - $this->setAppointmentRequired(new FHIRBoolean($data[self::FIELD_APPOINTMENT_REQUIRED])); - } - } - if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY_EXCEPTIONS] instanceof FHIRString) { - $this->setAvailabilityExceptions($data[self::FIELD_AVAILABILITY_EXCEPTIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AVAILABILITY_EXCEPTIONS]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $data[self::FIELD_AVAILABILITY_EXCEPTIONS]))); + $value = null; + } + if (isset($data[self::FIELD_APPOINTMENT_REQUIRED_EXT]) && is_array($data[self::FIELD_APPOINTMENT_REQUIRED_EXT])) { + $ext = $data[self::FIELD_APPOINTMENT_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAppointmentRequired($value); + } else if (is_array($value)) { + $this->setAppointmentRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAppointmentRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAppointmentRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS]) || isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $value = $data[self::FIELD_AVAILABILITY_EXCEPTIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]; } else { - $this->setAvailabilityExceptions(new FHIRString($data[self::FIELD_AVAILABILITY_EXCEPTIONS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAvailabilityExceptions($value); + } else if (is_array($value)) { + $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailabilityExceptions(new FHIRString($ext)); } } if (isset($data[self::FIELD_AVAILABLE_TIME])) { @@ -517,20 +538,27 @@ public function __construct($data = null) $this->addCharacteristic(new FHIRCodeableConcept($data[self::FIELD_CHARACTERISTIC])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_COVERAGE_AREA])) { @@ -558,20 +586,27 @@ public function __construct($data = null) $this->setEligibility(new FHIRCodeableConcept($data[self::FIELD_ELIGIBILITY])); } } - if (isset($data[self::FIELD_ELIGIBILITY_NOTE])) { - $ext = (isset($data[self::FIELD_ELIGIBILITY_NOTE_EXT]) && is_array($data[self::FIELD_ELIGIBILITY_NOTE_EXT])) - ? $data[self::FIELD_ELIGIBILITY_NOTE_EXT] - : null; - if ($data[self::FIELD_ELIGIBILITY_NOTE] instanceof FHIRString) { - $this->setEligibilityNote($data[self::FIELD_ELIGIBILITY_NOTE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ELIGIBILITY_NOTE])) { - $this->setEligibilityNote(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ELIGIBILITY_NOTE]] + $ext)); - } else if (is_array($data[self::FIELD_ELIGIBILITY_NOTE])) { - $this->setEligibilityNote(new FHIRString(array_merge($ext, $data[self::FIELD_ELIGIBILITY_NOTE]))); - } + if (isset($data[self::FIELD_ELIGIBILITY_NOTE]) || isset($data[self::FIELD_ELIGIBILITY_NOTE_EXT])) { + if (isset($data[self::FIELD_ELIGIBILITY_NOTE])) { + $value = $data[self::FIELD_ELIGIBILITY_NOTE]; } else { - $this->setEligibilityNote(new FHIRString($data[self::FIELD_ELIGIBILITY_NOTE])); + $value = null; + } + if (isset($data[self::FIELD_ELIGIBILITY_NOTE_EXT]) && is_array($data[self::FIELD_ELIGIBILITY_NOTE_EXT])) { + $ext = $data[self::FIELD_ELIGIBILITY_NOTE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setEligibilityNote($value); + } else if (is_array($value)) { + $this->setEligibilityNote(new FHIRString(array_merge($ext, $value))); + } else { + $this->setEligibilityNote(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEligibilityNote(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENDPOINT])) { @@ -592,20 +627,27 @@ public function __construct($data = null) $this->addEndpoint(new FHIRReference($data[self::FIELD_ENDPOINT])); } } - if (isset($data[self::FIELD_EXTRA_DETAILS])) { - $ext = (isset($data[self::FIELD_EXTRA_DETAILS_EXT]) && is_array($data[self::FIELD_EXTRA_DETAILS_EXT])) - ? $data[self::FIELD_EXTRA_DETAILS_EXT] - : null; - if ($data[self::FIELD_EXTRA_DETAILS] instanceof FHIRString) { - $this->setExtraDetails($data[self::FIELD_EXTRA_DETAILS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXTRA_DETAILS])) { - $this->setExtraDetails(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXTRA_DETAILS]] + $ext)); - } else if (is_array($data[self::FIELD_EXTRA_DETAILS])) { - $this->setExtraDetails(new FHIRString(array_merge($ext, $data[self::FIELD_EXTRA_DETAILS]))); - } + if (isset($data[self::FIELD_EXTRA_DETAILS]) || isset($data[self::FIELD_EXTRA_DETAILS_EXT])) { + if (isset($data[self::FIELD_EXTRA_DETAILS])) { + $value = $data[self::FIELD_EXTRA_DETAILS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXTRA_DETAILS_EXT]) && is_array($data[self::FIELD_EXTRA_DETAILS_EXT])) { + $ext = $data[self::FIELD_EXTRA_DETAILS_EXT]; } else { - $this->setExtraDetails(new FHIRString($data[self::FIELD_EXTRA_DETAILS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExtraDetails($value); + } else if (is_array($value)) { + $this->setExtraDetails(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExtraDetails(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExtraDetails(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -644,20 +686,27 @@ public function __construct($data = null) $this->addLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_NOT_AVAILABLE])) { @@ -685,33 +734,42 @@ public function __construct($data = null) $this->setPhoto(new FHIRAttachment($data[self::FIELD_PHOTO])); } } - if (isset($data[self::FIELD_PROGRAM_NAME])) { - $ext = (isset($data[self::FIELD_PROGRAM_NAME_EXT]) && is_array($data[self::FIELD_PROGRAM_NAME_EXT])) - ? $data[self::FIELD_PROGRAM_NAME_EXT] - : null; - if (is_array($data[self::FIELD_PROGRAM_NAME])) { - foreach($data[self::FIELD_PROGRAM_NAME] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addProgramName($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addProgramName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addProgramName(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_PROGRAM_NAME]) || isset($data[self::FIELD_PROGRAM_NAME_EXT])) { + if (isset($data[self::FIELD_PROGRAM_NAME])) { + $value = $data[self::FIELD_PROGRAM_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PROGRAM_NAME_EXT]) && is_array($data[self::FIELD_PROGRAM_NAME_EXT])) { + $ext = $data[self::FIELD_PROGRAM_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addProgramName($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addProgramName($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addProgramName(new FHIRString(array_merge($v, $iext))); + } else { + $this->addProgramName(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addProgramName(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addProgramName(new FHIRString(array_merge($ext, $value))); + } else { + $this->addProgramName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addProgramName(new FHIRString($iext)); } - } elseif ($data[self::FIELD_PROGRAM_NAME] instanceof FHIRString) { - $this->addProgramName($data[self::FIELD_PROGRAM_NAME]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_PROGRAM_NAME])) { - $this->addProgramName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PROGRAM_NAME]] + $ext)); - } else { - $this->addProgramName(new FHIRString($data[self::FIELD_PROGRAM_NAME])); } } if (isset($data[self::FIELD_PROVIDED_BY])) { @@ -2010,8 +2068,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2370,115 +2428,212 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getAppointmentRequired())) { $a[self::FIELD_APPOINTMENT_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_APPOINTMENT_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getAvailabilityExceptions())) { $a[self::FIELD_AVAILABILITY_EXCEPTIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] = $enc; } } if ([] !== ($vs = $this->getAvailableTime())) { - $a[self::FIELD_AVAILABLE_TIME] = $vs; + $a[self::FIELD_AVAILABLE_TIME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AVAILABLE_TIME][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; } if ([] !== ($vs = $this->getCharacteristic())) { - $a[self::FIELD_CHARACTERISTIC] = $vs; + $a[self::FIELD_CHARACTERISTIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CHARACTERISTIC][] = $v; + } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getCoverageArea())) { - $a[self::FIELD_COVERAGE_AREA] = $vs; + $a[self::FIELD_COVERAGE_AREA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COVERAGE_AREA][] = $v; + } } if (null !== ($v = $this->getEligibility())) { $a[self::FIELD_ELIGIBILITY] = $v; } if (null !== ($v = $this->getEligibilityNote())) { $a[self::FIELD_ELIGIBILITY_NOTE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ELIGIBILITY_NOTE_EXT] = $enc; } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if (null !== ($v = $this->getExtraDetails())) { $a[self::FIELD_EXTRA_DETAILS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXTRA_DETAILS_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getNotAvailable())) { - $a[self::FIELD_NOT_AVAILABLE] = $vs; + $a[self::FIELD_NOT_AVAILABLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOT_AVAILABLE][] = $v; + } } if (null !== ($v = $this->getPhoto())) { $a[self::FIELD_PHOTO] = $v; } if ([] !== ($vs = $this->getProgramName())) { $a[self::FIELD_PROGRAM_NAME] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_PROGRAM_NAME][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_PROGRAM_NAME_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_PROGRAM_NAME_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_PROGRAM_NAME_EXT] = $encs; + } } if (null !== ($v = $this->getProvidedBy())) { $a[self::FIELD_PROVIDED_BY] = $v; } if ([] !== ($vs = $this->getReferralMethod())) { - $a[self::FIELD_REFERRAL_METHOD] = $vs; + $a[self::FIELD_REFERRAL_METHOD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERRAL_METHOD][] = $v; + } } if ([] !== ($vs = $this->getServiceProvisionCode())) { - $a[self::FIELD_SERVICE_PROVISION_CODE] = $vs; + $a[self::FIELD_SERVICE_PROVISION_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_PROVISION_CODE][] = $v; + } } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingManifest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingManifest.php index 187c7cb24b..7151ca97f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingManifest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingManifest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -94,7 +94,7 @@ class FHIRImagingManifest extends FHIRDomainResource implements PHPFHIRContained const FIELD_STUDY = 'study'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -212,36 +212,50 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_AUTHORING_TIME])) { - $ext = (isset($data[self::FIELD_AUTHORING_TIME_EXT]) && is_array($data[self::FIELD_AUTHORING_TIME_EXT])) - ? $data[self::FIELD_AUTHORING_TIME_EXT] - : null; - if ($data[self::FIELD_AUTHORING_TIME] instanceof FHIRDateTime) { - $this->setAuthoringTime($data[self::FIELD_AUTHORING_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORING_TIME])) { - $this->setAuthoringTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORING_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORING_TIME])) { - $this->setAuthoringTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORING_TIME]))); - } + if (isset($data[self::FIELD_AUTHORING_TIME]) || isset($data[self::FIELD_AUTHORING_TIME_EXT])) { + if (isset($data[self::FIELD_AUTHORING_TIME])) { + $value = $data[self::FIELD_AUTHORING_TIME]; } else { - $this->setAuthoringTime(new FHIRDateTime($data[self::FIELD_AUTHORING_TIME])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_AUTHORING_TIME_EXT]) && is_array($data[self::FIELD_AUTHORING_TIME_EXT])) { + $ext = $data[self::FIELD_AUTHORING_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoringTime($value); + } else if (is_array($value)) { + $this->setAuthoringTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoringTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAuthoringTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -567,8 +581,8 @@ public function setStudy(array $study = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -698,15 +712,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthoringTime())) { $a[self::FIELD_AUTHORING_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORING_TIME_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -717,7 +735,16 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getStudy())) { - $a[self::FIELD_STUDY] = $vs; + $a[self::FIELD_STUDY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STUDY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php index 603700316f..1ce9b5e16c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImagingStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRImagingStudy extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_UID_EXT = '_uid'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -381,20 +381,27 @@ public function __construct($data = null) $this->setAccession(new FHIRIdentifier($data[self::FIELD_ACCESSION])); } } - if (isset($data[self::FIELD_AVAILABILITY])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY] instanceof FHIRInstanceAvailability) { - $this->setAvailability($data[self::FIELD_AVAILABILITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $data[self::FIELD_AVAILABILITY]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY])) { - $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $data[self::FIELD_AVAILABILITY]))); - } + if (isset($data[self::FIELD_AVAILABILITY]) || isset($data[self::FIELD_AVAILABILITY_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY])) { + $value = $data[self::FIELD_AVAILABILITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXT]; } else { - $this->setAvailability(new FHIRInstanceAvailability($data[self::FIELD_AVAILABILITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstanceAvailability) { + $this->setAvailability($value); + } else if (is_array($value)) { + $this->setAvailability(new FHIRInstanceAvailability(array_merge($ext, $value))); + } else { + $this->setAvailability(new FHIRInstanceAvailability([FHIRInstanceAvailability::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailability(new FHIRInstanceAvailability($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -422,20 +429,27 @@ public function __construct($data = null) $this->setContext(new FHIRReference($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENDPOINT])) { @@ -510,36 +524,50 @@ public function __construct($data = null) $this->addModalityList(new FHIRCoding($data[self::FIELD_MODALITY_LIST])); } } - if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) - ? $data[self::FIELD_NUMBER_OF_INSTANCES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_INSTANCES] instanceof FHIRUnsignedInt) { - $this->setNumberOfInstances($data[self::FIELD_NUMBER_OF_INSTANCES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_INSTANCES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_INSTANCES])) { - $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_INSTANCES]))); - } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES]) || isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES])) { + $value = $data[self::FIELD_NUMBER_OF_INSTANCES]; } else { - $this->setNumberOfInstances(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_INSTANCES])); - } - } - if (isset($data[self::FIELD_NUMBER_OF_SERIES])) { - $ext = (isset($data[self::FIELD_NUMBER_OF_SERIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SERIES_EXT])) - ? $data[self::FIELD_NUMBER_OF_SERIES_EXT] - : null; - if ($data[self::FIELD_NUMBER_OF_SERIES] instanceof FHIRUnsignedInt) { - $this->setNumberOfSeries($data[self::FIELD_NUMBER_OF_SERIES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NUMBER_OF_SERIES])) { - $this->setNumberOfSeries(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_NUMBER_OF_SERIES]] + $ext)); - } else if (is_array($data[self::FIELD_NUMBER_OF_SERIES])) { - $this->setNumberOfSeries(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_NUMBER_OF_SERIES]))); + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_INSTANCES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_INSTANCES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_INSTANCES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfInstances($value); + } else if (is_array($value)) { + $this->setNumberOfInstances(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfInstances(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setNumberOfInstances(new FHIRUnsignedInt($ext)); + } + } + if (isset($data[self::FIELD_NUMBER_OF_SERIES]) || isset($data[self::FIELD_NUMBER_OF_SERIES_EXT])) { + if (isset($data[self::FIELD_NUMBER_OF_SERIES])) { + $value = $data[self::FIELD_NUMBER_OF_SERIES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NUMBER_OF_SERIES_EXT]) && is_array($data[self::FIELD_NUMBER_OF_SERIES_EXT])) { + $ext = $data[self::FIELD_NUMBER_OF_SERIES_EXT]; } else { - $this->setNumberOfSeries(new FHIRUnsignedInt($data[self::FIELD_NUMBER_OF_SERIES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setNumberOfSeries($value); + } else if (is_array($value)) { + $this->setNumberOfSeries(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setNumberOfSeries(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNumberOfSeries(new FHIRUnsignedInt($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -617,36 +645,50 @@ public function __construct($data = null) $this->addSeries(new FHIRImagingStudySeries($data[self::FIELD_SERIES])); } } - if (isset($data[self::FIELD_STARTED])) { - $ext = (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) - ? $data[self::FIELD_STARTED_EXT] - : null; - if ($data[self::FIELD_STARTED] instanceof FHIRDateTime) { - $this->setStarted($data[self::FIELD_STARTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_STARTED]] + $ext)); - } else if (is_array($data[self::FIELD_STARTED])) { - $this->setStarted(new FHIRDateTime(array_merge($ext, $data[self::FIELD_STARTED]))); - } + if (isset($data[self::FIELD_STARTED]) || isset($data[self::FIELD_STARTED_EXT])) { + if (isset($data[self::FIELD_STARTED])) { + $value = $data[self::FIELD_STARTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STARTED_EXT]) && is_array($data[self::FIELD_STARTED_EXT])) { + $ext = $data[self::FIELD_STARTED_EXT]; } else { - $this->setStarted(new FHIRDateTime($data[self::FIELD_STARTED])); - } - } - if (isset($data[self::FIELD_UID])) { - $ext = (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) - ? $data[self::FIELD_UID_EXT] - : null; - if ($data[self::FIELD_UID] instanceof FHIROid) { - $this->setUid($data[self::FIELD_UID]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_UID])) { - $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $data[self::FIELD_UID]] + $ext)); - } else if (is_array($data[self::FIELD_UID])) { - $this->setUid(new FHIROid(array_merge($ext, $data[self::FIELD_UID]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setStarted($value); + } else if (is_array($value)) { + $this->setStarted(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setStarted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStarted(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_UID]) || isset($data[self::FIELD_UID_EXT])) { + if (isset($data[self::FIELD_UID])) { + $value = $data[self::FIELD_UID]; + } else { + $value = null; + } + if (isset($data[self::FIELD_UID_EXT]) && is_array($data[self::FIELD_UID_EXT])) { + $ext = $data[self::FIELD_UID_EXT]; } else { - $this->setUid(new FHIROid($data[self::FIELD_UID])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROid) { + $this->setUid($value); + } else if (is_array($value)) { + $this->setUid(new FHIROid(array_merge($ext, $value))); + } else { + $this->setUid(new FHIROid([FHIROid::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUid(new FHIROid($ext)); } } } @@ -1555,8 +1597,8 @@ public function setUid($uid = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1837,47 +1879,85 @@ public function jsonSerialize() } if (null !== ($v = $this->getAvailability())) { $a[self::FIELD_AVAILABILITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstanceAvailability::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstanceAvailability::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInterpreter())) { - $a[self::FIELD_INTERPRETER] = $vs; + $a[self::FIELD_INTERPRETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INTERPRETER][] = $v; + } } if ([] !== ($vs = $this->getModalityList())) { - $a[self::FIELD_MODALITY_LIST] = $vs; + $a[self::FIELD_MODALITY_LIST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MODALITY_LIST][] = $v; + } } if (null !== ($v = $this->getNumberOfInstances())) { $a[self::FIELD_NUMBER_OF_INSTANCES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_INSTANCES_EXT] = $enc; } } if (null !== ($v = $this->getNumberOfSeries())) { $a[self::FIELD_NUMBER_OF_SERIES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_NUMBER_OF_SERIES_EXT] = $enc; } } @@ -1885,10 +1965,22 @@ public function jsonSerialize() $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getProcedureCode())) { - $a[self::FIELD_PROCEDURE_CODE] = $vs; + $a[self::FIELD_PROCEDURE_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCEDURE_CODE][] = $v; + } } if ([] !== ($vs = $this->getProcedureReference())) { - $a[self::FIELD_PROCEDURE_REFERENCE] = $vs; + $a[self::FIELD_PROCEDURE_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCEDURE_REFERENCE][] = $v; + } } if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v; @@ -1897,22 +1989,35 @@ public function jsonSerialize() $a[self::FIELD_REFERRER] = $v; } if ([] !== ($vs = $this->getSeries())) { - $a[self::FIELD_SERIES] = $vs; + $a[self::FIELD_SERIES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERIES][] = $v; + } } if (null !== ($v = $this->getStarted())) { $a[self::FIELD_STARTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_STARTED_EXT] = $enc; } } if (null !== ($v = $this->getUid())) { $a[self::FIELD_UID] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROid::FIELD_VALUE, $enc)))) { + unset($enc[FHIROid::FIELD_VALUE]); $a[self::FIELD_UID_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunization.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunization.php index 6ae367e4ca..bbcc69d4de 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunization.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRImmunization extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_VACCINE_CODE = 'vaccineCode'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -393,20 +393,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DOSE_QUANTITY])) { @@ -423,20 +430,27 @@ public function __construct($data = null) $this->setEncounter(new FHIRReference($data[self::FIELD_ENCOUNTER])); } } - if (isset($data[self::FIELD_EXPIRATION_DATE])) { - $ext = (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) - ? $data[self::FIELD_EXPIRATION_DATE_EXT] - : null; - if ($data[self::FIELD_EXPIRATION_DATE] instanceof FHIRDate) { - $this->setExpirationDate($data[self::FIELD_EXPIRATION_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_EXPIRATION_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_EXPIRATION_DATE])) { - $this->setExpirationDate(new FHIRDate(array_merge($ext, $data[self::FIELD_EXPIRATION_DATE]))); - } + if (isset($data[self::FIELD_EXPIRATION_DATE]) || isset($data[self::FIELD_EXPIRATION_DATE_EXT])) { + if (isset($data[self::FIELD_EXPIRATION_DATE])) { + $value = $data[self::FIELD_EXPIRATION_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPIRATION_DATE_EXT]) && is_array($data[self::FIELD_EXPIRATION_DATE_EXT])) { + $ext = $data[self::FIELD_EXPIRATION_DATE_EXT]; } else { - $this->setExpirationDate(new FHIRDate($data[self::FIELD_EXPIRATION_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setExpirationDate($value); + } else if (is_array($value)) { + $this->setExpirationDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setExpirationDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpirationDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_EXPLANATION])) { @@ -471,20 +485,27 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_LOT_NUMBER])) { - $ext = (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) - ? $data[self::FIELD_LOT_NUMBER_EXT] - : null; - if ($data[self::FIELD_LOT_NUMBER] instanceof FHIRString) { - $this->setLotNumber($data[self::FIELD_LOT_NUMBER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_LOT_NUMBER]] + $ext)); - } else if (is_array($data[self::FIELD_LOT_NUMBER])) { - $this->setLotNumber(new FHIRString(array_merge($ext, $data[self::FIELD_LOT_NUMBER]))); - } + if (isset($data[self::FIELD_LOT_NUMBER]) || isset($data[self::FIELD_LOT_NUMBER_EXT])) { + if (isset($data[self::FIELD_LOT_NUMBER])) { + $value = $data[self::FIELD_LOT_NUMBER]; } else { - $this->setLotNumber(new FHIRString($data[self::FIELD_LOT_NUMBER])); + $value = null; + } + if (isset($data[self::FIELD_LOT_NUMBER_EXT]) && is_array($data[self::FIELD_LOT_NUMBER_EXT])) { + $ext = $data[self::FIELD_LOT_NUMBER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setLotNumber($value); + } else if (is_array($value)) { + $this->setLotNumber(new FHIRString(array_merge($ext, $value))); + } else { + $this->setLotNumber(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLotNumber(new FHIRString($ext)); } } if (isset($data[self::FIELD_MANUFACTURER])) { @@ -494,20 +515,27 @@ public function __construct($data = null) $this->setManufacturer(new FHIRReference($data[self::FIELD_MANUFACTURER])); } } - if (isset($data[self::FIELD_NOT_GIVEN])) { - $ext = (isset($data[self::FIELD_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_NOT_GIVEN_EXT])) - ? $data[self::FIELD_NOT_GIVEN_EXT] - : null; - if ($data[self::FIELD_NOT_GIVEN] instanceof FHIRBoolean) { - $this->setNotGiven($data[self::FIELD_NOT_GIVEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOT_GIVEN])) { - $this->setNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NOT_GIVEN]] + $ext)); - } else if (is_array($data[self::FIELD_NOT_GIVEN])) { - $this->setNotGiven(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NOT_GIVEN]))); - } + if (isset($data[self::FIELD_NOT_GIVEN]) || isset($data[self::FIELD_NOT_GIVEN_EXT])) { + if (isset($data[self::FIELD_NOT_GIVEN])) { + $value = $data[self::FIELD_NOT_GIVEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_NOT_GIVEN_EXT])) { + $ext = $data[self::FIELD_NOT_GIVEN_EXT]; } else { - $this->setNotGiven(new FHIRBoolean($data[self::FIELD_NOT_GIVEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNotGiven($value); + } else if (is_array($value)) { + $this->setNotGiven(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotGiven(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -553,20 +581,27 @@ public function __construct($data = null) $this->addPractitioner(new FHIRImmunizationPractitioner($data[self::FIELD_PRACTITIONER])); } } - if (isset($data[self::FIELD_PRIMARY_SOURCE])) { - $ext = (isset($data[self::FIELD_PRIMARY_SOURCE_EXT]) && is_array($data[self::FIELD_PRIMARY_SOURCE_EXT])) - ? $data[self::FIELD_PRIMARY_SOURCE_EXT] - : null; - if ($data[self::FIELD_PRIMARY_SOURCE] instanceof FHIRBoolean) { - $this->setPrimarySource($data[self::FIELD_PRIMARY_SOURCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIMARY_SOURCE])) { - $this->setPrimarySource(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_PRIMARY_SOURCE]] + $ext)); - } else if (is_array($data[self::FIELD_PRIMARY_SOURCE])) { - $this->setPrimarySource(new FHIRBoolean(array_merge($ext, $data[self::FIELD_PRIMARY_SOURCE]))); - } + if (isset($data[self::FIELD_PRIMARY_SOURCE]) || isset($data[self::FIELD_PRIMARY_SOURCE_EXT])) { + if (isset($data[self::FIELD_PRIMARY_SOURCE])) { + $value = $data[self::FIELD_PRIMARY_SOURCE]; } else { - $this->setPrimarySource(new FHIRBoolean($data[self::FIELD_PRIMARY_SOURCE])); + $value = null; + } + if (isset($data[self::FIELD_PRIMARY_SOURCE_EXT]) && is_array($data[self::FIELD_PRIMARY_SOURCE_EXT])) { + $ext = $data[self::FIELD_PRIMARY_SOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setPrimarySource($value); + } else if (is_array($value)) { + $this->setPrimarySource(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setPrimarySource(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPrimarySource(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_REACTION])) { @@ -608,20 +643,27 @@ public function __construct($data = null) $this->setSite(new FHIRCodeableConcept($data[self::FIELD_SITE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRImmunizationStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRImmunizationStatusCodes([FHIRImmunizationStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRImmunizationStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRImmunizationStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRImmunizationStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRImmunizationStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRImmunizationStatusCodes([FHIRImmunizationStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRImmunizationStatusCodes($ext)); } } if (isset($data[self::FIELD_VACCINATION_PROTOCOL])) { @@ -1518,8 +1560,8 @@ public function setVaccineCode(FHIRCodeableConcept $vaccineCode = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1788,8 +1830,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1801,8 +1845,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getExpirationDate())) { $a[self::FIELD_EXPIRATION_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_EXPIRATION_DATE_EXT] = $enc; } } @@ -1810,15 +1856,23 @@ public function jsonSerialize() $a[self::FIELD_EXPLANATION] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getLotNumber())) { $a[self::FIELD_LOT_NUMBER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_LOT_NUMBER_EXT] = $enc; } } @@ -1827,29 +1881,51 @@ public function jsonSerialize() } if (null !== ($v = $this->getNotGiven())) { $a[self::FIELD_NOT_GIVEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NOT_GIVEN_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getPractitioner())) { - $a[self::FIELD_PRACTITIONER] = $vs; + $a[self::FIELD_PRACTITIONER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PRACTITIONER][] = $v; + } } if (null !== ($v = $this->getPrimarySource())) { $a[self::FIELD_PRIMARY_SOURCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_PRIMARY_SOURCE_EXT] = $enc; } } if ([] !== ($vs = $this->getReaction())) { - $a[self::FIELD_REACTION] = $vs; + $a[self::FIELD_REACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REACTION][] = $v; + } } if (null !== ($v = $this->getReportOrigin())) { $a[self::FIELD_REPORT_ORIGIN] = $v; @@ -1862,17 +1938,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRImmunizationStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRImmunizationStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getVaccinationProtocol())) { - $a[self::FIELD_VACCINATION_PROTOCOL] = $vs; + $a[self::FIELD_VACCINATION_PROTOCOL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VACCINATION_PROTOCOL][] = $v; + } } if (null !== ($v = $this->getVaccineCode())) { $a[self::FIELD_VACCINE_CODE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php index ddc2a9f1d4..8771001e51 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRImmunizationRecommendation extends FHIRDomainResource implements PHPFH const FIELD_RECOMMENDATION = 'recommendation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -369,8 +369,8 @@ public function setRecommendation(array $recommendation = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -469,13 +469,28 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getRecommendation())) { - $a[self::FIELD_RECOMMENDATION] = $vs; + $a[self::FIELD_RECOMMENDATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECOMMENDATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php index 136cb0bd33..6d561f6bef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRImplementationGuide.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRImplementationGuide extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * String of characters used to identify a name or a resource @@ -398,33 +398,42 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BINARY])) { - $ext = (isset($data[self::FIELD_BINARY_EXT]) && is_array($data[self::FIELD_BINARY_EXT])) - ? $data[self::FIELD_BINARY_EXT] - : null; - if (is_array($data[self::FIELD_BINARY])) { - foreach($data[self::FIELD_BINARY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addBinary($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addBinary(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addBinary(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_BINARY]) || isset($data[self::FIELD_BINARY_EXT])) { + if (isset($data[self::FIELD_BINARY])) { + $value = $data[self::FIELD_BINARY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BINARY_EXT]) && is_array($data[self::FIELD_BINARY_EXT])) { + $ext = $data[self::FIELD_BINARY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addBinary($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addBinary($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addBinary(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addBinary(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addBinary(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addBinary(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addBinary(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addBinary(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_BINARY] instanceof FHIRUri) { - $this->addBinary($data[self::FIELD_BINARY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_BINARY])) { - $this->addBinary(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_BINARY]] + $ext)); - } else { - $this->addBinary(new FHIRUri($data[self::FIELD_BINARY])); } } if (isset($data[self::FIELD_CONTACT])) { @@ -445,36 +454,50 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DEPENDENCY])) { @@ -495,52 +518,73 @@ public function __construct($data = null) $this->addDependency(new FHIRImplementationGuideDependency($data[self::FIELD_DEPENDENCY])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRId) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; } else { - $this->setFhirVersion(new FHIRId($data[self::FIELD_FHIR_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRId($ext)); } } if (isset($data[self::FIELD_GLOBAL])) { @@ -579,20 +623,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PACKAGE])) { @@ -620,52 +671,73 @@ public function __construct($data = null) $this->setPage(new FHIRImplementationGuidePage($data[self::FIELD_PAGE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -686,20 +758,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1652,8 +1731,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1950,110 +2029,177 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBinary())) { $a[self::FIELD_BINARY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_BINARY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_BINARY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_BINARY_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_BINARY_EXT] = $encs; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDependency())) { - $a[self::FIELD_DEPENDENCY] = $vs; + $a[self::FIELD_DEPENDENCY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEPENDENCY][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getGlobal())) { - $a[self::FIELD_GLOBAL] = $vs; + $a[self::FIELD_GLOBAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GLOBAL][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getPackage())) { - $a[self::FIELD_PACKAGE] = $vs; + $a[self::FIELD_PACKAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PACKAGE][] = $v; + } } if (null !== ($v = $this->getPage())) { $a[self::FIELD_PAGE] = $v; } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLibrary.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLibrary.php index 7931d3b0d3..220b969e31 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLibrary.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLibrary.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRLibrary extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -522,20 +522,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -592,20 +599,27 @@ public function __construct($data = null) $this->addContributor(new FHIRContributor($data[self::FIELD_CONTRIBUTOR])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DATA_REQUIREMENT])) { @@ -626,36 +640,50 @@ public function __construct($data = null) $this->addDataRequirement(new FHIRDataRequirement($data[self::FIELD_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -665,20 +693,27 @@ public function __construct($data = null) $this->setEffectivePeriod(new FHIRPeriod($data[self::FIELD_EFFECTIVE_PERIOD])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -717,36 +752,50 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARAMETER])) { @@ -767,36 +816,50 @@ public function __construct($data = null) $this->addParameter(new FHIRParameterDefinition($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -817,36 +880,50 @@ public function __construct($data = null) $this->addRelatedArtifact(new FHIRRelatedArtifact($data[self::FIELD_RELATED_ARTIFACT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -874,36 +951,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -924,20 +1015,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2286,8 +2384,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2685,41 +2783,73 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getContent())) { - $a[self::FIELD_CONTENT] = $vs; + $a[self::FIELD_CONTENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTENT][] = $v; + } } if ([] !== ($vs = $this->getContributor())) { - $a[self::FIELD_CONTRIBUTOR] = $vs; + $a[self::FIELD_CONTRIBUTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRIBUTOR][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if ([] !== ($vs = $this->getDataRequirement())) { - $a[self::FIELD_DATA_REQUIREMENT] = $vs; + $a[self::FIELD_DATA_REQUIREMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA_REQUIREMENT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2728,95 +2858,154 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLinkage.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLinkage.php index c478595ca5..cb66b8c236 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLinkage.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLinkage.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -88,7 +88,7 @@ class FHIRLinkage extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_ITEM = 'item'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -150,20 +150,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AUTHOR])) { @@ -353,8 +360,8 @@ public function setItem(array $item = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -455,8 +462,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } @@ -464,7 +473,16 @@ public function jsonSerialize() $a[self::FIELD_AUTHOR] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRList.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRList.php index 6888ad14b0..eab8310fc6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRList.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRList.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRList extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -289,20 +289,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EMPTY_REASON])) { @@ -355,20 +362,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRListMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRListMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; } else { - $this->setMode(new FHIRListMode($data[self::FIELD_MODE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRListMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRListMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRListMode([FHIRListMode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMode(new FHIRListMode($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -403,20 +417,27 @@ public function __construct($data = null) $this->setSource(new FHIRReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRListStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRListStatus([FHIRListStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRListStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRListStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRListStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRListStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRListStatus([FHIRListStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRListStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -426,20 +447,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -979,8 +1007,8 @@ public function setTitle($title = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1166,8 +1194,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -1178,20 +1208,40 @@ public function jsonSerialize() $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getEntry())) { - $a[self::FIELD_ENTRY] = $vs; + $a[self::FIELD_ENTRY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTRY][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRListMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRListMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOrderedBy())) { $a[self::FIELD_ORDERED_BY] = $v; @@ -1201,8 +1251,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRListStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRListStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1211,11 +1263,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLocation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLocation.php index ee4bba4e8d..92c006cc77 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLocation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRLocation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRLocation extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * An address expressed using postal conventions (as opposed to GPS or other @@ -324,49 +324,65 @@ public function __construct($data = null) $this->setAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if (is_array($data[self::FIELD_ALIAS])) { - foreach($data[self::FIELD_ALIAS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAlias($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAlias(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAlias($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAlias($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAlias(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAlias(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAlias(new FHIRString($iext)); } - } elseif ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->addAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ALIAS])) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else { - $this->addAlias(new FHIRString($data[self::FIELD_ALIAS])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_ENDPOINT])) { @@ -412,36 +428,50 @@ public function __construct($data = null) $this->setManagingOrganization(new FHIRReference($data[self::FIELD_MANAGING_ORGANIZATION])); } } - if (isset($data[self::FIELD_MODE])) { - $ext = (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) - ? $data[self::FIELD_MODE_EXT] - : null; - if ($data[self::FIELD_MODE] instanceof FHIRLocationMode) { - $this->setMode($data[self::FIELD_MODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MODE])) { - $this->setMode(new FHIRLocationMode([FHIRLocationMode::FIELD_VALUE => $data[self::FIELD_MODE]] + $ext)); - } else if (is_array($data[self::FIELD_MODE])) { - $this->setMode(new FHIRLocationMode(array_merge($ext, $data[self::FIELD_MODE]))); - } + if (isset($data[self::FIELD_MODE]) || isset($data[self::FIELD_MODE_EXT])) { + if (isset($data[self::FIELD_MODE])) { + $value = $data[self::FIELD_MODE]; } else { - $this->setMode(new FHIRLocationMode($data[self::FIELD_MODE])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_MODE_EXT]) && is_array($data[self::FIELD_MODE_EXT])) { + $ext = $data[self::FIELD_MODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLocationMode) { + $this->setMode($value); + } else if (is_array($value)) { + $this->setMode(new FHIRLocationMode(array_merge($ext, $value))); + } else { + $this->setMode(new FHIRLocationMode([FHIRLocationMode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMode(new FHIRLocationMode($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OPERATIONAL_STATUS])) { @@ -472,20 +502,27 @@ public function __construct($data = null) $this->setPosition(new FHIRLocationPosition($data[self::FIELD_POSITION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRLocationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRLocationStatus([FHIRLocationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRLocationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRLocationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRLocationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRLocationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRLocationStatus([FHIRLocationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRLocationStatus($ext)); } } if (isset($data[self::FIELD_TELECOM])) { @@ -1162,8 +1199,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1368,46 +1405,72 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getAlias())) { $a[self::FIELD_ALIAS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ALIAS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ALIAS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ALIAS_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ALIAS_EXT] = $encs; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; } if (null !== ($v = $this->getMode())) { $a[self::FIELD_MODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLocationMode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLocationMode::FIELD_VALUE]); $a[self::FIELD_MODE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1425,17 +1488,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRLocationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRLocationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasure.php index d4b3413a9a..2c5f970cb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -157,7 +157,7 @@ class FHIRMeasure extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -697,36 +697,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { - $ext = (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT]) && is_array($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT])) - ? $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT] - : null; - if ($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] instanceof FHIRMarkdown) { - $this->setClinicalRecommendationStatement($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { - $this->setClinicalRecommendationStatement(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]] + $ext)); - } else if (is_array($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { - $this->setClinicalRecommendationStatement(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]))); + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]) || isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT])) { + if (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])) { + $value = $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT]; } else { - $this->setClinicalRecommendationStatement(new FHIRMarkdown($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT])); + $value = null; + } + if (isset($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT]) && is_array($data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT])) { + $ext = $data[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setClinicalRecommendationStatement($value); + } else if (is_array($value)) { + $this->setClinicalRecommendationStatement(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setClinicalRecommendationStatement(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setClinicalRecommendationStatement(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_COMPOSITE_SCORING])) { @@ -772,97 +786,134 @@ public function __construct($data = null) $this->addContributor(new FHIRContributor($data[self::FIELD_CONTRIBUTOR])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_DEFINITION])) { - $ext = (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) - ? $data[self::FIELD_DEFINITION_EXT] - : null; - if (is_array($data[self::FIELD_DEFINITION])) { - foreach($data[self::FIELD_DEFINITION] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRMarkdown) { - $this->addDefinition($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addDefinition(new FHIRMarkdown(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_DEFINITION]) || isset($data[self::FIELD_DEFINITION_EXT])) { + if (isset($data[self::FIELD_DEFINITION])) { + $value = $data[self::FIELD_DEFINITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_EXT]) && is_array($data[self::FIELD_DEFINITION_EXT])) { + $ext = $data[self::FIELD_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->addDefinition($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRMarkdown) { + $this->addDefinition($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addDefinition(new FHIRMarkdown(array_merge($v, $iext))); + } else { + $this->addDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addDefinition(new FHIRMarkdown($v)); } + } elseif (is_array($value)) { + $this->addDefinition(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->addDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_DEFINITION] instanceof FHIRMarkdown) { - $this->addDefinition($data[self::FIELD_DEFINITION]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_DEFINITION])) { - $this->addDefinition(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DEFINITION]] + $ext)); - } else { - $this->addDefinition(new FHIRMarkdown($data[self::FIELD_DEFINITION])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addDefinition(new FHIRMarkdown($iext)); } - } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); } } - if (isset($data[self::FIELD_DISCLAIMER])) { - $ext = (isset($data[self::FIELD_DISCLAIMER_EXT]) && is_array($data[self::FIELD_DISCLAIMER_EXT])) - ? $data[self::FIELD_DISCLAIMER_EXT] - : null; - if ($data[self::FIELD_DISCLAIMER] instanceof FHIRMarkdown) { - $this->setDisclaimer($data[self::FIELD_DISCLAIMER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISCLAIMER])) { - $this->setDisclaimer(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DISCLAIMER]] + $ext)); - } else if (is_array($data[self::FIELD_DISCLAIMER])) { - $this->setDisclaimer(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DISCLAIMER]))); + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DISCLAIMER]) || isset($data[self::FIELD_DISCLAIMER_EXT])) { + if (isset($data[self::FIELD_DISCLAIMER])) { + $value = $data[self::FIELD_DISCLAIMER]; } else { - $this->setDisclaimer(new FHIRMarkdown($data[self::FIELD_DISCLAIMER])); + $value = null; + } + if (isset($data[self::FIELD_DISCLAIMER_EXT]) && is_array($data[self::FIELD_DISCLAIMER_EXT])) { + $ext = $data[self::FIELD_DISCLAIMER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDisclaimer($value); + } else if (is_array($value)) { + $this->setDisclaimer(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDisclaimer(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisclaimer(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -872,20 +923,27 @@ public function __construct($data = null) $this->setEffectivePeriod(new FHIRPeriod($data[self::FIELD_EFFECTIVE_PERIOD])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_GROUP])) { @@ -906,20 +964,27 @@ public function __construct($data = null) $this->addGroup(new FHIRMeasureGroup($data[self::FIELD_GROUP])); } } - if (isset($data[self::FIELD_GUIDANCE])) { - $ext = (isset($data[self::FIELD_GUIDANCE_EXT]) && is_array($data[self::FIELD_GUIDANCE_EXT])) - ? $data[self::FIELD_GUIDANCE_EXT] - : null; - if ($data[self::FIELD_GUIDANCE] instanceof FHIRMarkdown) { - $this->setGuidance($data[self::FIELD_GUIDANCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GUIDANCE])) { - $this->setGuidance(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_GUIDANCE]] + $ext)); - } else if (is_array($data[self::FIELD_GUIDANCE])) { - $this->setGuidance(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_GUIDANCE]))); - } + if (isset($data[self::FIELD_GUIDANCE]) || isset($data[self::FIELD_GUIDANCE_EXT])) { + if (isset($data[self::FIELD_GUIDANCE])) { + $value = $data[self::FIELD_GUIDANCE]; } else { - $this->setGuidance(new FHIRMarkdown($data[self::FIELD_GUIDANCE])); + $value = null; + } + if (isset($data[self::FIELD_GUIDANCE_EXT]) && is_array($data[self::FIELD_GUIDANCE_EXT])) { + $ext = $data[self::FIELD_GUIDANCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setGuidance($value); + } else if (is_array($value)) { + $this->setGuidance(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setGuidance(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGuidance(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -940,20 +1005,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_IMPROVEMENT_NOTATION])) { - $ext = (isset($data[self::FIELD_IMPROVEMENT_NOTATION_EXT]) && is_array($data[self::FIELD_IMPROVEMENT_NOTATION_EXT])) - ? $data[self::FIELD_IMPROVEMENT_NOTATION_EXT] - : null; - if ($data[self::FIELD_IMPROVEMENT_NOTATION] instanceof FHIRString) { - $this->setImprovementNotation($data[self::FIELD_IMPROVEMENT_NOTATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IMPROVEMENT_NOTATION])) { - $this->setImprovementNotation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_IMPROVEMENT_NOTATION]] + $ext)); - } else if (is_array($data[self::FIELD_IMPROVEMENT_NOTATION])) { - $this->setImprovementNotation(new FHIRString(array_merge($ext, $data[self::FIELD_IMPROVEMENT_NOTATION]))); - } + if (isset($data[self::FIELD_IMPROVEMENT_NOTATION]) || isset($data[self::FIELD_IMPROVEMENT_NOTATION_EXT])) { + if (isset($data[self::FIELD_IMPROVEMENT_NOTATION])) { + $value = $data[self::FIELD_IMPROVEMENT_NOTATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPROVEMENT_NOTATION_EXT]) && is_array($data[self::FIELD_IMPROVEMENT_NOTATION_EXT])) { + $ext = $data[self::FIELD_IMPROVEMENT_NOTATION_EXT]; } else { - $this->setImprovementNotation(new FHIRString($data[self::FIELD_IMPROVEMENT_NOTATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setImprovementNotation($value); + } else if (is_array($value)) { + $this->setImprovementNotation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setImprovementNotation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setImprovementNotation(new FHIRString($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -974,20 +1046,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_LIBRARY])) { @@ -1008,84 +1087,119 @@ public function __construct($data = null) $this->addLibrary(new FHIRReference($data[self::FIELD_LIBRARY])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $ext = []; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_RATE_AGGREGATION])) { - $ext = (isset($data[self::FIELD_RATE_AGGREGATION_EXT]) && is_array($data[self::FIELD_RATE_AGGREGATION_EXT])) - ? $data[self::FIELD_RATE_AGGREGATION_EXT] - : null; - if ($data[self::FIELD_RATE_AGGREGATION] instanceof FHIRString) { - $this->setRateAggregation($data[self::FIELD_RATE_AGGREGATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RATE_AGGREGATION])) { - $this->setRateAggregation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RATE_AGGREGATION]] + $ext)); - } else if (is_array($data[self::FIELD_RATE_AGGREGATION])) { - $this->setRateAggregation(new FHIRString(array_merge($ext, $data[self::FIELD_RATE_AGGREGATION]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setRateAggregation(new FHIRString($data[self::FIELD_RATE_AGGREGATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_RATIONALE])) { - $ext = (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) - ? $data[self::FIELD_RATIONALE_EXT] - : null; - if ($data[self::FIELD_RATIONALE] instanceof FHIRMarkdown) { - $this->setRationale($data[self::FIELD_RATIONALE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_RATIONALE]] + $ext)); - } else if (is_array($data[self::FIELD_RATIONALE])) { - $this->setRationale(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_RATIONALE]))); + if (isset($data[self::FIELD_RATE_AGGREGATION]) || isset($data[self::FIELD_RATE_AGGREGATION_EXT])) { + if (isset($data[self::FIELD_RATE_AGGREGATION])) { + $value = $data[self::FIELD_RATE_AGGREGATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RATE_AGGREGATION_EXT]) && is_array($data[self::FIELD_RATE_AGGREGATION_EXT])) { + $ext = $data[self::FIELD_RATE_AGGREGATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRateAggregation($value); + } else if (is_array($value)) { + $this->setRateAggregation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRateAggregation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setRateAggregation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_RATIONALE]) || isset($data[self::FIELD_RATIONALE_EXT])) { + if (isset($data[self::FIELD_RATIONALE])) { + $value = $data[self::FIELD_RATIONALE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RATIONALE_EXT]) && is_array($data[self::FIELD_RATIONALE_EXT])) { + $ext = $data[self::FIELD_RATIONALE_EXT]; } else { - $this->setRationale(new FHIRMarkdown($data[self::FIELD_RATIONALE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setRationale($value); + } else if (is_array($value)) { + $this->setRationale(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setRationale(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRationale(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -1106,20 +1220,27 @@ public function __construct($data = null) $this->addRelatedArtifact(new FHIRRelatedArtifact($data[self::FIELD_RELATED_ARTIFACT])); } } - if (isset($data[self::FIELD_RISK_ADJUSTMENT])) { - $ext = (isset($data[self::FIELD_RISK_ADJUSTMENT_EXT]) && is_array($data[self::FIELD_RISK_ADJUSTMENT_EXT])) - ? $data[self::FIELD_RISK_ADJUSTMENT_EXT] - : null; - if ($data[self::FIELD_RISK_ADJUSTMENT] instanceof FHIRString) { - $this->setRiskAdjustment($data[self::FIELD_RISK_ADJUSTMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RISK_ADJUSTMENT])) { - $this->setRiskAdjustment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RISK_ADJUSTMENT]] + $ext)); - } else if (is_array($data[self::FIELD_RISK_ADJUSTMENT])) { - $this->setRiskAdjustment(new FHIRString(array_merge($ext, $data[self::FIELD_RISK_ADJUSTMENT]))); - } + if (isset($data[self::FIELD_RISK_ADJUSTMENT]) || isset($data[self::FIELD_RISK_ADJUSTMENT_EXT])) { + if (isset($data[self::FIELD_RISK_ADJUSTMENT])) { + $value = $data[self::FIELD_RISK_ADJUSTMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RISK_ADJUSTMENT_EXT]) && is_array($data[self::FIELD_RISK_ADJUSTMENT_EXT])) { + $ext = $data[self::FIELD_RISK_ADJUSTMENT_EXT]; } else { - $this->setRiskAdjustment(new FHIRString($data[self::FIELD_RISK_ADJUSTMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setRiskAdjustment($value); + } else if (is_array($value)) { + $this->setRiskAdjustment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setRiskAdjustment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRiskAdjustment(new FHIRString($ext)); } } if (isset($data[self::FIELD_SCORING])) { @@ -1129,36 +1250,50 @@ public function __construct($data = null) $this->setScoring(new FHIRCodeableConcept($data[self::FIELD_SCORING])); } } - if (isset($data[self::FIELD_SET])) { - $ext = (isset($data[self::FIELD_SET_EXT]) && is_array($data[self::FIELD_SET_EXT])) - ? $data[self::FIELD_SET_EXT] - : null; - if ($data[self::FIELD_SET] instanceof FHIRString) { - $this->setSet($data[self::FIELD_SET]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SET])) { - $this->setSet(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_SET]] + $ext)); - } else if (is_array($data[self::FIELD_SET])) { - $this->setSet(new FHIRString(array_merge($ext, $data[self::FIELD_SET]))); - } + if (isset($data[self::FIELD_SET]) || isset($data[self::FIELD_SET_EXT])) { + if (isset($data[self::FIELD_SET])) { + $value = $data[self::FIELD_SET]; } else { - $this->setSet(new FHIRString($data[self::FIELD_SET])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_SET_EXT]) && is_array($data[self::FIELD_SET_EXT])) { + $ext = $data[self::FIELD_SET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setSet($value); + } else if (is_array($value)) { + $this->setSet(new FHIRString(array_merge($ext, $value))); + } else { + $this->setSet(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSet(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_SUPPLEMENTAL_DATA])) { @@ -1179,20 +1314,27 @@ public function __construct($data = null) $this->addSupplementalData(new FHIRMeasureSupplementalData($data[self::FIELD_SUPPLEMENTAL_DATA])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -1231,36 +1373,50 @@ public function __construct($data = null) $this->addType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1281,20 +1437,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -3171,8 +3334,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -3714,15 +3877,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if (null !== ($v = $this->getClinicalRecommendationStatement())) { $a[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_CLINICAL_RECOMMENDATION_STATEMENT_EXT] = $enc; } } @@ -3730,51 +3897,79 @@ public function jsonSerialize() $a[self::FIELD_COMPOSITE_SCORING] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getContributor())) { - $a[self::FIELD_CONTRIBUTOR] = $vs; + $a[self::FIELD_CONTRIBUTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRIBUTOR][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getDefinition())) { $a[self::FIELD_DEFINITION] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_DEFINITION][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_DEFINITION_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRMarkdown::FIELD_VALUE]) || array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_DEFINITION_EXT][] = null; + unset($enc[FHIRMarkdown::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_DEFINITION_EXT] = $encs; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getDisclaimer())) { $a[self::FIELD_DISCLAIMER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DISCLAIMER_EXT] = $enc; } } @@ -3783,86 +3978,136 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getGuidance())) { $a[self::FIELD_GUIDANCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_GUIDANCE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getImprovementNotation())) { $a[self::FIELD_IMPROVEMENT_NOTATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_IMPROVEMENT_NOTATION_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getLibrary())) { - $a[self::FIELD_LIBRARY] = $vs; + $a[self::FIELD_LIBRARY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LIBRARY][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getRateAggregation())) { $a[self::FIELD_RATE_AGGREGATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RATE_AGGREGATION_EXT] = $enc; } } if (null !== ($v = $this->getRationale())) { $a[self::FIELD_RATIONALE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_RATIONALE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if (null !== ($v = $this->getRiskAdjustment())) { $a[self::FIELD_RISK_ADJUSTMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RISK_ADJUSTMENT_EXT] = $enc; } } @@ -3871,58 +4116,97 @@ public function jsonSerialize() } if (null !== ($v = $this->getSet())) { $a[self::FIELD_SET] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_SET_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupplementalData())) { - $a[self::FIELD_SUPPLEMENTAL_DATA] = $vs; + $a[self::FIELD_SUPPLEMENTAL_DATA] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPLEMENTAL_DATA][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php index 9ee745c6b5..bb931fbd66 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMeasureReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRMeasureReport extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TYPE_EXT = '_type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -241,20 +241,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EVALUATED_RESOURCES])) { @@ -317,36 +324,50 @@ public function __construct($data = null) $this->setReportingOrganization(new FHIRReference($data[self::FIELD_REPORTING_ORGANIZATION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMeasureReportStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMeasureReportStatus([FHIRMeasureReportStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMeasureReportStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRMeasureReportStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRMeasureReportType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRMeasureReportType([FHIRMeasureReportType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRMeasureReportType(array_merge($ext, $data[self::FIELD_TYPE]))); + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMeasureReportStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMeasureReportStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMeasureReportStatus([FHIRMeasureReportStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMeasureReportStatus($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; } else { - $this->setType(new FHIRMeasureReportType($data[self::FIELD_TYPE])); + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMeasureReportType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRMeasureReportType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRMeasureReportType([FHIRMeasureReportType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRMeasureReportType($ext)); } } } @@ -730,8 +751,8 @@ public function setType(FHIRMeasureReportType $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -874,8 +895,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } @@ -883,7 +906,13 @@ public function jsonSerialize() $a[self::FIELD_EVALUATED_RESOURCES] = $v; } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; @@ -902,18 +931,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMeasureReportStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMeasureReportStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMeasureReportType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMeasureReportType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedia.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedia.php index f15c1bff25..44776e5e12 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedia.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedia.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -116,7 +116,7 @@ class FHIRMedia extends FHIRDomainResource implements PHPFHIRContainedTypeInterf const FIELD_WIDTH_EXT = '_width'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -413,52 +413,73 @@ public function __construct($data = null) $this->setDevice(new FHIRReference($data[self::FIELD_DEVICE])); } } - if (isset($data[self::FIELD_DURATION])) { - $ext = (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) - ? $data[self::FIELD_DURATION_EXT] - : null; - if ($data[self::FIELD_DURATION] instanceof FHIRUnsignedInt) { - $this->setDuration($data[self::FIELD_DURATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $data[self::FIELD_DURATION]] + $ext)); - } else if (is_array($data[self::FIELD_DURATION])) { - $this->setDuration(new FHIRUnsignedInt(array_merge($ext, $data[self::FIELD_DURATION]))); - } + if (isset($data[self::FIELD_DURATION]) || isset($data[self::FIELD_DURATION_EXT])) { + if (isset($data[self::FIELD_DURATION])) { + $value = $data[self::FIELD_DURATION]; } else { - $this->setDuration(new FHIRUnsignedInt($data[self::FIELD_DURATION])); + $value = null; } - } - if (isset($data[self::FIELD_FRAMES])) { - $ext = (isset($data[self::FIELD_FRAMES_EXT]) && is_array($data[self::FIELD_FRAMES_EXT])) - ? $data[self::FIELD_FRAMES_EXT] - : null; - if ($data[self::FIELD_FRAMES] instanceof FHIRPositiveInt) { - $this->setFrames($data[self::FIELD_FRAMES]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FRAMES])) { - $this->setFrames(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_FRAMES]] + $ext)); - } else if (is_array($data[self::FIELD_FRAMES])) { - $this->setFrames(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_FRAMES]))); - } + if (isset($data[self::FIELD_DURATION_EXT]) && is_array($data[self::FIELD_DURATION_EXT])) { + $ext = $data[self::FIELD_DURATION_EXT]; } else { - $this->setFrames(new FHIRPositiveInt($data[self::FIELD_FRAMES])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUnsignedInt) { + $this->setDuration($value); + } else if (is_array($value)) { + $this->setDuration(new FHIRUnsignedInt(array_merge($ext, $value))); + } else { + $this->setDuration(new FHIRUnsignedInt([FHIRUnsignedInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDuration(new FHIRUnsignedInt($ext)); } } - if (isset($data[self::FIELD_HEIGHT])) { - $ext = (isset($data[self::FIELD_HEIGHT_EXT]) && is_array($data[self::FIELD_HEIGHT_EXT])) - ? $data[self::FIELD_HEIGHT_EXT] - : null; - if ($data[self::FIELD_HEIGHT] instanceof FHIRPositiveInt) { - $this->setHeight($data[self::FIELD_HEIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_HEIGHT])) { - $this->setHeight(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_HEIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_HEIGHT])) { - $this->setHeight(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_HEIGHT]))); + if (isset($data[self::FIELD_FRAMES]) || isset($data[self::FIELD_FRAMES_EXT])) { + if (isset($data[self::FIELD_FRAMES])) { + $value = $data[self::FIELD_FRAMES]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FRAMES_EXT]) && is_array($data[self::FIELD_FRAMES_EXT])) { + $ext = $data[self::FIELD_FRAMES_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setFrames($value); + } else if (is_array($value)) { + $this->setFrames(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setFrames(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setFrames(new FHIRPositiveInt($ext)); + } + } + if (isset($data[self::FIELD_HEIGHT]) || isset($data[self::FIELD_HEIGHT_EXT])) { + if (isset($data[self::FIELD_HEIGHT])) { + $value = $data[self::FIELD_HEIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_HEIGHT_EXT]) && is_array($data[self::FIELD_HEIGHT_EXT])) { + $ext = $data[self::FIELD_HEIGHT_EXT]; } else { - $this->setHeight(new FHIRPositiveInt($data[self::FIELD_HEIGHT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setHeight($value); + } else if (is_array($value)) { + $this->setHeight(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setHeight(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setHeight(new FHIRPositiveInt($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -497,20 +518,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -559,20 +587,27 @@ public function __construct($data = null) $this->setSubtype(new FHIRCodeableConcept($data[self::FIELD_SUBTYPE])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRDigitalMediaType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDigitalMediaType([FHIRDigitalMediaType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRDigitalMediaType(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRDigitalMediaType($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDigitalMediaType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRDigitalMediaType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRDigitalMediaType([FHIRDigitalMediaType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRDigitalMediaType($ext)); } } if (isset($data[self::FIELD_VIEW])) { @@ -582,20 +617,27 @@ public function __construct($data = null) $this->setView(new FHIRCodeableConcept($data[self::FIELD_VIEW])); } } - if (isset($data[self::FIELD_WIDTH])) { - $ext = (isset($data[self::FIELD_WIDTH_EXT]) && is_array($data[self::FIELD_WIDTH_EXT])) - ? $data[self::FIELD_WIDTH_EXT] - : null; - if ($data[self::FIELD_WIDTH] instanceof FHIRPositiveInt) { - $this->setWidth($data[self::FIELD_WIDTH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WIDTH])) { - $this->setWidth(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $data[self::FIELD_WIDTH]] + $ext)); - } else if (is_array($data[self::FIELD_WIDTH])) { - $this->setWidth(new FHIRPositiveInt(array_merge($ext, $data[self::FIELD_WIDTH]))); - } + if (isset($data[self::FIELD_WIDTH]) || isset($data[self::FIELD_WIDTH_EXT])) { + if (isset($data[self::FIELD_WIDTH])) { + $value = $data[self::FIELD_WIDTH]; } else { - $this->setWidth(new FHIRPositiveInt($data[self::FIELD_WIDTH])); + $value = null; + } + if (isset($data[self::FIELD_WIDTH_EXT]) && is_array($data[self::FIELD_WIDTH_EXT])) { + $ext = $data[self::FIELD_WIDTH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPositiveInt) { + $this->setWidth($value); + } else if (is_array($value)) { + $this->setWidth(new FHIRPositiveInt(array_merge($ext, $value))); + } else { + $this->setWidth(new FHIRPositiveInt([FHIRPositiveInt::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWidth(new FHIRPositiveInt($ext)); } } } @@ -1387,8 +1429,8 @@ public function setWidth($width = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1637,7 +1679,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getBodySite())) { $a[self::FIELD_BODY_SITE] = $v; @@ -1653,35 +1701,55 @@ public function jsonSerialize() } if (null !== ($v = $this->getDuration())) { $a[self::FIELD_DURATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUnsignedInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUnsignedInt::FIELD_VALUE]); $a[self::FIELD_DURATION_EXT] = $enc; } } if (null !== ($v = $this->getFrames())) { $a[self::FIELD_FRAMES] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_FRAMES_EXT] = $enc; } } if (null !== ($v = $this->getHeight())) { $a[self::FIELD_HEIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_HEIGHT_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -1692,7 +1760,13 @@ public function jsonSerialize() $a[self::FIELD_OPERATOR] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; @@ -1702,8 +1776,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDigitalMediaType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDigitalMediaType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } @@ -1712,11 +1788,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getWidth())) { $a[self::FIELD_WIDTH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPositiveInt::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPositiveInt::FIELD_VALUE]); $a[self::FIELD_WIDTH_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedication.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedication.php index bc7c686fa7..d3213f2144 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedication.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedication.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRMedication extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -275,36 +275,50 @@ public function __construct($data = null) $this->addIngredient(new FHIRMedicationIngredient($data[self::FIELD_INGREDIENT])); } } - if (isset($data[self::FIELD_IS_BRAND])) { - $ext = (isset($data[self::FIELD_IS_BRAND_EXT]) && is_array($data[self::FIELD_IS_BRAND_EXT])) - ? $data[self::FIELD_IS_BRAND_EXT] - : null; - if ($data[self::FIELD_IS_BRAND] instanceof FHIRBoolean) { - $this->setIsBrand($data[self::FIELD_IS_BRAND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_BRAND])) { - $this->setIsBrand(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_BRAND]] + $ext)); - } else if (is_array($data[self::FIELD_IS_BRAND])) { - $this->setIsBrand(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_BRAND]))); - } + if (isset($data[self::FIELD_IS_BRAND]) || isset($data[self::FIELD_IS_BRAND_EXT])) { + if (isset($data[self::FIELD_IS_BRAND])) { + $value = $data[self::FIELD_IS_BRAND]; } else { - $this->setIsBrand(new FHIRBoolean($data[self::FIELD_IS_BRAND])); + $value = null; } - } - if (isset($data[self::FIELD_IS_OVER_THE_COUNTER])) { - $ext = (isset($data[self::FIELD_IS_OVER_THE_COUNTER_EXT]) && is_array($data[self::FIELD_IS_OVER_THE_COUNTER_EXT])) - ? $data[self::FIELD_IS_OVER_THE_COUNTER_EXT] - : null; - if ($data[self::FIELD_IS_OVER_THE_COUNTER] instanceof FHIRBoolean) { - $this->setIsOverTheCounter($data[self::FIELD_IS_OVER_THE_COUNTER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IS_OVER_THE_COUNTER])) { - $this->setIsOverTheCounter(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IS_OVER_THE_COUNTER]] + $ext)); - } else if (is_array($data[self::FIELD_IS_OVER_THE_COUNTER])) { - $this->setIsOverTheCounter(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IS_OVER_THE_COUNTER]))); + if (isset($data[self::FIELD_IS_BRAND_EXT]) && is_array($data[self::FIELD_IS_BRAND_EXT])) { + $ext = $data[self::FIELD_IS_BRAND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsBrand($value); + } else if (is_array($value)) { + $this->setIsBrand(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsBrand(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIsBrand(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_IS_OVER_THE_COUNTER]) || isset($data[self::FIELD_IS_OVER_THE_COUNTER_EXT])) { + if (isset($data[self::FIELD_IS_OVER_THE_COUNTER])) { + $value = $data[self::FIELD_IS_OVER_THE_COUNTER]; } else { - $this->setIsOverTheCounter(new FHIRBoolean($data[self::FIELD_IS_OVER_THE_COUNTER])); + $value = null; + } + if (isset($data[self::FIELD_IS_OVER_THE_COUNTER_EXT]) && is_array($data[self::FIELD_IS_OVER_THE_COUNTER_EXT])) { + $ext = $data[self::FIELD_IS_OVER_THE_COUNTER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIsOverTheCounter($value); + } else if (is_array($value)) { + $this->setIsOverTheCounter(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIsOverTheCounter(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIsOverTheCounter(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_MANUFACTURER])) { @@ -321,20 +335,27 @@ public function __construct($data = null) $this->setPackage(new FHIRMedicationPackage($data[self::FIELD_PACKAGE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatus([FHIRMedicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationStatus([FHIRMedicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationStatus($ext)); } } } @@ -713,8 +734,8 @@ public function setStatus(FHIRMedicationStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -871,22 +892,38 @@ public function jsonSerialize() $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getImage())) { - $a[self::FIELD_IMAGE] = $vs; + $a[self::FIELD_IMAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IMAGE][] = $v; + } } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } } if (null !== ($v = $this->getIsBrand())) { $a[self::FIELD_IS_BRAND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_BRAND_EXT] = $enc; } } if (null !== ($v = $this->getIsOverTheCounter())) { $a[self::FIELD_IS_OVER_THE_COUNTER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IS_OVER_THE_COUNTER_EXT] = $enc; } } @@ -898,11 +935,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php index 527ec91091..e00a8cd643 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationAdministration.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRMedicationAdministration extends FHIRDomainResource implements PHPFHIR const FIELD_SUPPORTING_INFORMATION = 'supportingInformation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -480,20 +480,27 @@ public function __construct($data = null) $this->setDosage(new FHIRMedicationAdministrationDosage($data[self::FIELD_DOSAGE])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -553,20 +560,27 @@ public function __construct($data = null) $this->setMedicationReference(new FHIRReference($data[self::FIELD_MEDICATION_REFERENCE])); } } - if (isset($data[self::FIELD_NOT_GIVEN])) { - $ext = (isset($data[self::FIELD_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_NOT_GIVEN_EXT])) - ? $data[self::FIELD_NOT_GIVEN_EXT] - : null; - if ($data[self::FIELD_NOT_GIVEN] instanceof FHIRBoolean) { - $this->setNotGiven($data[self::FIELD_NOT_GIVEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOT_GIVEN])) { - $this->setNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NOT_GIVEN]] + $ext)); - } else if (is_array($data[self::FIELD_NOT_GIVEN])) { - $this->setNotGiven(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NOT_GIVEN]))); - } + if (isset($data[self::FIELD_NOT_GIVEN]) || isset($data[self::FIELD_NOT_GIVEN_EXT])) { + if (isset($data[self::FIELD_NOT_GIVEN])) { + $value = $data[self::FIELD_NOT_GIVEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOT_GIVEN_EXT]) && is_array($data[self::FIELD_NOT_GIVEN_EXT])) { + $ext = $data[self::FIELD_NOT_GIVEN_EXT]; } else { - $this->setNotGiven(new FHIRBoolean($data[self::FIELD_NOT_GIVEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNotGiven($value); + } else if (is_array($value)) { + $this->setNotGiven(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNotGiven(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotGiven(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -684,20 +698,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationAdministrationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationAdministrationStatus([FHIRMedicationAdministrationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationAdministrationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRMedicationAdministrationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationAdministrationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationAdministrationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationAdministrationStatus([FHIRMedicationAdministrationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationAdministrationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1814,8 +1835,8 @@ public function setSupportingInformation(array $supportingInformation = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2113,18 +2134,32 @@ public function jsonSerialize() $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if ([] !== ($vs = $this->getDevice())) { - $a[self::FIELD_DEVICE] = $vs; + $a[self::FIELD_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEVICE][] = $v; + } } if (null !== ($v = $this->getDosage())) { $a[self::FIELD_DOSAGE] = $v; } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -2132,10 +2167,22 @@ public function jsonSerialize() $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getEventHistory())) { - $a[self::FIELD_EVENT_HISTORY] = $vs; + $a[self::FIELD_EVENT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMedicationCodeableConcept())) { $a[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $v; @@ -2145,36 +2192,76 @@ public function jsonSerialize() } if (null !== ($v = $this->getNotGiven())) { $a[self::FIELD_NOT_GIVEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NOT_GIVEN_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getPrescription())) { $a[self::FIELD_PRESCRIPTION] = $v; } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonNotGiven())) { - $a[self::FIELD_REASON_NOT_GIVEN] = $vs; + $a[self::FIELD_REASON_NOT_GIVEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_NOT_GIVEN][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationAdministrationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationAdministrationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2182,7 +2269,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php index e8bf15fc3a..aaf9ddd007 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationDispense.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRMedicationDispense extends FHIRDomainResource implements PHPFHIRContai const FIELD_WHEN_PREPARED_EXT = '_whenPrepared'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -602,20 +602,27 @@ public function __construct($data = null) $this->setMedicationReference(new FHIRReference($data[self::FIELD_MEDICATION_REFERENCE])); } } - if (isset($data[self::FIELD_NOT_DONE])) { - $ext = (isset($data[self::FIELD_NOT_DONE_EXT]) && is_array($data[self::FIELD_NOT_DONE_EXT])) - ? $data[self::FIELD_NOT_DONE_EXT] - : null; - if ($data[self::FIELD_NOT_DONE] instanceof FHIRBoolean) { - $this->setNotDone($data[self::FIELD_NOT_DONE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOT_DONE])) { - $this->setNotDone(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NOT_DONE]] + $ext)); - } else if (is_array($data[self::FIELD_NOT_DONE])) { - $this->setNotDone(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NOT_DONE]))); - } + if (isset($data[self::FIELD_NOT_DONE]) || isset($data[self::FIELD_NOT_DONE_EXT])) { + if (isset($data[self::FIELD_NOT_DONE])) { + $value = $data[self::FIELD_NOT_DONE]; } else { - $this->setNotDone(new FHIRBoolean($data[self::FIELD_NOT_DONE])); + $value = null; + } + if (isset($data[self::FIELD_NOT_DONE_EXT]) && is_array($data[self::FIELD_NOT_DONE_EXT])) { + $ext = $data[self::FIELD_NOT_DONE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNotDone($value); + } else if (is_array($value)) { + $this->setNotDone(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNotDone(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotDone(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_NOT_DONE_REASON_CODEABLE_CONCEPT])) { @@ -711,20 +718,27 @@ public function __construct($data = null) $this->addReceiver(new FHIRReference($data[self::FIELD_RECEIVER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationDispenseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationDispenseStatus([FHIRMedicationDispenseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationDispenseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRMedicationDispenseStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationDispenseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationDispenseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationDispenseStatus([FHIRMedicationDispenseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationDispenseStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -766,36 +780,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_WHEN_HANDED_OVER])) { - $ext = (isset($data[self::FIELD_WHEN_HANDED_OVER_EXT]) && is_array($data[self::FIELD_WHEN_HANDED_OVER_EXT])) - ? $data[self::FIELD_WHEN_HANDED_OVER_EXT] - : null; - if ($data[self::FIELD_WHEN_HANDED_OVER] instanceof FHIRDateTime) { - $this->setWhenHandedOver($data[self::FIELD_WHEN_HANDED_OVER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN_HANDED_OVER])) { - $this->setWhenHandedOver(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_WHEN_HANDED_OVER]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN_HANDED_OVER])) { - $this->setWhenHandedOver(new FHIRDateTime(array_merge($ext, $data[self::FIELD_WHEN_HANDED_OVER]))); - } + if (isset($data[self::FIELD_WHEN_HANDED_OVER]) || isset($data[self::FIELD_WHEN_HANDED_OVER_EXT])) { + if (isset($data[self::FIELD_WHEN_HANDED_OVER])) { + $value = $data[self::FIELD_WHEN_HANDED_OVER]; } else { - $this->setWhenHandedOver(new FHIRDateTime($data[self::FIELD_WHEN_HANDED_OVER])); - } - } - if (isset($data[self::FIELD_WHEN_PREPARED])) { - $ext = (isset($data[self::FIELD_WHEN_PREPARED_EXT]) && is_array($data[self::FIELD_WHEN_PREPARED_EXT])) - ? $data[self::FIELD_WHEN_PREPARED_EXT] - : null; - if ($data[self::FIELD_WHEN_PREPARED] instanceof FHIRDateTime) { - $this->setWhenPrepared($data[self::FIELD_WHEN_PREPARED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_WHEN_PREPARED])) { - $this->setWhenPrepared(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_WHEN_PREPARED]] + $ext)); - } else if (is_array($data[self::FIELD_WHEN_PREPARED])) { - $this->setWhenPrepared(new FHIRDateTime(array_merge($ext, $data[self::FIELD_WHEN_PREPARED]))); + $value = null; + } + if (isset($data[self::FIELD_WHEN_HANDED_OVER_EXT]) && is_array($data[self::FIELD_WHEN_HANDED_OVER_EXT])) { + $ext = $data[self::FIELD_WHEN_HANDED_OVER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setWhenHandedOver($value); + } else if (is_array($value)) { + $this->setWhenHandedOver(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setWhenHandedOver(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setWhenHandedOver(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_WHEN_PREPARED]) || isset($data[self::FIELD_WHEN_PREPARED_EXT])) { + if (isset($data[self::FIELD_WHEN_PREPARED])) { + $value = $data[self::FIELD_WHEN_PREPARED]; } else { - $this->setWhenPrepared(new FHIRDateTime($data[self::FIELD_WHEN_PREPARED])); + $value = null; + } + if (isset($data[self::FIELD_WHEN_PREPARED_EXT]) && is_array($data[self::FIELD_WHEN_PREPARED_EXT])) { + $ext = $data[self::FIELD_WHEN_PREPARED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setWhenPrepared($value); + } else if (is_array($value)) { + $this->setWhenPrepared(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setWhenPrepared(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setWhenPrepared(new FHIRDateTime($ext)); } } } @@ -1979,8 +2007,8 @@ public function setWhenPrepared($whenPrepared = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2297,7 +2325,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAuthorizingPrescription())) { - $a[self::FIELD_AUTHORIZING_PRESCRIPTION] = $vs; + $a[self::FIELD_AUTHORIZING_PRESCRIPTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AUTHORIZING_PRESCRIPTION][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -2312,16 +2346,40 @@ public function jsonSerialize() $a[self::FIELD_DESTINATION] = $v; } if ([] !== ($vs = $this->getDetectedIssue())) { - $a[self::FIELD_DETECTED_ISSUE] = $vs; + $a[self::FIELD_DETECTED_ISSUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETECTED_ISSUE][] = $v; + } } if ([] !== ($vs = $this->getDosageInstruction())) { - $a[self::FIELD_DOSAGE_INSTRUCTION] = $vs; + $a[self::FIELD_DOSAGE_INSTRUCTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE_INSTRUCTION][] = $v; + } } if ([] !== ($vs = $this->getEventHistory())) { - $a[self::FIELD_EVENT_HISTORY] = $vs; + $a[self::FIELD_EVENT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getMedicationCodeableConcept())) { $a[self::FIELD_MEDICATION_CODEABLE_CONCEPT] = $v; @@ -2331,8 +2389,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getNotDone())) { $a[self::FIELD_NOT_DONE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NOT_DONE_EXT] = $enc; } } @@ -2343,24 +2403,50 @@ public function jsonSerialize() $a[self::FIELD_NOT_DONE_REASON_REFERENCE] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } if ([] !== ($vs = $this->getReceiver())) { - $a[self::FIELD_RECEIVER] = $vs; + $a[self::FIELD_RECEIVER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECEIVER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationDispenseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationDispenseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2371,25 +2457,38 @@ public function jsonSerialize() $a[self::FIELD_SUBSTITUTION] = $v; } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getWhenHandedOver())) { $a[self::FIELD_WHEN_HANDED_OVER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_WHEN_HANDED_OVER_EXT] = $enc; } } if (null !== ($v = $this->getWhenPrepared())) { $a[self::FIELD_WHEN_PREPARED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_WHEN_PREPARED_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php index 1c0dddb4d0..2ea0418c75 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -125,7 +125,7 @@ class FHIRMedicationRequest extends FHIRDomainResource implements PHPFHIRContain const FIELD_SUPPORTING_INFORMATION = 'supportingInformation'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -473,20 +473,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -625,20 +632,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRMedicationRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRMedicationRequestIntent([FHIRMedicationRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRMedicationRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; } else { - $this->setIntent(new FHIRMedicationRequestIntent($data[self::FIELD_INTENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRMedicationRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRMedicationRequestIntent([FHIRMedicationRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRMedicationRequestIntent($ext)); } } if (isset($data[self::FIELD_MEDICATION_CODEABLE_CONCEPT])) { @@ -680,20 +694,27 @@ public function __construct($data = null) $this->setPriorPrescription(new FHIRReference($data[self::FIELD_PRIOR_PRESCRIPTION])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRMedicationRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRMedicationRequestPriority([FHIRMedicationRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRMedicationRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRMedicationRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRMedicationRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRMedicationRequestPriority([FHIRMedicationRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRMedicationRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -746,20 +767,27 @@ public function __construct($data = null) $this->setRequester(new FHIRMedicationRequestRequester($data[self::FIELD_REQUESTER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationRequestStatus([FHIRMedicationRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationRequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationRequestStatus([FHIRMedicationRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1960,8 +1988,8 @@ public function setSupportingInformation(array $supportingInformation = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2257,13 +2285,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -2272,30 +2308,62 @@ public function jsonSerialize() $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if ([] !== ($vs = $this->getDetectedIssue())) { - $a[self::FIELD_DETECTED_ISSUE] = $vs; + $a[self::FIELD_DETECTED_ISSUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETECTED_ISSUE][] = $v; + } } if (null !== ($v = $this->getDispenseRequest())) { $a[self::FIELD_DISPENSE_REQUEST] = $v; } if ([] !== ($vs = $this->getDosageInstruction())) { - $a[self::FIELD_DOSAGE_INSTRUCTION] = $vs; + $a[self::FIELD_DOSAGE_INSTRUCTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE_INSTRUCTION][] = $v; + } } if ([] !== ($vs = $this->getEventHistory())) { - $a[self::FIELD_EVENT_HISTORY] = $vs; + $a[self::FIELD_EVENT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EVENT_HISTORY][] = $v; + } } if (null !== ($v = $this->getGroupIdentifier())) { $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } @@ -2306,23 +2374,43 @@ public function jsonSerialize() $a[self::FIELD_MEDICATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPriorPrescription())) { $a[self::FIELD_PRIOR_PRESCRIPTION] = $v; } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getRecorder())) { $a[self::FIELD_RECORDER] = $v; @@ -2332,8 +2420,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2344,7 +2434,16 @@ public function jsonSerialize() $a[self::FIELD_SUBSTITUTION] = $v; } if ([] !== ($vs = $this->getSupportingInformation())) { - $a[self::FIELD_SUPPORTING_INFORMATION] = $vs; + $a[self::FIELD_SUPPORTING_INFORMATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFORMATION][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php index c5c8ab8018..7410a38221 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMedicationStatement.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRMedicationStatement extends FHIRDomainResource implements PHPFHIRConta const FIELD_TAKEN_EXT = '_taken'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -438,20 +438,27 @@ public function __construct($data = null) $this->setContext(new FHIRReference($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_DATE_ASSERTED])) { - $ext = (isset($data[self::FIELD_DATE_ASSERTED_EXT]) && is_array($data[self::FIELD_DATE_ASSERTED_EXT])) - ? $data[self::FIELD_DATE_ASSERTED_EXT] - : null; - if ($data[self::FIELD_DATE_ASSERTED] instanceof FHIRDateTime) { - $this->setDateAsserted($data[self::FIELD_DATE_ASSERTED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_ASSERTED])) { - $this->setDateAsserted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_ASSERTED]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_ASSERTED])) { - $this->setDateAsserted(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_ASSERTED]))); - } + if (isset($data[self::FIELD_DATE_ASSERTED]) || isset($data[self::FIELD_DATE_ASSERTED_EXT])) { + if (isset($data[self::FIELD_DATE_ASSERTED])) { + $value = $data[self::FIELD_DATE_ASSERTED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_ASSERTED_EXT]) && is_array($data[self::FIELD_DATE_ASSERTED_EXT])) { + $ext = $data[self::FIELD_DATE_ASSERTED_EXT]; } else { - $this->setDateAsserted(new FHIRDateTime($data[self::FIELD_DATE_ASSERTED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateAsserted($value); + } else if (is_array($value)) { + $this->setDateAsserted(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateAsserted(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateAsserted(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DERIVED_FROM])) { @@ -490,20 +497,27 @@ public function __construct($data = null) $this->addDosage(new FHIRDosage($data[self::FIELD_DOSAGE])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -642,20 +656,27 @@ public function __construct($data = null) $this->addReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRMedicationStatementStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatementStatus([FHIRMedicationStatementStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRMedicationStatementStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRMedicationStatementStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationStatementStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRMedicationStatementStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRMedicationStatementStatus([FHIRMedicationStatementStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRMedicationStatementStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -665,20 +686,27 @@ public function __construct($data = null) $this->setSubject(new FHIRReference($data[self::FIELD_SUBJECT])); } } - if (isset($data[self::FIELD_TAKEN])) { - $ext = (isset($data[self::FIELD_TAKEN_EXT]) && is_array($data[self::FIELD_TAKEN_EXT])) - ? $data[self::FIELD_TAKEN_EXT] - : null; - if ($data[self::FIELD_TAKEN] instanceof FHIRMedicationStatementTaken) { - $this->setTaken($data[self::FIELD_TAKEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TAKEN])) { - $this->setTaken(new FHIRMedicationStatementTaken([FHIRMedicationStatementTaken::FIELD_VALUE => $data[self::FIELD_TAKEN]] + $ext)); - } else if (is_array($data[self::FIELD_TAKEN])) { - $this->setTaken(new FHIRMedicationStatementTaken(array_merge($ext, $data[self::FIELD_TAKEN]))); - } + if (isset($data[self::FIELD_TAKEN]) || isset($data[self::FIELD_TAKEN_EXT])) { + if (isset($data[self::FIELD_TAKEN])) { + $value = $data[self::FIELD_TAKEN]; } else { - $this->setTaken(new FHIRMedicationStatementTaken($data[self::FIELD_TAKEN])); + $value = null; + } + if (isset($data[self::FIELD_TAKEN_EXT]) && is_array($data[self::FIELD_TAKEN_EXT])) { + $ext = $data[self::FIELD_TAKEN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMedicationStatementTaken) { + $this->setTaken($value); + } else if (is_array($value)) { + $this->setTaken(new FHIRMedicationStatementTaken(array_merge($ext, $value))); + } else { + $this->setTaken(new FHIRMedicationStatementTaken([FHIRMedicationStatementTaken::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTaken(new FHIRMedicationStatementTaken($ext)); } } } @@ -1637,8 +1665,8 @@ public function setTaken(FHIRMedicationStatementTaken $taken = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1904,7 +1932,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -1914,21 +1948,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getDateAsserted())) { $a[self::FIELD_DATE_ASSERTED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_ASSERTED_EXT] = $enc; } } if ([] !== ($vs = $this->getDerivedFrom())) { - $a[self::FIELD_DERIVED_FROM] = $vs; + $a[self::FIELD_DERIVED_FROM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DERIVED_FROM][] = $v; + } } if ([] !== ($vs = $this->getDosage())) { - $a[self::FIELD_DOSAGE] = $vs; + $a[self::FIELD_DOSAGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DOSAGE][] = $v; + } } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -1936,7 +1986,13 @@ public function jsonSerialize() $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInformationSource())) { $a[self::FIELD_INFORMATION_SOURCE] = $v; @@ -1948,24 +2004,56 @@ public function jsonSerialize() $a[self::FIELD_MEDICATION_REFERENCE] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonNotTaken())) { - $a[self::FIELD_REASON_NOT_TAKEN] = $vs; + $a[self::FIELD_REASON_NOT_TAKEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_NOT_TAKEN][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationStatementStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationStatementStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1974,11 +2062,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getTaken())) { $a[self::FIELD_TAKEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMedicationStatementTaken::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMedicationStatementTaken::FIELD_VALUE]); $a[self::FIELD_TAKEN_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php index e23cc57a0a..24a62bfc6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -133,7 +133,7 @@ class FHIRMessageDefinition extends FHIRDomainResource implements PHPFHIRContain const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Defines the characteristics of a message that can be shared between systems, @@ -488,20 +488,27 @@ public function __construct($data = null) $this->setBase(new FHIRReference($data[self::FIELD_BASE])); } } - if (isset($data[self::FIELD_CATEGORY])) { - $ext = (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) - ? $data[self::FIELD_CATEGORY_EXT] - : null; - if ($data[self::FIELD_CATEGORY] instanceof FHIRMessageSignificanceCategory) { - $this->setCategory($data[self::FIELD_CATEGORY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $data[self::FIELD_CATEGORY]] + $ext)); - } else if (is_array($data[self::FIELD_CATEGORY])) { - $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $data[self::FIELD_CATEGORY]))); - } + if (isset($data[self::FIELD_CATEGORY]) || isset($data[self::FIELD_CATEGORY_EXT])) { + if (isset($data[self::FIELD_CATEGORY])) { + $value = $data[self::FIELD_CATEGORY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CATEGORY_EXT]) && is_array($data[self::FIELD_CATEGORY_EXT])) { + $ext = $data[self::FIELD_CATEGORY_EXT]; } else { - $this->setCategory(new FHIRMessageSignificanceCategory($data[self::FIELD_CATEGORY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMessageSignificanceCategory) { + $this->setCategory($value); + } else if (is_array($value)) { + $this->setCategory(new FHIRMessageSignificanceCategory(array_merge($ext, $value))); + } else { + $this->setCategory(new FHIRMessageSignificanceCategory([FHIRMessageSignificanceCategory::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCategory(new FHIRMessageSignificanceCategory($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -522,52 +529,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EVENT])) { @@ -577,20 +605,27 @@ public function __construct($data = null) $this->setEvent(new FHIRCoding($data[self::FIELD_EVENT])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FOCUS])) { @@ -636,20 +671,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARENT])) { @@ -670,36 +712,50 @@ public function __construct($data = null) $this->addParent(new FHIRReference($data[self::FIELD_PARENT])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_REPLACES])) { @@ -720,68 +776,96 @@ public function __construct($data = null) $this->addReplaces(new FHIRReference($data[self::FIELD_REPLACES])); } } - if (isset($data[self::FIELD_RESPONSE_REQUIRED])) { - $ext = (isset($data[self::FIELD_RESPONSE_REQUIRED_EXT]) && is_array($data[self::FIELD_RESPONSE_REQUIRED_EXT])) - ? $data[self::FIELD_RESPONSE_REQUIRED_EXT] - : null; - if ($data[self::FIELD_RESPONSE_REQUIRED] instanceof FHIRBoolean) { - $this->setResponseRequired($data[self::FIELD_RESPONSE_REQUIRED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSE_REQUIRED])) { - $this->setResponseRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_RESPONSE_REQUIRED]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSE_REQUIRED])) { - $this->setResponseRequired(new FHIRBoolean(array_merge($ext, $data[self::FIELD_RESPONSE_REQUIRED]))); - } + if (isset($data[self::FIELD_RESPONSE_REQUIRED]) || isset($data[self::FIELD_RESPONSE_REQUIRED_EXT])) { + if (isset($data[self::FIELD_RESPONSE_REQUIRED])) { + $value = $data[self::FIELD_RESPONSE_REQUIRED]; } else { - $this->setResponseRequired(new FHIRBoolean($data[self::FIELD_RESPONSE_REQUIRED])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_RESPONSE_REQUIRED_EXT]) && is_array($data[self::FIELD_RESPONSE_REQUIRED_EXT])) { + $ext = $data[self::FIELD_RESPONSE_REQUIRED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setResponseRequired($value); + } else if (is_array($value)) { + $this->setResponseRequired(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setResponseRequired(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponseRequired(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -802,20 +886,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1931,8 +2022,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2274,39 +2365,59 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAllowedResponse())) { - $a[self::FIELD_ALLOWED_RESPONSE] = $vs; + $a[self::FIELD_ALLOWED_RESPONSE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ALLOWED_RESPONSE][] = $v; + } } if (null !== ($v = $this->getBase())) { $a[self::FIELD_BASE] = $v; } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMessageSignificanceCategory::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMessageSignificanceCategory::FIELD_VALUE]); $a[self::FIELD_CATEGORY_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2315,85 +2426,136 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFocus())) { - $a[self::FIELD_FOCUS] = $vs; + $a[self::FIELD_FOCUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCUS][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParent())) { - $a[self::FIELD_PARENT] = $vs; + $a[self::FIELD_PARENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARENT][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getResponseRequired())) { $a[self::FIELD_RESPONSE_REQUIRED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_RESPONSE_REQUIRED_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php index 52cea49fd2..734cb8cb26 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRMessageHeader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRMessageHeader extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TIMESTAMP_EXT = '_timestamp'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -376,20 +376,27 @@ public function __construct($data = null) $this->setSource(new FHIRMessageHeaderSource($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_TIMESTAMP])) { - $ext = (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) - ? $data[self::FIELD_TIMESTAMP_EXT] - : null; - if ($data[self::FIELD_TIMESTAMP] instanceof FHIRInstant) { - $this->setTimestamp($data[self::FIELD_TIMESTAMP]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_TIMESTAMP]] + $ext)); - } else if (is_array($data[self::FIELD_TIMESTAMP])) { - $this->setTimestamp(new FHIRInstant(array_merge($ext, $data[self::FIELD_TIMESTAMP]))); - } + if (isset($data[self::FIELD_TIMESTAMP]) || isset($data[self::FIELD_TIMESTAMP_EXT])) { + if (isset($data[self::FIELD_TIMESTAMP])) { + $value = $data[self::FIELD_TIMESTAMP]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TIMESTAMP_EXT]) && is_array($data[self::FIELD_TIMESTAMP_EXT])) { + $ext = $data[self::FIELD_TIMESTAMP_EXT]; } else { - $this->setTimestamp(new FHIRInstant($data[self::FIELD_TIMESTAMP])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setTimestamp($value); + } else if (is_array($value)) { + $this->setTimestamp(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setTimestamp(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTimestamp(new FHIRInstant($ext)); } } } @@ -885,8 +892,8 @@ public function setTimestamp($timestamp = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1050,7 +1057,13 @@ public function jsonSerialize() $a[self::FIELD_AUTHOR] = $v; } if ([] !== ($vs = $this->getDestination())) { - $a[self::FIELD_DESTINATION] = $vs; + $a[self::FIELD_DESTINATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESTINATION][] = $v; + } } if (null !== ($v = $this->getEnterer())) { $a[self::FIELD_ENTERER] = $v; @@ -1059,7 +1072,13 @@ public function jsonSerialize() $a[self::FIELD_EVENT] = $v; } if ([] !== ($vs = $this->getFocus())) { - $a[self::FIELD_FOCUS] = $vs; + $a[self::FIELD_FOCUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCUS][] = $v; + } } if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v; @@ -1081,11 +1100,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getTimestamp())) { $a[self::FIELD_TIMESTAMP] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_TIMESTAMP_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php index cf3886c025..f71a654aeb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNamingSystem.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -114,7 +114,7 @@ class FHIRNamingSystem extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_USE_CONTEXT = 'useContext'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -342,36 +342,50 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -392,52 +406,73 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRNamingSystemType) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRNamingSystemType([FHIRNamingSystemType::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRNamingSystemType(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIRNamingSystemType($data[self::FIELD_KIND])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNamingSystemType) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRNamingSystemType(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRNamingSystemType([FHIRNamingSystemType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRNamingSystemType($ext)); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } if (isset($data[self::FIELD_REPLACED_BY])) { @@ -447,36 +482,50 @@ public function __construct($data = null) $this->setReplacedBy(new FHIRReference($data[self::FIELD_REPLACED_BY])); } } - if (isset($data[self::FIELD_RESPONSIBLE])) { - $ext = (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) - ? $data[self::FIELD_RESPONSIBLE_EXT] - : null; - if ($data[self::FIELD_RESPONSIBLE] instanceof FHIRString) { - $this->setResponsible($data[self::FIELD_RESPONSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_RESPONSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_RESPONSIBLE])) { - $this->setResponsible(new FHIRString(array_merge($ext, $data[self::FIELD_RESPONSIBLE]))); - } + if (isset($data[self::FIELD_RESPONSIBLE]) || isset($data[self::FIELD_RESPONSIBLE_EXT])) { + if (isset($data[self::FIELD_RESPONSIBLE])) { + $value = $data[self::FIELD_RESPONSIBLE]; } else { - $this->setResponsible(new FHIRString($data[self::FIELD_RESPONSIBLE])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_RESPONSIBLE_EXT]) && is_array($data[self::FIELD_RESPONSIBLE_EXT])) { + $ext = $data[self::FIELD_RESPONSIBLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setResponsible($value); + } else if (is_array($value)) { + $this->setResponsible(new FHIRString(array_merge($ext, $value))); + } else { + $this->setResponsible(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResponsible(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_TYPE])) { @@ -504,20 +553,27 @@ public function __construct($data = null) $this->addUniqueId(new FHIRNamingSystemUniqueId($data[self::FIELD_UNIQUE_ID])); } } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); - } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -1209,8 +1265,8 @@ public function setUseContext(array $useContext = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1437,43 +1493,65 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNamingSystemType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNamingSystemType::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } @@ -1482,15 +1560,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getResponsible())) { $a[self::FIELD_RESPONSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_RESPONSIBLE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1498,17 +1580,34 @@ public function jsonSerialize() $a[self::FIELD_TYPE] = $v; } if ([] !== ($vs = $this->getUniqueId())) { - $a[self::FIELD_UNIQUE_ID] = $vs; + $a[self::FIELD_UNIQUE_ID] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_UNIQUE_ID][] = $v; + } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php index 6a21b4b949..f53eb49721 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRNutritionOrder.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRNutritionOrder extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_SUPPLEMENT = 'supplement'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -297,20 +297,27 @@ public function __construct($data = null) $this->addAllergyIntolerance(new FHIRReference($data[self::FIELD_ALLERGY_INTOLERANCE])); } } - if (isset($data[self::FIELD_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) - ? $data[self::FIELD_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DATE_TIME] instanceof FHIRDateTime) { - $this->setDateTime($data[self::FIELD_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_TIME])) { - $this->setDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_TIME]))); - } + if (isset($data[self::FIELD_DATE_TIME]) || isset($data[self::FIELD_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DATE_TIME])) { + $value = $data[self::FIELD_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_TIME_EXT]) && is_array($data[self::FIELD_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DATE_TIME_EXT]; } else { - $this->setDateTime(new FHIRDateTime($data[self::FIELD_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateTime($value); + } else if (is_array($value)) { + $this->setDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_ENCOUNTER])) { @@ -402,20 +409,27 @@ public function __construct($data = null) $this->setPatient(new FHIRReference($data[self::FIELD_PATIENT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRNutritionOrderStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNutritionOrderStatus([FHIRNutritionOrderStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRNutritionOrderStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRNutritionOrderStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRNutritionOrderStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRNutritionOrderStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRNutritionOrderStatus([FHIRNutritionOrderStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRNutritionOrderStatus($ext)); } } if (isset($data[self::FIELD_SUPPLEMENT])) { @@ -1024,8 +1038,8 @@ public function setSupplement(array $supplement = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1207,12 +1221,20 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAllergyIntolerance())) { - $a[self::FIELD_ALLERGY_INTOLERANCE] = $vs; + $a[self::FIELD_ALLERGY_INTOLERANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ALLERGY_INTOLERANCE][] = $v; + } } if (null !== ($v = $this->getDateTime())) { $a[self::FIELD_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_TIME_EXT] = $enc; } } @@ -1223,13 +1245,31 @@ public function jsonSerialize() $a[self::FIELD_ENTERAL_FORMULA] = $v; } if ([] !== ($vs = $this->getExcludeFoodModifier())) { - $a[self::FIELD_EXCLUDE_FOOD_MODIFIER] = $vs; + $a[self::FIELD_EXCLUDE_FOOD_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_EXCLUDE_FOOD_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getFoodPreferenceModifier())) { - $a[self::FIELD_FOOD_PREFERENCE_MODIFIER] = $vs; + $a[self::FIELD_FOOD_PREFERENCE_MODIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOOD_PREFERENCE_MODIFIER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOralDiet())) { $a[self::FIELD_ORAL_DIET] = $v; @@ -1242,13 +1282,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRNutritionOrderStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRNutritionOrderStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupplement())) { - $a[self::FIELD_SUPPLEMENT] = $vs; + $a[self::FIELD_SUPPLEMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPLEMENT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRObservation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRObservation.php index 7c2b0d365c..4aeb8d3205 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRObservation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRObservation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRObservation extends FHIRDomainResource implements PHPFHIRContainedType const FIELD_VALUE_TIME_EXT = '_valueTime'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -616,20 +616,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_COMPONENT])) { @@ -671,20 +678,27 @@ public function __construct($data = null) $this->setDevice(new FHIRReference($data[self::FIELD_DEVICE])); } } - if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) - ? $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_EFFECTIVE_DATE_TIME] instanceof FHIRDateTime) { - $this->setEffectiveDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_EFFECTIVE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_EFFECTIVE_DATE_TIME])) { - $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_EFFECTIVE_DATE_TIME]))); - } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME]) || isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME])) { + $value = $data[self::FIELD_EFFECTIVE_DATE_TIME]; } else { - $this->setEffectiveDateTime(new FHIRDateTime($data[self::FIELD_EFFECTIVE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]) && is_array($data[self::FIELD_EFFECTIVE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_EFFECTIVE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setEffectiveDateTime($value); + } else if (is_array($value)) { + $this->setEffectiveDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setEffectiveDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEffectiveDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -719,20 +733,27 @@ public function __construct($data = null) $this->setInterpretation(new FHIRCodeableConcept($data[self::FIELD_INTERPRETATION])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRInstant) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRInstant(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; } else { - $this->setIssued(new FHIRInstant($data[self::FIELD_ISSUED])); + $value = null; + } + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIssued(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_METHOD])) { @@ -803,20 +824,27 @@ public function __construct($data = null) $this->setSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRObservationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRObservationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRObservationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRObservationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -833,20 +861,27 @@ public function __construct($data = null) $this->setValueAttachment(new FHIRAttachment($data[self::FIELD_VALUE_ATTACHMENT])); } } - if (isset($data[self::FIELD_VALUE_BOOLEAN])) { - $ext = (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) - ? $data[self::FIELD_VALUE_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_VALUE_BOOLEAN] instanceof FHIRBoolean) { - $this->setValueBoolean($data[self::FIELD_VALUE_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_VALUE_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_BOOLEAN])) { - $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_VALUE_BOOLEAN]))); - } + if (isset($data[self::FIELD_VALUE_BOOLEAN]) || isset($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_VALUE_BOOLEAN])) { + $value = $data[self::FIELD_VALUE_BOOLEAN]; } else { - $this->setValueBoolean(new FHIRBoolean($data[self::FIELD_VALUE_BOOLEAN])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_BOOLEAN_EXT]) && is_array($data[self::FIELD_VALUE_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_VALUE_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setValueBoolean($value); + } else if (is_array($value)) { + $this->setValueBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setValueBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_VALUE_CODEABLE_CONCEPT])) { @@ -856,20 +891,27 @@ public function __construct($data = null) $this->setValueCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_VALUE_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_VALUE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) - ? $data[self::FIELD_VALUE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_DATE_TIME] instanceof FHIRDateTime) { - $this->setValueDateTime($data[self::FIELD_VALUE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_VALUE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_DATE_TIME])) { - $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_VALUE_DATE_TIME]))); - } + if (isset($data[self::FIELD_VALUE_DATE_TIME]) || isset($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_DATE_TIME])) { + $value = $data[self::FIELD_VALUE_DATE_TIME]; } else { - $this->setValueDateTime(new FHIRDateTime($data[self::FIELD_VALUE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_VALUE_DATE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setValueDateTime($value); + } else if (is_array($value)) { + $this->setValueDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setValueDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_VALUE_PERIOD])) { @@ -907,36 +949,50 @@ public function __construct($data = null) $this->setValueSampledData(new FHIRSampledData($data[self::FIELD_VALUE_SAMPLED_DATA])); } } - if (isset($data[self::FIELD_VALUE_STRING])) { - $ext = (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) - ? $data[self::FIELD_VALUE_STRING_EXT] - : null; - if ($data[self::FIELD_VALUE_STRING] instanceof FHIRString) { - $this->setValueString($data[self::FIELD_VALUE_STRING]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VALUE_STRING]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_STRING])) { - $this->setValueString(new FHIRString(array_merge($ext, $data[self::FIELD_VALUE_STRING]))); - } + if (isset($data[self::FIELD_VALUE_STRING]) || isset($data[self::FIELD_VALUE_STRING_EXT])) { + if (isset($data[self::FIELD_VALUE_STRING])) { + $value = $data[self::FIELD_VALUE_STRING]; } else { - $this->setValueString(new FHIRString($data[self::FIELD_VALUE_STRING])); - } - } - if (isset($data[self::FIELD_VALUE_TIME])) { - $ext = (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) - ? $data[self::FIELD_VALUE_TIME_EXT] - : null; - if ($data[self::FIELD_VALUE_TIME] instanceof FHIRTime) { - $this->setValueTime($data[self::FIELD_VALUE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $data[self::FIELD_VALUE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_VALUE_TIME])) { - $this->setValueTime(new FHIRTime(array_merge($ext, $data[self::FIELD_VALUE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_VALUE_STRING_EXT]) && is_array($data[self::FIELD_VALUE_STRING_EXT])) { + $ext = $data[self::FIELD_VALUE_STRING_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setValueString($value); + } else if (is_array($value)) { + $this->setValueString(new FHIRString(array_merge($ext, $value))); + } else { + $this->setValueString(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setValueString(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_VALUE_TIME]) || isset($data[self::FIELD_VALUE_TIME_EXT])) { + if (isset($data[self::FIELD_VALUE_TIME])) { + $value = $data[self::FIELD_VALUE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VALUE_TIME_EXT]) && is_array($data[self::FIELD_VALUE_TIME_EXT])) { + $ext = $data[self::FIELD_VALUE_TIME_EXT]; } else { - $this->setValueTime(new FHIRTime($data[self::FIELD_VALUE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTime) { + $this->setValueTime($value); + } else if (is_array($value)) { + $this->setValueTime(new FHIRTime(array_merge($ext, $value))); + } else { + $this->setValueTime(new FHIRTime([FHIRTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setValueTime(new FHIRTime($ext)); } } } @@ -2278,8 +2334,8 @@ public function setValueTime($valueTime = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2643,26 +2699,46 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getBodySite())) { $a[self::FIELD_BODY_SITE] = $v; } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getComponent())) { - $a[self::FIELD_COMPONENT] = $vs; + $a[self::FIELD_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPONENT][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; @@ -2675,8 +2751,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getEffectiveDateTime())) { $a[self::FIELD_EFFECTIVE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_EFFECTIVE_DATE_TIME_EXT] = $enc; } } @@ -2684,15 +2762,23 @@ public function jsonSerialize() $a[self::FIELD_EFFECTIVE_PERIOD] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getInterpretation())) { $a[self::FIELD_INTERPRETATION] = $v; } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } @@ -2700,21 +2786,41 @@ public function jsonSerialize() $a[self::FIELD_METHOD] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getReferenceRange())) { - $a[self::FIELD_REFERENCE_RANGE] = $vs; + $a[self::FIELD_REFERENCE_RANGE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REFERENCE_RANGE][] = $v; + } } if ([] !== ($vs = $this->getRelated())) { - $a[self::FIELD_RELATED] = $vs; + $a[self::FIELD_RELATED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED][] = $v; + } } if (null !== ($v = $this->getSpecimen())) { $a[self::FIELD_SPECIMEN] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2726,8 +2832,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueBoolean())) { $a[self::FIELD_VALUE_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_VALUE_BOOLEAN_EXT] = $enc; } } @@ -2736,8 +2844,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueDateTime())) { $a[self::FIELD_VALUE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_VALUE_DATE_TIME_EXT] = $enc; } } @@ -2758,18 +2868,25 @@ public function jsonSerialize() } if (null !== ($v = $this->getValueString())) { $a[self::FIELD_VALUE_STRING] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VALUE_STRING_EXT] = $enc; } } if (null !== ($v = $this->getValueTime())) { $a[self::FIELD_VALUE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTime::FIELD_VALUE]); $a[self::FIELD_VALUE_TIME_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php index 6c5165c988..8705e96893 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -136,7 +136,7 @@ class FHIROperationDefinition extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -462,36 +462,50 @@ public function __construct($data = null) $this->setBase(new FHIRReference($data[self::FIELD_BASE])); } } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); - } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); - } - } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -512,84 +526,119 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_IDEMPOTENT])) { - $ext = (isset($data[self::FIELD_IDEMPOTENT_EXT]) && is_array($data[self::FIELD_IDEMPOTENT_EXT])) - ? $data[self::FIELD_IDEMPOTENT_EXT] - : null; - if ($data[self::FIELD_IDEMPOTENT] instanceof FHIRBoolean) { - $this->setIdempotent($data[self::FIELD_IDEMPOTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IDEMPOTENT])) { - $this->setIdempotent(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IDEMPOTENT]] + $ext)); - } else if (is_array($data[self::FIELD_IDEMPOTENT])) { - $this->setIdempotent(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IDEMPOTENT]))); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_IDEMPOTENT]) || isset($data[self::FIELD_IDEMPOTENT_EXT])) { + if (isset($data[self::FIELD_IDEMPOTENT])) { + $value = $data[self::FIELD_IDEMPOTENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IDEMPOTENT_EXT]) && is_array($data[self::FIELD_IDEMPOTENT_EXT])) { + $ext = $data[self::FIELD_IDEMPOTENT_EXT]; } else { - $this->setIdempotent(new FHIRBoolean($data[self::FIELD_IDEMPOTENT])); - } - } - if (isset($data[self::FIELD_INSTANCE])) { - $ext = (isset($data[self::FIELD_INSTANCE_EXT]) && is_array($data[self::FIELD_INSTANCE_EXT])) - ? $data[self::FIELD_INSTANCE_EXT] - : null; - if ($data[self::FIELD_INSTANCE] instanceof FHIRBoolean) { - $this->setInstance($data[self::FIELD_INSTANCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INSTANCE])) { - $this->setInstance(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_INSTANCE]] + $ext)); - } else if (is_array($data[self::FIELD_INSTANCE])) { - $this->setInstance(new FHIRBoolean(array_merge($ext, $data[self::FIELD_INSTANCE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setIdempotent($value); + } else if (is_array($value)) { + $this->setIdempotent(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setIdempotent(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIdempotent(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_INSTANCE]) || isset($data[self::FIELD_INSTANCE_EXT])) { + if (isset($data[self::FIELD_INSTANCE])) { + $value = $data[self::FIELD_INSTANCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INSTANCE_EXT]) && is_array($data[self::FIELD_INSTANCE_EXT])) { + $ext = $data[self::FIELD_INSTANCE_EXT]; } else { - $this->setInstance(new FHIRBoolean($data[self::FIELD_INSTANCE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setInstance($value); + } else if (is_array($value)) { + $this->setInstance(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setInstance(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setInstance(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -610,36 +659,50 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIROperationKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIROperationKind([FHIROperationKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIROperationKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; } else { - $this->setKind(new FHIROperationKind($data[self::FIELD_KIND])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIROperationKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIROperationKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIROperationKind([FHIROperationKind::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setKind(new FHIROperationKind($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OVERLOAD])) { @@ -678,129 +741,180 @@ public function __construct($data = null) $this->addParameter(new FHIROperationDefinitionParameter($data[self::FIELD_PARAMETER])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_RESOURCE])) { - $ext = (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) - ? $data[self::FIELD_RESOURCE_EXT] - : null; - if (is_array($data[self::FIELD_RESOURCE])) { - foreach($data[self::FIELD_RESOURCE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRResourceType) { - $this->addResource($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addResource(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addResource(new FHIRResourceType(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_RESOURCE]) || isset($data[self::FIELD_RESOURCE_EXT])) { + if (isset($data[self::FIELD_RESOURCE])) { + $value = $data[self::FIELD_RESOURCE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RESOURCE_EXT]) && is_array($data[self::FIELD_RESOURCE_EXT])) { + $ext = $data[self::FIELD_RESOURCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->addResource($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRResourceType) { + $this->addResource($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addResource(new FHIRResourceType(array_merge($v, $iext))); + } else { + $this->addResource(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addResource(new FHIRResourceType($v)); } + } elseif (is_array($value)) { + $this->addResource(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->addResource(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_RESOURCE] instanceof FHIRResourceType) { - $this->addResource($data[self::FIELD_RESOURCE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_RESOURCE])) { - $this->addResource(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_RESOURCE]] + $ext)); - } else { - $this->addResource(new FHIRResourceType($data[self::FIELD_RESOURCE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addResource(new FHIRResourceType($iext)); } + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_SYSTEM])) { - $ext = (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) - ? $data[self::FIELD_SYSTEM_EXT] - : null; - if ($data[self::FIELD_SYSTEM] instanceof FHIRBoolean) { - $this->setSystem($data[self::FIELD_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_SYSTEM])) { - $this->setSystem(new FHIRBoolean(array_merge($ext, $data[self::FIELD_SYSTEM]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_SYSTEM]) || isset($data[self::FIELD_SYSTEM_EXT])) { + if (isset($data[self::FIELD_SYSTEM])) { + $value = $data[self::FIELD_SYSTEM]; } else { - $this->setSystem(new FHIRBoolean($data[self::FIELD_SYSTEM])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRBoolean) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRBoolean(array_merge($ext, $data[self::FIELD_TYPE]))); + $value = null; + } + if (isset($data[self::FIELD_SYSTEM_EXT]) && is_array($data[self::FIELD_SYSTEM_EXT])) { + $ext = $data[self::FIELD_SYSTEM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setSystem($value); + } else if (is_array($value)) { + $this->setSystem(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setSystem(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setSystem(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRBoolean($data[self::FIELD_TYPE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setType(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -821,20 +935,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1921,8 +2042,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2285,146 +2406,219 @@ public function jsonSerialize() } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getIdempotent())) { $a[self::FIELD_IDEMPOTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IDEMPOTENT_EXT] = $enc; } } if (null !== ($v = $this->getInstance())) { $a[self::FIELD_INSTANCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_INSTANCE_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIROperationKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIROperationKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getOverload())) { - $a[self::FIELD_OVERLOAD] = $vs; + $a[self::FIELD_OVERLOAD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OVERLOAD][] = $v; + } } if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getResource())) { $a[self::FIELD_RESOURCE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_RESOURCE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_RESOURCE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRResourceType::FIELD_VALUE]) || array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_RESOURCE_EXT][] = null; + unset($enc[FHIRResourceType::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_RESOURCE_EXT] = $encs; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSystem())) { $a[self::FIELD_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_SYSTEM_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php index 608c612a64..5ea884ff1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROperationOutcome.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -83,7 +83,7 @@ class FHIROperationOutcome extends FHIRDomainResource implements PHPFHIRContaine const FIELD_ISSUE = 'issue'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A collection of error, warning or information messages that result from a system @@ -227,8 +227,8 @@ public function setIssue(array $issue = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -308,7 +308,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getIssue())) { - $a[self::FIELD_ISSUE] = $vs; + $a[self::FIELD_ISSUE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ISSUE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROrganization.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROrganization.php index 8bccb7528c..eb714d1a90 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROrganization.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIROrganization.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIROrganization extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -246,20 +246,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -280,33 +287,42 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_ALIAS])) { - $ext = (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) - ? $data[self::FIELD_ALIAS_EXT] - : null; - if (is_array($data[self::FIELD_ALIAS])) { - foreach($data[self::FIELD_ALIAS] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addAlias($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addAlias(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_ALIAS]) || isset($data[self::FIELD_ALIAS_EXT])) { + if (isset($data[self::FIELD_ALIAS])) { + $value = $data[self::FIELD_ALIAS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ALIAS_EXT]) && is_array($data[self::FIELD_ALIAS_EXT])) { + $ext = $data[self::FIELD_ALIAS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addAlias($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addAlias($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addAlias(new FHIRString(array_merge($v, $iext))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addAlias(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addAlias(new FHIRString(array_merge($ext, $value))); + } else { + $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addAlias(new FHIRString($iext)); } - } elseif ($data[self::FIELD_ALIAS] instanceof FHIRString) { - $this->addAlias($data[self::FIELD_ALIAS]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_ALIAS])) { - $this->addAlias(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ALIAS]] + $ext)); - } else { - $this->addAlias(new FHIRString($data[self::FIELD_ALIAS])); } } if (isset($data[self::FIELD_CONTACT])) { @@ -363,20 +379,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PART_OF])) { @@ -988,8 +1011,8 @@ public function setType(array $type = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1182,42 +1205,78 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if ([] !== ($vs = $this->getAlias())) { $a[self::FIELD_ALIAS] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_ALIAS][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_ALIAS_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_ALIAS_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_ALIAS_EXT] = $encs; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -1225,10 +1284,25 @@ public function jsonSerialize() $a[self::FIELD_PART_OF] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } } if ([] !== ($vs = $this->getType())) { - $a[self::FIELD_TYPE] = $vs; + $a[self::FIELD_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TYPE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPatient.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPatient.php index f28530432c..39f89753c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPatient.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPatient.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -123,7 +123,7 @@ class FHIRPatient extends FHIRDomainResource implements PHPFHIRContainedTypeInte const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -362,20 +362,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -403,20 +410,27 @@ public function __construct($data = null) $this->setAnimal(new FHIRPatientAnimal($data[self::FIELD_ANIMAL])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; + } + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_COMMUNICATION])) { @@ -455,52 +469,73 @@ public function __construct($data = null) $this->addContact(new FHIRPatientContact($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) - ? $data[self::FIELD_DECEASED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_DECEASED_BOOLEAN] instanceof FHIRBoolean) { - $this->setDeceasedBoolean($data[self::FIELD_DECEASED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DECEASED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_BOOLEAN])) { - $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DECEASED_BOOLEAN]))); - } + if (isset($data[self::FIELD_DECEASED_BOOLEAN]) || isset($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_DECEASED_BOOLEAN])) { + $value = $data[self::FIELD_DECEASED_BOOLEAN]; } else { - $this->setDeceasedBoolean(new FHIRBoolean($data[self::FIELD_DECEASED_BOOLEAN])); - } - } - if (isset($data[self::FIELD_DECEASED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_DECEASED_DATE_TIME_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_TIME_EXT])) - ? $data[self::FIELD_DECEASED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_DECEASED_DATE_TIME] instanceof FHIRDateTime) { - $this->setDeceasedDateTime($data[self::FIELD_DECEASED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DECEASED_DATE_TIME])) { - $this->setDeceasedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DECEASED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_DECEASED_DATE_TIME])) { - $this->setDeceasedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DECEASED_DATE_TIME]))); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_BOOLEAN_EXT]) && is_array($data[self::FIELD_DECEASED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_DECEASED_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDeceasedBoolean($value); + } else if (is_array($value)) { + $this->setDeceasedBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDeceasedBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_DECEASED_DATE_TIME]) || isset($data[self::FIELD_DECEASED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_DECEASED_DATE_TIME])) { + $value = $data[self::FIELD_DECEASED_DATE_TIME]; } else { - $this->setDeceasedDateTime(new FHIRDateTime($data[self::FIELD_DECEASED_DATE_TIME])); - } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); + $value = null; + } + if (isset($data[self::FIELD_DECEASED_DATE_TIME_EXT]) && is_array($data[self::FIELD_DECEASED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_DECEASED_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDeceasedDateTime($value); + } else if (is_array($value)) { + $this->setDeceasedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDeceasedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDeceasedDateTime(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_GENERAL_PRACTITIONER])) { @@ -571,36 +606,50 @@ public function __construct($data = null) $this->setMaritalStatus(new FHIRCodeableConcept($data[self::FIELD_MARITAL_STATUS])); } } - if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $ext = (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) - ? $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] instanceof FHIRBoolean) { - $this->setMultipleBirthBoolean($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $this->setMultipleBirthBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { - $this->setMultipleBirthBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]))); - } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]) || isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])) { + $value = $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN]; } else { - $this->setMultipleBirthBoolean(new FHIRBoolean($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN])); - } - } - if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $ext = (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) - ? $data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT] - : null; - if ($data[self::FIELD_MULTIPLE_BIRTH_INTEGER] instanceof FHIRInteger) { - $this->setMultipleBirthInteger($data[self::FIELD_MULTIPLE_BIRTH_INTEGER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $this->setMultipleBirthInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]] + $ext)); - } else if (is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { - $this->setMultipleBirthInteger(new FHIRInteger(array_merge($ext, $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]))); + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setMultipleBirthBoolean($value); + } else if (is_array($value)) { + $this->setMultipleBirthBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setMultipleBirthBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMultipleBirthBoolean(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER]) || isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) { + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])) { + $value = $data[self::FIELD_MULTIPLE_BIRTH_INTEGER]; } else { - $this->setMultipleBirthInteger(new FHIRInteger($data[self::FIELD_MULTIPLE_BIRTH_INTEGER])); + $value = null; + } + if (isset($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]) && is_array($data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT])) { + $ext = $data[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setMultipleBirthInteger($value); + } else if (is_array($value)) { + $this->setMultipleBirthInteger(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setMultipleBirthInteger(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setMultipleBirthInteger(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_NAME])) { @@ -1560,8 +1609,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1854,59 +1903,105 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getAnimal())) { $a[self::FIELD_ANIMAL] = $v; } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDeceasedBoolean())) { $a[self::FIELD_DECEASED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DECEASED_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getDeceasedDateTime())) { $a[self::FIELD_DECEASED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DECEASED_DATE_TIME_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getGeneralPractitioner())) { - $a[self::FIELD_GENERAL_PRACTITIONER] = $vs; + $a[self::FIELD_GENERAL_PRACTITIONER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GENERAL_PRACTITIONER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; @@ -1916,26 +2011,51 @@ public function jsonSerialize() } if (null !== ($v = $this->getMultipleBirthBoolean())) { $a[self::FIELD_MULTIPLE_BIRTH_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_BIRTH_BOOLEAN_EXT] = $enc; } } if (null !== ($v = $this->getMultipleBirthInteger())) { $a[self::FIELD_MULTIPLE_BIRTH_INTEGER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_MULTIPLE_BIRTH_INTEGER_EXT] = $enc; } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php index 2bad715fc1..35d283c140 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentNotice.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRPaymentNotice extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -238,20 +238,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -307,36 +314,50 @@ public function __construct($data = null) $this->setResponse(new FHIRReference($data[self::FIELD_RESPONSE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS_DATE])) { - $ext = (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) - ? $data[self::FIELD_STATUS_DATE_EXT] - : null; - if ($data[self::FIELD_STATUS_DATE] instanceof FHIRDate) { - $this->setStatusDate($data[self::FIELD_STATUS_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_STATUS_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS_DATE])) { - $this->setStatusDate(new FHIRDate(array_merge($ext, $data[self::FIELD_STATUS_DATE]))); + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); + } + } + if (isset($data[self::FIELD_STATUS_DATE]) || isset($data[self::FIELD_STATUS_DATE_EXT])) { + if (isset($data[self::FIELD_STATUS_DATE])) { + $value = $data[self::FIELD_STATUS_DATE]; } else { - $this->setStatusDate(new FHIRDate($data[self::FIELD_STATUS_DATE])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_DATE_EXT]) && is_array($data[self::FIELD_STATUS_DATE_EXT])) { + $ext = $data[self::FIELD_STATUS_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setStatusDate($value); + } else if (is_array($value)) { + $this->setStatusDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setStatusDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatusDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -731,8 +752,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -883,13 +904,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -908,21 +937,28 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStatusDate())) { $a[self::FIELD_STATUS_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_STATUS_DATE_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php index 034fb90d8c..37276d4793 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliation.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRPaymentReconciliation extends FHIRDomainResource implements PHPFHIRCon const FIELD_TOTAL = 'total'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -289,20 +289,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DETAIL])) { @@ -323,20 +330,27 @@ public function __construct($data = null) $this->addDetail(new FHIRPaymentReconciliationDetail($data[self::FIELD_DETAIL])); } } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); - } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_FORM])) { @@ -424,20 +438,27 @@ public function __construct($data = null) $this->setRequestProvider(new FHIRReference($data[self::FIELD_REQUEST_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_TOTAL])) { @@ -1000,8 +1021,8 @@ public function setTotal(FHIRMoney $total = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1190,18 +1211,28 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getDetail())) { - $a[self::FIELD_DETAIL] = $vs; + $a[self::FIELD_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DETAIL][] = $v; + } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } @@ -1209,7 +1240,13 @@ public function jsonSerialize() $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -1221,7 +1258,13 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getProcessNote())) { - $a[self::FIELD_PROCESS_NOTE] = $vs; + $a[self::FIELD_PROCESS_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESS_NOTE][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -1234,14 +1277,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTotal())) { $a[self::FIELD_TOTAL] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPerson.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPerson.php index 6926490643..41225633af 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRPerson extends FHIRDomainResource implements PHPFHIRContainedTypeInter const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -241,20 +241,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -275,36 +282,50 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -884,8 +905,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1064,45 +1085,84 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLink())) { - $a[self::FIELD_LINK] = $vs; + $a[self::FIELD_LINK] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LINK][] = $v; + } } if (null !== ($v = $this->getManagingOrganization())) { $a[self::FIELD_MANAGING_ORGANIZATION] = $v; } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if (null !== ($v = $this->getPhoto())) { $a[self::FIELD_PHOTO] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php index 3f95e6f2f9..bdb59b6666 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPlanDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -140,7 +140,7 @@ class FHIRPlanDefinition extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This resource allows for the definition of various types of plans as a sharable, @@ -541,20 +541,27 @@ public function __construct($data = null) $this->addAction(new FHIRPlanDefinitionAction($data[self::FIELD_ACTION])); } } - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -593,52 +600,73 @@ public function __construct($data = null) $this->addContributor(new FHIRContributor($data[self::FIELD_CONTRIBUTOR])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -648,20 +676,27 @@ public function __construct($data = null) $this->setEffectivePeriod(new FHIRPeriod($data[self::FIELD_EFFECTIVE_PERIOD])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_GOAL])) { @@ -718,20 +753,27 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_LIBRARY])) { @@ -752,52 +794,73 @@ public function __construct($data = null) $this->addLibrary(new FHIRReference($data[self::FIELD_LIBRARY])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -818,36 +881,50 @@ public function __construct($data = null) $this->addRelatedArtifact(new FHIRRelatedArtifact($data[self::FIELD_RELATED_ARTIFACT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -875,36 +952,50 @@ public function __construct($data = null) $this->setType(new FHIRCodeableConcept($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -925,20 +1016,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2288,8 +2386,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2686,39 +2784,65 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getContributor())) { - $a[self::FIELD_CONTRIBUTOR] = $vs; + $a[self::FIELD_CONTRIBUTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRIBUTOR][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2727,98 +2851,163 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getGoal())) { - $a[self::FIELD_GOAL] = $vs; + $a[self::FIELD_GOAL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GOAL][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getLibrary())) { - $a[self::FIELD_LIBRARY] = $vs; + $a[self::FIELD_LIBRARY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LIBRARY][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitioner.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitioner.php index 8c89bbffbd..a64fa59958 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitioner.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitioner.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRPractitioner extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -245,20 +245,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -279,20 +286,27 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; + } + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_COMMUNICATION])) { @@ -313,20 +327,27 @@ public function __construct($data = null) $this->addCommunication(new FHIRCodeableConcept($data[self::FIELD_COMMUNICATION])); } } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); - } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -974,8 +995,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1168,45 +1189,96 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCommunication())) { - $a[self::FIELD_COMMUNICATION] = $vs; + $a[self::FIELD_COMMUNICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION][] = $v; + } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if ([] !== ($vs = $this->getQualification())) { - $a[self::FIELD_QUALIFICATION] = $vs; + $a[self::FIELD_QUALIFICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUALIFICATION][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php index 3daba6d8de..599097d0e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRPractitionerRole.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -106,7 +106,7 @@ class FHIRPractitionerRole extends FHIRDomainResource implements PHPFHIRContaine const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -290,36 +290,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $value = null; } - } - if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $ext = (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) - ? $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] - : null; - if ($data[self::FIELD_AVAILABILITY_EXCEPTIONS] instanceof FHIRString) { - $this->setAvailabilityExceptions($data[self::FIELD_AVAILABILITY_EXCEPTIONS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_AVAILABILITY_EXCEPTIONS]] + $ext)); - } else if (is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { - $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $data[self::FIELD_AVAILABILITY_EXCEPTIONS]))); + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS]) || isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS])) { + $value = $data[self::FIELD_AVAILABILITY_EXCEPTIONS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]) && is_array($data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT])) { + $ext = $data[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT]; } else { - $this->setAvailabilityExceptions(new FHIRString($data[self::FIELD_AVAILABILITY_EXCEPTIONS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAvailabilityExceptions($value); + } else if (is_array($value)) { + $this->setAvailabilityExceptions(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAvailabilityExceptions(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAvailabilityExceptions(new FHIRString($ext)); } } if (isset($data[self::FIELD_AVAILABLE_TIME])) { @@ -1226,8 +1240,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1458,38 +1472,84 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if (null !== ($v = $this->getAvailabilityExceptions())) { $a[self::FIELD_AVAILABILITY_EXCEPTIONS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_AVAILABILITY_EXCEPTIONS_EXT] = $enc; } } if ([] !== ($vs = $this->getAvailableTime())) { - $a[self::FIELD_AVAILABLE_TIME] = $vs; + $a[self::FIELD_AVAILABLE_TIME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AVAILABLE_TIME][] = $v; + } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getEndpoint())) { - $a[self::FIELD_ENDPOINT] = $vs; + $a[self::FIELD_ENDPOINT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENDPOINT][] = $v; + } } if ([] !== ($vs = $this->getHealthcareService())) { - $a[self::FIELD_HEALTHCARE_SERVICE] = $vs; + $a[self::FIELD_HEALTHCARE_SERVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_HEALTHCARE_SERVICE][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getLocation())) { - $a[self::FIELD_LOCATION] = $vs; + $a[self::FIELD_LOCATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_LOCATION][] = $v; + } } if ([] !== ($vs = $this->getNotAvailable())) { - $a[self::FIELD_NOT_AVAILABLE] = $vs; + $a[self::FIELD_NOT_AVAILABLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOT_AVAILABLE][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -1501,10 +1561,25 @@ public function jsonSerialize() $a[self::FIELD_PRACTITIONER] = $v; } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedure.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedure.php index 2652a8baaa..b2ab6c0569 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedure.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedure.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRProcedure extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_USED_REFERENCE = 'usedReference'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -651,20 +651,27 @@ public function __construct($data = null) $this->setLocation(new FHIRReference($data[self::FIELD_LOCATION])); } } - if (isset($data[self::FIELD_NOT_DONE])) { - $ext = (isset($data[self::FIELD_NOT_DONE_EXT]) && is_array($data[self::FIELD_NOT_DONE_EXT])) - ? $data[self::FIELD_NOT_DONE_EXT] - : null; - if ($data[self::FIELD_NOT_DONE] instanceof FHIRBoolean) { - $this->setNotDone($data[self::FIELD_NOT_DONE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NOT_DONE])) { - $this->setNotDone(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NOT_DONE]] + $ext)); - } else if (is_array($data[self::FIELD_NOT_DONE])) { - $this->setNotDone(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NOT_DONE]))); - } + if (isset($data[self::FIELD_NOT_DONE]) || isset($data[self::FIELD_NOT_DONE_EXT])) { + if (isset($data[self::FIELD_NOT_DONE])) { + $value = $data[self::FIELD_NOT_DONE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NOT_DONE_EXT]) && is_array($data[self::FIELD_NOT_DONE_EXT])) { + $ext = $data[self::FIELD_NOT_DONE_EXT]; } else { - $this->setNotDone(new FHIRBoolean($data[self::FIELD_NOT_DONE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNotDone($value); + } else if (is_array($value)) { + $this->setNotDone(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNotDone(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNotDone(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_NOT_DONE_REASON])) { @@ -717,20 +724,27 @@ public function __construct($data = null) $this->addPartOf(new FHIRReference($data[self::FIELD_PART_OF])); } } - if (isset($data[self::FIELD_PERFORMED_DATE_TIME])) { - $ext = (isset($data[self::FIELD_PERFORMED_DATE_TIME_EXT]) && is_array($data[self::FIELD_PERFORMED_DATE_TIME_EXT])) - ? $data[self::FIELD_PERFORMED_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_PERFORMED_DATE_TIME] instanceof FHIRDateTime) { - $this->setPerformedDateTime($data[self::FIELD_PERFORMED_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PERFORMED_DATE_TIME])) { - $this->setPerformedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_PERFORMED_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_PERFORMED_DATE_TIME])) { - $this->setPerformedDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_PERFORMED_DATE_TIME]))); - } + if (isset($data[self::FIELD_PERFORMED_DATE_TIME]) || isset($data[self::FIELD_PERFORMED_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_PERFORMED_DATE_TIME])) { + $value = $data[self::FIELD_PERFORMED_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PERFORMED_DATE_TIME_EXT]) && is_array($data[self::FIELD_PERFORMED_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_PERFORMED_DATE_TIME_EXT]; } else { - $this->setPerformedDateTime(new FHIRDateTime($data[self::FIELD_PERFORMED_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setPerformedDateTime($value); + } else if (is_array($value)) { + $this->setPerformedDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setPerformedDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPerformedDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_PERFORMED_PERIOD])) { @@ -812,20 +826,27 @@ public function __construct($data = null) $this->addReport(new FHIRReference($data[self::FIELD_REPORT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIREventStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIREventStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIREventStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIREventStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIREventStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIREventStatus([FHIREventStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIREventStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -2242,8 +2263,8 @@ public function setUsedReference(array $usedReference = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2600,10 +2621,22 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if (null !== ($v = $this->getCategory())) { $a[self::FIELD_CATEGORY] = $v; @@ -2612,33 +2645,71 @@ public function jsonSerialize() $a[self::FIELD_CODE] = $v; } if ([] !== ($vs = $this->getComplication())) { - $a[self::FIELD_COMPLICATION] = $vs; + $a[self::FIELD_COMPLICATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPLICATION][] = $v; + } } if ([] !== ($vs = $this->getComplicationDetail())) { - $a[self::FIELD_COMPLICATION_DETAIL] = $vs; + $a[self::FIELD_COMPLICATION_DETAIL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPLICATION_DETAIL][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if ([] !== ($vs = $this->getFocalDevice())) { - $a[self::FIELD_FOCAL_DEVICE] = $vs; + $a[self::FIELD_FOCAL_DEVICE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCAL_DEVICE][] = $v; + } } if ([] !== ($vs = $this->getFollowUp())) { - $a[self::FIELD_FOLLOW_UP] = $vs; + $a[self::FIELD_FOLLOW_UP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOLLOW_UP][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; } if (null !== ($v = $this->getNotDone())) { $a[self::FIELD_NOT_DONE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NOT_DONE_EXT] = $enc; } } @@ -2646,18 +2717,32 @@ public function jsonSerialize() $a[self::FIELD_NOT_DONE_REASON] = $v; } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOutcome())) { $a[self::FIELD_OUTCOME] = $v; } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if (null !== ($v = $this->getPerformedDateTime())) { $a[self::FIELD_PERFORMED_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_PERFORMED_DATE_TIME_EXT] = $enc; } } @@ -2665,21 +2750,47 @@ public function jsonSerialize() $a[self::FIELD_PERFORMED_PERIOD] = $v; } if ([] !== ($vs = $this->getPerformer())) { - $a[self::FIELD_PERFORMER] = $vs; + $a[self::FIELD_PERFORMER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER][] = $v; + } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getReport())) { - $a[self::FIELD_REPORT] = $vs; + $a[self::FIELD_REPORT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPORT][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIREventStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIREventStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2687,10 +2798,25 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getUsedCode())) { - $a[self::FIELD_USED_CODE] = $vs; + $a[self::FIELD_USED_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USED_CODE][] = $v; + } } if ([] !== ($vs = $this->getUsedReference())) { - $a[self::FIELD_USED_REFERENCE] = $vs; + $a[self::FIELD_USED_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USED_REFERENCE][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php index 0033947558..98a4a284ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcedureRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -129,7 +129,7 @@ class FHIRProcedureRequest extends FHIRDomainResource implements PHPFHIRContaine const FIELD_SUPPORTING_INFO = 'supportingInfo'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -512,20 +512,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $ext = (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) - ? $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT] - : null; - if ($data[self::FIELD_AS_NEEDED_BOOLEAN] instanceof FHIRBoolean) { - $this->setAsNeededBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_AS_NEEDED_BOOLEAN]] + $ext)); - } else if (is_array($data[self::FIELD_AS_NEEDED_BOOLEAN])) { - $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $data[self::FIELD_AS_NEEDED_BOOLEAN]))); - } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN]) || isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN])) { + $value = $data[self::FIELD_AS_NEEDED_BOOLEAN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]) && is_array($data[self::FIELD_AS_NEEDED_BOOLEAN_EXT])) { + $ext = $data[self::FIELD_AS_NEEDED_BOOLEAN_EXT]; } else { - $this->setAsNeededBoolean(new FHIRBoolean($data[self::FIELD_AS_NEEDED_BOOLEAN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAsNeededBoolean($value); + } else if (is_array($value)) { + $this->setAsNeededBoolean(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAsNeededBoolean(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAsNeededBoolean(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])) { @@ -535,20 +542,27 @@ public function __construct($data = null) $this->setAsNeededCodeableConcept(new FHIRCodeableConcept($data[self::FIELD_AS_NEEDED_CODEABLE_CONCEPT])); } } - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -637,20 +651,27 @@ public function __construct($data = null) $this->addDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_DO_NOT_PERFORM])) { - $ext = (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) - ? $data[self::FIELD_DO_NOT_PERFORM_EXT] - : null; - if ($data[self::FIELD_DO_NOT_PERFORM] instanceof FHIRBoolean) { - $this->setDoNotPerform($data[self::FIELD_DO_NOT_PERFORM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_DO_NOT_PERFORM]] + $ext)); - } else if (is_array($data[self::FIELD_DO_NOT_PERFORM])) { - $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $data[self::FIELD_DO_NOT_PERFORM]))); - } + if (isset($data[self::FIELD_DO_NOT_PERFORM]) || isset($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + if (isset($data[self::FIELD_DO_NOT_PERFORM])) { + $value = $data[self::FIELD_DO_NOT_PERFORM]; } else { - $this->setDoNotPerform(new FHIRBoolean($data[self::FIELD_DO_NOT_PERFORM])); + $value = null; + } + if (isset($data[self::FIELD_DO_NOT_PERFORM_EXT]) && is_array($data[self::FIELD_DO_NOT_PERFORM_EXT])) { + $ext = $data[self::FIELD_DO_NOT_PERFORM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setDoNotPerform($value); + } else if (is_array($value)) { + $this->setDoNotPerform(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setDoNotPerform(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDoNotPerform(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -671,20 +692,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; } else { - $this->setIntent(new FHIRRequestIntent($data[self::FIELD_INTENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRRequestIntent($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -705,20 +733,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -749,20 +784,27 @@ public function __construct($data = null) $this->setPerformerType(new FHIRCodeableConcept($data[self::FIELD_PERFORMER_TYPE])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -869,20 +911,27 @@ public function __construct($data = null) $this->addSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -2259,8 +2308,8 @@ public function setSupportingInfo(array $supportingInfo = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2618,8 +2667,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAsNeededBoolean())) { $a[self::FIELD_AS_NEEDED_BOOLEAN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_AS_NEEDED_BOOLEAN_EXT] = $enc; } } @@ -2628,19 +2679,39 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if ([] !== ($vs = $this->getBodySite())) { - $a[self::FIELD_BODY_SITE] = $vs; + $a[self::FIELD_BODY_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BODY_SITE][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; @@ -2649,32 +2720,56 @@ public function jsonSerialize() $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if (null !== ($v = $this->getDoNotPerform())) { $a[self::FIELD_DO_NOT_PERFORM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_DO_NOT_PERFORM_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -2692,22 +2787,48 @@ public function jsonSerialize() } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getRelevantHistory())) { - $a[self::FIELD_RELEVANT_HISTORY] = $vs; + $a[self::FIELD_RELEVANT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELEVANT_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; @@ -2716,12 +2837,20 @@ public function jsonSerialize() $a[self::FIELD_REQUISITION] = $v; } if ([] !== ($vs = $this->getSpecimen())) { - $a[self::FIELD_SPECIMEN] = $vs; + $a[self::FIELD_SPECIMEN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIMEN][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2729,7 +2858,16 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php index d6f9b3028c..58f5344e58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -112,7 +112,7 @@ class FHIRProcessRequest extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * List of allowable action which this resource can request. @@ -303,65 +303,88 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTION])) { - $ext = (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) - ? $data[self::FIELD_ACTION_EXT] - : null; - if ($data[self::FIELD_ACTION] instanceof FHIRActionList) { - $this->setAction($data[self::FIELD_ACTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRActionList([FHIRActionList::FIELD_VALUE => $data[self::FIELD_ACTION]] + $ext)); - } else if (is_array($data[self::FIELD_ACTION])) { - $this->setAction(new FHIRActionList(array_merge($ext, $data[self::FIELD_ACTION]))); - } + if (isset($data[self::FIELD_ACTION]) || isset($data[self::FIELD_ACTION_EXT])) { + if (isset($data[self::FIELD_ACTION])) { + $value = $data[self::FIELD_ACTION]; } else { - $this->setAction(new FHIRActionList($data[self::FIELD_ACTION])); + $value = null; } - } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); + if (isset($data[self::FIELD_ACTION_EXT]) && is_array($data[self::FIELD_ACTION_EXT])) { + $ext = $data[self::FIELD_ACTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRActionList) { + $this->setAction($value); + } else if (is_array($value)) { + $this->setAction(new FHIRActionList(array_merge($ext, $value))); + } else { + $this->setAction(new FHIRActionList([FHIRActionList::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAction(new FHIRActionList($ext)); + } + } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_EXCLUDE])) { - $ext = (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) - ? $data[self::FIELD_EXCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_EXCLUDE])) { - foreach($data[self::FIELD_EXCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addExclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addExclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addExclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_EXCLUDE]) || isset($data[self::FIELD_EXCLUDE_EXT])) { + if (isset($data[self::FIELD_EXCLUDE])) { + $value = $data[self::FIELD_EXCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXCLUDE_EXT]) && is_array($data[self::FIELD_EXCLUDE_EXT])) { + $ext = $data[self::FIELD_EXCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addExclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addExclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addExclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addExclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addExclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addExclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addExclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addExclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_EXCLUDE] instanceof FHIRString) { - $this->addExclude($data[self::FIELD_EXCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_EXCLUDE])) { - $this->addExclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXCLUDE]] + $ext)); - } else { - $this->addExclude(new FHIRString($data[self::FIELD_EXCLUDE])); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -382,33 +405,42 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INCLUDE])) { - $ext = (isset($data[self::FIELD_INCLUDE_EXT]) && is_array($data[self::FIELD_INCLUDE_EXT])) - ? $data[self::FIELD_INCLUDE_EXT] - : null; - if (is_array($data[self::FIELD_INCLUDE])) { - foreach($data[self::FIELD_INCLUDE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addInclude($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addInclude(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_INCLUDE]) || isset($data[self::FIELD_INCLUDE_EXT])) { + if (isset($data[self::FIELD_INCLUDE])) { + $value = $data[self::FIELD_INCLUDE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INCLUDE_EXT]) && is_array($data[self::FIELD_INCLUDE_EXT])) { + $ext = $data[self::FIELD_INCLUDE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addInclude($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addInclude($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addInclude(new FHIRString(array_merge($v, $iext))); + } else { + $this->addInclude(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addInclude(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addInclude(new FHIRString(array_merge($ext, $value))); + } else { + $this->addInclude(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addInclude(new FHIRString($iext)); } - } elseif ($data[self::FIELD_INCLUDE] instanceof FHIRString) { - $this->addInclude($data[self::FIELD_INCLUDE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_INCLUDE])) { - $this->addInclude(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_INCLUDE]] + $ext)); - } else { - $this->addInclude(new FHIRString($data[self::FIELD_INCLUDE])); } } if (isset($data[self::FIELD_ITEM])) { @@ -429,20 +461,27 @@ public function __construct($data = null) $this->addItem(new FHIRProcessRequestItem($data[self::FIELD_ITEM])); } } - if (isset($data[self::FIELD_NULLIFY])) { - $ext = (isset($data[self::FIELD_NULLIFY_EXT]) && is_array($data[self::FIELD_NULLIFY_EXT])) - ? $data[self::FIELD_NULLIFY_EXT] - : null; - if ($data[self::FIELD_NULLIFY] instanceof FHIRBoolean) { - $this->setNullify($data[self::FIELD_NULLIFY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NULLIFY])) { - $this->setNullify(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_NULLIFY]] + $ext)); - } else if (is_array($data[self::FIELD_NULLIFY])) { - $this->setNullify(new FHIRBoolean(array_merge($ext, $data[self::FIELD_NULLIFY]))); - } + if (isset($data[self::FIELD_NULLIFY]) || isset($data[self::FIELD_NULLIFY_EXT])) { + if (isset($data[self::FIELD_NULLIFY])) { + $value = $data[self::FIELD_NULLIFY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NULLIFY_EXT]) && is_array($data[self::FIELD_NULLIFY_EXT])) { + $ext = $data[self::FIELD_NULLIFY_EXT]; } else { - $this->setNullify(new FHIRBoolean($data[self::FIELD_NULLIFY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setNullify($value); + } else if (is_array($value)) { + $this->setNullify(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setNullify(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setNullify(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ORGANIZATION])) { @@ -466,20 +505,27 @@ public function __construct($data = null) $this->setProvider(new FHIRReference($data[self::FIELD_PROVIDER])); } } - if (isset($data[self::FIELD_REFERENCE])) { - $ext = (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) - ? $data[self::FIELD_REFERENCE_EXT] - : null; - if ($data[self::FIELD_REFERENCE] instanceof FHIRString) { - $this->setReference($data[self::FIELD_REFERENCE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REFERENCE]] + $ext)); - } else if (is_array($data[self::FIELD_REFERENCE])) { - $this->setReference(new FHIRString(array_merge($ext, $data[self::FIELD_REFERENCE]))); - } + if (isset($data[self::FIELD_REFERENCE]) || isset($data[self::FIELD_REFERENCE_EXT])) { + if (isset($data[self::FIELD_REFERENCE])) { + $value = $data[self::FIELD_REFERENCE]; } else { - $this->setReference(new FHIRString($data[self::FIELD_REFERENCE])); + $value = null; + } + if (isset($data[self::FIELD_REFERENCE_EXT]) && is_array($data[self::FIELD_REFERENCE_EXT])) { + $ext = $data[self::FIELD_REFERENCE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReference($value); + } else if (is_array($value)) { + $this->setReference(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReference(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReference(new FHIRString($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -496,20 +542,27 @@ public function __construct($data = null) $this->setResponse(new FHIRReference($data[self::FIELD_RESPONSE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } if (isset($data[self::FIELD_TARGET])) { @@ -1152,8 +1205,8 @@ public function setTarget(FHIRReference $target = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1363,58 +1416,92 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAction())) { $a[self::FIELD_ACTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRActionList::FIELD_VALUE, $enc)))) { + unset($enc[FHIRActionList::FIELD_VALUE]); $a[self::FIELD_ACTION_EXT] = $enc; } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if ([] !== ($vs = $this->getExclude())) { $a[self::FIELD_EXCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_EXCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_EXCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_EXCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_EXCLUDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInclude())) { $a[self::FIELD_INCLUDE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_INCLUDE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_INCLUDE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_INCLUDE_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_INCLUDE_EXT] = $encs; + } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if (null !== ($v = $this->getNullify())) { $a[self::FIELD_NULLIFY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_NULLIFY_EXT] = $enc; } } @@ -1429,8 +1516,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getReference())) { $a[self::FIELD_REFERENCE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REFERENCE_EXT] = $enc; } } @@ -1442,14 +1531,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTarget())) { $a[self::FIELD_TARGET] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php index e488bdb5dd..397edeaf6b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProcessResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -104,7 +104,7 @@ class FHIRProcessResponse extends FHIRDomainResource implements PHPFHIRContained const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -295,36 +295,50 @@ public function __construct($data = null) $this->addCommunicationRequest(new FHIRReference($data[self::FIELD_COMMUNICATION_REQUEST])); } } - if (isset($data[self::FIELD_CREATED])) { - $ext = (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) - ? $data[self::FIELD_CREATED_EXT] - : null; - if ($data[self::FIELD_CREATED] instanceof FHIRDateTime) { - $this->setCreated($data[self::FIELD_CREATED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_CREATED]] + $ext)); - } else if (is_array($data[self::FIELD_CREATED])) { - $this->setCreated(new FHIRDateTime(array_merge($ext, $data[self::FIELD_CREATED]))); - } + if (isset($data[self::FIELD_CREATED]) || isset($data[self::FIELD_CREATED_EXT])) { + if (isset($data[self::FIELD_CREATED])) { + $value = $data[self::FIELD_CREATED]; } else { - $this->setCreated(new FHIRDateTime($data[self::FIELD_CREATED])); + $value = null; } - } - if (isset($data[self::FIELD_DISPOSITION])) { - $ext = (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) - ? $data[self::FIELD_DISPOSITION_EXT] - : null; - if ($data[self::FIELD_DISPOSITION] instanceof FHIRString) { - $this->setDisposition($data[self::FIELD_DISPOSITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DISPOSITION]] + $ext)); - } else if (is_array($data[self::FIELD_DISPOSITION])) { - $this->setDisposition(new FHIRString(array_merge($ext, $data[self::FIELD_DISPOSITION]))); + if (isset($data[self::FIELD_CREATED_EXT]) && is_array($data[self::FIELD_CREATED_EXT])) { + $ext = $data[self::FIELD_CREATED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setCreated($value); + } else if (is_array($value)) { + $this->setCreated(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setCreated(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCreated(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DISPOSITION]) || isset($data[self::FIELD_DISPOSITION_EXT])) { + if (isset($data[self::FIELD_DISPOSITION])) { + $value = $data[self::FIELD_DISPOSITION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DISPOSITION_EXT]) && is_array($data[self::FIELD_DISPOSITION_EXT])) { + $ext = $data[self::FIELD_DISPOSITION_EXT]; } else { - $this->setDisposition(new FHIRString($data[self::FIELD_DISPOSITION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDisposition($value); + } else if (is_array($value)) { + $this->setDisposition(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDisposition(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDisposition(new FHIRString($ext)); } } if (isset($data[self::FIELD_ERROR])) { @@ -423,20 +437,27 @@ public function __construct($data = null) $this->setRequestProvider(new FHIRReference($data[self::FIELD_REQUEST_PROVIDER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -998,8 +1019,8 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1188,30 +1209,52 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCommunicationRequest())) { - $a[self::FIELD_COMMUNICATION_REQUEST] = $vs; + $a[self::FIELD_COMMUNICATION_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMMUNICATION_REQUEST][] = $v; + } } if (null !== ($v = $this->getCreated())) { $a[self::FIELD_CREATED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_CREATED_EXT] = $enc; } } if (null !== ($v = $this->getDisposition())) { $a[self::FIELD_DISPOSITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DISPOSITION_EXT] = $enc; } } if ([] !== ($vs = $this->getError())) { - $a[self::FIELD_ERROR] = $vs; + $a[self::FIELD_ERROR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ERROR][] = $v; + } } if (null !== ($v = $this->getForm())) { $a[self::FIELD_FORM] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOrganization())) { $a[self::FIELD_ORGANIZATION] = $v; @@ -1220,7 +1263,13 @@ public function jsonSerialize() $a[self::FIELD_OUTCOME] = $v; } if ([] !== ($vs = $this->getProcessNote())) { - $a[self::FIELD_PROCESS_NOTE] = $vs; + $a[self::FIELD_PROCESS_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESS_NOTE][] = $v; + } } if (null !== ($v = $this->getRequest())) { $a[self::FIELD_REQUEST] = $v; @@ -1233,11 +1282,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProvenance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProvenance.php index 506c5e8047..9acc764e78 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProvenance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRProvenance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -108,7 +108,7 @@ class FHIRProvenance extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_TARGET = 'target'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference to a code defined by a terminology system. @@ -332,33 +332,42 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_POLICY])) { - $ext = (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) - ? $data[self::FIELD_POLICY_EXT] - : null; - if (is_array($data[self::FIELD_POLICY])) { - foreach($data[self::FIELD_POLICY] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addPolicy($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addPolicy(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_POLICY]) || isset($data[self::FIELD_POLICY_EXT])) { + if (isset($data[self::FIELD_POLICY])) { + $value = $data[self::FIELD_POLICY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_POLICY_EXT]) && is_array($data[self::FIELD_POLICY_EXT])) { + $ext = $data[self::FIELD_POLICY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addPolicy($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addPolicy($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addPolicy(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addPolicy(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addPolicy(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addPolicy(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_POLICY] instanceof FHIRUri) { - $this->addPolicy($data[self::FIELD_POLICY]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_POLICY])) { - $this->addPolicy(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_POLICY]] + $ext)); - } else { - $this->addPolicy(new FHIRUri($data[self::FIELD_POLICY])); } } if (isset($data[self::FIELD_REASON])) { @@ -379,20 +388,27 @@ public function __construct($data = null) $this->addReason(new FHIRCoding($data[self::FIELD_REASON])); } } - if (isset($data[self::FIELD_RECORDED])) { - $ext = (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) - ? $data[self::FIELD_RECORDED_EXT] - : null; - if ($data[self::FIELD_RECORDED] instanceof FHIRInstant) { - $this->setRecorded($data[self::FIELD_RECORDED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_RECORDED]] + $ext)); - } else if (is_array($data[self::FIELD_RECORDED])) { - $this->setRecorded(new FHIRInstant(array_merge($ext, $data[self::FIELD_RECORDED]))); - } + if (isset($data[self::FIELD_RECORDED]) || isset($data[self::FIELD_RECORDED_EXT])) { + if (isset($data[self::FIELD_RECORDED])) { + $value = $data[self::FIELD_RECORDED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECORDED_EXT]) && is_array($data[self::FIELD_RECORDED_EXT])) { + $ext = $data[self::FIELD_RECORDED_EXT]; } else { - $this->setRecorded(new FHIRInstant($data[self::FIELD_RECORDED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setRecorded($value); + } else if (is_array($value)) { + $this->setRecorded(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setRecorded(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setRecorded(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_SIGNATURE])) { @@ -1009,8 +1025,8 @@ public function setTarget(array $target = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1190,10 +1206,22 @@ public function jsonSerialize() $a[self::FIELD_ACTIVITY] = $v; } if ([] !== ($vs = $this->getAgent())) { - $a[self::FIELD_AGENT] = $vs; + $a[self::FIELD_AGENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_AGENT][] = $v; + } } if ([] !== ($vs = $this->getEntity())) { - $a[self::FIELD_ENTITY] = $vs; + $a[self::FIELD_ENTITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENTITY][] = $v; + } } if (null !== ($v = $this->getLocation())) { $a[self::FIELD_LOCATION] = $v; @@ -1203,34 +1231,65 @@ public function jsonSerialize() } if ([] !== ($vs = $this->getPolicy())) { $a[self::FIELD_POLICY] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_POLICY][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_POLICY_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_POLICY_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_POLICY_EXT] = $encs; + } } if ([] !== ($vs = $this->getReason())) { - $a[self::FIELD_REASON] = $vs; + $a[self::FIELD_REASON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON][] = $v; + } } if (null !== ($v = $this->getRecorded())) { $a[self::FIELD_RECORDED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_RECORDED_EXT] = $enc; } } if ([] !== ($vs = $this->getSignature())) { - $a[self::FIELD_SIGNATURE] = $vs; + $a[self::FIELD_SIGNATURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SIGNATURE][] = $v; + } } if ([] !== ($vs = $this->getTarget())) { - $a[self::FIELD_TARGET] = $vs; + $a[self::FIELD_TARGET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TARGET][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php index 423daf66cd..f04b8af2c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaire.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -132,7 +132,7 @@ class FHIRQuestionnaire extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -443,20 +443,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_CODE])) { @@ -495,52 +502,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -550,20 +578,27 @@ public function __construct($data = null) $this->setEffectivePeriod(new FHIRPeriod($data[self::FIELD_EFFECTIVE_PERIOD])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -620,145 +655,203 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_SUBJECT_TYPE])) { - $ext = (isset($data[self::FIELD_SUBJECT_TYPE_EXT]) && is_array($data[self::FIELD_SUBJECT_TYPE_EXT])) - ? $data[self::FIELD_SUBJECT_TYPE_EXT] - : null; - if (is_array($data[self::FIELD_SUBJECT_TYPE])) { - foreach($data[self::FIELD_SUBJECT_TYPE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRResourceType) { - $this->addSubjectType($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addSubjectType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addSubjectType(new FHIRResourceType(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_SUBJECT_TYPE]) || isset($data[self::FIELD_SUBJECT_TYPE_EXT])) { + if (isset($data[self::FIELD_SUBJECT_TYPE])) { + $value = $data[self::FIELD_SUBJECT_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_SUBJECT_TYPE_EXT]) && is_array($data[self::FIELD_SUBJECT_TYPE_EXT])) { + $ext = $data[self::FIELD_SUBJECT_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->addSubjectType($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRResourceType) { + $this->addSubjectType($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addSubjectType(new FHIRResourceType(array_merge($v, $iext))); + } else { + $this->addSubjectType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addSubjectType(new FHIRResourceType($v)); } + } elseif (is_array($value)) { + $this->addSubjectType(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->addSubjectType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_SUBJECT_TYPE] instanceof FHIRResourceType) { - $this->addSubjectType($data[self::FIELD_SUBJECT_TYPE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_SUBJECT_TYPE])) { - $this->addSubjectType(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_SUBJECT_TYPE]] + $ext)); - } else { - $this->addSubjectType(new FHIRResourceType($data[self::FIELD_SUBJECT_TYPE])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addSubjectType(new FHIRResourceType($iext)); } + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -779,20 +872,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1861,8 +1961,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2201,35 +2301,55 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getCode())) { - $a[self::FIELD_CODE] = $vs; + $a[self::FIELD_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CODE][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2238,94 +2358,147 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSubjectType())) { $a[self::FIELD_SUBJECT_TYPE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_SUBJECT_TYPE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_SUBJECT_TYPE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRResourceType::FIELD_VALUE]) || array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_SUBJECT_TYPE_EXT][] = null; + unset($enc[FHIRResourceType::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_SUBJECT_TYPE_EXT] = $encs; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php index 9015744c64..23e6844a3a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponse.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -100,7 +100,7 @@ class FHIRQuestionnaireResponse extends FHIRDomainResource implements PHPFHIRCon const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -265,20 +265,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_AUTHORED])) { - $ext = (isset($data[self::FIELD_AUTHORED_EXT]) && is_array($data[self::FIELD_AUTHORED_EXT])) - ? $data[self::FIELD_AUTHORED_EXT] - : null; - if ($data[self::FIELD_AUTHORED] instanceof FHIRDateTime) { - $this->setAuthored($data[self::FIELD_AUTHORED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED])) { - $this->setAuthored(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED])) { - $this->setAuthored(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED]))); - } + if (isset($data[self::FIELD_AUTHORED]) || isset($data[self::FIELD_AUTHORED_EXT])) { + if (isset($data[self::FIELD_AUTHORED])) { + $value = $data[self::FIELD_AUTHORED]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_EXT]) && is_array($data[self::FIELD_AUTHORED_EXT])) { + $ext = $data[self::FIELD_AUTHORED_EXT]; } else { - $this->setAuthored(new FHIRDateTime($data[self::FIELD_AUTHORED])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthored($value); + } else if (is_array($value)) { + $this->setAuthored(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthored(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthored(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -363,20 +370,27 @@ public function __construct($data = null) $this->setSource(new FHIRReference($data[self::FIELD_SOURCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRQuestionnaireResponseStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireResponseStatus([FHIRQuestionnaireResponseStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRQuestionnaireResponseStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRQuestionnaireResponseStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRQuestionnaireResponseStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRQuestionnaireResponseStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRQuestionnaireResponseStatus([FHIRQuestionnaireResponseStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRQuestionnaireResponseStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -868,8 +882,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1035,13 +1049,21 @@ public function jsonSerialize() } if (null !== ($v = $this->getAuthored())) { $a[self::FIELD_AUTHORED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; @@ -1050,10 +1072,22 @@ public function jsonSerialize() $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getItem())) { - $a[self::FIELD_ITEM] = $vs; + $a[self::FIELD_ITEM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ITEM][] = $v; + } } if ([] !== ($vs = $this->getParent())) { - $a[self::FIELD_PARENT] = $vs; + $a[self::FIELD_PARENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARENT][] = $v; + } } if (null !== ($v = $this->getQuestionnaire())) { $a[self::FIELD_QUESTIONNAIRE] = $v; @@ -1063,14 +1097,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRQuestionnaireResponseStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRQuestionnaireResponseStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php index 121f1c918d..f86986c6c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRReferralRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRReferralRequest extends FHIRDomainResource implements PHPFHIRContained const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -443,20 +443,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -502,20 +509,27 @@ public function __construct($data = null) $this->addDefinition(new FHIRReference($data[self::FIELD_DEFINITION])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_GROUP_IDENTIFIER])) { @@ -543,20 +557,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; } else { - $this->setIntent(new FHIRRequestIntent($data[self::FIELD_INTENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRRequestIntent($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -577,20 +598,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -600,20 +628,27 @@ public function __construct($data = null) $this->setOccurrencePeriod(new FHIRPeriod($data[self::FIELD_OCCURRENCE_PERIOD])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODE])) { @@ -738,20 +773,27 @@ public function __construct($data = null) $this->setSpecialty(new FHIRCodeableConcept($data[self::FIELD_SPECIALTY])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1934,8 +1976,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2248,24 +2290,40 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2273,22 +2331,38 @@ public function jsonSerialize() $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -2297,39 +2371,79 @@ public function jsonSerialize() } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } if ([] !== ($vs = $this->getReasonCode())) { - $a[self::FIELD_REASON_CODE] = $vs; + $a[self::FIELD_REASON_CODE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_CODE][] = $v; + } } if ([] !== ($vs = $this->getReasonReference())) { - $a[self::FIELD_REASON_REFERENCE] = $vs; + $a[self::FIELD_REASON_REFERENCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REASON_REFERENCE][] = $v; + } } if ([] !== ($vs = $this->getRecipient())) { - $a[self::FIELD_RECIPIENT] = $vs; + $a[self::FIELD_RECIPIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECIPIENT][] = $v; + } } if ([] !== ($vs = $this->getRelevantHistory())) { - $a[self::FIELD_RELEVANT_HISTORY] = $vs; + $a[self::FIELD_RELEVANT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELEVANT_HISTORY][] = $v; + } } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; } if ([] !== ($vs = $this->getServiceRequested())) { - $a[self::FIELD_SERVICE_REQUESTED] = $vs; + $a[self::FIELD_SERVICE_REQUESTED] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_REQUESTED][] = $v; + } } if (null !== ($v = $this->getSpecialty())) { $a[self::FIELD_SPECIALTY] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2337,11 +2451,20 @@ public function jsonSerialize() $a[self::FIELD_SUBJECT] = $v; } if ([] !== ($vs = $this->getSupportingInfo())) { - $a[self::FIELD_SUPPORTING_INFO] = $vs; + $a[self::FIELD_SUPPORTING_INFO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPORTING_INFO][] = $v; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php index ca5a2b28ca..1bed7f7da5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRelatedPerson.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -107,7 +107,7 @@ class FHIRRelatedPerson extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TELECOM = 'telecom'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -258,20 +258,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ADDRESS])) { @@ -292,36 +299,50 @@ public function __construct($data = null) $this->addAddress(new FHIRAddress($data[self::FIELD_ADDRESS])); } } - if (isset($data[self::FIELD_BIRTH_DATE])) { - $ext = (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) - ? $data[self::FIELD_BIRTH_DATE_EXT] - : null; - if ($data[self::FIELD_BIRTH_DATE] instanceof FHIRDate) { - $this->setBirthDate($data[self::FIELD_BIRTH_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_BIRTH_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_BIRTH_DATE])) { - $this->setBirthDate(new FHIRDate(array_merge($ext, $data[self::FIELD_BIRTH_DATE]))); - } + if (isset($data[self::FIELD_BIRTH_DATE]) || isset($data[self::FIELD_BIRTH_DATE_EXT])) { + if (isset($data[self::FIELD_BIRTH_DATE])) { + $value = $data[self::FIELD_BIRTH_DATE]; } else { - $this->setBirthDate(new FHIRDate($data[self::FIELD_BIRTH_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_GENDER])) { - $ext = (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) - ? $data[self::FIELD_GENDER_EXT] - : null; - if ($data[self::FIELD_GENDER] instanceof FHIRAdministrativeGender) { - $this->setGender($data[self::FIELD_GENDER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $data[self::FIELD_GENDER]] + $ext)); - } else if (is_array($data[self::FIELD_GENDER])) { - $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $data[self::FIELD_GENDER]))); + if (isset($data[self::FIELD_BIRTH_DATE_EXT]) && is_array($data[self::FIELD_BIRTH_DATE_EXT])) { + $ext = $data[self::FIELD_BIRTH_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setBirthDate($value); + } else if (is_array($value)) { + $this->setBirthDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setBirthDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setBirthDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_GENDER]) || isset($data[self::FIELD_GENDER_EXT])) { + if (isset($data[self::FIELD_GENDER])) { + $value = $data[self::FIELD_GENDER]; } else { - $this->setGender(new FHIRAdministrativeGender($data[self::FIELD_GENDER])); + $value = null; + } + if (isset($data[self::FIELD_GENDER_EXT]) && is_array($data[self::FIELD_GENDER_EXT])) { + $ext = $data[self::FIELD_GENDER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRAdministrativeGender) { + $this->setGender($value); + } else if (is_array($value)) { + $this->setGender(new FHIRAdministrativeGender(array_merge($ext, $value))); + } else { + $this->setGender(new FHIRAdministrativeGender([FHIRAdministrativeGender::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setGender(new FHIRAdministrativeGender($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -945,8 +966,8 @@ public function setTelecom(array $telecom = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1131,33 +1152,57 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getAddress())) { - $a[self::FIELD_ADDRESS] = $vs; + $a[self::FIELD_ADDRESS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ADDRESS][] = $v; + } } if (null !== ($v = $this->getBirthDate())) { $a[self::FIELD_BIRTH_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_BIRTH_DATE_EXT] = $enc; } } if (null !== ($v = $this->getGender())) { $a[self::FIELD_GENDER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRAdministrativeGender::FIELD_VALUE, $enc)))) { + unset($enc[FHIRAdministrativeGender::FIELD_VALUE]); $a[self::FIELD_GENDER_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getName())) { - $a[self::FIELD_NAME] = $vs; + $a[self::FIELD_NAME] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NAME][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -1166,13 +1211,28 @@ public function jsonSerialize() $a[self::FIELD_PERIOD] = $v; } if ([] !== ($vs = $this->getPhoto())) { - $a[self::FIELD_PHOTO] = $vs; + $a[self::FIELD_PHOTO] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PHOTO][] = $v; + } } if (null !== ($v = $this->getRelationship())) { $a[self::FIELD_RELATIONSHIP] = $v; } if ([] !== ($vs = $this->getTelecom())) { - $a[self::FIELD_TELECOM] = $vs; + $a[self::FIELD_TELECOM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TELECOM][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php index d9e2d1dd49..e6090f677d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRequestGroup.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRRequestGroup extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A group of related requests that can be used to capture intended activities that @@ -348,20 +348,27 @@ public function __construct($data = null) $this->setAuthor(new FHIRReference($data[self::FIELD_AUTHOR])); } } - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -432,20 +439,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; } else { - $this->setIntent(new FHIRRequestIntent($data[self::FIELD_INTENT])); + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setIntent(new FHIRRequestIntent($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -466,20 +480,27 @@ public function __construct($data = null) $this->addNote(new FHIRAnnotation($data[self::FIELD_NOTE])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODEABLE_CONCEPT])) { @@ -514,20 +535,27 @@ public function __construct($data = null) $this->addReplaces(new FHIRReference($data[self::FIELD_REPLACES])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRRequestStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRRequestStatus([FHIRRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRRequestStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1243,8 +1271,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1457,47 +1485,83 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getAction())) { - $a[self::FIELD_ACTION] = $vs; + $a[self::FIELD_ACTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTION][] = $v; + } } if (null !== ($v = $this->getAuthor())) { $a[self::FIELD_AUTHOR] = $v; } if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getContext())) { $a[self::FIELD_CONTEXT] = $v; } if ([] !== ($vs = $this->getDefinition())) { - $a[self::FIELD_DEFINITION] = $vs; + $a[self::FIELD_DEFINITION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DEFINITION][] = $v; + } } if (null !== ($v = $this->getGroupIdentifier())) { $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } @@ -1508,18 +1572,29 @@ public function jsonSerialize() $a[self::FIELD_REASON_REFERENCE] = $v; } if ([] !== ($vs = $this->getReplaces())) { - $a[self::FIELD_REPLACES] = $vs; + $a[self::FIELD_REPLACES] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPLACES][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php index e0714ae4f3..42fbc9056a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchStudy.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -119,7 +119,7 @@ class FHIRResearchStudy extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_TITLE_EXT = '_title'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A process where a researcher or organization plans and then executes a series of @@ -441,20 +441,27 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_ENROLLMENT])) { @@ -665,36 +672,50 @@ public function __construct($data = null) $this->setSponsor(new FHIRReference($data[self::FIELD_SPONSOR])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRResearchStudyStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResearchStudyStatus([FHIRResearchStudyStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResearchStudyStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRResearchStudyStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResearchStudyStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRResearchStudyStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRResearchStudyStatus([FHIRResearchStudyStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRResearchStudyStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } } @@ -1751,8 +1772,8 @@ public function setTitle($title = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2046,41 +2067,103 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getArm())) { - $a[self::FIELD_ARM] = $vs; + $a[self::FIELD_ARM] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ARM][] = $v; + } } if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getEnrollment())) { - $a[self::FIELD_ENROLLMENT] = $vs; + $a[self::FIELD_ENROLLMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ENROLLMENT][] = $v; + } } if ([] !== ($vs = $this->getFocus())) { - $a[self::FIELD_FOCUS] = $vs; + $a[self::FIELD_FOCUS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FOCUS][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getKeyword())) { - $a[self::FIELD_KEYWORD] = $vs; + $a[self::FIELD_KEYWORD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_KEYWORD][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if (null !== ($v = $this->getPeriod())) { $a[self::FIELD_PERIOD] = $v; @@ -2089,34 +2172,59 @@ public function jsonSerialize() $a[self::FIELD_PRINCIPAL_INVESTIGATOR] = $v; } if ([] !== ($vs = $this->getProtocol())) { - $a[self::FIELD_PROTOCOL] = $vs; + $a[self::FIELD_PROTOCOL] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROTOCOL][] = $v; + } } if (null !== ($v = $this->getReasonStopped())) { $a[self::FIELD_REASON_STOPPED] = $v; } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if ([] !== ($vs = $this->getSite())) { - $a[self::FIELD_SITE] = $vs; + $a[self::FIELD_SITE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SITE][] = $v; + } } if (null !== ($v = $this->getSponsor())) { $a[self::FIELD_SPONSOR] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResearchStudyStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResearchStudyStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php index b58bab337f..0177fc3ce6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRResearchSubject.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -101,7 +101,7 @@ class FHIRResearchSubject extends FHIRDomainResource implements PHPFHIRContained const FIELD_STUDY = 'study'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A sequence of Unicode characters @@ -214,36 +214,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTUAL_ARM])) { - $ext = (isset($data[self::FIELD_ACTUAL_ARM_EXT]) && is_array($data[self::FIELD_ACTUAL_ARM_EXT])) - ? $data[self::FIELD_ACTUAL_ARM_EXT] - : null; - if ($data[self::FIELD_ACTUAL_ARM] instanceof FHIRString) { - $this->setActualArm($data[self::FIELD_ACTUAL_ARM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTUAL_ARM])) { - $this->setActualArm(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ACTUAL_ARM]] + $ext)); - } else if (is_array($data[self::FIELD_ACTUAL_ARM])) { - $this->setActualArm(new FHIRString(array_merge($ext, $data[self::FIELD_ACTUAL_ARM]))); - } + if (isset($data[self::FIELD_ACTUAL_ARM]) || isset($data[self::FIELD_ACTUAL_ARM_EXT])) { + if (isset($data[self::FIELD_ACTUAL_ARM])) { + $value = $data[self::FIELD_ACTUAL_ARM]; } else { - $this->setActualArm(new FHIRString($data[self::FIELD_ACTUAL_ARM])); + $value = null; } - } - if (isset($data[self::FIELD_ASSIGNED_ARM])) { - $ext = (isset($data[self::FIELD_ASSIGNED_ARM_EXT]) && is_array($data[self::FIELD_ASSIGNED_ARM_EXT])) - ? $data[self::FIELD_ASSIGNED_ARM_EXT] - : null; - if ($data[self::FIELD_ASSIGNED_ARM] instanceof FHIRString) { - $this->setAssignedArm($data[self::FIELD_ASSIGNED_ARM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ASSIGNED_ARM])) { - $this->setAssignedArm(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ASSIGNED_ARM]] + $ext)); - } else if (is_array($data[self::FIELD_ASSIGNED_ARM])) { - $this->setAssignedArm(new FHIRString(array_merge($ext, $data[self::FIELD_ASSIGNED_ARM]))); + if (isset($data[self::FIELD_ACTUAL_ARM_EXT]) && is_array($data[self::FIELD_ACTUAL_ARM_EXT])) { + $ext = $data[self::FIELD_ACTUAL_ARM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setActualArm($value); + } else if (is_array($value)) { + $this->setActualArm(new FHIRString(array_merge($ext, $value))); + } else { + $this->setActualArm(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setActualArm(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_ASSIGNED_ARM]) || isset($data[self::FIELD_ASSIGNED_ARM_EXT])) { + if (isset($data[self::FIELD_ASSIGNED_ARM])) { + $value = $data[self::FIELD_ASSIGNED_ARM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ASSIGNED_ARM_EXT]) && is_array($data[self::FIELD_ASSIGNED_ARM_EXT])) { + $ext = $data[self::FIELD_ASSIGNED_ARM_EXT]; } else { - $this->setAssignedArm(new FHIRString($data[self::FIELD_ASSIGNED_ARM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setAssignedArm($value); + } else if (is_array($value)) { + $this->setAssignedArm(new FHIRString(array_merge($ext, $value))); + } else { + $this->setAssignedArm(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAssignedArm(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONSENT])) { @@ -274,20 +288,27 @@ public function __construct($data = null) $this->setPeriod(new FHIRPeriod($data[self::FIELD_PERIOD])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRResearchSubjectStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResearchSubjectStatus([FHIRResearchSubjectStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRResearchSubjectStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRResearchSubjectStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResearchSubjectStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRResearchSubjectStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRResearchSubjectStatus([FHIRResearchSubjectStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRResearchSubjectStatus($ext)); } } if (isset($data[self::FIELD_STUDY])) { @@ -590,8 +611,8 @@ public function setStudy(FHIRReference $study = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -723,15 +744,19 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActualArm())) { $a[self::FIELD_ACTUAL_ARM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ACTUAL_ARM_EXT] = $enc; } } if (null !== ($v = $this->getAssignedArm())) { $a[self::FIELD_ASSIGNED_ARM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ASSIGNED_ARM_EXT] = $enc; } } @@ -749,14 +774,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRResearchSubjectStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRResearchSubjectStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStudy())) { $a[self::FIELD_STUDY] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php index a69433c691..a39a77403f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRRiskAssessment.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -111,7 +111,7 @@ class FHIRRiskAssessment extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_SUBJECT = 'subject'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -372,20 +372,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_CONDITION])) { @@ -416,36 +423,50 @@ public function __construct($data = null) $this->setMethod(new FHIRCodeableConcept($data[self::FIELD_METHOD])); } } - if (isset($data[self::FIELD_MITIGATION])) { - $ext = (isset($data[self::FIELD_MITIGATION_EXT]) && is_array($data[self::FIELD_MITIGATION_EXT])) - ? $data[self::FIELD_MITIGATION_EXT] - : null; - if ($data[self::FIELD_MITIGATION] instanceof FHIRString) { - $this->setMitigation($data[self::FIELD_MITIGATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_MITIGATION])) { - $this->setMitigation(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_MITIGATION]] + $ext)); - } else if (is_array($data[self::FIELD_MITIGATION])) { - $this->setMitigation(new FHIRString(array_merge($ext, $data[self::FIELD_MITIGATION]))); - } + if (isset($data[self::FIELD_MITIGATION]) || isset($data[self::FIELD_MITIGATION_EXT])) { + if (isset($data[self::FIELD_MITIGATION])) { + $value = $data[self::FIELD_MITIGATION]; } else { - $this->setMitigation(new FHIRString($data[self::FIELD_MITIGATION])); + $value = null; } - } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); + if (isset($data[self::FIELD_MITIGATION_EXT]) && is_array($data[self::FIELD_MITIGATION_EXT])) { + $ext = $data[self::FIELD_MITIGATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setMitigation($value); + } else if (is_array($value)) { + $this->setMitigation(new FHIRString(array_merge($ext, $value))); + } else { + $this->setMitigation(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setMitigation(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -501,20 +522,27 @@ public function __construct($data = null) $this->setReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRObservationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRObservationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRObservationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRObservationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRObservationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRObservationStatus([FHIRObservationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRObservationStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1189,8 +1217,8 @@ public function setSubject(FHIRReference $subject = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1406,15 +1434,23 @@ public function jsonSerialize() $a[self::FIELD_BASED_ON] = $v; } if ([] !== ($vs = $this->getBasis())) { - $a[self::FIELD_BASIS] = $vs; + $a[self::FIELD_BASIS] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASIS][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } @@ -1432,15 +1468,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getMitigation())) { $a[self::FIELD_MITIGATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_MITIGATION_EXT] = $enc; } } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -1454,7 +1494,13 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getPrediction())) { - $a[self::FIELD_PREDICTION] = $vs; + $a[self::FIELD_PREDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PREDICTION][] = $v; + } } if (null !== ($v = $this->getReasonCodeableConcept())) { $a[self::FIELD_REASON_CODEABLE_CONCEPT] = $v; @@ -1464,14 +1510,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRObservationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRObservationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getSubject())) { $a[self::FIELD_SUBJECT] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSchedule.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSchedule.php index 1cdcab64d6..c17f8055fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSchedule.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSchedule.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -96,7 +96,7 @@ class FHIRSchedule extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_SPECIALTY = 'specialty'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -224,20 +224,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ACTIVE])) { - $ext = (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) - ? $data[self::FIELD_ACTIVE_EXT] - : null; - if ($data[self::FIELD_ACTIVE] instanceof FHIRBoolean) { - $this->setActive($data[self::FIELD_ACTIVE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ACTIVE]] + $ext)); - } else if (is_array($data[self::FIELD_ACTIVE])) { - $this->setActive(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ACTIVE]))); - } + if (isset($data[self::FIELD_ACTIVE]) || isset($data[self::FIELD_ACTIVE_EXT])) { + if (isset($data[self::FIELD_ACTIVE])) { + $value = $data[self::FIELD_ACTIVE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_ACTIVE_EXT]) && is_array($data[self::FIELD_ACTIVE_EXT])) { + $ext = $data[self::FIELD_ACTIVE_EXT]; } else { - $this->setActive(new FHIRBoolean($data[self::FIELD_ACTIVE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setActive($value); + } else if (is_array($value)) { + $this->setActive(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setActive(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setActive(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_ACTOR])) { @@ -258,20 +265,27 @@ public function __construct($data = null) $this->addActor(new FHIRReference($data[self::FIELD_ACTOR])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -766,8 +780,8 @@ public function setSpecialty(array $specialty = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -927,23 +941,39 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getActive())) { $a[self::FIELD_ACTIVE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ACTIVE_EXT] = $enc; } } if ([] !== ($vs = $this->getActor())) { - $a[self::FIELD_ACTOR] = $vs; + $a[self::FIELD_ACTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ACTOR][] = $v; + } } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPlanningHorizon())) { $a[self::FIELD_PLANNING_HORIZON] = $v; @@ -952,10 +982,25 @@ public function jsonSerialize() $a[self::FIELD_SERVICE_CATEGORY] = $v; } if ([] !== ($vs = $this->getServiceType())) { - $a[self::FIELD_SERVICE_TYPE] = $vs; + $a[self::FIELD_SERVICE_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_TYPE][] = $v; + } } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php index b19201095b..1d1bc5117d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSearchParameter.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -141,7 +141,7 @@ class FHIRSearchParameter extends FHIRDomainResource implements PHPFHIRContained const FIELD_XPATH_USAGE_EXT = '_xpathUsage'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The kind of activity the definition is describing @@ -479,107 +479,141 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_BASE])) { - $ext = (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) - ? $data[self::FIELD_BASE_EXT] - : null; - if (is_array($data[self::FIELD_BASE])) { - foreach($data[self::FIELD_BASE] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRResourceType) { - $this->addBase($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addBase(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addBase(new FHIRResourceType(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_BASE]) || isset($data[self::FIELD_BASE_EXT])) { + if (isset($data[self::FIELD_BASE])) { + $value = $data[self::FIELD_BASE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_BASE_EXT]) && is_array($data[self::FIELD_BASE_EXT])) { + $ext = $data[self::FIELD_BASE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->addBase($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRResourceType) { + $this->addBase($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addBase(new FHIRResourceType(array_merge($v, $iext))); + } else { + $this->addBase(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addBase(new FHIRResourceType($v)); } + } elseif (is_array($value)) { + $this->addBase(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->addBase(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addBase(new FHIRResourceType($iext)); } - } elseif ($data[self::FIELD_BASE] instanceof FHIRResourceType) { - $this->addBase($data[self::FIELD_BASE]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_BASE])) { - $this->addBase(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_BASE]] + $ext)); - } else { - $this->addBase(new FHIRResourceType($data[self::FIELD_BASE])); } } - if (isset($data[self::FIELD_CHAIN])) { - $ext = (isset($data[self::FIELD_CHAIN_EXT]) && is_array($data[self::FIELD_CHAIN_EXT])) - ? $data[self::FIELD_CHAIN_EXT] - : null; - if (is_array($data[self::FIELD_CHAIN])) { - foreach($data[self::FIELD_CHAIN] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addChain($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addChain(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CHAIN]) || isset($data[self::FIELD_CHAIN_EXT])) { + if (isset($data[self::FIELD_CHAIN])) { + $value = $data[self::FIELD_CHAIN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CHAIN_EXT]) && is_array($data[self::FIELD_CHAIN_EXT])) { + $ext = $data[self::FIELD_CHAIN_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addChain($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addChain($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addChain(new FHIRString(array_merge($v, $iext))); + } else { + $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addChain(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addChain(new FHIRString(array_merge($ext, $value))); + } else { + $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_CHAIN] instanceof FHIRString) { - $this->addChain($data[self::FIELD_CHAIN]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CHAIN])) { - $this->addChain(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CHAIN]] + $ext)); - } else { - $this->addChain(new FHIRString($data[self::FIELD_CHAIN])); - } - } - if (isset($data[self::FIELD_CODE])) { - $ext = (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) - ? $data[self::FIELD_CODE_EXT] - : null; - if ($data[self::FIELD_CODE] instanceof FHIRCode) { - $this->setCode($data[self::FIELD_CODE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_CODE]] + $ext)); - } else if (is_array($data[self::FIELD_CODE])) { - $this->setCode(new FHIRCode(array_merge($ext, $data[self::FIELD_CODE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addChain(new FHIRString($iext)); } + } + } + if (isset($data[self::FIELD_CODE]) || isset($data[self::FIELD_CODE_EXT])) { + if (isset($data[self::FIELD_CODE])) { + $value = $data[self::FIELD_CODE]; } else { - $this->setCode(new FHIRCode($data[self::FIELD_CODE])); + $value = null; + } + if (isset($data[self::FIELD_CODE_EXT]) && is_array($data[self::FIELD_CODE_EXT])) { + $ext = $data[self::FIELD_CODE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setCode($value); + } else if (is_array($value)) { + $this->setCode(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setCode(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCode(new FHIRCode($ext)); } } - if (isset($data[self::FIELD_COMPARATOR])) { - $ext = (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) - ? $data[self::FIELD_COMPARATOR_EXT] - : null; - if (is_array($data[self::FIELD_COMPARATOR])) { - foreach($data[self::FIELD_COMPARATOR] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRSearchComparator) { - $this->addComparator($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addComparator(new FHIRSearchComparator([FHIRSearchComparator::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addComparator(new FHIRSearchComparator(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_COMPARATOR]) || isset($data[self::FIELD_COMPARATOR_EXT])) { + if (isset($data[self::FIELD_COMPARATOR])) { + $value = $data[self::FIELD_COMPARATOR]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COMPARATOR_EXT]) && is_array($data[self::FIELD_COMPARATOR_EXT])) { + $ext = $data[self::FIELD_COMPARATOR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchComparator) { + $this->addComparator($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRSearchComparator) { + $this->addComparator($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addComparator(new FHIRSearchComparator(array_merge($v, $iext))); + } else { + $this->addComparator(new FHIRSearchComparator([FHIRSearchComparator::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addComparator(new FHIRSearchComparator($v)); } + } elseif (is_array($value)) { + $this->addComparator(new FHIRSearchComparator(array_merge($ext, $value))); + } else { + $this->addComparator(new FHIRSearchComparator([FHIRSearchComparator::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addComparator(new FHIRSearchComparator($iext)); } - } elseif ($data[self::FIELD_COMPARATOR] instanceof FHIRSearchComparator) { - $this->addComparator($data[self::FIELD_COMPARATOR]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_COMPARATOR])) { - $this->addComparator(new FHIRSearchComparator([FHIRSearchComparator::FIELD_VALUE => $data[self::FIELD_COMPARATOR]] + $ext)); - } else { - $this->addComparator(new FHIRSearchComparator($data[self::FIELD_COMPARATOR])); } } if (isset($data[self::FIELD_COMPONENT])) { @@ -618,84 +652,119 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $value = null; } - } - if (isset($data[self::FIELD_DERIVED_FROM])) { - $ext = (isset($data[self::FIELD_DERIVED_FROM_EXT]) && is_array($data[self::FIELD_DERIVED_FROM_EXT])) - ? $data[self::FIELD_DERIVED_FROM_EXT] - : null; - if ($data[self::FIELD_DERIVED_FROM] instanceof FHIRUri) { - $this->setDerivedFrom($data[self::FIELD_DERIVED_FROM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DERIVED_FROM])) { - $this->setDerivedFrom(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DERIVED_FROM]] + $ext)); - } else if (is_array($data[self::FIELD_DERIVED_FROM])) { - $this->setDerivedFrom(new FHIRUri(array_merge($ext, $data[self::FIELD_DERIVED_FROM]))); - } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDerivedFrom(new FHIRUri($data[self::FIELD_DERIVED_FROM])); + $ext = []; } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } - } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + if (isset($data[self::FIELD_DERIVED_FROM]) || isset($data[self::FIELD_DERIVED_FROM_EXT])) { + if (isset($data[self::FIELD_DERIVED_FROM])) { + $value = $data[self::FIELD_DERIVED_FROM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DERIVED_FROM_EXT]) && is_array($data[self::FIELD_DERIVED_FROM_EXT])) { + $ext = $data[self::FIELD_DERIVED_FROM_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDerivedFrom($value); + } else if (is_array($value)) { + $this->setDerivedFrom(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDerivedFrom(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDerivedFrom(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } - if (isset($data[self::FIELD_EXPRESSION])) { - $ext = (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) - ? $data[self::FIELD_EXPRESSION_EXT] - : null; - if ($data[self::FIELD_EXPRESSION] instanceof FHIRString) { - $this->setExpression($data[self::FIELD_EXPRESSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_EXPRESSION]] + $ext)); - } else if (is_array($data[self::FIELD_EXPRESSION])) { - $this->setExpression(new FHIRString(array_merge($ext, $data[self::FIELD_EXPRESSION]))); + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXPRESSION]) || isset($data[self::FIELD_EXPRESSION_EXT])) { + if (isset($data[self::FIELD_EXPRESSION])) { + $value = $data[self::FIELD_EXPRESSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPRESSION_EXT]) && is_array($data[self::FIELD_EXPRESSION_EXT])) { + $ext = $data[self::FIELD_EXPRESSION_EXT]; } else { - $this->setExpression(new FHIRString($data[self::FIELD_EXPRESSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setExpression($value); + } else if (is_array($value)) { + $this->setExpression(new FHIRString(array_merge($ext, $value))); + } else { + $this->setExpression(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExpression(new FHIRString($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -716,158 +785,218 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_MODIFIER])) { - $ext = (isset($data[self::FIELD_MODIFIER_EXT]) && is_array($data[self::FIELD_MODIFIER_EXT])) - ? $data[self::FIELD_MODIFIER_EXT] - : null; - if (is_array($data[self::FIELD_MODIFIER])) { - foreach($data[self::FIELD_MODIFIER] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRSearchModifierCode) { - $this->addModifier($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addModifier(new FHIRSearchModifierCode(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_MODIFIER]) || isset($data[self::FIELD_MODIFIER_EXT])) { + if (isset($data[self::FIELD_MODIFIER])) { + $value = $data[self::FIELD_MODIFIER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_MODIFIER_EXT]) && is_array($data[self::FIELD_MODIFIER_EXT])) { + $ext = $data[self::FIELD_MODIFIER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchModifierCode) { + $this->addModifier($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRSearchModifierCode) { + $this->addModifier($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addModifier(new FHIRSearchModifierCode(array_merge($v, $iext))); + } else { + $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addModifier(new FHIRSearchModifierCode($v)); } + } elseif (is_array($value)) { + $this->addModifier(new FHIRSearchModifierCode(array_merge($ext, $value))); + } else { + $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_MODIFIER] instanceof FHIRSearchModifierCode) { - $this->addModifier($data[self::FIELD_MODIFIER]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_MODIFIER])) { - $this->addModifier(new FHIRSearchModifierCode([FHIRSearchModifierCode::FIELD_VALUE => $data[self::FIELD_MODIFIER]] + $ext)); - } else { - $this->addModifier(new FHIRSearchModifierCode($data[self::FIELD_MODIFIER])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addModifier(new FHIRSearchModifierCode($iext)); } - } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $value = null; } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } - if (isset($data[self::FIELD_TARGET])) { - $ext = (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) - ? $data[self::FIELD_TARGET_EXT] - : null; - if (is_array($data[self::FIELD_TARGET])) { - foreach($data[self::FIELD_TARGET] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRResourceType) { - $this->addTarget($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addTarget(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addTarget(new FHIRResourceType(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_TARGET]) || isset($data[self::FIELD_TARGET_EXT])) { + if (isset($data[self::FIELD_TARGET])) { + $value = $data[self::FIELD_TARGET]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TARGET_EXT]) && is_array($data[self::FIELD_TARGET_EXT])) { + $ext = $data[self::FIELD_TARGET_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRResourceType) { + $this->addTarget($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRResourceType) { + $this->addTarget($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addTarget(new FHIRResourceType(array_merge($v, $iext))); + } else { + $this->addTarget(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addTarget(new FHIRResourceType($v)); } + } elseif (is_array($value)) { + $this->addTarget(new FHIRResourceType(array_merge($ext, $value))); + } else { + $this->addTarget(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_TARGET] instanceof FHIRResourceType) { - $this->addTarget($data[self::FIELD_TARGET]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_TARGET])) { - $this->addTarget(new FHIRResourceType([FHIRResourceType::FIELD_VALUE => $data[self::FIELD_TARGET]] + $ext)); - } else { - $this->addTarget(new FHIRResourceType($data[self::FIELD_TARGET])); - } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRSearchParamType) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRSearchParamType(array_merge($ext, $data[self::FIELD_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addTarget(new FHIRResourceType($iext)); } - } else { - $this->setType(new FHIRSearchParamType($data[self::FIELD_TYPE])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSearchParamType) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRSearchParamType(array_merge($ext, $value))); + } else { + $this->setType(new FHIRSearchParamType([FHIRSearchParamType::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRSearchParamType($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -888,52 +1017,73 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; } - } - if (isset($data[self::FIELD_XPATH])) { - $ext = (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) - ? $data[self::FIELD_XPATH_EXT] - : null; - if ($data[self::FIELD_XPATH] instanceof FHIRString) { - $this->setXpath($data[self::FIELD_XPATH]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_XPATH]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH])) { - $this->setXpath(new FHIRString(array_merge($ext, $data[self::FIELD_XPATH]))); - } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setXpath(new FHIRString($data[self::FIELD_XPATH])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } - if (isset($data[self::FIELD_XPATH_USAGE])) { - $ext = (isset($data[self::FIELD_XPATH_USAGE_EXT]) && is_array($data[self::FIELD_XPATH_USAGE_EXT])) - ? $data[self::FIELD_XPATH_USAGE_EXT] - : null; - if ($data[self::FIELD_XPATH_USAGE] instanceof FHIRXPathUsageType) { - $this->setXpathUsage($data[self::FIELD_XPATH_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_XPATH_USAGE])) { - $this->setXpathUsage(new FHIRXPathUsageType([FHIRXPathUsageType::FIELD_VALUE => $data[self::FIELD_XPATH_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_XPATH_USAGE])) { - $this->setXpathUsage(new FHIRXPathUsageType(array_merge($ext, $data[self::FIELD_XPATH_USAGE]))); + if (isset($data[self::FIELD_XPATH]) || isset($data[self::FIELD_XPATH_EXT])) { + if (isset($data[self::FIELD_XPATH])) { + $value = $data[self::FIELD_XPATH]; + } else { + $value = null; + } + if (isset($data[self::FIELD_XPATH_EXT]) && is_array($data[self::FIELD_XPATH_EXT])) { + $ext = $data[self::FIELD_XPATH_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setXpath($value); + } else if (is_array($value)) { + $this->setXpath(new FHIRString(array_merge($ext, $value))); + } else { + $this->setXpath(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setXpath(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_XPATH_USAGE]) || isset($data[self::FIELD_XPATH_USAGE_EXT])) { + if (isset($data[self::FIELD_XPATH_USAGE])) { + $value = $data[self::FIELD_XPATH_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_XPATH_USAGE_EXT]) && is_array($data[self::FIELD_XPATH_USAGE_EXT])) { + $ext = $data[self::FIELD_XPATH_USAGE_EXT]; } else { - $this->setXpathUsage(new FHIRXPathUsageType($data[self::FIELD_XPATH_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRXPathUsageType) { + $this->setXpathUsage($value); + } else if (is_array($value)) { + $this->setXpathUsage(new FHIRXPathUsageType(array_merge($ext, $value))); + } else { + $this->setXpathUsage(new FHIRXPathUsageType([FHIRXPathUsageType::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setXpathUsage(new FHIRXPathUsageType($ext)); } } } @@ -2129,8 +2279,8 @@ public function setXpathUsage(FHIRXPathUsageType $xpathUsage = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2501,196 +2651,293 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBase())) { $a[self::FIELD_BASE] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_BASE][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_BASE_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRResourceType::FIELD_VALUE]) || array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_BASE_EXT][] = null; + unset($enc[FHIRResourceType::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_BASE_EXT] = $encs; + } } if ([] !== ($vs = $this->getChain())) { $a[self::FIELD_CHAIN] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CHAIN][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CHAIN_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CHAIN_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CHAIN_EXT] = $encs; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_CODE_EXT] = $enc; } } if ([] !== ($vs = $this->getComparator())) { $a[self::FIELD_COMPARATOR] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_COMPARATOR][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_COMPARATOR_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRSearchComparator::FIELD_VALUE]) || array_key_exists(FHIRSearchComparator::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_COMPARATOR_EXT][] = null; + unset($enc[FHIRSearchComparator::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_COMPARATOR_EXT] = $encs; + } } if ([] !== ($vs = $this->getComponent())) { - $a[self::FIELD_COMPONENT] = $vs; + $a[self::FIELD_COMPONENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_COMPONENT][] = $v; + } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDerivedFrom())) { $a[self::FIELD_DERIVED_FROM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DERIVED_FROM_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getExpression())) { $a[self::FIELD_EXPRESSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_EXPRESSION_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getModifier())) { $a[self::FIELD_MODIFIER] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_MODIFIER][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_MODIFIER_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRSearchModifierCode::FIELD_VALUE]) || array_key_exists(FHIRSearchModifierCode::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_MODIFIER_EXT][] = null; + unset($enc[FHIRSearchModifierCode::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_MODIFIER_EXT] = $encs; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTarget())) { $a[self::FIELD_TARGET] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_TARGET][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_TARGET_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRResourceType::FIELD_VALUE]) || array_key_exists(FHIRResourceType::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_TARGET_EXT][] = null; + unset($enc[FHIRResourceType::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_TARGET_EXT] = $encs; + } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSearchParamType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSearchParamType::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } if (null !== ($v = $this->getXpath())) { $a[self::FIELD_XPATH] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_XPATH_EXT] = $enc; } } if (null !== ($v = $this->getXpathUsage())) { $a[self::FIELD_XPATH_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRXPathUsageType::FIELD_VALUE, $enc)))) { + unset($enc[FHIRXPathUsageType::FIELD_VALUE]); $a[self::FIELD_XPATH_USAGE_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSequence.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSequence.php index 3da7007ebd..c62c1ff149 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSequence.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSequence.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRSequence extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_VARIANT = 'variant'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A whole number @@ -307,20 +307,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_COORDINATE_SYSTEM])) { - $ext = (isset($data[self::FIELD_COORDINATE_SYSTEM_EXT]) && is_array($data[self::FIELD_COORDINATE_SYSTEM_EXT])) - ? $data[self::FIELD_COORDINATE_SYSTEM_EXT] - : null; - if ($data[self::FIELD_COORDINATE_SYSTEM] instanceof FHIRInteger) { - $this->setCoordinateSystem($data[self::FIELD_COORDINATE_SYSTEM]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COORDINATE_SYSTEM])) { - $this->setCoordinateSystem(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_COORDINATE_SYSTEM]] + $ext)); - } else if (is_array($data[self::FIELD_COORDINATE_SYSTEM])) { - $this->setCoordinateSystem(new FHIRInteger(array_merge($ext, $data[self::FIELD_COORDINATE_SYSTEM]))); - } + if (isset($data[self::FIELD_COORDINATE_SYSTEM]) || isset($data[self::FIELD_COORDINATE_SYSTEM_EXT])) { + if (isset($data[self::FIELD_COORDINATE_SYSTEM])) { + $value = $data[self::FIELD_COORDINATE_SYSTEM]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COORDINATE_SYSTEM_EXT]) && is_array($data[self::FIELD_COORDINATE_SYSTEM_EXT])) { + $ext = $data[self::FIELD_COORDINATE_SYSTEM_EXT]; } else { - $this->setCoordinateSystem(new FHIRInteger($data[self::FIELD_COORDINATE_SYSTEM])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setCoordinateSystem($value); + } else if (is_array($value)) { + $this->setCoordinateSystem(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setCoordinateSystem(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCoordinateSystem(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_DEVICE])) { @@ -348,20 +355,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_OBSERVED_SEQ])) { - $ext = (isset($data[self::FIELD_OBSERVED_SEQ_EXT]) && is_array($data[self::FIELD_OBSERVED_SEQ_EXT])) - ? $data[self::FIELD_OBSERVED_SEQ_EXT] - : null; - if ($data[self::FIELD_OBSERVED_SEQ] instanceof FHIRString) { - $this->setObservedSeq($data[self::FIELD_OBSERVED_SEQ]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OBSERVED_SEQ])) { - $this->setObservedSeq(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_OBSERVED_SEQ]] + $ext)); - } else if (is_array($data[self::FIELD_OBSERVED_SEQ])) { - $this->setObservedSeq(new FHIRString(array_merge($ext, $data[self::FIELD_OBSERVED_SEQ]))); - } + if (isset($data[self::FIELD_OBSERVED_SEQ]) || isset($data[self::FIELD_OBSERVED_SEQ_EXT])) { + if (isset($data[self::FIELD_OBSERVED_SEQ])) { + $value = $data[self::FIELD_OBSERVED_SEQ]; } else { - $this->setObservedSeq(new FHIRString($data[self::FIELD_OBSERVED_SEQ])); + $value = null; + } + if (isset($data[self::FIELD_OBSERVED_SEQ_EXT]) && is_array($data[self::FIELD_OBSERVED_SEQ_EXT])) { + $ext = $data[self::FIELD_OBSERVED_SEQ_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setObservedSeq($value); + } else if (is_array($value)) { + $this->setObservedSeq(new FHIRString(array_merge($ext, $value))); + } else { + $this->setObservedSeq(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setObservedSeq(new FHIRString($ext)); } } if (isset($data[self::FIELD_PATIENT])) { @@ -421,20 +435,27 @@ public function __construct($data = null) $this->setQuantity(new FHIRQuantity($data[self::FIELD_QUANTITY])); } } - if (isset($data[self::FIELD_READ_COVERAGE])) { - $ext = (isset($data[self::FIELD_READ_COVERAGE_EXT]) && is_array($data[self::FIELD_READ_COVERAGE_EXT])) - ? $data[self::FIELD_READ_COVERAGE_EXT] - : null; - if ($data[self::FIELD_READ_COVERAGE] instanceof FHIRInteger) { - $this->setReadCoverage($data[self::FIELD_READ_COVERAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_READ_COVERAGE])) { - $this->setReadCoverage(new FHIRInteger([FHIRInteger::FIELD_VALUE => $data[self::FIELD_READ_COVERAGE]] + $ext)); - } else if (is_array($data[self::FIELD_READ_COVERAGE])) { - $this->setReadCoverage(new FHIRInteger(array_merge($ext, $data[self::FIELD_READ_COVERAGE]))); - } + if (isset($data[self::FIELD_READ_COVERAGE]) || isset($data[self::FIELD_READ_COVERAGE_EXT])) { + if (isset($data[self::FIELD_READ_COVERAGE])) { + $value = $data[self::FIELD_READ_COVERAGE]; } else { - $this->setReadCoverage(new FHIRInteger($data[self::FIELD_READ_COVERAGE])); + $value = null; + } + if (isset($data[self::FIELD_READ_COVERAGE_EXT]) && is_array($data[self::FIELD_READ_COVERAGE_EXT])) { + $ext = $data[self::FIELD_READ_COVERAGE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInteger) { + $this->setReadCoverage($value); + } else if (is_array($value)) { + $this->setReadCoverage(new FHIRInteger(array_merge($ext, $value))); + } else { + $this->setReadCoverage(new FHIRInteger([FHIRInteger::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReadCoverage(new FHIRInteger($ext)); } } if (isset($data[self::FIELD_REFERENCE_SEQ])) { @@ -469,20 +490,27 @@ public function __construct($data = null) $this->setSpecimen(new FHIRReference($data[self::FIELD_SPECIMEN])); } } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); - } + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); } } if (isset($data[self::FIELD_VARIANT])) { @@ -1170,8 +1198,8 @@ public function setVariant(array $variant = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1396,8 +1424,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getCoordinateSystem())) { $a[self::FIELD_COORDINATE_SYSTEM] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_COORDINATE_SYSTEM_EXT] = $enc; } } @@ -1405,12 +1435,20 @@ public function jsonSerialize() $a[self::FIELD_DEVICE] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getObservedSeq())) { $a[self::FIELD_OBSERVED_SEQ] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_OBSERVED_SEQ_EXT] = $enc; } } @@ -1421,18 +1459,32 @@ public function jsonSerialize() $a[self::FIELD_PERFORMER] = $v; } if ([] !== ($vs = $this->getPointer())) { - $a[self::FIELD_POINTER] = $vs; + $a[self::FIELD_POINTER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_POINTER][] = $v; + } } if ([] !== ($vs = $this->getQuality())) { - $a[self::FIELD_QUALITY] = $vs; + $a[self::FIELD_QUALITY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_QUALITY][] = $v; + } } if (null !== ($v = $this->getQuantity())) { $a[self::FIELD_QUANTITY] = $v; } if (null !== ($v = $this->getReadCoverage())) { $a[self::FIELD_READ_COVERAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInteger::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInteger::FIELD_VALUE]); $a[self::FIELD_READ_COVERAGE_EXT] = $enc; } } @@ -1440,20 +1492,37 @@ public function jsonSerialize() $a[self::FIELD_REFERENCE_SEQ] = $v; } if ([] !== ($vs = $this->getRepository())) { - $a[self::FIELD_REPOSITORY] = $vs; + $a[self::FIELD_REPOSITORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REPOSITORY][] = $v; + } } if (null !== ($v = $this->getSpecimen())) { $a[self::FIELD_SPECIMEN] = $v; } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if ([] !== ($vs = $this->getVariant())) { - $a[self::FIELD_VARIANT] = $vs; + $a[self::FIELD_VARIANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VARIANT][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRServiceDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRServiceDefinition.php index e6891353cb..eff820ccb0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRServiceDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRServiceDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -138,7 +138,7 @@ class FHIRServiceDefinition extends FHIRDomainResource implements PHPFHIRContain const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date or partial date (e.g. just year or year + month). There is no time zone. @@ -505,20 +505,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_APPROVAL_DATE])) { - $ext = (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) - ? $data[self::FIELD_APPROVAL_DATE_EXT] - : null; - if ($data[self::FIELD_APPROVAL_DATE] instanceof FHIRDate) { - $this->setApprovalDate($data[self::FIELD_APPROVAL_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_APPROVAL_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_APPROVAL_DATE])) { - $this->setApprovalDate(new FHIRDate(array_merge($ext, $data[self::FIELD_APPROVAL_DATE]))); - } + if (isset($data[self::FIELD_APPROVAL_DATE]) || isset($data[self::FIELD_APPROVAL_DATE_EXT])) { + if (isset($data[self::FIELD_APPROVAL_DATE])) { + $value = $data[self::FIELD_APPROVAL_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_APPROVAL_DATE_EXT]) && is_array($data[self::FIELD_APPROVAL_DATE_EXT])) { + $ext = $data[self::FIELD_APPROVAL_DATE_EXT]; } else { - $this->setApprovalDate(new FHIRDate($data[self::FIELD_APPROVAL_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setApprovalDate($value); + } else if (is_array($value)) { + $this->setApprovalDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setApprovalDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setApprovalDate(new FHIRDate($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -557,20 +564,27 @@ public function __construct($data = null) $this->addContributor(new FHIRContributor($data[self::FIELD_CONTRIBUTOR])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DATA_REQUIREMENT])) { @@ -591,36 +605,50 @@ public function __construct($data = null) $this->addDataRequirement(new FHIRDataRequirement($data[self::FIELD_DATA_REQUIREMENT])); } } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EFFECTIVE_PERIOD])) { @@ -630,20 +658,27 @@ public function __construct($data = null) $this->setEffectivePeriod(new FHIRPeriod($data[self::FIELD_EFFECTIVE_PERIOD])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -682,36 +717,50 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { - $ext = (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) - ? $data[self::FIELD_LAST_REVIEW_DATE_EXT] - : null; - if ($data[self::FIELD_LAST_REVIEW_DATE] instanceof FHIRDate) { - $this->setLastReviewDate($data[self::FIELD_LAST_REVIEW_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $data[self::FIELD_LAST_REVIEW_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_REVIEW_DATE])) { - $this->setLastReviewDate(new FHIRDate(array_merge($ext, $data[self::FIELD_LAST_REVIEW_DATE]))); - } + if (isset($data[self::FIELD_LAST_REVIEW_DATE]) || isset($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + if (isset($data[self::FIELD_LAST_REVIEW_DATE])) { + $value = $data[self::FIELD_LAST_REVIEW_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_LAST_REVIEW_DATE_EXT]) && is_array($data[self::FIELD_LAST_REVIEW_DATE_EXT])) { + $ext = $data[self::FIELD_LAST_REVIEW_DATE_EXT]; } else { - $this->setLastReviewDate(new FHIRDate($data[self::FIELD_LAST_REVIEW_DATE])); - } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDate) { + $this->setLastReviewDate($value); + } else if (is_array($value)) { + $this->setLastReviewDate(new FHIRDate(array_merge($ext, $value))); + } else { + $this->setLastReviewDate(new FHIRDate([FHIRDate::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setLastReviewDate(new FHIRDate($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_OPERATION_DEFINITION])) { @@ -721,36 +770,50 @@ public function __construct($data = null) $this->setOperationDefinition(new FHIRReference($data[self::FIELD_OPERATION_DEFINITION])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RELATED_ARTIFACT])) { @@ -771,36 +834,50 @@ public function __construct($data = null) $this->addRelatedArtifact(new FHIRRelatedArtifact($data[self::FIELD_RELATED_ARTIFACT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } if (isset($data[self::FIELD_TOPIC])) { @@ -839,36 +916,50 @@ public function __construct($data = null) $this->addTrigger(new FHIRTriggerDefinition($data[self::FIELD_TRIGGER])); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); - } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); - } - } - if (isset($data[self::FIELD_USAGE])) { - $ext = (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) - ? $data[self::FIELD_USAGE_EXT] - : null; - if ($data[self::FIELD_USAGE] instanceof FHIRString) { - $this->setUsage($data[self::FIELD_USAGE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_USAGE]] + $ext)); - } else if (is_array($data[self::FIELD_USAGE])) { - $this->setUsage(new FHIRString(array_merge($ext, $data[self::FIELD_USAGE]))); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_USAGE]) || isset($data[self::FIELD_USAGE_EXT])) { + if (isset($data[self::FIELD_USAGE])) { + $value = $data[self::FIELD_USAGE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_USAGE_EXT]) && is_array($data[self::FIELD_USAGE_EXT])) { + $ext = $data[self::FIELD_USAGE_EXT]; } else { - $this->setUsage(new FHIRString($data[self::FIELD_USAGE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setUsage($value); + } else if (is_array($value)) { + $this->setUsage(new FHIRString(array_merge($ext, $value))); + } else { + $this->setUsage(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUsage(new FHIRString($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -889,20 +980,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2186,8 +2284,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2572,38 +2670,64 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getApprovalDate())) { $a[self::FIELD_APPROVAL_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_APPROVAL_DATE_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getContributor())) { - $a[self::FIELD_CONTRIBUTOR] = $vs; + $a[self::FIELD_CONTRIBUTOR] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTRIBUTOR][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if ([] !== ($vs = $this->getDataRequirement())) { - $a[self::FIELD_DATA_REQUIREMENT] = $vs; + $a[self::FIELD_DATA_REQUIREMENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DATA_REQUIREMENT][] = $v; + } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2612,28 +2736,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getLastReviewDate())) { $a[self::FIELD_LAST_REVIEW_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDate::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDate::FIELD_VALUE]); $a[self::FIELD_LAST_REVIEW_DATE_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } @@ -2642,65 +2784,106 @@ public function jsonSerialize() } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRelatedArtifact())) { - $a[self::FIELD_RELATED_ARTIFACT] = $vs; + $a[self::FIELD_RELATED_ARTIFACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELATED_ARTIFACT][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if ([] !== ($vs = $this->getTopic())) { - $a[self::FIELD_TOPIC] = $vs; + $a[self::FIELD_TOPIC] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TOPIC][] = $v; + } } if ([] !== ($vs = $this->getTrigger())) { - $a[self::FIELD_TRIGGER] = $vs; + $a[self::FIELD_TRIGGER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TRIGGER][] = $v; + } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if (null !== ($v = $this->getUsage())) { $a[self::FIELD_USAGE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_USAGE_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSlot.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSlot.php index 19ee4c6e92..63d4ed6bff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSlot.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSlot.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRSlot extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -269,36 +269,50 @@ public function __construct($data = null) $this->setAppointmentType(new FHIRCodeableConcept($data[self::FIELD_APPOINTMENT_TYPE])); } } - if (isset($data[self::FIELD_COMMENT])) { - $ext = (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) - ? $data[self::FIELD_COMMENT_EXT] - : null; - if ($data[self::FIELD_COMMENT] instanceof FHIRString) { - $this->setComment($data[self::FIELD_COMMENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_COMMENT]] + $ext)); - } else if (is_array($data[self::FIELD_COMMENT])) { - $this->setComment(new FHIRString(array_merge($ext, $data[self::FIELD_COMMENT]))); - } + if (isset($data[self::FIELD_COMMENT]) || isset($data[self::FIELD_COMMENT_EXT])) { + if (isset($data[self::FIELD_COMMENT])) { + $value = $data[self::FIELD_COMMENT]; } else { - $this->setComment(new FHIRString($data[self::FIELD_COMMENT])); + $value = null; } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + if (isset($data[self::FIELD_COMMENT_EXT]) && is_array($data[self::FIELD_COMMENT_EXT])) { + $ext = $data[self::FIELD_COMMENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setComment($value); + } else if (is_array($value)) { + $this->setComment(new FHIRString(array_merge($ext, $value))); + } else { + $this->setComment(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setComment(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -319,20 +333,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_OVERBOOKED])) { - $ext = (isset($data[self::FIELD_OVERBOOKED_EXT]) && is_array($data[self::FIELD_OVERBOOKED_EXT])) - ? $data[self::FIELD_OVERBOOKED_EXT] - : null; - if ($data[self::FIELD_OVERBOOKED] instanceof FHIRBoolean) { - $this->setOverbooked($data[self::FIELD_OVERBOOKED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OVERBOOKED])) { - $this->setOverbooked(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_OVERBOOKED]] + $ext)); - } else if (is_array($data[self::FIELD_OVERBOOKED])) { - $this->setOverbooked(new FHIRBoolean(array_merge($ext, $data[self::FIELD_OVERBOOKED]))); - } + if (isset($data[self::FIELD_OVERBOOKED]) || isset($data[self::FIELD_OVERBOOKED_EXT])) { + if (isset($data[self::FIELD_OVERBOOKED])) { + $value = $data[self::FIELD_OVERBOOKED]; } else { - $this->setOverbooked(new FHIRBoolean($data[self::FIELD_OVERBOOKED])); + $value = null; + } + if (isset($data[self::FIELD_OVERBOOKED_EXT]) && is_array($data[self::FIELD_OVERBOOKED_EXT])) { + $ext = $data[self::FIELD_OVERBOOKED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setOverbooked($value); + } else if (is_array($value)) { + $this->setOverbooked(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setOverbooked(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOverbooked(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_SCHEDULE])) { @@ -385,36 +406,50 @@ public function __construct($data = null) $this->addSpecialty(new FHIRCodeableConcept($data[self::FIELD_SPECIALTY])); } } - if (isset($data[self::FIELD_START])) { - $ext = (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) - ? $data[self::FIELD_START_EXT] - : null; - if ($data[self::FIELD_START] instanceof FHIRInstant) { - $this->setStart($data[self::FIELD_START]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_START]] + $ext)); - } else if (is_array($data[self::FIELD_START])) { - $this->setStart(new FHIRInstant(array_merge($ext, $data[self::FIELD_START]))); - } + if (isset($data[self::FIELD_START]) || isset($data[self::FIELD_START_EXT])) { + if (isset($data[self::FIELD_START])) { + $value = $data[self::FIELD_START]; } else { - $this->setStart(new FHIRInstant($data[self::FIELD_START])); + $value = null; } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSlotStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSlotStatus([FHIRSlotStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSlotStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + if (isset($data[self::FIELD_START_EXT]) && is_array($data[self::FIELD_START_EXT])) { + $ext = $data[self::FIELD_START_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setStart($value); + } else if (is_array($value)) { + $this->setStart(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setStart(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStart(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRSlotStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSlotStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSlotStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSlotStatus([FHIRSlotStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSlotStatus($ext)); } } } @@ -926,8 +961,8 @@ public function setStatus(FHIRSlotStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1117,25 +1152,37 @@ public function jsonSerialize() } if (null !== ($v = $this->getComment())) { $a[self::FIELD_COMMENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_COMMENT_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getOverbooked())) { $a[self::FIELD_OVERBOOKED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_OVERBOOKED_EXT] = $enc; } } @@ -1146,25 +1193,44 @@ public function jsonSerialize() $a[self::FIELD_SERVICE_CATEGORY] = $v; } if ([] !== ($vs = $this->getServiceType())) { - $a[self::FIELD_SERVICE_TYPE] = $vs; + $a[self::FIELD_SERVICE_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SERVICE_TYPE][] = $v; + } } if ([] !== ($vs = $this->getSpecialty())) { - $a[self::FIELD_SPECIALTY] = $vs; + $a[self::FIELD_SPECIALTY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SPECIALTY][] = $v; + } } if (null !== ($v = $this->getStart())) { $a[self::FIELD_START] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_START_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSlotStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSlotStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSpecimen.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSpecimen.php index 1e4c34b11a..b664ca80f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSpecimen.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSpecimen.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRSpecimen extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -368,20 +368,27 @@ public function __construct($data = null) $this->addProcessing(new FHIRSpecimenProcessing($data[self::FIELD_PROCESSING])); } } - if (isset($data[self::FIELD_RECEIVED_TIME])) { - $ext = (isset($data[self::FIELD_RECEIVED_TIME_EXT]) && is_array($data[self::FIELD_RECEIVED_TIME_EXT])) - ? $data[self::FIELD_RECEIVED_TIME_EXT] - : null; - if ($data[self::FIELD_RECEIVED_TIME] instanceof FHIRDateTime) { - $this->setReceivedTime($data[self::FIELD_RECEIVED_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RECEIVED_TIME])) { - $this->setReceivedTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_RECEIVED_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_RECEIVED_TIME])) { - $this->setReceivedTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_RECEIVED_TIME]))); - } + if (isset($data[self::FIELD_RECEIVED_TIME]) || isset($data[self::FIELD_RECEIVED_TIME_EXT])) { + if (isset($data[self::FIELD_RECEIVED_TIME])) { + $value = $data[self::FIELD_RECEIVED_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_RECEIVED_TIME_EXT]) && is_array($data[self::FIELD_RECEIVED_TIME_EXT])) { + $ext = $data[self::FIELD_RECEIVED_TIME_EXT]; } else { - $this->setReceivedTime(new FHIRDateTime($data[self::FIELD_RECEIVED_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setReceivedTime($value); + } else if (is_array($value)) { + $this->setReceivedTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setReceivedTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setReceivedTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_REQUEST])) { @@ -402,20 +409,27 @@ public function __construct($data = null) $this->addRequest(new FHIRReference($data[self::FIELD_REQUEST])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSpecimenStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSpecimenStatus([FHIRSpecimenStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSpecimenStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRSpecimenStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSpecimenStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSpecimenStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSpecimenStatus([FHIRSpecimenStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSpecimenStatus($ext)); } } if (isset($data[self::FIELD_SUBJECT])) { @@ -1002,8 +1016,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1198,34 +1212,74 @@ public function jsonSerialize() $a[self::FIELD_COLLECTION] = $v; } if ([] !== ($vs = $this->getContainer())) { - $a[self::FIELD_CONTAINER] = $vs; + $a[self::FIELD_CONTAINER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTAINER][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getParent())) { - $a[self::FIELD_PARENT] = $vs; + $a[self::FIELD_PARENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARENT][] = $v; + } } if ([] !== ($vs = $this->getProcessing())) { - $a[self::FIELD_PROCESSING] = $vs; + $a[self::FIELD_PROCESSING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROCESSING][] = $v; + } } if (null !== ($v = $this->getReceivedTime())) { $a[self::FIELD_RECEIVED_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_RECEIVED_TIME_EXT] = $enc; } } if ([] !== ($vs = $this->getRequest())) { - $a[self::FIELD_REQUEST] = $vs; + $a[self::FIELD_REQUEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_REQUEST][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSpecimenStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSpecimenStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1235,6 +1289,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php index af911cabe2..ad384a319b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureDefinition.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -149,7 +149,7 @@ class FHIRStructureDefinition extends FHIRDomainResource implements PHPFHIRConta const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Value of "true" or "false" @@ -547,36 +547,50 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_ABSTRACT])) { - $ext = (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) - ? $data[self::FIELD_ABSTRACT_EXT] - : null; - if ($data[self::FIELD_ABSTRACT] instanceof FHIRBoolean) { - $this->setAbstract($data[self::FIELD_ABSTRACT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_ABSTRACT]] + $ext)); - } else if (is_array($data[self::FIELD_ABSTRACT])) { - $this->setAbstract(new FHIRBoolean(array_merge($ext, $data[self::FIELD_ABSTRACT]))); - } + if (isset($data[self::FIELD_ABSTRACT]) || isset($data[self::FIELD_ABSTRACT_EXT])) { + if (isset($data[self::FIELD_ABSTRACT])) { + $value = $data[self::FIELD_ABSTRACT]; } else { - $this->setAbstract(new FHIRBoolean($data[self::FIELD_ABSTRACT])); + $value = null; } - } - if (isset($data[self::FIELD_BASE_DEFINITION])) { - $ext = (isset($data[self::FIELD_BASE_DEFINITION_EXT]) && is_array($data[self::FIELD_BASE_DEFINITION_EXT])) - ? $data[self::FIELD_BASE_DEFINITION_EXT] - : null; - if ($data[self::FIELD_BASE_DEFINITION] instanceof FHIRUri) { - $this->setBaseDefinition($data[self::FIELD_BASE_DEFINITION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_BASE_DEFINITION])) { - $this->setBaseDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_BASE_DEFINITION]] + $ext)); - } else if (is_array($data[self::FIELD_BASE_DEFINITION])) { - $this->setBaseDefinition(new FHIRUri(array_merge($ext, $data[self::FIELD_BASE_DEFINITION]))); + if (isset($data[self::FIELD_ABSTRACT_EXT]) && is_array($data[self::FIELD_ABSTRACT_EXT])) { + $ext = $data[self::FIELD_ABSTRACT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setAbstract($value); + } else if (is_array($value)) { + $this->setAbstract(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setAbstract(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setAbstract(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_BASE_DEFINITION]) || isset($data[self::FIELD_BASE_DEFINITION_EXT])) { + if (isset($data[self::FIELD_BASE_DEFINITION])) { + $value = $data[self::FIELD_BASE_DEFINITION]; } else { - $this->setBaseDefinition(new FHIRUri($data[self::FIELD_BASE_DEFINITION])); + $value = null; + } + if (isset($data[self::FIELD_BASE_DEFINITION_EXT]) && is_array($data[self::FIELD_BASE_DEFINITION_EXT])) { + $ext = $data[self::FIELD_BASE_DEFINITION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setBaseDefinition($value); + } else if (is_array($value)) { + $this->setBaseDefinition(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setBaseDefinition(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setBaseDefinition(new FHIRUri($ext)); } } if (isset($data[self::FIELD_CONTACT])) { @@ -597,142 +611,195 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_CONTEXT])) { - $ext = (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) - ? $data[self::FIELD_CONTEXT_EXT] - : null; - if (is_array($data[self::FIELD_CONTEXT])) { - foreach($data[self::FIELD_CONTEXT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addContext($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addContext(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CONTEXT]) || isset($data[self::FIELD_CONTEXT_EXT])) { + if (isset($data[self::FIELD_CONTEXT])) { + $value = $data[self::FIELD_CONTEXT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_EXT]) && is_array($data[self::FIELD_CONTEXT_EXT])) { + $ext = $data[self::FIELD_CONTEXT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addContext($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addContext($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addContext(new FHIRString(array_merge($v, $iext))); + } else { + $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addContext(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addContext(new FHIRString(array_merge($ext, $value))); + } else { + $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addContext(new FHIRString($iext)); } - } elseif ($data[self::FIELD_CONTEXT] instanceof FHIRString) { - $this->addContext($data[self::FIELD_CONTEXT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONTEXT])) { - $this->addContext(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTEXT]] + $ext)); - } else { - $this->addContext(new FHIRString($data[self::FIELD_CONTEXT])); } } - if (isset($data[self::FIELD_CONTEXT_INVARIANT])) { - $ext = (isset($data[self::FIELD_CONTEXT_INVARIANT_EXT]) && is_array($data[self::FIELD_CONTEXT_INVARIANT_EXT])) - ? $data[self::FIELD_CONTEXT_INVARIANT_EXT] - : null; - if (is_array($data[self::FIELD_CONTEXT_INVARIANT])) { - foreach($data[self::FIELD_CONTEXT_INVARIANT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRString) { - $this->addContextInvariant($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addContextInvariant(new FHIRString([FHIRString::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addContextInvariant(new FHIRString(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_CONTEXT_INVARIANT]) || isset($data[self::FIELD_CONTEXT_INVARIANT_EXT])) { + if (isset($data[self::FIELD_CONTEXT_INVARIANT])) { + $value = $data[self::FIELD_CONTEXT_INVARIANT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CONTEXT_INVARIANT_EXT]) && is_array($data[self::FIELD_CONTEXT_INVARIANT_EXT])) { + $ext = $data[self::FIELD_CONTEXT_INVARIANT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->addContextInvariant($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRString) { + $this->addContextInvariant($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addContextInvariant(new FHIRString(array_merge($v, $iext))); + } else { + $this->addContextInvariant(new FHIRString([FHIRString::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addContextInvariant(new FHIRString($v)); } + } elseif (is_array($value)) { + $this->addContextInvariant(new FHIRString(array_merge($ext, $value))); + } else { + $this->addContextInvariant(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } - } elseif ($data[self::FIELD_CONTEXT_INVARIANT] instanceof FHIRString) { - $this->addContextInvariant($data[self::FIELD_CONTEXT_INVARIANT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_CONTEXT_INVARIANT])) { - $this->addContextInvariant(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CONTEXT_INVARIANT]] + $ext)); - } else { - $this->addContextInvariant(new FHIRString($data[self::FIELD_CONTEXT_INVARIANT])); - } - } - if (isset($data[self::FIELD_CONTEXT_TYPE])) { - $ext = (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) - ? $data[self::FIELD_CONTEXT_TYPE_EXT] - : null; - if ($data[self::FIELD_CONTEXT_TYPE] instanceof FHIRExtensionContext) { - $this->setContextType($data[self::FIELD_CONTEXT_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRExtensionContext([FHIRExtensionContext::FIELD_VALUE => $data[self::FIELD_CONTEXT_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_CONTEXT_TYPE])) { - $this->setContextType(new FHIRExtensionContext(array_merge($ext, $data[self::FIELD_CONTEXT_TYPE]))); + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addContextInvariant(new FHIRString($iext)); } - } else { - $this->setContextType(new FHIRExtensionContext($data[self::FIELD_CONTEXT_TYPE])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_CONTEXT_TYPE]) || isset($data[self::FIELD_CONTEXT_TYPE_EXT])) { + if (isset($data[self::FIELD_CONTEXT_TYPE])) { + $value = $data[self::FIELD_CONTEXT_TYPE]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); + $value = null; } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); - } + if (isset($data[self::FIELD_CONTEXT_TYPE_EXT]) && is_array($data[self::FIELD_CONTEXT_TYPE_EXT])) { + $ext = $data[self::FIELD_CONTEXT_TYPE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRExtensionContext) { + $this->setContextType($value); + } else if (is_array($value)) { + $this->setContextType(new FHIRExtensionContext(array_merge($ext, $value))); + } else { + $this->setContextType(new FHIRExtensionContext([FHIRExtensionContext::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setContextType(new FHIRExtensionContext($ext)); } } - if (isset($data[self::FIELD_DERIVATION])) { - $ext = (isset($data[self::FIELD_DERIVATION_EXT]) && is_array($data[self::FIELD_DERIVATION_EXT])) - ? $data[self::FIELD_DERIVATION_EXT] - : null; - if ($data[self::FIELD_DERIVATION] instanceof FHIRTypeDerivationRule) { - $this->setDerivation($data[self::FIELD_DERIVATION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DERIVATION])) { - $this->setDerivation(new FHIRTypeDerivationRule([FHIRTypeDerivationRule::FIELD_VALUE => $data[self::FIELD_DERIVATION]] + $ext)); - } else if (is_array($data[self::FIELD_DERIVATION])) { - $this->setDerivation(new FHIRTypeDerivationRule(array_merge($ext, $data[self::FIELD_DERIVATION]))); + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDerivation(new FHIRTypeDerivationRule($data[self::FIELD_DERIVATION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + if (isset($data[self::FIELD_DERIVATION]) || isset($data[self::FIELD_DERIVATION_EXT])) { + if (isset($data[self::FIELD_DERIVATION])) { + $value = $data[self::FIELD_DERIVATION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DERIVATION_EXT]) && is_array($data[self::FIELD_DERIVATION_EXT])) { + $ext = $data[self::FIELD_DERIVATION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTypeDerivationRule) { + $this->setDerivation($value); + } else if (is_array($value)) { + $this->setDerivation(new FHIRTypeDerivationRule(array_merge($ext, $value))); + } else { + $this->setDerivation(new FHIRTypeDerivationRule([FHIRTypeDerivationRule::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDerivation(new FHIRTypeDerivationRule($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DIFFERENTIAL])) { @@ -742,36 +809,50 @@ public function __construct($data = null) $this->setDifferential(new FHIRStructureDefinitionDifferential($data[self::FIELD_DIFFERENTIAL])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; } - } - if (isset($data[self::FIELD_FHIR_VERSION])) { - $ext = (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) - ? $data[self::FIELD_FHIR_VERSION_EXT] - : null; - if ($data[self::FIELD_FHIR_VERSION] instanceof FHIRId) { - $this->setFhirVersion($data[self::FIELD_FHIR_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $data[self::FIELD_FHIR_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_FHIR_VERSION])) { - $this->setFhirVersion(new FHIRId(array_merge($ext, $data[self::FIELD_FHIR_VERSION]))); + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_FHIR_VERSION]) || isset($data[self::FIELD_FHIR_VERSION_EXT])) { + if (isset($data[self::FIELD_FHIR_VERSION])) { + $value = $data[self::FIELD_FHIR_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_FHIR_VERSION_EXT]) && is_array($data[self::FIELD_FHIR_VERSION_EXT])) { + $ext = $data[self::FIELD_FHIR_VERSION_EXT]; } else { - $this->setFhirVersion(new FHIRId($data[self::FIELD_FHIR_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRId) { + $this->setFhirVersion($value); + } else if (is_array($value)) { + $this->setFhirVersion(new FHIRId(array_merge($ext, $value))); + } else { + $this->setFhirVersion(new FHIRId([FHIRId::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setFhirVersion(new FHIRId($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -828,20 +909,27 @@ public function __construct($data = null) $this->addKeyword(new FHIRCoding($data[self::FIELD_KEYWORD])); } } - if (isset($data[self::FIELD_KIND])) { - $ext = (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) - ? $data[self::FIELD_KIND_EXT] - : null; - if ($data[self::FIELD_KIND] instanceof FHIRStructureDefinitionKind) { - $this->setKind($data[self::FIELD_KIND]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_KIND])) { - $this->setKind(new FHIRStructureDefinitionKind([FHIRStructureDefinitionKind::FIELD_VALUE => $data[self::FIELD_KIND]] + $ext)); - } else if (is_array($data[self::FIELD_KIND])) { - $this->setKind(new FHIRStructureDefinitionKind(array_merge($ext, $data[self::FIELD_KIND]))); - } + if (isset($data[self::FIELD_KIND]) || isset($data[self::FIELD_KIND_EXT])) { + if (isset($data[self::FIELD_KIND])) { + $value = $data[self::FIELD_KIND]; + } else { + $value = null; + } + if (isset($data[self::FIELD_KIND_EXT]) && is_array($data[self::FIELD_KIND_EXT])) { + $ext = $data[self::FIELD_KIND_EXT]; } else { - $this->setKind(new FHIRStructureDefinitionKind($data[self::FIELD_KIND])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRStructureDefinitionKind) { + $this->setKind($value); + } else if (is_array($value)) { + $this->setKind(new FHIRStructureDefinitionKind(array_merge($ext, $value))); + } else { + $this->setKind(new FHIRStructureDefinitionKind([FHIRStructureDefinitionKind::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setKind(new FHIRStructureDefinitionKind($ext)); } } if (isset($data[self::FIELD_MAPPING])) { @@ -862,52 +950,73 @@ public function __construct($data = null) $this->addMapping(new FHIRStructureDefinitionMapping($data[self::FIELD_MAPPING])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_SNAPSHOT])) { @@ -917,68 +1026,96 @@ public function __construct($data = null) $this->setSnapshot(new FHIRStructureDefinitionSnapshot($data[self::FIELD_SNAPSHOT])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); + $ext = []; } - } - if (isset($data[self::FIELD_TYPE])) { - $ext = (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) - ? $data[self::FIELD_TYPE_EXT] - : null; - if ($data[self::FIELD_TYPE] instanceof FHIRCode) { - $this->setType($data[self::FIELD_TYPE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $data[self::FIELD_TYPE]] + $ext)); - } else if (is_array($data[self::FIELD_TYPE])) { - $this->setType(new FHIRCode(array_merge($ext, $data[self::FIELD_TYPE]))); + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setType(new FHIRCode($data[self::FIELD_TYPE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); } } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + if (isset($data[self::FIELD_TYPE]) || isset($data[self::FIELD_TYPE_EXT])) { + if (isset($data[self::FIELD_TYPE])) { + $value = $data[self::FIELD_TYPE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TYPE_EXT]) && is_array($data[self::FIELD_TYPE_EXT])) { + $ext = $data[self::FIELD_TYPE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRCode) { + $this->setType($value); + } else if (is_array($value)) { + $this->setType(new FHIRCode(array_merge($ext, $value))); + } else { + $this->setType(new FHIRCode([FHIRCode::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setType(new FHIRCode($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -999,20 +1136,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2371,8 +2515,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2776,83 +2920,119 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAbstract())) { $a[self::FIELD_ABSTRACT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_ABSTRACT_EXT] = $enc; } } if (null !== ($v = $this->getBaseDefinition())) { $a[self::FIELD_BASE_DEFINITION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_BASE_DEFINITION_EXT] = $enc; } } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if ([] !== ($vs = $this->getContext())) { $a[self::FIELD_CONTEXT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONTEXT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONTEXT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONTEXT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONTEXT_EXT] = $encs; + } } if ([] !== ($vs = $this->getContextInvariant())) { $a[self::FIELD_CONTEXT_INVARIANT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_CONTEXT_INVARIANT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_CONTEXT_INVARIANT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRString::FIELD_VALUE]) || array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_CONTEXT_INVARIANT_EXT][] = null; + unset($enc[FHIRString::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_CONTEXT_INVARIANT_EXT] = $encs; + } } if (null !== ($v = $this->getContextType())) { $a[self::FIELD_CONTEXT_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRExtensionContext::FIELD_VALUE, $enc)))) { + unset($enc[FHIRExtensionContext::FIELD_VALUE]); $a[self::FIELD_CONTEXT_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDerivation())) { $a[self::FIELD_DERIVATION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTypeDerivationRule::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTypeDerivationRule::FIELD_VALUE]); $a[self::FIELD_DERIVATION_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2861,55 +3041,91 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getFhirVersion())) { $a[self::FIELD_FHIR_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRId::FIELD_VALUE, $enc)))) { + unset($enc[FHIRId::FIELD_VALUE]); $a[self::FIELD_FHIR_VERSION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if ([] !== ($vs = $this->getKeyword())) { - $a[self::FIELD_KEYWORD] = $vs; + $a[self::FIELD_KEYWORD] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_KEYWORD][] = $v; + } } if (null !== ($v = $this->getKind())) { $a[self::FIELD_KIND] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRStructureDefinitionKind::FIELD_VALUE, $enc)))) { + unset($enc[FHIRStructureDefinitionKind::FIELD_VALUE]); $a[self::FIELD_KIND_EXT] = $enc; } } if ([] !== ($vs = $this->getMapping())) { - $a[self::FIELD_MAPPING] = $vs; + $a[self::FIELD_MAPPING] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_MAPPING][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } @@ -2918,42 +3134,61 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRCode::FIELD_VALUE, $enc)))) { + unset($enc[FHIRCode::FIELD_VALUE]); $a[self::FIELD_TYPE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureMap.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureMap.php index b94b7672c5..465d356168 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureMap.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRStructureMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -122,7 +122,7 @@ class FHIRStructureMap extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -413,68 +413,96 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); - } - } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_GROUP])) { @@ -513,33 +541,42 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_IMPORT])) { - $ext = (isset($data[self::FIELD_IMPORT_EXT]) && is_array($data[self::FIELD_IMPORT_EXT])) - ? $data[self::FIELD_IMPORT_EXT] - : null; - if (is_array($data[self::FIELD_IMPORT])) { - foreach($data[self::FIELD_IMPORT] as $i => $v) { - if (null === $v) { - continue; - } - if ($v instanceof FHIRUri) { - $this->addImport($v); - } elseif (null !== $ext && isset($ext[$i]) && is_array($ext[$i])) { - if (is_scalar($v)) { - $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $ext[$i])); - } elseif (is_array($v)) { - $this->addImport(new FHIRUri(array_merge($v, $ext[$i]))); + if (isset($data[self::FIELD_IMPORT]) || isset($data[self::FIELD_IMPORT_EXT])) { + if (isset($data[self::FIELD_IMPORT])) { + $value = $data[self::FIELD_IMPORT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMPORT_EXT]) && is_array($data[self::FIELD_IMPORT_EXT])) { + $ext = $data[self::FIELD_IMPORT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->addImport($value); + } else if (is_array($value)) { + foreach($value as $i => $v) { + if ($v instanceof FHIRUri) { + $this->addImport($v); + } else { + $iext = (isset($ext[$i]) && is_array($ext[$i])) ? $ext[$i] : []; + if (is_array($v)) { + $this->addImport(new FHIRUri(array_merge($v, $iext))); + } else { + $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $v] + $iext)); + } } - } else { - $this->addImport(new FHIRUri($v)); } + } elseif (is_array($value)) { + $this->addImport(new FHIRUri(array_merge($ext, $value))); + } else { + $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + foreach($ext as $iext) { + $this->addImport(new FHIRUri($iext)); } - } elseif ($data[self::FIELD_IMPORT] instanceof FHIRUri) { - $this->addImport($data[self::FIELD_IMPORT]); - } elseif (null !== $ext && is_scalar($data[self::FIELD_IMPORT])) { - $this->addImport(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_IMPORT]] + $ext)); - } else { - $this->addImport(new FHIRUri($data[self::FIELD_IMPORT])); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -560,68 +597,96 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_STRUCTURE])) { @@ -642,36 +707,50 @@ public function __construct($data = null) $this->addStructure(new FHIRStructureMapStructure($data[self::FIELD_STRUCTURE])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -692,20 +771,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1654,8 +1740,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1959,115 +2045,184 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getGroup())) { - $a[self::FIELD_GROUP] = $vs; + $a[self::FIELD_GROUP] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_GROUP][] = $v; + } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getImport())) { $a[self::FIELD_IMPORT] = []; + $encs = []; + $encValued = false; foreach ($vs as $v) { if (null === $v) { continue; } $a[self::FIELD_IMPORT][] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); - $a[self::FIELD_IMPORT_EXT][] = $enc; + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 === $cnt || (1 === $cnt && (isset($enc[FHIRUri::FIELD_VALUE]) || array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + $encs[] = null; } else { - $a[self::FIELD_IMPORT_EXT][] = null; + unset($enc[FHIRUri::FIELD_VALUE]); + $encs[] = $enc; + $encValued = true; } } + if ($encValued) { + $a[self::FIELD_IMPORT_EXT] = $encs; + } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getStructure())) { - $a[self::FIELD_STRUCTURE] = $vs; + $a[self::FIELD_STRUCTURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_STRUCTURE][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubscription.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubscription.php index 01bcb82e69..75424f66ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubscription.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubscription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRSubscription extends FHIRDomainResource implements PHPFHIRContainedTyp const FIELD_TAG = 'tag'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * The subscription resource is used to define a push based subscription from a @@ -250,84 +250,119 @@ public function __construct($data = null) $this->addContact(new FHIRContactPoint($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_CRITERIA])) { - $ext = (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) - ? $data[self::FIELD_CRITERIA_EXT] - : null; - if ($data[self::FIELD_CRITERIA] instanceof FHIRString) { - $this->setCriteria($data[self::FIELD_CRITERIA]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_CRITERIA]] + $ext)); - } else if (is_array($data[self::FIELD_CRITERIA])) { - $this->setCriteria(new FHIRString(array_merge($ext, $data[self::FIELD_CRITERIA]))); - } + if (isset($data[self::FIELD_CRITERIA]) || isset($data[self::FIELD_CRITERIA_EXT])) { + if (isset($data[self::FIELD_CRITERIA])) { + $value = $data[self::FIELD_CRITERIA]; + } else { + $value = null; + } + if (isset($data[self::FIELD_CRITERIA_EXT]) && is_array($data[self::FIELD_CRITERIA_EXT])) { + $ext = $data[self::FIELD_CRITERIA_EXT]; } else { - $this->setCriteria(new FHIRString($data[self::FIELD_CRITERIA])); - } - } - if (isset($data[self::FIELD_END])) { - $ext = (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) - ? $data[self::FIELD_END_EXT] - : null; - if ($data[self::FIELD_END] instanceof FHIRInstant) { - $this->setEnd($data[self::FIELD_END]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $data[self::FIELD_END]] + $ext)); - } else if (is_array($data[self::FIELD_END])) { - $this->setEnd(new FHIRInstant(array_merge($ext, $data[self::FIELD_END]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setCriteria($value); + } else if (is_array($value)) { + $this->setCriteria(new FHIRString(array_merge($ext, $value))); + } else { + $this->setCriteria(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCriteria(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_END]) || isset($data[self::FIELD_END_EXT])) { + if (isset($data[self::FIELD_END])) { + $value = $data[self::FIELD_END]; + } else { + $value = null; + } + if (isset($data[self::FIELD_END_EXT]) && is_array($data[self::FIELD_END_EXT])) { + $ext = $data[self::FIELD_END_EXT]; } else { - $this->setEnd(new FHIRInstant($data[self::FIELD_END])); - } - } - if (isset($data[self::FIELD_ERROR])) { - $ext = (isset($data[self::FIELD_ERROR_EXT]) && is_array($data[self::FIELD_ERROR_EXT])) - ? $data[self::FIELD_ERROR_EXT] - : null; - if ($data[self::FIELD_ERROR] instanceof FHIRString) { - $this->setError($data[self::FIELD_ERROR]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ERROR])) { - $this->setError(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_ERROR]] + $ext)); - } else if (is_array($data[self::FIELD_ERROR])) { - $this->setError(new FHIRString(array_merge($ext, $data[self::FIELD_ERROR]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRInstant) { + $this->setEnd($value); + } else if (is_array($value)) { + $this->setEnd(new FHIRInstant(array_merge($ext, $value))); + } else { + $this->setEnd(new FHIRInstant([FHIRInstant::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setEnd(new FHIRInstant($ext)); + } + } + if (isset($data[self::FIELD_ERROR]) || isset($data[self::FIELD_ERROR_EXT])) { + if (isset($data[self::FIELD_ERROR])) { + $value = $data[self::FIELD_ERROR]; } else { - $this->setError(new FHIRString($data[self::FIELD_ERROR])); - } - } - if (isset($data[self::FIELD_REASON])) { - $ext = (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) - ? $data[self::FIELD_REASON_EXT] - : null; - if ($data[self::FIELD_REASON] instanceof FHIRString) { - $this->setReason($data[self::FIELD_REASON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_REASON])) { - $this->setReason(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_REASON]] + $ext)); - } else if (is_array($data[self::FIELD_REASON])) { - $this->setReason(new FHIRString(array_merge($ext, $data[self::FIELD_REASON]))); + $value = null; + } + if (isset($data[self::FIELD_ERROR_EXT]) && is_array($data[self::FIELD_ERROR_EXT])) { + $ext = $data[self::FIELD_ERROR_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setError($value); + } else if (is_array($value)) { + $this->setError(new FHIRString(array_merge($ext, $value))); + } else { + $this->setError(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setError(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_REASON]) || isset($data[self::FIELD_REASON_EXT])) { + if (isset($data[self::FIELD_REASON])) { + $value = $data[self::FIELD_REASON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_REASON_EXT]) && is_array($data[self::FIELD_REASON_EXT])) { + $ext = $data[self::FIELD_REASON_EXT]; } else { - $this->setReason(new FHIRString($data[self::FIELD_REASON])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSubscriptionStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSubscriptionStatus([FHIRSubscriptionStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSubscriptionStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setReason($value); + } else if (is_array($value)) { + $this->setReason(new FHIRString(array_merge($ext, $value))); + } else { + $this->setReason(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setReason(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRSubscriptionStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSubscriptionStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSubscriptionStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSubscriptionStatus([FHIRSubscriptionStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSubscriptionStatus($ext)); } } if (isset($data[self::FIELD_TAG])) { @@ -730,8 +765,8 @@ public function setTag(array $tag = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -895,45 +930,70 @@ public function jsonSerialize() $a[self::FIELD_CHANNEL] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCriteria())) { $a[self::FIELD_CRITERIA] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_CRITERIA_EXT] = $enc; } } if (null !== ($v = $this->getEnd())) { $a[self::FIELD_END] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRInstant::FIELD_VALUE, $enc)))) { + unset($enc[FHIRInstant::FIELD_VALUE]); $a[self::FIELD_END_EXT] = $enc; } } if (null !== ($v = $this->getError())) { $a[self::FIELD_ERROR] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_ERROR_EXT] = $enc; } } if (null !== ($v = $this->getReason())) { $a[self::FIELD_REASON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_REASON_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSubscriptionStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSubscriptionStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getTag())) { - $a[self::FIELD_TAG] = $vs; + $a[self::FIELD_TAG] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TAG][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubstance.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubstance.php index ad451f26ea..9e195aed7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubstance.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSubstance.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -95,7 +95,7 @@ class FHIRSubstance extends FHIRDomainResource implements PHPFHIRContainedTypeIn const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A concept that may be defined by a formal reference to a terminology or ontology @@ -221,20 +221,27 @@ public function __construct($data = null) $this->setCode(new FHIRCodeableConcept($data[self::FIELD_CODE])); } } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); - } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -291,20 +298,27 @@ public function __construct($data = null) $this->addInstance(new FHIRSubstanceInstance($data[self::FIELD_INSTANCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFHIRSubstanceStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFHIRSubstanceStatus([FHIRFHIRSubstanceStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFHIRSubstanceStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; + } else { + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; } else { - $this->setStatus(new FHIRFHIRSubstanceStatus($data[self::FIELD_STATUS])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFHIRSubstanceStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFHIRSubstanceStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFHIRSubstanceStatus([FHIRFHIRSubstanceStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFHIRSubstanceStatus($ext)); } } } @@ -663,8 +677,8 @@ public function setStatus(FHIRFHIRSubstanceStatus $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -809,34 +823,65 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getCategory())) { - $a[self::FIELD_CATEGORY] = $vs; + $a[self::FIELD_CATEGORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CATEGORY][] = $v; + } } if (null !== ($v = $this->getCode())) { $a[self::FIELD_CODE] = $v; } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getIngredient())) { - $a[self::FIELD_INGREDIENT] = $vs; + $a[self::FIELD_INGREDIENT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INGREDIENT][] = $v; + } } if ([] !== ($vs = $this->getInstance())) { - $a[self::FIELD_INSTANCE] = $vs; + $a[self::FIELD_INSTANCE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INSTANCE][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFHIRSubstanceStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFHIRSubstanceStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php index 523d51ded6..661d314d42 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyDelivery.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -103,7 +103,7 @@ class FHIRSupplyDelivery extends FHIRDomainResource implements PHPFHIRContainedT const FIELD_TYPE = 'type'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A reference from one resource to another. @@ -309,20 +309,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -382,20 +389,27 @@ public function __construct($data = null) $this->addReceiver(new FHIRReference($data[self::FIELD_RECEIVER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSupplyDeliveryStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyDeliveryStatus([FHIRSupplyDeliveryStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyDeliveryStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRSupplyDeliveryStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSupplyDeliveryStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSupplyDeliveryStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSupplyDeliveryStatus([FHIRSupplyDeliveryStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSupplyDeliveryStatus($ext)); } } if (isset($data[self::FIELD_SUPPLIED_ITEM])) { @@ -944,8 +958,8 @@ public function setType(FHIRCodeableConcept $type = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1119,7 +1133,13 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getDestination())) { $a[self::FIELD_DESTINATION] = $v; @@ -1129,8 +1149,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -1141,18 +1163,32 @@ public function jsonSerialize() $a[self::FIELD_OCCURRENCE_TIMING] = $v; } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; } if ([] !== ($vs = $this->getReceiver())) { - $a[self::FIELD_RECEIVER] = $vs; + $a[self::FIELD_RECEIVER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RECEIVER][] = $v; + } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSupplyDeliveryStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSupplyDeliveryStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1165,6 +1201,9 @@ public function jsonSerialize() if (null !== ($v = $this->getType())) { $a[self::FIELD_TYPE] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php index bdcff2c973..38e2a67122 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRSupplyRequest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -110,7 +110,7 @@ class FHIRSupplyRequest extends FHIRDomainResource implements PHPFHIRContainedTy const FIELD_SUPPLIER = 'supplier'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -310,20 +310,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; + } else { + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_CATEGORY])) { @@ -354,20 +361,27 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $ext = (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) - ? $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT] - : null; - if ($data[self::FIELD_OCCURRENCE_DATE_TIME] instanceof FHIRDateTime) { - $this->setOccurrenceDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_OCCURRENCE_DATE_TIME]] + $ext)); - } else if (is_array($data[self::FIELD_OCCURRENCE_DATE_TIME])) { - $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $data[self::FIELD_OCCURRENCE_DATE_TIME]))); - } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME]) || isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME])) { + $value = $data[self::FIELD_OCCURRENCE_DATE_TIME]; } else { - $this->setOccurrenceDateTime(new FHIRDateTime($data[self::FIELD_OCCURRENCE_DATE_TIME])); + $value = null; + } + if (isset($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]) && is_array($data[self::FIELD_OCCURRENCE_DATE_TIME_EXT])) { + $ext = $data[self::FIELD_OCCURRENCE_DATE_TIME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setOccurrenceDateTime($value); + } else if (is_array($value)) { + $this->setOccurrenceDateTime(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setOccurrenceDateTime(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setOccurrenceDateTime(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_OCCURRENCE_PERIOD])) { @@ -391,20 +405,27 @@ public function __construct($data = null) $this->setOrderedItem(new FHIRSupplyRequestOrderedItem($data[self::FIELD_ORDERED_ITEM])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON_CODEABLE_CONCEPT])) { @@ -428,20 +449,27 @@ public function __construct($data = null) $this->setRequester(new FHIRSupplyRequestRequester($data[self::FIELD_REQUESTER])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRSupplyRequestStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyRequestStatus([FHIRSupplyRequestStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRSupplyRequestStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRSupplyRequestStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRSupplyRequestStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRSupplyRequestStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRSupplyRequestStatus([FHIRSupplyRequestStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRSupplyRequestStatus($ext)); } } if (isset($data[self::FIELD_SUPPLIER])) { @@ -1011,8 +1039,8 @@ public function setSupplier(array $supplier = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1193,8 +1221,10 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } @@ -1212,8 +1242,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getOccurrenceDateTime())) { $a[self::FIELD_OCCURRENCE_DATE_TIME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_OCCURRENCE_DATE_TIME_EXT] = $enc; } } @@ -1228,8 +1260,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } @@ -1244,13 +1278,24 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRSupplyRequestStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRSupplyRequestStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if ([] !== ($vs = $this->getSupplier())) { - $a[self::FIELD_SUPPLIER] = $vs; + $a[self::FIELD_SUPPLIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_SUPPLIER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTask.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTask.php index 3d134289a3..224d659b90 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTask.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTask.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -130,7 +130,7 @@ class FHIRTask extends FHIRDomainResource implements PHPFHIRContainedTypeInterfa const FIELD_STATUS_REASON = 'statusReason'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -482,20 +482,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_AUTHORED_ON])) { - $ext = (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) - ? $data[self::FIELD_AUTHORED_ON_EXT] - : null; - if ($data[self::FIELD_AUTHORED_ON] instanceof FHIRDateTime) { - $this->setAuthoredOn($data[self::FIELD_AUTHORED_ON]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_AUTHORED_ON]] + $ext)); - } else if (is_array($data[self::FIELD_AUTHORED_ON])) { - $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $data[self::FIELD_AUTHORED_ON]))); - } + if (isset($data[self::FIELD_AUTHORED_ON]) || isset($data[self::FIELD_AUTHORED_ON_EXT])) { + if (isset($data[self::FIELD_AUTHORED_ON])) { + $value = $data[self::FIELD_AUTHORED_ON]; } else { - $this->setAuthoredOn(new FHIRDateTime($data[self::FIELD_AUTHORED_ON])); + $value = null; + } + if (isset($data[self::FIELD_AUTHORED_ON_EXT]) && is_array($data[self::FIELD_AUTHORED_ON_EXT])) { + $ext = $data[self::FIELD_AUTHORED_ON_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setAuthoredOn($value); + } else if (is_array($value)) { + $this->setAuthoredOn(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setAuthoredOn(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setAuthoredOn(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_BASED_ON])) { @@ -544,36 +551,50 @@ public function __construct($data = null) $this->setDefinitionReference(new FHIRReference($data[self::FIELD_DEFINITION_REFERENCE])); } } - if (isset($data[self::FIELD_DEFINITION_URI])) { - $ext = (isset($data[self::FIELD_DEFINITION_URI_EXT]) && is_array($data[self::FIELD_DEFINITION_URI_EXT])) - ? $data[self::FIELD_DEFINITION_URI_EXT] - : null; - if ($data[self::FIELD_DEFINITION_URI] instanceof FHIRUri) { - $this->setDefinitionUri($data[self::FIELD_DEFINITION_URI]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DEFINITION_URI])) { - $this->setDefinitionUri(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_DEFINITION_URI]] + $ext)); - } else if (is_array($data[self::FIELD_DEFINITION_URI])) { - $this->setDefinitionUri(new FHIRUri(array_merge($ext, $data[self::FIELD_DEFINITION_URI]))); - } + if (isset($data[self::FIELD_DEFINITION_URI]) || isset($data[self::FIELD_DEFINITION_URI_EXT])) { + if (isset($data[self::FIELD_DEFINITION_URI])) { + $value = $data[self::FIELD_DEFINITION_URI]; } else { - $this->setDefinitionUri(new FHIRUri($data[self::FIELD_DEFINITION_URI])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRString) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRString(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DEFINITION_URI_EXT]) && is_array($data[self::FIELD_DEFINITION_URI_EXT])) { + $ext = $data[self::FIELD_DEFINITION_URI_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setDefinitionUri($value); + } else if (is_array($value)) { + $this->setDefinitionUri(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setDefinitionUri(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDefinitionUri(new FHIRUri($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRString($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRString(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRString($ext)); } } if (isset($data[self::FIELD_EXECUTION_PERIOD])) { @@ -640,36 +661,50 @@ public function __construct($data = null) $this->addInput(new FHIRTaskInput($data[self::FIELD_INPUT])); } } - if (isset($data[self::FIELD_INTENT])) { - $ext = (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) - ? $data[self::FIELD_INTENT_EXT] - : null; - if ($data[self::FIELD_INTENT] instanceof FHIRRequestIntent) { - $this->setIntent($data[self::FIELD_INTENT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $data[self::FIELD_INTENT]] + $ext)); - } else if (is_array($data[self::FIELD_INTENT])) { - $this->setIntent(new FHIRRequestIntent(array_merge($ext, $data[self::FIELD_INTENT]))); - } + if (isset($data[self::FIELD_INTENT]) || isset($data[self::FIELD_INTENT_EXT])) { + if (isset($data[self::FIELD_INTENT])) { + $value = $data[self::FIELD_INTENT]; } else { - $this->setIntent(new FHIRRequestIntent($data[self::FIELD_INTENT])); - } - } - if (isset($data[self::FIELD_LAST_MODIFIED])) { - $ext = (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) - ? $data[self::FIELD_LAST_MODIFIED_EXT] - : null; - if ($data[self::FIELD_LAST_MODIFIED] instanceof FHIRDateTime) { - $this->setLastModified($data[self::FIELD_LAST_MODIFIED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_LAST_MODIFIED]] + $ext)); - } else if (is_array($data[self::FIELD_LAST_MODIFIED])) { - $this->setLastModified(new FHIRDateTime(array_merge($ext, $data[self::FIELD_LAST_MODIFIED]))); + $value = null; + } + if (isset($data[self::FIELD_INTENT_EXT]) && is_array($data[self::FIELD_INTENT_EXT])) { + $ext = $data[self::FIELD_INTENT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestIntent) { + $this->setIntent($value); + } else if (is_array($value)) { + $this->setIntent(new FHIRRequestIntent(array_merge($ext, $value))); + } else { + $this->setIntent(new FHIRRequestIntent([FHIRRequestIntent::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIntent(new FHIRRequestIntent($ext)); + } + } + if (isset($data[self::FIELD_LAST_MODIFIED]) || isset($data[self::FIELD_LAST_MODIFIED_EXT])) { + if (isset($data[self::FIELD_LAST_MODIFIED])) { + $value = $data[self::FIELD_LAST_MODIFIED]; } else { - $this->setLastModified(new FHIRDateTime($data[self::FIELD_LAST_MODIFIED])); + $value = null; + } + if (isset($data[self::FIELD_LAST_MODIFIED_EXT]) && is_array($data[self::FIELD_LAST_MODIFIED_EXT])) { + $ext = $data[self::FIELD_LAST_MODIFIED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setLastModified($value); + } else if (is_array($value)) { + $this->setLastModified(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setLastModified(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setLastModified(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_NOTE])) { @@ -751,20 +786,27 @@ public function __construct($data = null) $this->addPerformerType(new FHIRCodeableConcept($data[self::FIELD_PERFORMER_TYPE])); } } - if (isset($data[self::FIELD_PRIORITY])) { - $ext = (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) - ? $data[self::FIELD_PRIORITY_EXT] - : null; - if ($data[self::FIELD_PRIORITY] instanceof FHIRRequestPriority) { - $this->setPriority($data[self::FIELD_PRIORITY]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $data[self::FIELD_PRIORITY]] + $ext)); - } else if (is_array($data[self::FIELD_PRIORITY])) { - $this->setPriority(new FHIRRequestPriority(array_merge($ext, $data[self::FIELD_PRIORITY]))); - } + if (isset($data[self::FIELD_PRIORITY]) || isset($data[self::FIELD_PRIORITY_EXT])) { + if (isset($data[self::FIELD_PRIORITY])) { + $value = $data[self::FIELD_PRIORITY]; } else { - $this->setPriority(new FHIRRequestPriority($data[self::FIELD_PRIORITY])); + $value = null; + } + if (isset($data[self::FIELD_PRIORITY_EXT]) && is_array($data[self::FIELD_PRIORITY_EXT])) { + $ext = $data[self::FIELD_PRIORITY_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRRequestPriority) { + $this->setPriority($value); + } else if (is_array($value)) { + $this->setPriority(new FHIRRequestPriority(array_merge($ext, $value))); + } else { + $this->setPriority(new FHIRRequestPriority([FHIRRequestPriority::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPriority(new FHIRRequestPriority($ext)); } } if (isset($data[self::FIELD_REASON])) { @@ -806,20 +848,27 @@ public function __construct($data = null) $this->setRestriction(new FHIRTaskRestriction($data[self::FIELD_RESTRICTION])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRTaskStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRTaskStatus([FHIRTaskStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRTaskStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRTaskStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTaskStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRTaskStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRTaskStatus([FHIRTaskStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRTaskStatus($ext)); } } if (isset($data[self::FIELD_STATUS_REASON])) { @@ -1990,8 +2039,8 @@ public function setStatusReason(FHIRCodeableConcept $statusReason = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2315,13 +2364,21 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getAuthoredOn())) { $a[self::FIELD_AUTHORED_ON] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_AUTHORED_ON_EXT] = $enc; } } if ([] !== ($vs = $this->getBasedOn())) { - $a[self::FIELD_BASED_ON] = $vs; + $a[self::FIELD_BASED_ON] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_BASED_ON][] = $v; + } } if (null !== ($v = $this->getBusinessStatus())) { $a[self::FIELD_BUSINESS_STATUS] = $v; @@ -2337,15 +2394,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getDefinitionUri())) { $a[self::FIELD_DEFINITION_URI] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_DEFINITION_URI_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -2362,44 +2423,86 @@ public function jsonSerialize() $a[self::FIELD_GROUP_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if ([] !== ($vs = $this->getInput())) { - $a[self::FIELD_INPUT] = $vs; + $a[self::FIELD_INPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_INPUT][] = $v; + } } if (null !== ($v = $this->getIntent())) { $a[self::FIELD_INTENT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestIntent::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestIntent::FIELD_VALUE]); $a[self::FIELD_INTENT_EXT] = $enc; } } if (null !== ($v = $this->getLastModified())) { $a[self::FIELD_LAST_MODIFIED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_LAST_MODIFIED_EXT] = $enc; } } if ([] !== ($vs = $this->getNote())) { - $a[self::FIELD_NOTE] = $vs; + $a[self::FIELD_NOTE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_NOTE][] = $v; + } } if ([] !== ($vs = $this->getOutput())) { - $a[self::FIELD_OUTPUT] = $vs; + $a[self::FIELD_OUTPUT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_OUTPUT][] = $v; + } } if (null !== ($v = $this->getOwner())) { $a[self::FIELD_OWNER] = $v; } if ([] !== ($vs = $this->getPartOf())) { - $a[self::FIELD_PART_OF] = $vs; + $a[self::FIELD_PART_OF] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PART_OF][] = $v; + } } if ([] !== ($vs = $this->getPerformerType())) { - $a[self::FIELD_PERFORMER_TYPE] = $vs; + $a[self::FIELD_PERFORMER_TYPE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PERFORMER_TYPE][] = $v; + } } if (null !== ($v = $this->getPriority())) { $a[self::FIELD_PRIORITY] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRRequestPriority::FIELD_VALUE, $enc)))) { + unset($enc[FHIRRequestPriority::FIELD_VALUE]); $a[self::FIELD_PRIORITY_EXT] = $enc; } } @@ -2407,7 +2510,13 @@ public function jsonSerialize() $a[self::FIELD_REASON] = $v; } if ([] !== ($vs = $this->getRelevantHistory())) { - $a[self::FIELD_RELEVANT_HISTORY] = $vs; + $a[self::FIELD_RELEVANT_HISTORY] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RELEVANT_HISTORY][] = $v; + } } if (null !== ($v = $this->getRequester())) { $a[self::FIELD_REQUESTER] = $v; @@ -2417,14 +2526,19 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTaskStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTaskStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getStatusReason())) { $a[self::FIELD_STATUS_REASON] = $v; } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestReport.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestReport.php index 902e6efda9..83ccfa5be0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestReport.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestReport.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -109,7 +109,7 @@ class FHIRTestReport extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_TESTER_EXT = '_tester'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A technical identifier - identifies some entity uniquely and unambiguously. @@ -272,36 +272,50 @@ public function __construct($data = null) $this->setIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_ISSUED])) { - $ext = (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) - ? $data[self::FIELD_ISSUED_EXT] - : null; - if ($data[self::FIELD_ISSUED] instanceof FHIRDateTime) { - $this->setIssued($data[self::FIELD_ISSUED]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_ISSUED]] + $ext)); - } else if (is_array($data[self::FIELD_ISSUED])) { - $this->setIssued(new FHIRDateTime(array_merge($ext, $data[self::FIELD_ISSUED]))); - } + if (isset($data[self::FIELD_ISSUED]) || isset($data[self::FIELD_ISSUED_EXT])) { + if (isset($data[self::FIELD_ISSUED])) { + $value = $data[self::FIELD_ISSUED]; } else { - $this->setIssued(new FHIRDateTime($data[self::FIELD_ISSUED])); + $value = null; } - } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); + if (isset($data[self::FIELD_ISSUED_EXT]) && is_array($data[self::FIELD_ISSUED_EXT])) { + $ext = $data[self::FIELD_ISSUED_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setIssued($value); + } else if (is_array($value)) { + $this->setIssued(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setIssued(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setIssued(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_PARTICIPANT])) { @@ -322,36 +336,50 @@ public function __construct($data = null) $this->addParticipant(new FHIRTestReportParticipant($data[self::FIELD_PARTICIPANT])); } } - if (isset($data[self::FIELD_RESULT])) { - $ext = (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) - ? $data[self::FIELD_RESULT_EXT] - : null; - if ($data[self::FIELD_RESULT] instanceof FHIRTestReportResult) { - $this->setResult($data[self::FIELD_RESULT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportResult([FHIRTestReportResult::FIELD_VALUE => $data[self::FIELD_RESULT]] + $ext)); - } else if (is_array($data[self::FIELD_RESULT])) { - $this->setResult(new FHIRTestReportResult(array_merge($ext, $data[self::FIELD_RESULT]))); - } + if (isset($data[self::FIELD_RESULT]) || isset($data[self::FIELD_RESULT_EXT])) { + if (isset($data[self::FIELD_RESULT])) { + $value = $data[self::FIELD_RESULT]; } else { - $this->setResult(new FHIRTestReportResult($data[self::FIELD_RESULT])); + $value = null; } - } - if (isset($data[self::FIELD_SCORE])) { - $ext = (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) - ? $data[self::FIELD_SCORE_EXT] - : null; - if ($data[self::FIELD_SCORE] instanceof FHIRDecimal) { - $this->setScore($data[self::FIELD_SCORE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $data[self::FIELD_SCORE]] + $ext)); - } else if (is_array($data[self::FIELD_SCORE])) { - $this->setScore(new FHIRDecimal(array_merge($ext, $data[self::FIELD_SCORE]))); + if (isset($data[self::FIELD_RESULT_EXT]) && is_array($data[self::FIELD_RESULT_EXT])) { + $ext = $data[self::FIELD_RESULT_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportResult) { + $this->setResult($value); + } else if (is_array($value)) { + $this->setResult(new FHIRTestReportResult(array_merge($ext, $value))); + } else { + $this->setResult(new FHIRTestReportResult([FHIRTestReportResult::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setResult(new FHIRTestReportResult($ext)); + } + } + if (isset($data[self::FIELD_SCORE]) || isset($data[self::FIELD_SCORE_EXT])) { + if (isset($data[self::FIELD_SCORE])) { + $value = $data[self::FIELD_SCORE]; } else { - $this->setScore(new FHIRDecimal($data[self::FIELD_SCORE])); + $value = null; + } + if (isset($data[self::FIELD_SCORE_EXT]) && is_array($data[self::FIELD_SCORE_EXT])) { + $ext = $data[self::FIELD_SCORE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDecimal) { + $this->setScore($value); + } else if (is_array($value)) { + $this->setScore(new FHIRDecimal(array_merge($ext, $value))); + } else { + $this->setScore(new FHIRDecimal([FHIRDecimal::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setScore(new FHIRDecimal($ext)); } } if (isset($data[self::FIELD_SETUP])) { @@ -361,20 +389,27 @@ public function __construct($data = null) $this->setSetup(new FHIRTestReportSetup($data[self::FIELD_SETUP])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRTestReportStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRTestReportStatus([FHIRTestReportStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRTestReportStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRTestReportStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRTestReportStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRTestReportStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRTestReportStatus([FHIRTestReportStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRTestReportStatus($ext)); } } if (isset($data[self::FIELD_TEARDOWN])) { @@ -409,20 +444,27 @@ public function __construct($data = null) $this->setTestScript(new FHIRReference($data[self::FIELD_TEST_SCRIPT])); } } - if (isset($data[self::FIELD_TESTER])) { - $ext = (isset($data[self::FIELD_TESTER_EXT]) && is_array($data[self::FIELD_TESTER_EXT])) - ? $data[self::FIELD_TESTER_EXT] - : null; - if ($data[self::FIELD_TESTER] instanceof FHIRString) { - $this->setTester($data[self::FIELD_TESTER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TESTER])) { - $this->setTester(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TESTER]] + $ext)); - } else if (is_array($data[self::FIELD_TESTER])) { - $this->setTester(new FHIRString(array_merge($ext, $data[self::FIELD_TESTER]))); - } + if (isset($data[self::FIELD_TESTER]) || isset($data[self::FIELD_TESTER_EXT])) { + if (isset($data[self::FIELD_TESTER])) { + $value = $data[self::FIELD_TESTER]; } else { - $this->setTester(new FHIRString($data[self::FIELD_TESTER])); + $value = null; + } + if (isset($data[self::FIELD_TESTER_EXT]) && is_array($data[self::FIELD_TESTER_EXT])) { + $ext = $data[self::FIELD_TESTER_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTester($value); + } else if (is_array($value)) { + $this->setTester(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTester(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setTester(new FHIRString($ext)); } } } @@ -901,8 +943,8 @@ public function setTester($tester = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1091,32 +1133,46 @@ public function jsonSerialize() } if (null !== ($v = $this->getIssued())) { $a[self::FIELD_ISSUED] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_ISSUED_EXT] = $enc; } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getParticipant())) { - $a[self::FIELD_PARTICIPANT] = $vs; + $a[self::FIELD_PARTICIPANT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARTICIPANT][] = $v; + } } if (null !== ($v = $this->getResult())) { $a[self::FIELD_RESULT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportResult::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportResult::FIELD_VALUE]); $a[self::FIELD_RESULT_EXT] = $enc; } } if (null !== ($v = $this->getScore())) { $a[self::FIELD_SCORE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDecimal::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDecimal::FIELD_VALUE]); $a[self::FIELD_SCORE_EXT] = $enc; } } @@ -1125,8 +1181,10 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRTestReportStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRTestReportStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -1134,18 +1192,29 @@ public function jsonSerialize() $a[self::FIELD_TEARDOWN] = $v; } if ([] !== ($vs = $this->getTest())) { - $a[self::FIELD_TEST] = $vs; + $a[self::FIELD_TEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEST][] = $v; + } } if (null !== ($v = $this->getTestScript())) { $a[self::FIELD_TEST_SCRIPT] = $v; } if (null !== ($v = $this->getTester())) { $a[self::FIELD_TESTER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TESTER_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestScript.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestScript.php index 39b9a21231..ca5181ddc7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestScript.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRTestScript.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -139,7 +139,7 @@ class FHIRTestScript extends FHIRDomainResource implements PHPFHIRContainedTypeI const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * Specifies contact information for a person or organization. @@ -511,52 +511,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_DESTINATION])) { @@ -577,20 +598,27 @@ public function __construct($data = null) $this->addDestination(new FHIRTestScriptDestination($data[self::FIELD_DESTINATION])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_FIXTURE])) { @@ -643,20 +671,27 @@ public function __construct($data = null) $this->setMetadata(new FHIRTestScriptMetadata($data[self::FIELD_METADATA])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); } } if (isset($data[self::FIELD_ORIGIN])) { @@ -695,36 +730,50 @@ public function __construct($data = null) $this->addProfile(new FHIRReference($data[self::FIELD_PROFILE])); } } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); - } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_RULE])) { @@ -770,20 +819,27 @@ public function __construct($data = null) $this->setSetup(new FHIRTestScriptSetup($data[self::FIELD_SETUP])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); } } if (isset($data[self::FIELD_TEARDOWN])) { @@ -811,36 +867,50 @@ public function __construct($data = null) $this->addTest(new FHIRTestScriptTest($data[self::FIELD_TEST])); } } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); - } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -879,20 +949,27 @@ public function __construct($data = null) $this->addVariable(new FHIRTestScriptVariable($data[self::FIELD_VARIABLE])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -2169,8 +2246,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -2550,91 +2627,155 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } if ([] !== ($vs = $this->getDestination())) { - $a[self::FIELD_DESTINATION] = $vs; + $a[self::FIELD_DESTINATION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DESTINATION][] = $v; + } } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if ([] !== ($vs = $this->getFixture())) { - $a[self::FIELD_FIXTURE] = $vs; + $a[self::FIELD_FIXTURE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_FIXTURE][] = $v; + } } if (null !== ($v = $this->getIdentifier())) { $a[self::FIELD_IDENTIFIER] = $v; } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getMetadata())) { $a[self::FIELD_METADATA] = $v; } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if ([] !== ($vs = $this->getOrigin())) { - $a[self::FIELD_ORIGIN] = $vs; + $a[self::FIELD_ORIGIN] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_ORIGIN][] = $v; + } } if ([] !== ($vs = $this->getProfile())) { - $a[self::FIELD_PROFILE] = $vs; + $a[self::FIELD_PROFILE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PROFILE][] = $v; + } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if ([] !== ($vs = $this->getRule())) { - $a[self::FIELD_RULE] = $vs; + $a[self::FIELD_RULE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULE][] = $v; + } } if ([] !== ($vs = $this->getRuleset())) { - $a[self::FIELD_RULESET] = $vs; + $a[self::FIELD_RULESET] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_RULESET][] = $v; + } } if (null !== ($v = $this->getSetup())) { $a[self::FIELD_SETUP] = $v; } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } @@ -2642,35 +2783,62 @@ public function jsonSerialize() $a[self::FIELD_TEARDOWN] = $v; } if ([] !== ($vs = $this->getTest())) { - $a[self::FIELD_TEST] = $vs; + $a[self::FIELD_TEST] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_TEST][] = $v; + } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if ([] !== ($vs = $this->getVariable())) { - $a[self::FIELD_VARIABLE] = $vs; + $a[self::FIELD_VARIABLE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_VARIABLE][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRValueSet.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRValueSet.php index 51d26412a4..01c407b070 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRValueSet.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRValueSet.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -124,7 +124,7 @@ class FHIRValueSet extends FHIRDomainResource implements PHPFHIRContainedTypeInt const FIELD_VERSION_EXT = '_version'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A value set specifies a set of codes drawn from one or more code systems. @@ -428,52 +428,73 @@ public function __construct($data = null) $this->addContact(new FHIRContactDetail($data[self::FIELD_CONTACT])); } } - if (isset($data[self::FIELD_COPYRIGHT])) { - $ext = (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) - ? $data[self::FIELD_COPYRIGHT_EXT] - : null; - if ($data[self::FIELD_COPYRIGHT] instanceof FHIRMarkdown) { - $this->setCopyright($data[self::FIELD_COPYRIGHT]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_COPYRIGHT]] + $ext)); - } else if (is_array($data[self::FIELD_COPYRIGHT])) { - $this->setCopyright(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_COPYRIGHT]))); - } + if (isset($data[self::FIELD_COPYRIGHT]) || isset($data[self::FIELD_COPYRIGHT_EXT])) { + if (isset($data[self::FIELD_COPYRIGHT])) { + $value = $data[self::FIELD_COPYRIGHT]; + } else { + $value = null; + } + if (isset($data[self::FIELD_COPYRIGHT_EXT]) && is_array($data[self::FIELD_COPYRIGHT_EXT])) { + $ext = $data[self::FIELD_COPYRIGHT_EXT]; } else { - $this->setCopyright(new FHIRMarkdown($data[self::FIELD_COPYRIGHT])); - } - } - if (isset($data[self::FIELD_DATE])) { - $ext = (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) - ? $data[self::FIELD_DATE_EXT] - : null; - if ($data[self::FIELD_DATE] instanceof FHIRDateTime) { - $this->setDate($data[self::FIELD_DATE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE]] + $ext)); - } else if (is_array($data[self::FIELD_DATE])) { - $this->setDate(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setCopyright($value); + } else if (is_array($value)) { + $this->setCopyright(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setCopyright(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setCopyright(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_DATE]) || isset($data[self::FIELD_DATE_EXT])) { + if (isset($data[self::FIELD_DATE])) { + $value = $data[self::FIELD_DATE]; } else { - $this->setDate(new FHIRDateTime($data[self::FIELD_DATE])); - } - } - if (isset($data[self::FIELD_DESCRIPTION])) { - $ext = (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) - ? $data[self::FIELD_DESCRIPTION_EXT] - : null; - if ($data[self::FIELD_DESCRIPTION] instanceof FHIRMarkdown) { - $this->setDescription($data[self::FIELD_DESCRIPTION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_DESCRIPTION]] + $ext)); - } else if (is_array($data[self::FIELD_DESCRIPTION])) { - $this->setDescription(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_DESCRIPTION]))); + $value = null; + } + if (isset($data[self::FIELD_DATE_EXT]) && is_array($data[self::FIELD_DATE_EXT])) { + $ext = $data[self::FIELD_DATE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDate($value); + } else if (is_array($value)) { + $this->setDate(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDate(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setDate(new FHIRDateTime($ext)); + } + } + if (isset($data[self::FIELD_DESCRIPTION]) || isset($data[self::FIELD_DESCRIPTION_EXT])) { + if (isset($data[self::FIELD_DESCRIPTION])) { + $value = $data[self::FIELD_DESCRIPTION]; } else { - $this->setDescription(new FHIRMarkdown($data[self::FIELD_DESCRIPTION])); + $value = null; + } + if (isset($data[self::FIELD_DESCRIPTION_EXT]) && is_array($data[self::FIELD_DESCRIPTION_EXT])) { + $ext = $data[self::FIELD_DESCRIPTION_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setDescription($value); + } else if (is_array($value)) { + $this->setDescription(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setDescription(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDescription(new FHIRMarkdown($ext)); } } if (isset($data[self::FIELD_EXPANSION])) { @@ -483,36 +504,50 @@ public function __construct($data = null) $this->setExpansion(new FHIRValueSetExpansion($data[self::FIELD_EXPANSION])); } } - if (isset($data[self::FIELD_EXPERIMENTAL])) { - $ext = (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) - ? $data[self::FIELD_EXPERIMENTAL_EXT] - : null; - if ($data[self::FIELD_EXPERIMENTAL] instanceof FHIRBoolean) { - $this->setExperimental($data[self::FIELD_EXPERIMENTAL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXPERIMENTAL]] + $ext)); - } else if (is_array($data[self::FIELD_EXPERIMENTAL])) { - $this->setExperimental(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXPERIMENTAL]))); - } + if (isset($data[self::FIELD_EXPERIMENTAL]) || isset($data[self::FIELD_EXPERIMENTAL_EXT])) { + if (isset($data[self::FIELD_EXPERIMENTAL])) { + $value = $data[self::FIELD_EXPERIMENTAL]; } else { - $this->setExperimental(new FHIRBoolean($data[self::FIELD_EXPERIMENTAL])); - } - } - if (isset($data[self::FIELD_EXTENSIBLE])) { - $ext = (isset($data[self::FIELD_EXTENSIBLE_EXT]) && is_array($data[self::FIELD_EXTENSIBLE_EXT])) - ? $data[self::FIELD_EXTENSIBLE_EXT] - : null; - if ($data[self::FIELD_EXTENSIBLE] instanceof FHIRBoolean) { - $this->setExtensible($data[self::FIELD_EXTENSIBLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_EXTENSIBLE])) { - $this->setExtensible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_EXTENSIBLE]] + $ext)); - } else if (is_array($data[self::FIELD_EXTENSIBLE])) { - $this->setExtensible(new FHIRBoolean(array_merge($ext, $data[self::FIELD_EXTENSIBLE]))); + $value = null; + } + if (isset($data[self::FIELD_EXPERIMENTAL_EXT]) && is_array($data[self::FIELD_EXPERIMENTAL_EXT])) { + $ext = $data[self::FIELD_EXPERIMENTAL_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExperimental($value); + } else if (is_array($value)) { + $this->setExperimental(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExperimental(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setExperimental(new FHIRBoolean($ext)); + } + } + if (isset($data[self::FIELD_EXTENSIBLE]) || isset($data[self::FIELD_EXTENSIBLE_EXT])) { + if (isset($data[self::FIELD_EXTENSIBLE])) { + $value = $data[self::FIELD_EXTENSIBLE]; } else { - $this->setExtensible(new FHIRBoolean($data[self::FIELD_EXTENSIBLE])); + $value = null; + } + if (isset($data[self::FIELD_EXTENSIBLE_EXT]) && is_array($data[self::FIELD_EXTENSIBLE_EXT])) { + $ext = $data[self::FIELD_EXTENSIBLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setExtensible($value); + } else if (is_array($value)) { + $this->setExtensible(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setExtensible(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setExtensible(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_IDENTIFIER])) { @@ -533,20 +568,27 @@ public function __construct($data = null) $this->addIdentifier(new FHIRIdentifier($data[self::FIELD_IDENTIFIER])); } } - if (isset($data[self::FIELD_IMMUTABLE])) { - $ext = (isset($data[self::FIELD_IMMUTABLE_EXT]) && is_array($data[self::FIELD_IMMUTABLE_EXT])) - ? $data[self::FIELD_IMMUTABLE_EXT] - : null; - if ($data[self::FIELD_IMMUTABLE] instanceof FHIRBoolean) { - $this->setImmutable($data[self::FIELD_IMMUTABLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_IMMUTABLE])) { - $this->setImmutable(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $data[self::FIELD_IMMUTABLE]] + $ext)); - } else if (is_array($data[self::FIELD_IMMUTABLE])) { - $this->setImmutable(new FHIRBoolean(array_merge($ext, $data[self::FIELD_IMMUTABLE]))); - } + if (isset($data[self::FIELD_IMMUTABLE]) || isset($data[self::FIELD_IMMUTABLE_EXT])) { + if (isset($data[self::FIELD_IMMUTABLE])) { + $value = $data[self::FIELD_IMMUTABLE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_IMMUTABLE_EXT]) && is_array($data[self::FIELD_IMMUTABLE_EXT])) { + $ext = $data[self::FIELD_IMMUTABLE_EXT]; } else { - $this->setImmutable(new FHIRBoolean($data[self::FIELD_IMMUTABLE])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRBoolean) { + $this->setImmutable($value); + } else if (is_array($value)) { + $this->setImmutable(new FHIRBoolean(array_merge($ext, $value))); + } else { + $this->setImmutable(new FHIRBoolean([FHIRBoolean::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setImmutable(new FHIRBoolean($ext)); } } if (isset($data[self::FIELD_JURISDICTION])) { @@ -567,100 +609,142 @@ public function __construct($data = null) $this->addJurisdiction(new FHIRCodeableConcept($data[self::FIELD_JURISDICTION])); } } - if (isset($data[self::FIELD_NAME])) { - $ext = (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) - ? $data[self::FIELD_NAME_EXT] - : null; - if ($data[self::FIELD_NAME] instanceof FHIRString) { - $this->setName($data[self::FIELD_NAME]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_NAME])) { - $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_NAME]] + $ext)); - } else if (is_array($data[self::FIELD_NAME])) { - $this->setName(new FHIRString(array_merge($ext, $data[self::FIELD_NAME]))); - } + if (isset($data[self::FIELD_NAME]) || isset($data[self::FIELD_NAME_EXT])) { + if (isset($data[self::FIELD_NAME])) { + $value = $data[self::FIELD_NAME]; + } else { + $value = null; + } + if (isset($data[self::FIELD_NAME_EXT]) && is_array($data[self::FIELD_NAME_EXT])) { + $ext = $data[self::FIELD_NAME_EXT]; } else { - $this->setName(new FHIRString($data[self::FIELD_NAME])); - } - } - if (isset($data[self::FIELD_PUBLISHER])) { - $ext = (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) - ? $data[self::FIELD_PUBLISHER_EXT] - : null; - if ($data[self::FIELD_PUBLISHER] instanceof FHIRString) { - $this->setPublisher($data[self::FIELD_PUBLISHER]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_PUBLISHER]] + $ext)); - } else if (is_array($data[self::FIELD_PUBLISHER])) { - $this->setPublisher(new FHIRString(array_merge($ext, $data[self::FIELD_PUBLISHER]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setName($value); + } else if (is_array($value)) { + $this->setName(new FHIRString(array_merge($ext, $value))); + } else { + $this->setName(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setName(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PUBLISHER]) || isset($data[self::FIELD_PUBLISHER_EXT])) { + if (isset($data[self::FIELD_PUBLISHER])) { + $value = $data[self::FIELD_PUBLISHER]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PUBLISHER_EXT]) && is_array($data[self::FIELD_PUBLISHER_EXT])) { + $ext = $data[self::FIELD_PUBLISHER_EXT]; } else { - $this->setPublisher(new FHIRString($data[self::FIELD_PUBLISHER])); - } - } - if (isset($data[self::FIELD_PURPOSE])) { - $ext = (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) - ? $data[self::FIELD_PURPOSE_EXT] - : null; - if ($data[self::FIELD_PURPOSE] instanceof FHIRMarkdown) { - $this->setPurpose($data[self::FIELD_PURPOSE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $data[self::FIELD_PURPOSE]] + $ext)); - } else if (is_array($data[self::FIELD_PURPOSE])) { - $this->setPurpose(new FHIRMarkdown(array_merge($ext, $data[self::FIELD_PURPOSE]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setPublisher($value); + } else if (is_array($value)) { + $this->setPublisher(new FHIRString(array_merge($ext, $value))); + } else { + $this->setPublisher(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPublisher(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_PURPOSE]) || isset($data[self::FIELD_PURPOSE_EXT])) { + if (isset($data[self::FIELD_PURPOSE])) { + $value = $data[self::FIELD_PURPOSE]; + } else { + $value = null; + } + if (isset($data[self::FIELD_PURPOSE_EXT]) && is_array($data[self::FIELD_PURPOSE_EXT])) { + $ext = $data[self::FIELD_PURPOSE_EXT]; } else { - $this->setPurpose(new FHIRMarkdown($data[self::FIELD_PURPOSE])); - } - } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRPublicationStatus) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $data[self::FIELD_STATUS]))); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRMarkdown) { + $this->setPurpose($value); + } else if (is_array($value)) { + $this->setPurpose(new FHIRMarkdown(array_merge($ext, $value))); + } else { + $this->setPurpose(new FHIRMarkdown([FHIRMarkdown::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setPurpose(new FHIRMarkdown($ext)); + } + } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRPublicationStatus($data[self::FIELD_STATUS])); - } - } - if (isset($data[self::FIELD_TITLE])) { - $ext = (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) - ? $data[self::FIELD_TITLE_EXT] - : null; - if ($data[self::FIELD_TITLE] instanceof FHIRString) { - $this->setTitle($data[self::FIELD_TITLE]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_TITLE]] + $ext)); - } else if (is_array($data[self::FIELD_TITLE])) { - $this->setTitle(new FHIRString(array_merge($ext, $data[self::FIELD_TITLE]))); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRPublicationStatus) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRPublicationStatus(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRPublicationStatus([FHIRPublicationStatus::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setStatus(new FHIRPublicationStatus($ext)); + } + } + if (isset($data[self::FIELD_TITLE]) || isset($data[self::FIELD_TITLE_EXT])) { + if (isset($data[self::FIELD_TITLE])) { + $value = $data[self::FIELD_TITLE]; } else { - $this->setTitle(new FHIRString($data[self::FIELD_TITLE])); - } - } - if (isset($data[self::FIELD_URL])) { - $ext = (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) - ? $data[self::FIELD_URL_EXT] - : null; - if ($data[self::FIELD_URL] instanceof FHIRUri) { - $this->setUrl($data[self::FIELD_URL]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $data[self::FIELD_URL]] + $ext)); - } else if (is_array($data[self::FIELD_URL])) { - $this->setUrl(new FHIRUri(array_merge($ext, $data[self::FIELD_URL]))); + $value = null; + } + if (isset($data[self::FIELD_TITLE_EXT]) && is_array($data[self::FIELD_TITLE_EXT])) { + $ext = $data[self::FIELD_TITLE_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setTitle($value); + } else if (is_array($value)) { + $this->setTitle(new FHIRString(array_merge($ext, $value))); + } else { + $this->setTitle(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); } + } else if ([] !== $ext) { + $this->setTitle(new FHIRString($ext)); + } + } + if (isset($data[self::FIELD_URL]) || isset($data[self::FIELD_URL_EXT])) { + if (isset($data[self::FIELD_URL])) { + $value = $data[self::FIELD_URL]; + } else { + $value = null; + } + if (isset($data[self::FIELD_URL_EXT]) && is_array($data[self::FIELD_URL_EXT])) { + $ext = $data[self::FIELD_URL_EXT]; } else { - $this->setUrl(new FHIRUri($data[self::FIELD_URL])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRUri) { + $this->setUrl($value); + } else if (is_array($value)) { + $this->setUrl(new FHIRUri(array_merge($ext, $value))); + } else { + $this->setUrl(new FHIRUri([FHIRUri::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setUrl(new FHIRUri($ext)); } } if (isset($data[self::FIELD_USE_CONTEXT])) { @@ -681,20 +765,27 @@ public function __construct($data = null) $this->addUseContext(new FHIRUsageContext($data[self::FIELD_USE_CONTEXT])); } } - if (isset($data[self::FIELD_VERSION])) { - $ext = (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) - ? $data[self::FIELD_VERSION_EXT] - : null; - if ($data[self::FIELD_VERSION] instanceof FHIRString) { - $this->setVersion($data[self::FIELD_VERSION]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $data[self::FIELD_VERSION]] + $ext)); - } else if (is_array($data[self::FIELD_VERSION])) { - $this->setVersion(new FHIRString(array_merge($ext, $data[self::FIELD_VERSION]))); - } + if (isset($data[self::FIELD_VERSION]) || isset($data[self::FIELD_VERSION_EXT])) { + if (isset($data[self::FIELD_VERSION])) { + $value = $data[self::FIELD_VERSION]; + } else { + $value = null; + } + if (isset($data[self::FIELD_VERSION_EXT]) && is_array($data[self::FIELD_VERSION_EXT])) { + $ext = $data[self::FIELD_VERSION_EXT]; } else { - $this->setVersion(new FHIRString($data[self::FIELD_VERSION])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRString) { + $this->setVersion($value); + } else if (is_array($value)) { + $this->setVersion(new FHIRString(array_merge($ext, $value))); + } else { + $this->setVersion(new FHIRString([FHIRString::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setVersion(new FHIRString($ext)); } } } @@ -1603,8 +1694,8 @@ public function setVersion($version = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -1912,26 +2003,38 @@ public function jsonSerialize() $a[self::FIELD_COMPOSE] = $v; } if ([] !== ($vs = $this->getContact())) { - $a[self::FIELD_CONTACT] = $vs; + $a[self::FIELD_CONTACT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_CONTACT][] = $v; + } } if (null !== ($v = $this->getCopyright())) { $a[self::FIELD_COPYRIGHT] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_COPYRIGHT_EXT] = $enc; } } if (null !== ($v = $this->getDate())) { $a[self::FIELD_DATE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_EXT] = $enc; } } if (null !== ($v = $this->getDescription())) { $a[self::FIELD_DESCRIPTION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_DESCRIPTION_EXT] = $enc; } } @@ -1940,83 +2043,124 @@ public function jsonSerialize() } if (null !== ($v = $this->getExperimental())) { $a[self::FIELD_EXPERIMENTAL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXPERIMENTAL_EXT] = $enc; } } if (null !== ($v = $this->getExtensible())) { $a[self::FIELD_EXTENSIBLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_EXTENSIBLE_EXT] = $enc; } } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getImmutable())) { $a[self::FIELD_IMMUTABLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRBoolean::FIELD_VALUE, $enc)))) { + unset($enc[FHIRBoolean::FIELD_VALUE]); $a[self::FIELD_IMMUTABLE_EXT] = $enc; } } if ([] !== ($vs = $this->getJurisdiction())) { - $a[self::FIELD_JURISDICTION] = $vs; + $a[self::FIELD_JURISDICTION] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_JURISDICTION][] = $v; + } } if (null !== ($v = $this->getName())) { $a[self::FIELD_NAME] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_NAME_EXT] = $enc; } } if (null !== ($v = $this->getPublisher())) { $a[self::FIELD_PUBLISHER] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_PUBLISHER_EXT] = $enc; } } if (null !== ($v = $this->getPurpose())) { $a[self::FIELD_PURPOSE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRMarkdown::FIELD_VALUE, $enc)))) { + unset($enc[FHIRMarkdown::FIELD_VALUE]); $a[self::FIELD_PURPOSE_EXT] = $enc; } } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRPublicationStatus::FIELD_VALUE, $enc)))) { + unset($enc[FHIRPublicationStatus::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } if (null !== ($v = $this->getTitle())) { $a[self::FIELD_TITLE] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_TITLE_EXT] = $enc; } } if (null !== ($v = $this->getUrl())) { $a[self::FIELD_URL] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRUri::FIELD_VALUE, $enc)))) { + unset($enc[FHIRUri::FIELD_VALUE]); $a[self::FIELD_URL_EXT] = $enc; } } if ([] !== ($vs = $this->getUseContext())) { - $a[self::FIELD_USE_CONTEXT] = $vs; + $a[self::FIELD_USE_CONTEXT] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_USE_CONTEXT][] = $v; + } } if (null !== ($v = $this->getVersion())) { $a[self::FIELD_VERSION] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRString::FIELD_VALUE, $enc)))) { + unset($enc[FHIRString::FIELD_VALUE]); $a[self::FIELD_VERSION_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php index 31f1ff68f5..bd88d2f7b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRDomainResource/FHIRVisionPrescription.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -97,7 +97,7 @@ class FHIRVisionPrescription extends FHIRDomainResource implements PHPFHIRContai const FIELD_STATUS_EXT = '_status'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A date, date-time or partial date (e.g. just year or year + month). If hours and @@ -224,20 +224,27 @@ public function __construct($data = null) )); } parent::__construct($data); - if (isset($data[self::FIELD_DATE_WRITTEN])) { - $ext = (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) - ? $data[self::FIELD_DATE_WRITTEN_EXT] - : null; - if ($data[self::FIELD_DATE_WRITTEN] instanceof FHIRDateTime) { - $this->setDateWritten($data[self::FIELD_DATE_WRITTEN]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $data[self::FIELD_DATE_WRITTEN]] + $ext)); - } else if (is_array($data[self::FIELD_DATE_WRITTEN])) { - $this->setDateWritten(new FHIRDateTime(array_merge($ext, $data[self::FIELD_DATE_WRITTEN]))); - } + if (isset($data[self::FIELD_DATE_WRITTEN]) || isset($data[self::FIELD_DATE_WRITTEN_EXT])) { + if (isset($data[self::FIELD_DATE_WRITTEN])) { + $value = $data[self::FIELD_DATE_WRITTEN]; + } else { + $value = null; + } + if (isset($data[self::FIELD_DATE_WRITTEN_EXT]) && is_array($data[self::FIELD_DATE_WRITTEN_EXT])) { + $ext = $data[self::FIELD_DATE_WRITTEN_EXT]; } else { - $this->setDateWritten(new FHIRDateTime($data[self::FIELD_DATE_WRITTEN])); + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRDateTime) { + $this->setDateWritten($value); + } else if (is_array($value)) { + $this->setDateWritten(new FHIRDateTime(array_merge($ext, $value))); + } else { + $this->setDateWritten(new FHIRDateTime([FHIRDateTime::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setDateWritten(new FHIRDateTime($ext)); } } if (isset($data[self::FIELD_DISPENSE])) { @@ -311,20 +318,27 @@ public function __construct($data = null) $this->setReasonReference(new FHIRReference($data[self::FIELD_REASON_REFERENCE])); } } - if (isset($data[self::FIELD_STATUS])) { - $ext = (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) - ? $data[self::FIELD_STATUS_EXT] - : null; - if ($data[self::FIELD_STATUS] instanceof FHIRFinancialResourceStatusCodes) { - $this->setStatus($data[self::FIELD_STATUS]); - } elseif (null !== $ext) { - if (is_scalar($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $data[self::FIELD_STATUS]] + $ext)); - } else if (is_array($data[self::FIELD_STATUS])) { - $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $data[self::FIELD_STATUS]))); - } + if (isset($data[self::FIELD_STATUS]) || isset($data[self::FIELD_STATUS_EXT])) { + if (isset($data[self::FIELD_STATUS])) { + $value = $data[self::FIELD_STATUS]; } else { - $this->setStatus(new FHIRFinancialResourceStatusCodes($data[self::FIELD_STATUS])); + $value = null; + } + if (isset($data[self::FIELD_STATUS_EXT]) && is_array($data[self::FIELD_STATUS_EXT])) { + $ext = $data[self::FIELD_STATUS_EXT]; + } else { + $ext = []; + } + if (null !== $value) { + if ($value instanceof FHIRFinancialResourceStatusCodes) { + $this->setStatus($value); + } else if (is_array($value)) { + $this->setStatus(new FHIRFinancialResourceStatusCodes(array_merge($ext, $value))); + } else { + $this->setStatus(new FHIRFinancialResourceStatusCodes([FHIRFinancialResourceStatusCodes::FIELD_VALUE => $value] + $ext)); + } + } else if ([] !== $ext) { + $this->setStatus(new FHIRFinancialResourceStatusCodes($ext)); } } } @@ -699,8 +713,8 @@ public function setStatus(FHIRFinancialResourceStatusCodes $status = null) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -844,19 +858,33 @@ public function jsonSerialize() $a = parent::jsonSerialize(); if (null !== ($v = $this->getDateWritten())) { $a[self::FIELD_DATE_WRITTEN] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRDateTime::FIELD_VALUE, $enc)))) { + unset($enc[FHIRDateTime::FIELD_VALUE]); $a[self::FIELD_DATE_WRITTEN_EXT] = $enc; } } if ([] !== ($vs = $this->getDispense())) { - $a[self::FIELD_DISPENSE] = $vs; + $a[self::FIELD_DISPENSE] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_DISPENSE][] = $v; + } } if (null !== ($v = $this->getEncounter())) { $a[self::FIELD_ENCOUNTER] = $v; } if ([] !== ($vs = $this->getIdentifier())) { - $a[self::FIELD_IDENTIFIER] = $vs; + $a[self::FIELD_IDENTIFIER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_IDENTIFIER][] = $v; + } } if (null !== ($v = $this->getPatient())) { $a[self::FIELD_PATIENT] = $v; @@ -872,11 +900,16 @@ public function jsonSerialize() } if (null !== ($v = $this->getStatus())) { $a[self::FIELD_STATUS] = $v->getValue(); - if (1 < count($enc = $v->jsonSerialize())) { - unset($enc[$v::FIELD_VALUE]); + $enc = $v->jsonSerialize(); + $cnt = count($enc); + if (0 < $cnt && (1 !== $cnt || (1 === $cnt && !array_key_exists(FHIRFinancialResourceStatusCodes::FIELD_VALUE, $enc)))) { + unset($enc[FHIRFinancialResourceStatusCodes::FIELD_VALUE]); $a[self::FIELD_STATUS_EXT] = $enc; } } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; + } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRParameters.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRParameters.php index adbca49e7f..22dbe6ccd7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRParameters.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResource/FHIRParameters.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ class FHIRParameters extends FHIRResource implements PHPFHIRContainedTypeInterfa const FIELD_PARAMETER = 'parameter'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * This special resource type is used to represent an operation request and @@ -228,8 +228,8 @@ public function setParameter(array $parameter = []) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = parent::_validationErrors(); + return $errs; } /** @@ -309,7 +309,16 @@ public function jsonSerialize() { $a = parent::jsonSerialize(); if ([] !== ($vs = $this->getParameter())) { - $a[self::FIELD_PARAMETER] = $vs; + $a[self::FIELD_PARAMETER] = []; + foreach($vs as $v) { + if (null === $v) { + continue; + } + $a[self::FIELD_PARAMETER][] = $v; + } + } + if ([] !== ($vs = $this->_getFHIRComments())) { + $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs; } return [PHPFHIRConstants::JSON_FIELD_RESOURCE_TYPE => $this->_getResourceType()] + $a; } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResourceContainer.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResourceContainer.php index c81ef5c1eb..64ed7e4990 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResourceContainer.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRResourceContainer.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -310,7 +310,7 @@ class FHIRResourceContainer implements PHPFHIRCommentContainerInterface, PHPFHIR const FIELD_VISION_PRESCRIPTION = 'VisionPrescription'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * A financial tool for tracking value accrued for a particular purpose. In the @@ -1487,7 +1487,6 @@ public function __construct($data = null) } else { $this->setAccount(new FHIRAccount($data[self::FIELD_ACCOUNT])); } - return; } if (isset($data[self::FIELD_ACTIVITY_DEFINITION])) { if ($data[self::FIELD_ACTIVITY_DEFINITION] instanceof FHIRActivityDefinition) { @@ -1495,7 +1494,6 @@ public function __construct($data = null) } else { $this->setActivityDefinition(new FHIRActivityDefinition($data[self::FIELD_ACTIVITY_DEFINITION])); } - return; } if (isset($data[self::FIELD_ADVERSE_EVENT])) { if ($data[self::FIELD_ADVERSE_EVENT] instanceof FHIRAdverseEvent) { @@ -1503,7 +1501,6 @@ public function __construct($data = null) } else { $this->setAdverseEvent(new FHIRAdverseEvent($data[self::FIELD_ADVERSE_EVENT])); } - return; } if (isset($data[self::FIELD_ALLERGY_INTOLERANCE])) { if ($data[self::FIELD_ALLERGY_INTOLERANCE] instanceof FHIRAllergyIntolerance) { @@ -1511,7 +1508,6 @@ public function __construct($data = null) } else { $this->setAllergyIntolerance(new FHIRAllergyIntolerance($data[self::FIELD_ALLERGY_INTOLERANCE])); } - return; } if (isset($data[self::FIELD_APPOINTMENT])) { if ($data[self::FIELD_APPOINTMENT] instanceof FHIRAppointment) { @@ -1519,7 +1515,6 @@ public function __construct($data = null) } else { $this->setAppointment(new FHIRAppointment($data[self::FIELD_APPOINTMENT])); } - return; } if (isset($data[self::FIELD_APPOINTMENT_RESPONSE])) { if ($data[self::FIELD_APPOINTMENT_RESPONSE] instanceof FHIRAppointmentResponse) { @@ -1527,7 +1522,6 @@ public function __construct($data = null) } else { $this->setAppointmentResponse(new FHIRAppointmentResponse($data[self::FIELD_APPOINTMENT_RESPONSE])); } - return; } if (isset($data[self::FIELD_AUDIT_EVENT])) { if ($data[self::FIELD_AUDIT_EVENT] instanceof FHIRAuditEvent) { @@ -1535,7 +1529,6 @@ public function __construct($data = null) } else { $this->setAuditEvent(new FHIRAuditEvent($data[self::FIELD_AUDIT_EVENT])); } - return; } if (isset($data[self::FIELD_BASIC])) { if ($data[self::FIELD_BASIC] instanceof FHIRBasic) { @@ -1543,7 +1536,6 @@ public function __construct($data = null) } else { $this->setBasic(new FHIRBasic($data[self::FIELD_BASIC])); } - return; } if (isset($data[self::FIELD_BINARY])) { if ($data[self::FIELD_BINARY] instanceof FHIRBinary) { @@ -1551,7 +1543,6 @@ public function __construct($data = null) } else { $this->setBinary(new FHIRBinary($data[self::FIELD_BINARY])); } - return; } if (isset($data[self::FIELD_BODY_SITE])) { if ($data[self::FIELD_BODY_SITE] instanceof FHIRBodySite) { @@ -1559,7 +1550,6 @@ public function __construct($data = null) } else { $this->setBodySite(new FHIRBodySite($data[self::FIELD_BODY_SITE])); } - return; } if (isset($data[self::FIELD_BUNDLE])) { if ($data[self::FIELD_BUNDLE] instanceof FHIRBundle) { @@ -1567,7 +1557,6 @@ public function __construct($data = null) } else { $this->setBundle(new FHIRBundle($data[self::FIELD_BUNDLE])); } - return; } if (isset($data[self::FIELD_CAPABILITY_STATEMENT])) { if ($data[self::FIELD_CAPABILITY_STATEMENT] instanceof FHIRCapabilityStatement) { @@ -1575,7 +1564,6 @@ public function __construct($data = null) } else { $this->setCapabilityStatement(new FHIRCapabilityStatement($data[self::FIELD_CAPABILITY_STATEMENT])); } - return; } if (isset($data[self::FIELD_CARE_PLAN])) { if ($data[self::FIELD_CARE_PLAN] instanceof FHIRCarePlan) { @@ -1583,7 +1571,6 @@ public function __construct($data = null) } else { $this->setCarePlan(new FHIRCarePlan($data[self::FIELD_CARE_PLAN])); } - return; } if (isset($data[self::FIELD_CARE_TEAM])) { if ($data[self::FIELD_CARE_TEAM] instanceof FHIRCareTeam) { @@ -1591,7 +1578,6 @@ public function __construct($data = null) } else { $this->setCareTeam(new FHIRCareTeam($data[self::FIELD_CARE_TEAM])); } - return; } if (isset($data[self::FIELD_CHARGE_ITEM])) { if ($data[self::FIELD_CHARGE_ITEM] instanceof FHIRChargeItem) { @@ -1599,7 +1585,6 @@ public function __construct($data = null) } else { $this->setChargeItem(new FHIRChargeItem($data[self::FIELD_CHARGE_ITEM])); } - return; } if (isset($data[self::FIELD_CLAIM])) { if ($data[self::FIELD_CLAIM] instanceof FHIRClaim) { @@ -1607,7 +1592,6 @@ public function __construct($data = null) } else { $this->setClaim(new FHIRClaim($data[self::FIELD_CLAIM])); } - return; } if (isset($data[self::FIELD_CLAIM_RESPONSE])) { if ($data[self::FIELD_CLAIM_RESPONSE] instanceof FHIRClaimResponse) { @@ -1615,7 +1599,6 @@ public function __construct($data = null) } else { $this->setClaimResponse(new FHIRClaimResponse($data[self::FIELD_CLAIM_RESPONSE])); } - return; } if (isset($data[self::FIELD_CLINICAL_IMPRESSION])) { if ($data[self::FIELD_CLINICAL_IMPRESSION] instanceof FHIRClinicalImpression) { @@ -1623,7 +1606,6 @@ public function __construct($data = null) } else { $this->setClinicalImpression(new FHIRClinicalImpression($data[self::FIELD_CLINICAL_IMPRESSION])); } - return; } if (isset($data[self::FIELD_CODE_SYSTEM])) { if ($data[self::FIELD_CODE_SYSTEM] instanceof FHIRCodeSystem) { @@ -1631,7 +1613,6 @@ public function __construct($data = null) } else { $this->setCodeSystem(new FHIRCodeSystem($data[self::FIELD_CODE_SYSTEM])); } - return; } if (isset($data[self::FIELD_COMMUNICATION])) { if ($data[self::FIELD_COMMUNICATION] instanceof FHIRCommunication) { @@ -1639,7 +1620,6 @@ public function __construct($data = null) } else { $this->setCommunication(new FHIRCommunication($data[self::FIELD_COMMUNICATION])); } - return; } if (isset($data[self::FIELD_COMMUNICATION_REQUEST])) { if ($data[self::FIELD_COMMUNICATION_REQUEST] instanceof FHIRCommunicationRequest) { @@ -1647,7 +1627,6 @@ public function __construct($data = null) } else { $this->setCommunicationRequest(new FHIRCommunicationRequest($data[self::FIELD_COMMUNICATION_REQUEST])); } - return; } if (isset($data[self::FIELD_COMPARTMENT_DEFINITION])) { if ($data[self::FIELD_COMPARTMENT_DEFINITION] instanceof FHIRCompartmentDefinition) { @@ -1655,7 +1634,6 @@ public function __construct($data = null) } else { $this->setCompartmentDefinition(new FHIRCompartmentDefinition($data[self::FIELD_COMPARTMENT_DEFINITION])); } - return; } if (isset($data[self::FIELD_COMPOSITION])) { if ($data[self::FIELD_COMPOSITION] instanceof FHIRComposition) { @@ -1663,7 +1641,6 @@ public function __construct($data = null) } else { $this->setComposition(new FHIRComposition($data[self::FIELD_COMPOSITION])); } - return; } if (isset($data[self::FIELD_CONCEPT_MAP])) { if ($data[self::FIELD_CONCEPT_MAP] instanceof FHIRConceptMap) { @@ -1671,7 +1648,6 @@ public function __construct($data = null) } else { $this->setConceptMap(new FHIRConceptMap($data[self::FIELD_CONCEPT_MAP])); } - return; } if (isset($data[self::FIELD_CONDITION])) { if ($data[self::FIELD_CONDITION] instanceof FHIRCondition) { @@ -1679,7 +1655,6 @@ public function __construct($data = null) } else { $this->setCondition(new FHIRCondition($data[self::FIELD_CONDITION])); } - return; } if (isset($data[self::FIELD_CONSENT])) { if ($data[self::FIELD_CONSENT] instanceof FHIRConsent) { @@ -1687,7 +1662,6 @@ public function __construct($data = null) } else { $this->setConsent(new FHIRConsent($data[self::FIELD_CONSENT])); } - return; } if (isset($data[self::FIELD_CONTRACT])) { if ($data[self::FIELD_CONTRACT] instanceof FHIRContract) { @@ -1695,7 +1669,6 @@ public function __construct($data = null) } else { $this->setContract(new FHIRContract($data[self::FIELD_CONTRACT])); } - return; } if (isset($data[self::FIELD_COVERAGE])) { if ($data[self::FIELD_COVERAGE] instanceof FHIRCoverage) { @@ -1703,7 +1676,6 @@ public function __construct($data = null) } else { $this->setCoverage(new FHIRCoverage($data[self::FIELD_COVERAGE])); } - return; } if (isset($data[self::FIELD_DATA_ELEMENT])) { if ($data[self::FIELD_DATA_ELEMENT] instanceof FHIRDataElement) { @@ -1711,7 +1683,6 @@ public function __construct($data = null) } else { $this->setDataElement(new FHIRDataElement($data[self::FIELD_DATA_ELEMENT])); } - return; } if (isset($data[self::FIELD_DETECTED_ISSUE])) { if ($data[self::FIELD_DETECTED_ISSUE] instanceof FHIRDetectedIssue) { @@ -1719,7 +1690,6 @@ public function __construct($data = null) } else { $this->setDetectedIssue(new FHIRDetectedIssue($data[self::FIELD_DETECTED_ISSUE])); } - return; } if (isset($data[self::FIELD_DEVICE])) { if ($data[self::FIELD_DEVICE] instanceof FHIRDevice) { @@ -1727,7 +1697,6 @@ public function __construct($data = null) } else { $this->setDevice(new FHIRDevice($data[self::FIELD_DEVICE])); } - return; } if (isset($data[self::FIELD_DEVICE_COMPONENT])) { if ($data[self::FIELD_DEVICE_COMPONENT] instanceof FHIRDeviceComponent) { @@ -1735,7 +1704,6 @@ public function __construct($data = null) } else { $this->setDeviceComponent(new FHIRDeviceComponent($data[self::FIELD_DEVICE_COMPONENT])); } - return; } if (isset($data[self::FIELD_DEVICE_METRIC])) { if ($data[self::FIELD_DEVICE_METRIC] instanceof FHIRDeviceMetric) { @@ -1743,7 +1711,6 @@ public function __construct($data = null) } else { $this->setDeviceMetric(new FHIRDeviceMetric($data[self::FIELD_DEVICE_METRIC])); } - return; } if (isset($data[self::FIELD_DEVICE_REQUEST])) { if ($data[self::FIELD_DEVICE_REQUEST] instanceof FHIRDeviceRequest) { @@ -1751,7 +1718,6 @@ public function __construct($data = null) } else { $this->setDeviceRequest(new FHIRDeviceRequest($data[self::FIELD_DEVICE_REQUEST])); } - return; } if (isset($data[self::FIELD_DEVICE_USE_STATEMENT])) { if ($data[self::FIELD_DEVICE_USE_STATEMENT] instanceof FHIRDeviceUseStatement) { @@ -1759,7 +1725,6 @@ public function __construct($data = null) } else { $this->setDeviceUseStatement(new FHIRDeviceUseStatement($data[self::FIELD_DEVICE_USE_STATEMENT])); } - return; } if (isset($data[self::FIELD_DIAGNOSTIC_REPORT])) { if ($data[self::FIELD_DIAGNOSTIC_REPORT] instanceof FHIRDiagnosticReport) { @@ -1767,7 +1732,6 @@ public function __construct($data = null) } else { $this->setDiagnosticReport(new FHIRDiagnosticReport($data[self::FIELD_DIAGNOSTIC_REPORT])); } - return; } if (isset($data[self::FIELD_DOCUMENT_MANIFEST])) { if ($data[self::FIELD_DOCUMENT_MANIFEST] instanceof FHIRDocumentManifest) { @@ -1775,7 +1739,6 @@ public function __construct($data = null) } else { $this->setDocumentManifest(new FHIRDocumentManifest($data[self::FIELD_DOCUMENT_MANIFEST])); } - return; } if (isset($data[self::FIELD_DOCUMENT_REFERENCE])) { if ($data[self::FIELD_DOCUMENT_REFERENCE] instanceof FHIRDocumentReference) { @@ -1783,7 +1746,6 @@ public function __construct($data = null) } else { $this->setDocumentReference(new FHIRDocumentReference($data[self::FIELD_DOCUMENT_REFERENCE])); } - return; } if (isset($data[self::FIELD_ELIGIBILITY_REQUEST])) { if ($data[self::FIELD_ELIGIBILITY_REQUEST] instanceof FHIREligibilityRequest) { @@ -1791,7 +1753,6 @@ public function __construct($data = null) } else { $this->setEligibilityRequest(new FHIREligibilityRequest($data[self::FIELD_ELIGIBILITY_REQUEST])); } - return; } if (isset($data[self::FIELD_ELIGIBILITY_RESPONSE])) { if ($data[self::FIELD_ELIGIBILITY_RESPONSE] instanceof FHIREligibilityResponse) { @@ -1799,7 +1760,6 @@ public function __construct($data = null) } else { $this->setEligibilityResponse(new FHIREligibilityResponse($data[self::FIELD_ELIGIBILITY_RESPONSE])); } - return; } if (isset($data[self::FIELD_ENCOUNTER])) { if ($data[self::FIELD_ENCOUNTER] instanceof FHIREncounter) { @@ -1807,7 +1767,6 @@ public function __construct($data = null) } else { $this->setEncounter(new FHIREncounter($data[self::FIELD_ENCOUNTER])); } - return; } if (isset($data[self::FIELD_ENDPOINT])) { if ($data[self::FIELD_ENDPOINT] instanceof FHIREndpoint) { @@ -1815,7 +1774,6 @@ public function __construct($data = null) } else { $this->setEndpoint(new FHIREndpoint($data[self::FIELD_ENDPOINT])); } - return; } if (isset($data[self::FIELD_ENROLLMENT_REQUEST])) { if ($data[self::FIELD_ENROLLMENT_REQUEST] instanceof FHIREnrollmentRequest) { @@ -1823,7 +1781,6 @@ public function __construct($data = null) } else { $this->setEnrollmentRequest(new FHIREnrollmentRequest($data[self::FIELD_ENROLLMENT_REQUEST])); } - return; } if (isset($data[self::FIELD_ENROLLMENT_RESPONSE])) { if ($data[self::FIELD_ENROLLMENT_RESPONSE] instanceof FHIREnrollmentResponse) { @@ -1831,7 +1788,6 @@ public function __construct($data = null) } else { $this->setEnrollmentResponse(new FHIREnrollmentResponse($data[self::FIELD_ENROLLMENT_RESPONSE])); } - return; } if (isset($data[self::FIELD_EPISODE_OF_CARE])) { if ($data[self::FIELD_EPISODE_OF_CARE] instanceof FHIREpisodeOfCare) { @@ -1839,7 +1795,6 @@ public function __construct($data = null) } else { $this->setEpisodeOfCare(new FHIREpisodeOfCare($data[self::FIELD_EPISODE_OF_CARE])); } - return; } if (isset($data[self::FIELD_EXPANSION_PROFILE])) { if ($data[self::FIELD_EXPANSION_PROFILE] instanceof FHIRExpansionProfile) { @@ -1847,7 +1802,6 @@ public function __construct($data = null) } else { $this->setExpansionProfile(new FHIRExpansionProfile($data[self::FIELD_EXPANSION_PROFILE])); } - return; } if (isset($data[self::FIELD_EXPLANATION_OF_BENEFIT])) { if ($data[self::FIELD_EXPLANATION_OF_BENEFIT] instanceof FHIRExplanationOfBenefit) { @@ -1855,7 +1809,6 @@ public function __construct($data = null) } else { $this->setExplanationOfBenefit(new FHIRExplanationOfBenefit($data[self::FIELD_EXPLANATION_OF_BENEFIT])); } - return; } if (isset($data[self::FIELD_FAMILY_MEMBER_HISTORY])) { if ($data[self::FIELD_FAMILY_MEMBER_HISTORY] instanceof FHIRFamilyMemberHistory) { @@ -1863,7 +1816,6 @@ public function __construct($data = null) } else { $this->setFamilyMemberHistory(new FHIRFamilyMemberHistory($data[self::FIELD_FAMILY_MEMBER_HISTORY])); } - return; } if (isset($data[self::FIELD_FLAG])) { if ($data[self::FIELD_FLAG] instanceof FHIRFlag) { @@ -1871,7 +1823,6 @@ public function __construct($data = null) } else { $this->setFlag(new FHIRFlag($data[self::FIELD_FLAG])); } - return; } if (isset($data[self::FIELD_GOAL])) { if ($data[self::FIELD_GOAL] instanceof FHIRGoal) { @@ -1879,7 +1830,6 @@ public function __construct($data = null) } else { $this->setGoal(new FHIRGoal($data[self::FIELD_GOAL])); } - return; } if (isset($data[self::FIELD_GRAPH_DEFINITION])) { if ($data[self::FIELD_GRAPH_DEFINITION] instanceof FHIRGraphDefinition) { @@ -1887,7 +1837,6 @@ public function __construct($data = null) } else { $this->setGraphDefinition(new FHIRGraphDefinition($data[self::FIELD_GRAPH_DEFINITION])); } - return; } if (isset($data[self::FIELD_GROUP])) { if ($data[self::FIELD_GROUP] instanceof FHIRGroup) { @@ -1895,7 +1844,6 @@ public function __construct($data = null) } else { $this->setGroup(new FHIRGroup($data[self::FIELD_GROUP])); } - return; } if (isset($data[self::FIELD_GUIDANCE_RESPONSE])) { if ($data[self::FIELD_GUIDANCE_RESPONSE] instanceof FHIRGuidanceResponse) { @@ -1903,7 +1851,6 @@ public function __construct($data = null) } else { $this->setGuidanceResponse(new FHIRGuidanceResponse($data[self::FIELD_GUIDANCE_RESPONSE])); } - return; } if (isset($data[self::FIELD_HEALTHCARE_SERVICE])) { if ($data[self::FIELD_HEALTHCARE_SERVICE] instanceof FHIRHealthcareService) { @@ -1911,7 +1858,6 @@ public function __construct($data = null) } else { $this->setHealthcareService(new FHIRHealthcareService($data[self::FIELD_HEALTHCARE_SERVICE])); } - return; } if (isset($data[self::FIELD_IMAGING_MANIFEST])) { if ($data[self::FIELD_IMAGING_MANIFEST] instanceof FHIRImagingManifest) { @@ -1919,7 +1865,6 @@ public function __construct($data = null) } else { $this->setImagingManifest(new FHIRImagingManifest($data[self::FIELD_IMAGING_MANIFEST])); } - return; } if (isset($data[self::FIELD_IMAGING_STUDY])) { if ($data[self::FIELD_IMAGING_STUDY] instanceof FHIRImagingStudy) { @@ -1927,7 +1872,6 @@ public function __construct($data = null) } else { $this->setImagingStudy(new FHIRImagingStudy($data[self::FIELD_IMAGING_STUDY])); } - return; } if (isset($data[self::FIELD_IMMUNIZATION])) { if ($data[self::FIELD_IMMUNIZATION] instanceof FHIRImmunization) { @@ -1935,7 +1879,6 @@ public function __construct($data = null) } else { $this->setImmunization(new FHIRImmunization($data[self::FIELD_IMMUNIZATION])); } - return; } if (isset($data[self::FIELD_IMMUNIZATION_RECOMMENDATION])) { if ($data[self::FIELD_IMMUNIZATION_RECOMMENDATION] instanceof FHIRImmunizationRecommendation) { @@ -1943,7 +1886,6 @@ public function __construct($data = null) } else { $this->setImmunizationRecommendation(new FHIRImmunizationRecommendation($data[self::FIELD_IMMUNIZATION_RECOMMENDATION])); } - return; } if (isset($data[self::FIELD_IMPLEMENTATION_GUIDE])) { if ($data[self::FIELD_IMPLEMENTATION_GUIDE] instanceof FHIRImplementationGuide) { @@ -1951,7 +1893,6 @@ public function __construct($data = null) } else { $this->setImplementationGuide(new FHIRImplementationGuide($data[self::FIELD_IMPLEMENTATION_GUIDE])); } - return; } if (isset($data[self::FIELD_LIBRARY])) { if ($data[self::FIELD_LIBRARY] instanceof FHIRLibrary) { @@ -1959,7 +1900,6 @@ public function __construct($data = null) } else { $this->setLibrary(new FHIRLibrary($data[self::FIELD_LIBRARY])); } - return; } if (isset($data[self::FIELD_LINKAGE])) { if ($data[self::FIELD_LINKAGE] instanceof FHIRLinkage) { @@ -1967,7 +1907,6 @@ public function __construct($data = null) } else { $this->setLinkage(new FHIRLinkage($data[self::FIELD_LINKAGE])); } - return; } if (isset($data[self::FIELD_LIST])) { if ($data[self::FIELD_LIST] instanceof FHIRList) { @@ -1975,7 +1914,6 @@ public function __construct($data = null) } else { $this->setList(new FHIRList($data[self::FIELD_LIST])); } - return; } if (isset($data[self::FIELD_LOCATION])) { if ($data[self::FIELD_LOCATION] instanceof FHIRLocation) { @@ -1983,7 +1921,6 @@ public function __construct($data = null) } else { $this->setLocation(new FHIRLocation($data[self::FIELD_LOCATION])); } - return; } if (isset($data[self::FIELD_MEASURE])) { if ($data[self::FIELD_MEASURE] instanceof FHIRMeasure) { @@ -1991,7 +1928,6 @@ public function __construct($data = null) } else { $this->setMeasure(new FHIRMeasure($data[self::FIELD_MEASURE])); } - return; } if (isset($data[self::FIELD_MEASURE_REPORT])) { if ($data[self::FIELD_MEASURE_REPORT] instanceof FHIRMeasureReport) { @@ -1999,7 +1935,6 @@ public function __construct($data = null) } else { $this->setMeasureReport(new FHIRMeasureReport($data[self::FIELD_MEASURE_REPORT])); } - return; } if (isset($data[self::FIELD_MEDIA])) { if ($data[self::FIELD_MEDIA] instanceof FHIRMedia) { @@ -2007,7 +1942,6 @@ public function __construct($data = null) } else { $this->setMedia(new FHIRMedia($data[self::FIELD_MEDIA])); } - return; } if (isset($data[self::FIELD_MEDICATION])) { if ($data[self::FIELD_MEDICATION] instanceof FHIRMedication) { @@ -2015,7 +1949,6 @@ public function __construct($data = null) } else { $this->setMedication(new FHIRMedication($data[self::FIELD_MEDICATION])); } - return; } if (isset($data[self::FIELD_MEDICATION_ADMINISTRATION])) { if ($data[self::FIELD_MEDICATION_ADMINISTRATION] instanceof FHIRMedicationAdministration) { @@ -2023,7 +1956,6 @@ public function __construct($data = null) } else { $this->setMedicationAdministration(new FHIRMedicationAdministration($data[self::FIELD_MEDICATION_ADMINISTRATION])); } - return; } if (isset($data[self::FIELD_MEDICATION_DISPENSE])) { if ($data[self::FIELD_MEDICATION_DISPENSE] instanceof FHIRMedicationDispense) { @@ -2031,7 +1963,6 @@ public function __construct($data = null) } else { $this->setMedicationDispense(new FHIRMedicationDispense($data[self::FIELD_MEDICATION_DISPENSE])); } - return; } if (isset($data[self::FIELD_MEDICATION_REQUEST])) { if ($data[self::FIELD_MEDICATION_REQUEST] instanceof FHIRMedicationRequest) { @@ -2039,7 +1970,6 @@ public function __construct($data = null) } else { $this->setMedicationRequest(new FHIRMedicationRequest($data[self::FIELD_MEDICATION_REQUEST])); } - return; } if (isset($data[self::FIELD_MEDICATION_STATEMENT])) { if ($data[self::FIELD_MEDICATION_STATEMENT] instanceof FHIRMedicationStatement) { @@ -2047,7 +1977,6 @@ public function __construct($data = null) } else { $this->setMedicationStatement(new FHIRMedicationStatement($data[self::FIELD_MEDICATION_STATEMENT])); } - return; } if (isset($data[self::FIELD_MESSAGE_DEFINITION])) { if ($data[self::FIELD_MESSAGE_DEFINITION] instanceof FHIRMessageDefinition) { @@ -2055,7 +1984,6 @@ public function __construct($data = null) } else { $this->setMessageDefinition(new FHIRMessageDefinition($data[self::FIELD_MESSAGE_DEFINITION])); } - return; } if (isset($data[self::FIELD_MESSAGE_HEADER])) { if ($data[self::FIELD_MESSAGE_HEADER] instanceof FHIRMessageHeader) { @@ -2063,7 +1991,6 @@ public function __construct($data = null) } else { $this->setMessageHeader(new FHIRMessageHeader($data[self::FIELD_MESSAGE_HEADER])); } - return; } if (isset($data[self::FIELD_NAMING_SYSTEM])) { if ($data[self::FIELD_NAMING_SYSTEM] instanceof FHIRNamingSystem) { @@ -2071,7 +1998,6 @@ public function __construct($data = null) } else { $this->setNamingSystem(new FHIRNamingSystem($data[self::FIELD_NAMING_SYSTEM])); } - return; } if (isset($data[self::FIELD_NUTRITION_ORDER])) { if ($data[self::FIELD_NUTRITION_ORDER] instanceof FHIRNutritionOrder) { @@ -2079,7 +2005,6 @@ public function __construct($data = null) } else { $this->setNutritionOrder(new FHIRNutritionOrder($data[self::FIELD_NUTRITION_ORDER])); } - return; } if (isset($data[self::FIELD_OBSERVATION])) { if ($data[self::FIELD_OBSERVATION] instanceof FHIRObservation) { @@ -2087,7 +2012,6 @@ public function __construct($data = null) } else { $this->setObservation(new FHIRObservation($data[self::FIELD_OBSERVATION])); } - return; } if (isset($data[self::FIELD_OPERATION_DEFINITION])) { if ($data[self::FIELD_OPERATION_DEFINITION] instanceof FHIROperationDefinition) { @@ -2095,7 +2019,6 @@ public function __construct($data = null) } else { $this->setOperationDefinition(new FHIROperationDefinition($data[self::FIELD_OPERATION_DEFINITION])); } - return; } if (isset($data[self::FIELD_OPERATION_OUTCOME])) { if ($data[self::FIELD_OPERATION_OUTCOME] instanceof FHIROperationOutcome) { @@ -2103,7 +2026,6 @@ public function __construct($data = null) } else { $this->setOperationOutcome(new FHIROperationOutcome($data[self::FIELD_OPERATION_OUTCOME])); } - return; } if (isset($data[self::FIELD_ORGANIZATION])) { if ($data[self::FIELD_ORGANIZATION] instanceof FHIROrganization) { @@ -2111,7 +2033,6 @@ public function __construct($data = null) } else { $this->setOrganization(new FHIROrganization($data[self::FIELD_ORGANIZATION])); } - return; } if (isset($data[self::FIELD_PARAMETERS])) { if ($data[self::FIELD_PARAMETERS] instanceof FHIRParameters) { @@ -2119,7 +2040,6 @@ public function __construct($data = null) } else { $this->setParameters(new FHIRParameters($data[self::FIELD_PARAMETERS])); } - return; } if (isset($data[self::FIELD_PATIENT])) { if ($data[self::FIELD_PATIENT] instanceof FHIRPatient) { @@ -2127,7 +2047,6 @@ public function __construct($data = null) } else { $this->setPatient(new FHIRPatient($data[self::FIELD_PATIENT])); } - return; } if (isset($data[self::FIELD_PAYMENT_NOTICE])) { if ($data[self::FIELD_PAYMENT_NOTICE] instanceof FHIRPaymentNotice) { @@ -2135,7 +2054,6 @@ public function __construct($data = null) } else { $this->setPaymentNotice(new FHIRPaymentNotice($data[self::FIELD_PAYMENT_NOTICE])); } - return; } if (isset($data[self::FIELD_PAYMENT_RECONCILIATION])) { if ($data[self::FIELD_PAYMENT_RECONCILIATION] instanceof FHIRPaymentReconciliation) { @@ -2143,7 +2061,6 @@ public function __construct($data = null) } else { $this->setPaymentReconciliation(new FHIRPaymentReconciliation($data[self::FIELD_PAYMENT_RECONCILIATION])); } - return; } if (isset($data[self::FIELD_PERSON])) { if ($data[self::FIELD_PERSON] instanceof FHIRPerson) { @@ -2151,7 +2068,6 @@ public function __construct($data = null) } else { $this->setPerson(new FHIRPerson($data[self::FIELD_PERSON])); } - return; } if (isset($data[self::FIELD_PLAN_DEFINITION])) { if ($data[self::FIELD_PLAN_DEFINITION] instanceof FHIRPlanDefinition) { @@ -2159,7 +2075,6 @@ public function __construct($data = null) } else { $this->setPlanDefinition(new FHIRPlanDefinition($data[self::FIELD_PLAN_DEFINITION])); } - return; } if (isset($data[self::FIELD_PRACTITIONER])) { if ($data[self::FIELD_PRACTITIONER] instanceof FHIRPractitioner) { @@ -2167,7 +2082,6 @@ public function __construct($data = null) } else { $this->setPractitioner(new FHIRPractitioner($data[self::FIELD_PRACTITIONER])); } - return; } if (isset($data[self::FIELD_PRACTITIONER_ROLE])) { if ($data[self::FIELD_PRACTITIONER_ROLE] instanceof FHIRPractitionerRole) { @@ -2175,7 +2089,6 @@ public function __construct($data = null) } else { $this->setPractitionerRole(new FHIRPractitionerRole($data[self::FIELD_PRACTITIONER_ROLE])); } - return; } if (isset($data[self::FIELD_PROCEDURE])) { if ($data[self::FIELD_PROCEDURE] instanceof FHIRProcedure) { @@ -2183,7 +2096,6 @@ public function __construct($data = null) } else { $this->setProcedure(new FHIRProcedure($data[self::FIELD_PROCEDURE])); } - return; } if (isset($data[self::FIELD_PROCEDURE_REQUEST])) { if ($data[self::FIELD_PROCEDURE_REQUEST] instanceof FHIRProcedureRequest) { @@ -2191,7 +2103,6 @@ public function __construct($data = null) } else { $this->setProcedureRequest(new FHIRProcedureRequest($data[self::FIELD_PROCEDURE_REQUEST])); } - return; } if (isset($data[self::FIELD_PROCESS_REQUEST])) { if ($data[self::FIELD_PROCESS_REQUEST] instanceof FHIRProcessRequest) { @@ -2199,7 +2110,6 @@ public function __construct($data = null) } else { $this->setProcessRequest(new FHIRProcessRequest($data[self::FIELD_PROCESS_REQUEST])); } - return; } if (isset($data[self::FIELD_PROCESS_RESPONSE])) { if ($data[self::FIELD_PROCESS_RESPONSE] instanceof FHIRProcessResponse) { @@ -2207,7 +2117,6 @@ public function __construct($data = null) } else { $this->setProcessResponse(new FHIRProcessResponse($data[self::FIELD_PROCESS_RESPONSE])); } - return; } if (isset($data[self::FIELD_PROVENANCE])) { if ($data[self::FIELD_PROVENANCE] instanceof FHIRProvenance) { @@ -2215,7 +2124,6 @@ public function __construct($data = null) } else { $this->setProvenance(new FHIRProvenance($data[self::FIELD_PROVENANCE])); } - return; } if (isset($data[self::FIELD_QUESTIONNAIRE])) { if ($data[self::FIELD_QUESTIONNAIRE] instanceof FHIRQuestionnaire) { @@ -2223,7 +2131,6 @@ public function __construct($data = null) } else { $this->setQuestionnaire(new FHIRQuestionnaire($data[self::FIELD_QUESTIONNAIRE])); } - return; } if (isset($data[self::FIELD_QUESTIONNAIRE_RESPONSE])) { if ($data[self::FIELD_QUESTIONNAIRE_RESPONSE] instanceof FHIRQuestionnaireResponse) { @@ -2231,7 +2138,6 @@ public function __construct($data = null) } else { $this->setQuestionnaireResponse(new FHIRQuestionnaireResponse($data[self::FIELD_QUESTIONNAIRE_RESPONSE])); } - return; } if (isset($data[self::FIELD_REFERRAL_REQUEST])) { if ($data[self::FIELD_REFERRAL_REQUEST] instanceof FHIRReferralRequest) { @@ -2239,7 +2145,6 @@ public function __construct($data = null) } else { $this->setReferralRequest(new FHIRReferralRequest($data[self::FIELD_REFERRAL_REQUEST])); } - return; } if (isset($data[self::FIELD_RELATED_PERSON])) { if ($data[self::FIELD_RELATED_PERSON] instanceof FHIRRelatedPerson) { @@ -2247,7 +2152,6 @@ public function __construct($data = null) } else { $this->setRelatedPerson(new FHIRRelatedPerson($data[self::FIELD_RELATED_PERSON])); } - return; } if (isset($data[self::FIELD_REQUEST_GROUP])) { if ($data[self::FIELD_REQUEST_GROUP] instanceof FHIRRequestGroup) { @@ -2255,7 +2159,6 @@ public function __construct($data = null) } else { $this->setRequestGroup(new FHIRRequestGroup($data[self::FIELD_REQUEST_GROUP])); } - return; } if (isset($data[self::FIELD_RESEARCH_STUDY])) { if ($data[self::FIELD_RESEARCH_STUDY] instanceof FHIRResearchStudy) { @@ -2263,7 +2166,6 @@ public function __construct($data = null) } else { $this->setResearchStudy(new FHIRResearchStudy($data[self::FIELD_RESEARCH_STUDY])); } - return; } if (isset($data[self::FIELD_RESEARCH_SUBJECT])) { if ($data[self::FIELD_RESEARCH_SUBJECT] instanceof FHIRResearchSubject) { @@ -2271,7 +2173,6 @@ public function __construct($data = null) } else { $this->setResearchSubject(new FHIRResearchSubject($data[self::FIELD_RESEARCH_SUBJECT])); } - return; } if (isset($data[self::FIELD_RISK_ASSESSMENT])) { if ($data[self::FIELD_RISK_ASSESSMENT] instanceof FHIRRiskAssessment) { @@ -2279,7 +2180,6 @@ public function __construct($data = null) } else { $this->setRiskAssessment(new FHIRRiskAssessment($data[self::FIELD_RISK_ASSESSMENT])); } - return; } if (isset($data[self::FIELD_SCHEDULE])) { if ($data[self::FIELD_SCHEDULE] instanceof FHIRSchedule) { @@ -2287,7 +2187,6 @@ public function __construct($data = null) } else { $this->setSchedule(new FHIRSchedule($data[self::FIELD_SCHEDULE])); } - return; } if (isset($data[self::FIELD_SEARCH_PARAMETER])) { if ($data[self::FIELD_SEARCH_PARAMETER] instanceof FHIRSearchParameter) { @@ -2295,7 +2194,6 @@ public function __construct($data = null) } else { $this->setSearchParameter(new FHIRSearchParameter($data[self::FIELD_SEARCH_PARAMETER])); } - return; } if (isset($data[self::FIELD_SEQUENCE])) { if ($data[self::FIELD_SEQUENCE] instanceof FHIRSequence) { @@ -2303,7 +2201,6 @@ public function __construct($data = null) } else { $this->setSequence(new FHIRSequence($data[self::FIELD_SEQUENCE])); } - return; } if (isset($data[self::FIELD_SERVICE_DEFINITION])) { if ($data[self::FIELD_SERVICE_DEFINITION] instanceof FHIRServiceDefinition) { @@ -2311,7 +2208,6 @@ public function __construct($data = null) } else { $this->setServiceDefinition(new FHIRServiceDefinition($data[self::FIELD_SERVICE_DEFINITION])); } - return; } if (isset($data[self::FIELD_SLOT])) { if ($data[self::FIELD_SLOT] instanceof FHIRSlot) { @@ -2319,7 +2215,6 @@ public function __construct($data = null) } else { $this->setSlot(new FHIRSlot($data[self::FIELD_SLOT])); } - return; } if (isset($data[self::FIELD_SPECIMEN])) { if ($data[self::FIELD_SPECIMEN] instanceof FHIRSpecimen) { @@ -2327,7 +2222,6 @@ public function __construct($data = null) } else { $this->setSpecimen(new FHIRSpecimen($data[self::FIELD_SPECIMEN])); } - return; } if (isset($data[self::FIELD_STRUCTURE_DEFINITION])) { if ($data[self::FIELD_STRUCTURE_DEFINITION] instanceof FHIRStructureDefinition) { @@ -2335,7 +2229,6 @@ public function __construct($data = null) } else { $this->setStructureDefinition(new FHIRStructureDefinition($data[self::FIELD_STRUCTURE_DEFINITION])); } - return; } if (isset($data[self::FIELD_STRUCTURE_MAP])) { if ($data[self::FIELD_STRUCTURE_MAP] instanceof FHIRStructureMap) { @@ -2343,7 +2236,6 @@ public function __construct($data = null) } else { $this->setStructureMap(new FHIRStructureMap($data[self::FIELD_STRUCTURE_MAP])); } - return; } if (isset($data[self::FIELD_SUBSCRIPTION])) { if ($data[self::FIELD_SUBSCRIPTION] instanceof FHIRSubscription) { @@ -2351,7 +2243,6 @@ public function __construct($data = null) } else { $this->setSubscription(new FHIRSubscription($data[self::FIELD_SUBSCRIPTION])); } - return; } if (isset($data[self::FIELD_SUBSTANCE])) { if ($data[self::FIELD_SUBSTANCE] instanceof FHIRSubstance) { @@ -2359,7 +2250,6 @@ public function __construct($data = null) } else { $this->setSubstance(new FHIRSubstance($data[self::FIELD_SUBSTANCE])); } - return; } if (isset($data[self::FIELD_SUPPLY_DELIVERY])) { if ($data[self::FIELD_SUPPLY_DELIVERY] instanceof FHIRSupplyDelivery) { @@ -2367,7 +2257,6 @@ public function __construct($data = null) } else { $this->setSupplyDelivery(new FHIRSupplyDelivery($data[self::FIELD_SUPPLY_DELIVERY])); } - return; } if (isset($data[self::FIELD_SUPPLY_REQUEST])) { if ($data[self::FIELD_SUPPLY_REQUEST] instanceof FHIRSupplyRequest) { @@ -2375,7 +2264,6 @@ public function __construct($data = null) } else { $this->setSupplyRequest(new FHIRSupplyRequest($data[self::FIELD_SUPPLY_REQUEST])); } - return; } if (isset($data[self::FIELD_TASK])) { if ($data[self::FIELD_TASK] instanceof FHIRTask) { @@ -2383,7 +2271,6 @@ public function __construct($data = null) } else { $this->setTask(new FHIRTask($data[self::FIELD_TASK])); } - return; } if (isset($data[self::FIELD_TEST_REPORT])) { if ($data[self::FIELD_TEST_REPORT] instanceof FHIRTestReport) { @@ -2391,7 +2278,6 @@ public function __construct($data = null) } else { $this->setTestReport(new FHIRTestReport($data[self::FIELD_TEST_REPORT])); } - return; } if (isset($data[self::FIELD_TEST_SCRIPT])) { if ($data[self::FIELD_TEST_SCRIPT] instanceof FHIRTestScript) { @@ -2399,7 +2285,6 @@ public function __construct($data = null) } else { $this->setTestScript(new FHIRTestScript($data[self::FIELD_TEST_SCRIPT])); } - return; } if (isset($data[self::FIELD_VALUE_SET])) { if ($data[self::FIELD_VALUE_SET] instanceof FHIRValueSet) { @@ -2407,7 +2292,6 @@ public function __construct($data = null) } else { $this->setValueSet(new FHIRValueSet($data[self::FIELD_VALUE_SET])); } - return; } if (isset($data[self::FIELD_VISION_PRESCRIPTION])) { if ($data[self::FIELD_VISION_PRESCRIPTION] instanceof FHIRVisionPrescription) { @@ -2415,7 +2299,6 @@ public function __construct($data = null) } else { $this->setVisionPrescription(new FHIRVisionPrescription($data[self::FIELD_VISION_PRESCRIPTION])); } - return; } } @@ -5686,8 +5569,8 @@ public function setVisionPrescription(FHIRVisionPrescription $VisionPrescription */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRSampledDataDataTypePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRSampledDataDataTypePrimitive.php index 147f8c2176..0c5a83fe76 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRSampledDataDataTypePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRSampledDataDataTypePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRSampledDataDataTypePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -172,8 +172,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRStringPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRStringPrimitive.php index 418d125d27..18c89179e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRStringPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRStringPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRStringPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -172,8 +172,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRTimePrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRTimePrimitive.php index aa33346f51..2656d80afd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRTimePrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRTimePrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRTimePrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -192,8 +192,8 @@ public function _getDateTime() */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUnsignedIntPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUnsignedIntPrimitive.php index 197fa63b4e..be67128ada 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUnsignedIntPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUnsignedIntPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUnsignedIntPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -185,8 +185,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUriPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUriPrimitive.php index be82159aa5..b3744880f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUriPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUriPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUriPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -168,8 +168,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUuidPrimitive.php b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUuidPrimitive.php index 8879768bad..f51955f8e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUuidPrimitive.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/FHIRUuidPrimitive.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ class FHIRUuidPrimitive implements PHPFHIRTypeInterface const FIELD_VALUE = 'value'; /** @var string */ - protected $_xmlns = 'http://hl7.org/fhir'; + private $_xmlns = 'http://hl7.org/fhir'; /** * @var null|string @@ -173,8 +173,8 @@ public function setValue($value) */ public function _validationErrors() { - // TODO: implement validation - return []; + $errs = []; + return $errs; } /** diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRAutoloader.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRAutoloader.php index 5f1a0ea9ff..f83537039b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRAutoloader.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRAutoloader.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerInterface.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerInterface.php index 4bf41c3c46..eab4f0aa8f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerTrait.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerTrait.php index 770e944d4b..599294e567 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerTrait.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRCommentContainerTrait.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -69,7 +69,7 @@ trait PHPFHIRCommentContainerTrait { /** @var array */ - protected $_fhirComments = []; + private $_fhirComments = []; /** * Arbitrary comments of a hopefully useful nature diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRConstants.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRConstants.php index b9732efe7b..79f64f8648 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRConstants.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRConstants.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -73,7 +73,7 @@ abstract class PHPFHIRConstants const SOURCE_GENERATION_DATE = 'Wed, Apr 19, 2017 07:44+1000'; // PHPFHIR - const CODE_GENERATION_DATE = 'November 30th, 2019 23:37+0000'; + const CODE_GENERATION_DATE = 'December 7th, 2019 16:37+0000'; // Common const JSON_FIELD_RESOURCE_TYPE = 'resourceType'; diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRContainedTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRContainedTypeInterface.php index cf4f90c258..4987c38e8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRContainedTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRContainedTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParser.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParser.php index bd78e7fb5f..f8589e3cf7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParser.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParser.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParserConfig.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParserConfig.php index 6688313072..2233a7c5af 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParserConfig.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRResponseParserConfig.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php index 11446dea72..11fcc7b1ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBase64BinaryPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBooleanPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBooleanPrimitiveTest.php index a5b6f0589c..61f20067b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBooleanPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRBooleanPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php index d37ede2839..87b12908b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAccountStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php index db83696fe0..ac732c466e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionCardinalityBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php index 2cdbbea0b7..90414d5edf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionConditionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php index 6abd3d599f..62d62a92c1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionGroupingBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionListListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionListListTest.php index 9da33f92da..291e9c1da1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionListListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionListListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php index 4099ba38a8..05975acd2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionParticipantTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php index e732c5a84f..a3759aa63b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionPrecheckBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php index f8addce163..6645e49f47 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php index a446c3a7d3..1f76fbfc6a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionRequiredBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php index 5c2008a6f9..94ceff7875 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRActionSelectionBehaviorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php index 60ba2dd4c0..b269d04880 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php index f720773f5d..3e68606c00 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAddressUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php index 99adb8bcef..55c54580dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdministrativeGenderListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCategoryListTest.php index 140d4058c7..221fd426d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCausalityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCausalityListTest.php index d5ef517be2..70253337de 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCausalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAdverseEventCausalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php index 729f94a58c..154def39eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAggregationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php index 8d67fba1ee..33d41b15aa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusListTest.php index 5a8ae23020..0475494c69 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceClinicalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php index 383d85d476..dd334c4b31 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceCriticalityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php index f0b51eca6c..ccc75d477c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php index 4e91e6c30e..06df4093b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusListTest.php index 73066bb6e4..3689c1c134 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAllergyIntoleranceVerificationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php index c1c15b978a..f9fc995efa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAppointmentStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php index 55cc870599..0a0a4196b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionDirectionTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php index c1333dccbc..49afc51ac6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionOperatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php index 7b7c9f2146..19ccc4d784 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAssertionResponseTypesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php index d63590c888..249893c611 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php index 52c61eeaff..1cf2d320d2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventAgentNetworkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php index 0b59bc78a9..39fb052383 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRAuditEventOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php index f91accc554..7090c12567 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBindingStrengthListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php index a980571139..bd30f5fdde 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRBundleTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php index 102bc58606..ea39a55f9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCapabilityStatementKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php index 2b7937ea6e..81b242e0b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanActivityStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php index 31aeeb7693..eec20925d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanStatusListTest.php index 648f0c80db..c082b48826 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCarePlanStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php index 48711273a2..0c1015e1b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCareTeamStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php index 1d2687847d..29ebc38bac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRChargeItemStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php index 86368abacd..d2bda2058a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRClinicalImpressionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php index 767a1f6263..0cd8dadab6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemContentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php index f4f44bea11..8b5d517078 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCodeSystemHierarchyMeaningListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php index 28dc999b4d..a5e163d033 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompartmentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php index 69bbfc806a..39df99bfbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionAttestationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php index f12c7fd72c..5a26b32e39 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRCompositionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php index e91cd2cad6..76261ed28c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapEquivalenceListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php index d3d968c8c1..52e8d71bfe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConceptMapGroupUnmappedModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesListTest.php index 7624e92a7b..5446f197b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionClinicalStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionVerificationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionVerificationStatusListTest.php index a6e9fe44f1..01120360c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionVerificationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionVerificationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php index 5a8d1704ac..cad656645c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalDeleteStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php index bc0e708019..5ffeec6903 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConditionalReadStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConfidentialityClassificationListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConfidentialityClassificationListTest.php index 5c93d723a3..204ef628e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConfidentialityClassificationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConfidentialityClassificationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php index cb70426763..f9c821200f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentDataMeaningListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentExceptTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentExceptTypeListTest.php index 25dd7d037d..8e22df799b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentExceptTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentExceptTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php index 05497fb98a..7536441b73 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConsentStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php index 55364ff8f9..1ba75fa1df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRConstraintSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php index 6f69224ff5..e2dbaaeb77 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointSystemListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php index ee704a00a1..e837eea525 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContactPointUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContentTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContentTypeListTest.php index d19bd1a69a..5934589ae6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContentTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContentTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php index 2a040d9643..eff4b91eb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContractResourceStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php index 92161e49c8..efb211ba50 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRContributorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDataElementStringencyListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDataElementStringencyListTest.php index 106a5d0132..251ac816af 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDataElementStringencyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDataElementStringencyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php index 34f1053901..dc8c829904 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDaysOfWeekListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php index e3515a15d9..e03e4a6183 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDetectedIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php index e5ca73b218..5481808a82 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationStateListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php index 7b5a8a3121..348a7d75fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCalibrationTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php index ba3831543b..d0fe43c730 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php index 6dd4c73bff..8486b5c63a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricColorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php index 6fc2b7a1b8..344b2114e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceMetricOperationalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php index 1dfc5b36fa..85bc38dd1a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDeviceUseStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php index a2d264f2f4..b8ef76ebb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiagnosticReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDigitalMediaTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDigitalMediaTypeListTest.php index aa12b8a21f..62df390218 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDigitalMediaTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDigitalMediaTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php index 38cca84777..662e536db1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDiscriminatorTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php index 6eed629fd8..fb86da5781 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php index e6e290198a..10aa7d8349 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentReferenceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php index 82b6203c02..0e85f25ce9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRDocumentRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php index 10a0daf7bb..57c3576b15 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php index 17c89a4ec3..37fd2afc59 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREncounterStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php index b3e8d10804..c81556d145 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREndpointStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php index d641c58acc..8374e389d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREpisodeOfCareStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php index 8f7daad5bf..bfdc0d7766 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventCapabilityModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php index 3ea95420bf..f86441ad58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php index 015d5f79e1..1e55e0055d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIREventTimingListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php index 1b508acae7..f99183e12b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExplanationOfBenefitStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextListTest.php index 78f576243e..faab64aea2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRExtensionContextListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRAllTypesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRAllTypesListTest.php index 8541d01976..e35234b3b9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRAllTypesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRAllTypesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDefinedTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDefinedTypeListTest.php index b389ef7ea8..09681339e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDefinedTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDefinedTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php index 21a0c15252..1b3b92c52a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRDeviceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php index f09b66026e..239766e476 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFHIRSubstanceStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php index c731743ca6..e9d33b517b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFamilyHistoryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php index c7c8304cd3..172fc22627 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFilterOperatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php index 2df6667f15..fced32c28a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFinancialResourceStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php index 4301cdf229..7a65c47f54 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRFlagStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalStatusListTest.php index 3495bbd212..1ba5bc1fcf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGoalStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php index f25ca03126..776db4dbd0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGraphCompartmentRuleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php index 276a128511..007290a8ff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGroupTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php index ce91d938f8..f9bb55357d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidanceResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideDependencyTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideDependencyTypeListTest.php index e688f59130..4af4540eed 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideDependencyTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuideDependencyTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageKindListTest.php index 2eab931df8..25d4f5ff93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRGuidePageKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php index 35439474b6..a38264fad1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRHTTPVerbListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php index f1fff2a5f4..a3be2acb35 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentifierUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php index 2f34c02459..57e692aeba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIdentityAssuranceLevelListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php index c260557d0c..ee03d9ff02 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRImmunizationStatusCodesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRInstanceAvailabilityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRInstanceAvailabilityListTest.php index 7b8a455eb8..c55840e29c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRInstanceAvailabilityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRInstanceAvailabilityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php index 346ddefe64..204f2c6281 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueSeverityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php index 422523fe64..667cca0fdc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRIssueTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php index 295f24d23b..dd148b6a5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php index e775c89989..afd326fa04 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLinkageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php index f8c4b7b58d..61c68c6f5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php index 20886336cd..02e90dfb8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRListStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php index 6014946a1f..dc6fea3d46 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php index ad938c5968..8b995287e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRLocationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasmntPrincipleListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasmntPrincipleListTest.php index cd0354eb27..eacccea6fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasmntPrincipleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasmntPrincipleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php index 017124c0b1..0fd2be6547 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php index d74947ba86..8e7519b625 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMeasureReportTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationAdministrationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationAdministrationStatusListTest.php index c6df01eecb..762f24079b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationAdministrationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationAdministrationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationDispenseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationDispenseStatusListTest.php index d76293536f..7cde3f2ce2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationDispenseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationDispenseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php index 2c058d3a9b..dd8040c950 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestPriorityListTest.php index 4e4aa72bb9..37ec513dd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestStatusListTest.php index dcd942d675..0f5e48a6b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementStatusListTest.php index 5752068e25..5ed69d3aef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementTakenListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementTakenListTest.php index 492166450f..3c2e76a2e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementTakenListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatementTakenListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusListTest.php index c689274cdc..491acec292 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMedicationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php index b6f9ef5867..1fca285160 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRMessageSignificanceCategoryListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php index 4e08d1500b..ebc96bb7fe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNameUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php index 7682452ad0..ae6444752a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemIdentifierTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php index 0c1050af6a..ddbbf77248 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNamingSystemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php index f02b215f5f..ebead86037 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNarrativeStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php index 86b00d2c17..cf97aced0a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNoteTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNutritionOrderStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNutritionOrderStatusListTest.php index b81ced65ec..0c58c917ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNutritionOrderStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRNutritionOrderStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRelationshipTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRelationshipTypeListTest.php index 5672e6bc84..73ab5771c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRelationshipTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationRelationshipTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php index 8091c89590..759fa8d580 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRObservationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php index 56dc1b0d10..66052afe30 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php index bc141372a9..37cb0c733d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIROperationParameterUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php index 7e6f2ecda9..59520fe132 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipantRequiredListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php index 2b1682a327..7520d0e8ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRParticipationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php index 2876892064..dfa073bd77 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyRepresentationListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php index 32929a6e82..7600b4ac0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPropertyTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php index d8200f16b7..4e0b5a06b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRProvenanceEntityRoleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php index 772954d4ea..c6754e1d6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRPublicationStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php index c49996e0c4..88acde3506 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQualityTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php index f534f65ed2..624ed54108 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuantityComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php index 38714dc731..65bbdfc4bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireItemTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php index 9031d76345..22e7dbadb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRQuestionnaireResponseStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php index 89a84f9c7d..adc31e1568 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceHandlingPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php index aa14e461c3..c05d050c07 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRReferenceVersionRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php index 912abd744f..21c762879c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRelatedArtifactTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php index 4b8049d17c..99d9729497 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRemittanceOutcomeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php index 99074a9353..2661f9d878 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRepositoryTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php index d767bdee7f..200e0460b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestIntentListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php index 5f8dc4c923..0cd16f789d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestPriorityListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php index 09d09f49eb..6db77c3b41 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php index 545910aaff..5e70950349 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchStudyStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php index 903d015715..a6c918a2ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResearchSubjectStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php index 998847a415..dd6a90620c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php index f92832eff2..76f4c527bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResourceVersionPolicyListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php index d80c3f79e5..deb69525b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRResponseTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php index 16ea43d3b6..1007ceb0f6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRRestfulCapabilityModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php index 5691d2cb10..435660ab9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchComparatorListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php index 9e48a3a14b..3fdab7747c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchEntryModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php index 44823d4793..c2f4c7c569 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchModifierCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php index a9c050e0bc..2610d1d8f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSearchParamTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php index 6dd6b7d6fc..d0eefdc05e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlicingRulesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php index ad92e82415..67342061ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSlotStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php index 2534b759a7..8e33bce644 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSpecimenStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php index 44efcf3457..f7ae4cf042 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureDefinitionKindListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php index 930fa13c1a..7b6f6be6a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapContextTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php index f8dc93b03c..0b3a666e7d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapGroupTypeModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php index c88fc70ee7..8d501159ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapInputModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php index 263f59a23a..fe77d46a7f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapModelModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php index da1c90dcea..b9b168e838 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapSourceListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php index 4b7703f4e4..58b9ed533b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTargetListModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php index 1c59fe718c..08d8537120 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRStructureMapTransformListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php index 48db3fd1a1..0b822976f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionChannelTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php index 5bf89d4215..a50a1f9f03 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSubscriptionStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php index 89d43f6bc2..880091a5a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyDeliveryStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php index 1af48c5660..96fd69282f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSupplyRequestStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php index a268f529eb..7c57053f05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemVersionProcessingModeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemVersionProcessingModeListTest.php index cc8f267ae5..4770df19ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemVersionProcessingModeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRSystemVersionProcessingModeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php index b73dd829a9..1e460c7571 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTaskStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php index 32d36fe216..67e04a6c5f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportActionResultListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php index 567ddce2ae..2156a06fde 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportParticipantTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php index 50e8f4cddb..80fb83fef6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportResultListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php index 5e1abe84f3..13847634d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestReportStatusListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php index 58a174f378..96768842be 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTestScriptRequestMethodCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php index 40f516be81..669caeedc9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTriggerTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php index 0246b58689..18374bbf44 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeDerivationRuleListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php index 02768a2deb..abcee61c81 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRTypeRestfulInteractionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php index 1b6ef1d5f9..4ebeecc93d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUDIEntryTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php index ad2de096a6..7f9b885e3d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnitsOfTimeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnknownContentCodeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnknownContentCodeListTest.php index 94ca0af177..9091c981d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnknownContentCodeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUnknownContentCodeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php index f5547472bd..9ca0a1279a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRUseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php index 2013011d7f..9834272bba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionBaseListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php index b429c2bd8e..a8c8c2e732 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRVisionEyesListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php index 808c51316b..b9099a8f9c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitive/FHIRXPathUsageTypeListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitiveTest.php index 9036383af4..eab5811e0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRCodePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDatePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDatePrimitiveTest.php index fcb69f28a9..deeb42110a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDatePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDatePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDateTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDateTimePrimitiveTest.php index ca37fbbdd8..c7b7f80e6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDateTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDateTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDecimalPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDecimalPrimitiveTest.php index b24f571e1f..209188d34e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDecimalPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRDecimalPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php index 3330e139a2..cc0ac45669 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAccountStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php index 616d61d9b0..e49f3894ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionCardinalityBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php index cf16a1740a..cfe4e3cc19 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionConditionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php index fd5765c65e..925531eb63 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionGroupingBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionListTest.php index 8882e65d95..8d58e2f8ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php index 4baec0defc..c159e9bff0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionParticipantTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php index b57e793eed..a21ffe928b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionPrecheckBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php index f1207551e4..2f910bec50 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php index e7bf41d596..b8000c5aae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionRequiredBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php index 863ef3e7d4..828c89133c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRActionSelectionBehaviorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTest.php index e6179045af..9809258589 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php index 85e3502f2c..2c8c85fb9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php index ccecadfe28..c26fed4214 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAddressUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php index 52e7176ba6..846e8c0a51 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdministrativeGenderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCategoryTest.php index 7a9cea1b48..6145a3ddae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCausalityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCausalityTest.php index b446daefee..febb6b0b46 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCausalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAdverseEventCausalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php index 952f46dfba..8e2005ba61 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAggregationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php index 82a2cddc74..7317719fcc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceClinicalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceClinicalStatusTest.php index 8eb4c03dad..4e266cc64d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceClinicalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceClinicalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php index f3485e2273..11c901a6bb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceCriticalityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php index d1f59edc05..8f3904a7cc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php index 3301dad50f..9ab958c99d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceVerificationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceVerificationStatusTest.php index 0bd3e2e32d..a3545c7cfd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceVerificationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAllergyIntoleranceVerificationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php index ed1ee31d2f..05bc4cc38a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAnnotationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php index d2eee27c6b..f58e6f2bd4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAppointmentStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php index bf2fe35882..921097c6dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionDirectionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php index 4562e4ceaa..90ccad2836 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionOperatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php index 3b0c697180..76ba58e395 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAssertionResponseTypesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php index 4823488530..2bbd1b30e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAttachmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php index 234c740ce8..a02e64f06e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php index 2a3d65cf7f..62fec5d5f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventAgentNetworkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php index 58b1002023..e0adabc947 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRAuditEventOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php index 33e5b02206..586df0bb17 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php index f5e8b7d376..06a2895efe 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAccount/FHIRAccountGuarantorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php index 9f0d3d2f99..4c4b1b87c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionDynamicValueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php index b4ace6703f..b3a00121d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRActivityDefinition/FHIRActivityDefinitionParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php index 5c804177d0..0cf299f6c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAdverseEvent/FHIRAdverseEventSuspectEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php index 68c994f344..322d1a3564 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAllergyIntolerance/FHIRAllergyIntoleranceReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php index 3cca85b25f..001e32dd30 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAppointment/FHIRAppointmentParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php index f6a177819d..cdc5f50c25 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php index f264b4aa0b..4649becfe4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php index 884d6a4fb3..0889fc82b6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php index c6edc2a537..08875cc737 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventNetworkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php index 9f321cf1b6..8fdc9d5c15 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRAuditEvent/FHIRAuditEventSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php index 55ac50d320..11d8feffca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php index 4bf27ec138..036efc0a69 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php index 6cbe85a699..19600f4475 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php index 4b55070129..98f143454d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php index af26959014..7f1cb1c783 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRBundle/FHIRBundleSearchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificateTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificateTest.php index ea51ed6bb2..738ec9af86 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementCertificateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php index 5d999869c8..ce6ba36547 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementDocumentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php index 7e1fe0877a..12d7a159a6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEventTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEventTest.php index 8d9c5333e6..c415584f24 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php index c69a69a7b2..72b4549c1e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementImplementationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php index 383fd54a70..1c5c5af773 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteraction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php index 52293a10a1..8e4b7c02e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php index 27d4b5e29c..a2d905b262 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementMessagingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php index 8478d9fe01..036f31a829 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php index e241b2babe..7183bde870 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php index 6c883e92ed..2515948533 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementRestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php index 2ef75cb5d7..ed1792cef3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSearchParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php index 18bf3bdd7b..db0b58c4f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSecurityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php index 983e999cc3..d51a95d61c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSoftwareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php index 72c4e1be82..4ad752da65 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCapabilityStatement/FHIRCapabilityStatementSupportedMessageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php index 5f1ee70c8a..36403f8bcd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanActivityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php index 4a4c0a6233..da5a275552 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCarePlan/FHIRCarePlanDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php index faf70fa959..63450e802b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCareTeam/FHIRCareTeamParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipantTest.php index ea944c14f0..0df6cedc3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRChargeItem/FHIRChargeItemParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php index a4c6a252a6..61b06d3a4e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimAccidentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php index 34f3c6159e..c0305e6115 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php index 58a5d8368b..eacb6ce876 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php index c638bb18e3..ab5c593c1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformationTest.php index 9d80089fe4..9b4c7f94c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInformationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php index 23054f49c9..0f135d1efd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php index 39027d86a1..b74cfb12c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php index f23371f5b1..2d0195ec40 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php index c920bf3198..e7c14fc585 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php index 89f764c8c9..9d9d960e8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php index ed506aa3f9..ec66ae028c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaim/FHIRClaimSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php index d51e3c97f9..2672ff4b63 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php index 402a9bb268..dcedb0afd9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php index f0d6cf10ad..3fb23e4c72 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php index cd5f8a8c70..bc3a29c2c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php index 11cf1d6502..d934d2f7ae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php index 4906b86ffe..3a23002555 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php index a8acffdd61..6ae104d6d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php index 5c7af6bd49..49fbd5a57d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponsePaymentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php index e5b4a62c54..c560eddf1d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php index 0fce9eb09b..6012f6f071 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClaimResponse/FHIRClaimResponseSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php index cf1ccc2df7..06dd8cd49b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionFindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php index c1e5b00125..640c3ba965 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRClinicalImpression/FHIRClinicalImpressionInvestigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php index 61e71df6a2..9402f1a620 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php index 5d5ed75096..42e0ab9c10 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php index a1f7db6a15..fcfecec335 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php index 7fc91be519..8491cd88ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemProperty1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php index 54e984d54d..4a9001d9e5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCodeSystem/FHIRCodeSystemPropertyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php index 370f7b3b0f..037b2dffe7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunication/FHIRCommunicationPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php index 55a6f9d327..1f57ae5c57 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestPayloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequesterTest.php index 3a85e0de11..acbd278256 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCommunicationRequest/FHIRCommunicationRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php index d6b1d03d07..ade6ff2962 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCompartmentDefinition/FHIRCompartmentDefinitionResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php index 7c7346730d..5715e4c621 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionAttesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php index f15e3980fc..221b41c212 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php index 5586bec6e8..7fb832f7ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php index 60344f85f3..2708048613 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRComposition/FHIRCompositionSectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php index ee2512ddb9..884598dfa3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapDependsOnTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php index bc817bb597..3395e55905 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php index 45cd3b8cd5..abfd570c7c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php index 057ede1a17..5ad60d0c2b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php index fc435e9365..92c5f120a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConceptMap/FHIRConceptMapUnmappedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php index a431a9830c..8e7f5f56fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionEvidenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php index 71ccbaf3fb..dc95d1d3f5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCondition/FHIRConditionStageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1Test.php index d3b1cd2da2..b489750174 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActor1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php index 5f687105da..999af41133 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentActorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1Test.php index 32b4bde78f..257d9f2acf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentData1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php index 80f9b84e92..162681c5ca 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExceptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExceptTest.php index d1eb4eb500..62bd623913 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentExceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php index 7b76e82e81..425fda3d02 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRConsent/FHIRConsentPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1Test.php index 85dbc39590..7ed3fcbabf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgent1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgentTest.php index 6410272655..59ab126e24 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php index 91abd69007..f4c107b696 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractFriendlyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php index c1fc534a8e..4531740e2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractLegalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php index 54ad1c06b3..682473e34b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php index c1a9118f03..440812de34 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractSignerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php index c0af6e3c82..a5e0190f2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractTermTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php index 5dd4f3198b..19a2413427 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItem1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php index 68f3e066d7..81d096b90b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRContract/FHIRContractValuedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGroupingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGroupingTest.php index 9abf128dd8..53ad3e4623 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGroupingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRCoverage/FHIRCoverageGroupingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php index 12dd3b457a..df71770dbc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDataElement/FHIRDataElementMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php index 22cd95ab6a..6d74708f8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDetectedIssue/FHIRDetectedIssueMitigationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiTest.php index e596e9f7a3..9aee9cd71f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDevice/FHIRDeviceUdiTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php index c94b70cc94..5dbec5bd0d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceComponent/FHIRDeviceComponentProductionSpecificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php index 0d0c1a1a3a..98b47fc930 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceMetric/FHIRDeviceMetricCalibrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequesterTest.php index 61e5902b1d..b1e80d33df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDeviceRequest/FHIRDeviceRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php index 4d8590557e..fa6c076529 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportImageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformerTest.php index 519b468e78..99d2ba3b68 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDiagnosticReport/FHIRDiagnosticReportPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php index 17d0ab1901..a0c364f06a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php index 67e1281d50..42ecc9ba9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentManifest/FHIRDocumentManifestRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php index d9f3196db4..17d005c021 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php index 39ae501fd6..2fd1dc5c93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php index 508b4882f2..01151ee585 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php index 79aa108a3f..5ec4e357ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRDocumentReference/FHIRDocumentReferenceRelatesToTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalanceTest.php index 3726d4f60b..3b452d228f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseBenefitBalanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseErrorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseErrorTest.php index 791cca2a65..d091e26eda 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseErrorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseErrorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancialTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancialTest.php index 4d4840d58d..be25315da8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseFinancialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsuranceTest.php index 8762c033ee..ddab0e03d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREligibilityResponse/FHIREligibilityResponseInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php index c569593bfb..dfe575ff6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterClassHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php index 93b0ddec2c..8544f75b8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php index 32833a9c9e..5213d24204 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterHospitalizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php index f78394b941..59c6eb42df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php index e8ea433810..ba612876b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php index 907c749f39..264a6f6fa7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREncounter/FHIREncounterStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php index 91745693bc..06781aad94 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php index e5acb63359..93ba78210d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIREpisodeOfCare/FHIREpisodeOfCareStatusHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1Test.php index f71bfff877..3d95c486d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2Test.php index b2d97e939d..9622e711ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignation2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignationTest.php index 6e0c89e67a..c7728cfd3f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludeTest.php index 7dba683cff..1d0a20bf13 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystemTest.php index 9163103904..0e1e3441b4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileExcludedSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersionTest.php index 33c449c3f6..e29f0a64a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileFixedVersionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileIncludeTest.php index 802e8d75eb..8aa2bf9056 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExpansionProfile/FHIRExpansionProfileIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php index a4f399782c..b15c824f97 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAccidentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php index 394335ce64..6733014057 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAddItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php index 8004d2ae06..d6c4e04b41 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitAdjudicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php index bbdf01c73a..7949229adc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitBenefitBalanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php index e3033d6b3b..5c5fdb6188 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php index 9529bb772f..b986f55907 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetail1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php index f66859dde1..ec2b5f4735 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php index 892f032d9c..aa0416b0d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitDiagnosisTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php index 8356e9bef1..e87f36982f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitFinancialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformationTest.php index 67144651ee..5eceeeb73e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInformationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php index ffb207b79e..1414832b5d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitInsuranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php index 3ba0bbcb45..fb4a251d44 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php index de3a288d93..8931526fe3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPayeeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php index b3dc1da603..e70f57d493 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitPaymentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php index 0649aa5cd3..c634caf128 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php index 140aaf1560..1608101828 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php index 7c36a296e0..abc21957d7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php index 484436aa77..36d840e281 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRExplanationOfBenefit/FHIRExplanationOfBenefitSubDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php index c9d9bbdb98..ca8a3b9dde 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRFamilyMemberHistory/FHIRFamilyMemberHistoryConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php index b17317d3d7..b760df808b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGoal/FHIRGoalTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php index 12ab850a91..a794c7f2c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionCompartmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php index c16eb03f29..ab0655bdb4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php index c02df92e38..c9ce298274 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGraphDefinition/FHIRGraphDefinitionTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php index ab8cf8f656..7530a2713a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupCharacteristicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php index c4fdf7221f..e276b6ad6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRGroup/FHIRGroupMemberTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php index 6b375a8a93..e134180a1c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php index cf183b4232..602a6672c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRHealthcareService/FHIRHealthcareServiceNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstanceTest.php index 94d6650365..9439aa2a68 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeriesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeriesTest.php index 2a57397291..a1ac9e871f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestSeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudyTest.php index f526734017..dfd7eeb8b7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingManifest/FHIRImagingManifestStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php index 7f4946bb20..4053b9545f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudyInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php index c664d852be..a0ffed6a50 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImagingStudy/FHIRImagingStudySeriesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php index 78a7ac4488..33549fb5f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationExplanationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitionerTest.php index 9046a56a3e..22bac907fc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php index 793fb8c39e..422c697880 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationReactionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php index 780a023715..8c305915c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunization/FHIRImmunizationVaccinationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php index 79e05aa66e..d3dc58b6db 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationDateCriterionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php index 9b39f59621..c050ecfdf0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationProtocolTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php index d2a9ee555d..900d3c8abd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImmunizationRecommendation/FHIRImmunizationRecommendationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php index 04f7fdd246..a59e68a9bc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideDependencyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php index 69a74d0166..5234ae758e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideGlobalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php index bbc35f3022..92d74ba0ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php index 6e39e44f23..27a1f18a73 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuidePageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php index 5d5f716a06..2bb85bdef6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRImplementationGuide/FHIRImplementationGuideResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php index ccb45c8d4a..9122a948ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLinkage/FHIRLinkageItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php index ca721adbeb..bd584c798f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRList/FHIRListEntryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php index ebe722e279..b790ee114b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRLocation/FHIRLocationPositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php index 5b52747129..581de20bce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php index f282a4e3fd..353ce0b9b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasurePopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php index 8c898c7821..d1865b60b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureStratifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php index 3c0d66fa96..13bae6c760 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasure/FHIRMeasureSupplementalDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php index 4a7dbd81f3..f35ee6d7fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php index bf80fdcd9d..294595a6c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulation1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php index 2539fdb0ab..41592d777a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportPopulationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php index d0b9d4b8e8..2ca471c83a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php index da9cae5cdb..04b48a4ef9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMeasureReport/FHIRMeasureReportStratumTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php index 6eb7876a01..753239ad22 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationBatchTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php index cd82d0dd34..66fbd2ebae 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationContentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php index aa89993e08..86486d5d6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php index 4b53eb2927..62815855bf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedication/FHIRMedicationPackageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php index 879c5c807a..a7cd4d9d97 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php index 7268fbfe49..f7383489eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationAdministration/FHIRMedicationAdministrationPerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php index e3f949d739..a6782813eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispensePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php index 51eff37371..340c592a73 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationDispense/FHIRMedicationDispenseSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php index a3019539fd..c2b4132389 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestDispenseRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequesterTest.php index 7c8825ec5d..6213810f26 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php index 0f9f884b75..8d07e127b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMedicationRequest/FHIRMedicationRequestSubstitutionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php index 74b155055a..cd9d67b819 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionAllowedResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php index 442986043a..da8eede499 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageDefinition/FHIRMessageDefinitionFocusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php index e996f466d1..d8d55baf50 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php index 2d26aef514..65eb49820a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php index aed5e9da19..8bdd91dff5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRMessageHeader/FHIRMessageHeaderSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php index 5591d231b9..8168e687eb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNamingSystem/FHIRNamingSystemUniqueIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php index 4f93a298fa..d0737a4bab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php index f301d5bd0f..22a2cb9cf8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderEnteralFormulaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php index 6aef94cf02..31281d07ac 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderNutrientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php index c883605799..bbf601b1a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderOralDietTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php index ec42c1d735..c0ca8ae658 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderSupplementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php index d7934cbddb..c96431d33d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRNutritionOrder/FHIRNutritionOrderTextureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php index 472cf5730e..63f1bbae20 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php index 0f47fac20c..6ab89afab5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationReferenceRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php index e33dc04eb6..29a1547ea4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRObservation/FHIRObservationRelatedTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php index 80b88bb4d3..94b9df299f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php index 759eca8834..8683c638c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionOverloadTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php index 1e52167d82..c723d77bb3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationDefinition/FHIROperationDefinitionParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php index 35b603be84..242ff3b2af 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROperationOutcome/FHIROperationOutcomeIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php index 14381680ef..93a1f3aa80 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIROrganization/FHIROrganizationContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php index 372852c5d9..f260c3cadb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRParameters/FHIRParametersParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php index 0ab54b68f4..abec34167c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientAnimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php index aa8ca4c34d..8095b4ff13 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php index c1711cc82a..7ff609666c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientContactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php index 706915f651..f6ee6f6691 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPatient/FHIRPatientLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php index eb3f7bd09f..48642c7e01 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php index 4312501c92..a26c469b72 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPaymentReconciliation/FHIRPaymentReconciliationProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php index dee510305d..447d1ebd01 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPerson/FHIRPersonLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php index 312743d996..5d1c757a34 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php index 6368d34e70..193cd4897e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php index 095091bb6b..0e955ad250 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionDynamicValueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php index 2b23cb3c71..3eefaf4d75 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php index 777a6aea8f..92a6baea98 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php index 47d96d240b..89bf0823c8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionRelatedActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php index 3f82860bc1..d448890620 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPlanDefinition/FHIRPlanDefinitionTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php index cf5c41fb80..b63b36f013 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitioner/FHIRPractitionerQualificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php index 9b5fb3546c..b1c0eee498 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleAvailableTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php index dd40640159..3895d8d252 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRPractitionerRole/FHIRPractitionerRoleNotAvailableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php index 57cd082353..4e1e09c272 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedureFocalDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php index 1863ceb08f..bfc11cda8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedure/FHIRProcedurePerformerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequesterTest.php index 5f181a6c85..3e8ead53b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcedureRequest/FHIRProcedureRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php index 5eaf73688a..d73d047214 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessRequest/FHIRProcessRequestItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNoteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNoteTest.php index 9c232eaa56..9b37524e87 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNoteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProcessResponse/FHIRProcessResponseProcessNoteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php index 68082a0964..e994493c93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceAgentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php index 521a8b73ea..960f0232d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRProvenance/FHIRProvenanceEntityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php index ed1ad66e92..76689d3ccf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireEnableWhenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php index 1dc9b04da6..9eead93a30 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOptionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOptionTest.php index 58d5d9fbe9..5f288a79e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaire/FHIRQuestionnaireOptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php index 0c955bb263..ad2bd46d9e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseAnswerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php index 05d9c3d642..edd5f428f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRQuestionnaireResponse/FHIRQuestionnaireResponseItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequesterTest.php index 8703e69475..eb5e34e4e7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRReferralRequest/FHIRReferralRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php index bcf9b5c913..2a68b48d48 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php index efb8a69b62..404b5e6a64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php index 15cd37c7e0..f2cb72fe9a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRequestGroup/FHIRRequestGroupRelatedActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php index 8f2f26f6d9..3046f01977 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRResearchStudy/FHIRResearchStudyArmTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php index 37dda28ac1..4f3332cc22 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRRiskAssessment/FHIRRiskAssessmentPredictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php index a8880eb9fe..de5735361a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSearchParameter/FHIRSearchParameterComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQualityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQualityTest.php index dac9fada90..6576c552e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQualityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceQualityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeqTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeqTest.php index f54694cd5c..4ae44b2863 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeqTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceReferenceSeqTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepositoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepositoryTest.php index a2d0cefaed..bebfb79c82 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepositoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceRepositoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariantTest.php index 5e11b33a2c..7b2d4dec60 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSequence/FHIRSequenceVariantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php index 70a4b3e6ee..a1684168ec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenCollectionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php index 61df16b66b..d299703a13 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php index 762e57d50a..134f16991b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSpecimen/FHIRSpecimenProcessingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php index 153fe39f27..6caf5fee6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionDifferentialTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php index 8ab974ce71..a29a1f135e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php index 3966c5de4e..19422b307f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureDefinition/FHIRStructureDefinitionSnapshotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php index 7c7278d9a6..de929618c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapDependentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php index b8147e10a0..136ae5ce93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php index 7ba4ebfd47..833e1cc934 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapInputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php index 1d3d807adf..f7620bfb0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php index 00951a2c4a..cf2b9f38f7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php index 3a571164e8..b39cf6c014 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapSourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php index 0bd88cbc5b..897369a86f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapStructureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php index e774f5a875..5848a35f93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRStructureMap/FHIRStructureMapTargetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php index 77a64da086..46e6a81a41 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubscription/FHIRSubscriptionChannelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php index 20f97fc161..0a14c093b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceIngredientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php index d6d3a42b0f..f8e86f1605 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSubstance/FHIRSubstanceInstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php index 465ebbd1b8..d74dd15284 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyDelivery/FHIRSupplyDeliverySuppliedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItemTest.php index 7f7a74692a..0c30422057 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestOrderedItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequesterTest.php index 5de9bda3ec..e30e29b59d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRSupplyRequest/FHIRSupplyRequestRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php index 8ee1121257..cf11366f1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskInputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php index c73c74574b..e4130def22 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskOutputTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequesterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequesterTest.php index 932a1bf225..0532dfd66b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequesterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRequesterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php index 323f203e85..5ed9d801a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTask/FHIRTaskRestrictionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php index c82bc08279..77ba20181e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php index 858810e762..bfb48ab791 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php index 11c5ba1dbf..02c9306083 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php index f755a28e35..913a58870b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php index 1805c84aa3..ba6b7559d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php index 4a576ee809..b41532a391 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportParticipantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php index a3eaf47a66..630af2d45e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php index 750341c0df..74b4961421 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php index 42a57b8ba8..91540db84d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestReport/FHIRTestReportTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php index 9b0bbb25f0..0a4100ed24 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php index ba99cffe02..1065e03cf6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAction2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php index e1166d2ca9..efddc26b6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptActionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php index 3ba08a969b..2cbe8ff99c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptAssertTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php index aabe689b1b..985c272ee1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptCapabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php index 026b496f3d..24cdb9c0c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptDestinationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php index 8ed5009800..1ae74390e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptFixtureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php index 22a063473e..e79eba8f62 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptLinkTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php index 867e286109..9968ab77df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptMetadataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php index 713fb9a4a5..b10b101fb8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOperationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php index 914ea3ec13..69b53a3e46 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptOriginTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1Test.php index d782daf84d..daa9030e81 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2Test.php index 71164b34cf..bb064d082e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3Test.php index 1d741e6d8b..ac996dc9dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParam3Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParamTest.php index 6f60ba3b1e..8422b345e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptParamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php index 0af6dc763f..f88c120482 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRequestHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1Test.php index 3f8a580a3d..50c4a567b5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2Test.php index 528bd63362..09a35d909f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule2Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3Test.php index 604c644e8f..a5b31a8ebd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRule3Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleTest.php index e7022313fc..5605839176 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1Test.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1Test.php index 0a2d692526..610d29e583 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1Test.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRuleset1Test.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRulesetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRulesetTest.php index d59560b13b..f8248f8f8b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRulesetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptRulesetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php index 3bb179210a..9b17f7e477 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptSetupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php index 8464736666..8118c8dbaa 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTeardownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php index 720ebc5354..deca6831e2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptTestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php index 52a9b96563..140e3c0565 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRTestScript/FHIRTestScriptVariableTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php index 1e6a8151a0..185f95fd41 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetComposeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php index f6860c781e..f9f24ae741 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php index a0396d67b8..adce235f31 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetContainsTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php index 3e0fea4482..7907b96924 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetDesignationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php index f7060283f5..6150b4f5c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetExpansionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php index 0f0eab301b..7803c02b60 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php index 3b3078e88d..bc686c6c4c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetIncludeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php index 18e023105b..03190abef9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRValueSet/FHIRValueSetParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php index 38d1895420..82af9a1293 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElement/FHIRVisionPrescription/FHIRVisionPrescriptionDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php index 3685d7ab62..384500e5a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBackboneElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php index d28585b4df..d4b46f5610 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBase64BinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php index d5de802474..6d7d1d0446 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBindingStrengthTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php index 82fe1463a3..b497d278ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBooleanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php index d6fd676d17..cc5d6ac4e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRBundleTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php index 23405b5c98..22eff098d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCapabilityStatementKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php index ed391c7b23..c322ef1a06 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanActivityStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php index fd06cdee87..d301a6a522 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php index 4ed1fe9cd7..df62121472 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCarePlanStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php index 3f823f51b9..2d50c9b4e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCareTeamStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php index f71e1fbf52..815ca9b7b8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRChargeItemStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php index 7181a8c20c..c20ea7a352 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRClinicalImpressionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php index 7b011ea356..c0b0ca8064 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemContentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php index 38f1bdaf12..bd1919b23c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeSystemHierarchyMeaningTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeTest.php index 69f9819960..25cfe11487 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php index 21883c75c0..bb9f7262cd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodeableConceptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodingTest.php index b5c4b51f38..f4b351c917 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCodingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php index 3ac215a906..52e998908f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompartmentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php index ff431a0fcc..6de1e4d25f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionAttestationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php index 3a4f0e1662..0ce7050bec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRCompositionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php index e9993b2808..eda341326e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapEquivalenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php index 3a6eca189e..425a6247e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConceptMapGroupUnmappedModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionClinicalStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionClinicalStatusCodesTest.php index dafbf29b20..6134fa6012 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionClinicalStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionClinicalStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php index e2c65beb6a..c9fef6c26b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionVerificationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php index f1c78304dc..947a2711a8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalDeleteStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php index 7bbb82ffca..5aa208299f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConditionalReadStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConfidentialityClassificationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConfidentialityClassificationTest.php index aa231785aa..746f6f3586 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConfidentialityClassificationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConfidentialityClassificationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php index 1ce7077438..cfa7b726c9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentDataMeaningTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentExceptTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentExceptTypeTest.php index 25fafe546e..218f0d4103 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentExceptTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentExceptTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php index 68b7fe49ba..385e706ff7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConsentStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php index fce57017b5..45b7c14163 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRConstraintSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php index 5e7511cea4..901a7decce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactDetailTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php index bf2149b098..b6cc30ff99 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php index 77a5c75964..64f81b09c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php index b068faa9ff..05214dd1b1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContactPointUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php index 2ed9263e71..466609a76d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContentTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php index b301d3ec9e..6115609347 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContractResourceStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTest.php index b1f59f3cc0..6bde5ee705 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php index 8ac305b993..f8da6e28ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRContributorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php index be545cde1e..d38e1cf6d1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataElementStringencyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php index 8cc14b29d1..5d4526e620 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementCodeFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php index 7fe0836336..e92abf646d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirement/FHIRDataRequirementDateFilterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php index 7dc1419ecd..69e84c7ef2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDataRequirementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTest.php index bde9637390..7bd8ad5b58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php index 8a9ebf782b..617d946167 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDateTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php index 56680814ea..647ba0baea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDaysOfWeekTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php index 778d4fc153..a20137e52e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDecimalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php index de7fbb5c74..6e1e51156b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDetectedIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php index ca886a074b..d90e81cb94 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationStateTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php index 68ad730ce7..de0a5ba44f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCalibrationTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php index 43ed623809..9d3b32e3bd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php index 1f139f4aa2..a79c0ecc12 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricColorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php index 914b74473e..4e80f77955 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceMetricOperationalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php index 614f241176..2672e48ab9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDeviceUseStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php index 7b8b9ae9df..078e85e0da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiagnosticReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php index 1d41af489b..3af5dc3e60 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDigitalMediaTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php index f9c16b12ec..3723859013 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDiscriminatorTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php index 31e4735d6d..637db7e182 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php index 989176028e..0629d8f1cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentReferenceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php index 03eeb50021..396d07d7c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDocumentRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDosageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDosageTest.php index 1094a6fa5c..745745dd96 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDosageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRDosageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php index b0cb8c082c..f1b3daa59f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php index 10c60ee86b..8d780d6003 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionBindingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php index 3a135c4ff7..32588e777a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionConstraintTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php index a591485604..c789d5d093 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionDiscriminatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php index efc1c89024..1f83986e52 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionExampleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php index 4fb7c1f5b6..c04d0c595f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionMappingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php index 5dbae6783b..5ac454e11d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionSlicingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php index 79a3efb0e6..dc86894fb1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinition/FHIRElementDefinitionTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php index 96589a5414..0a54d2cd54 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRElementDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php index 2f15d0c432..a84fe0c349 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php index b49ba605b0..7b1fa7b141 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREncounterStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php index 55590f267c..11b5a8131e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREndpointStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php index 2d77e14291..eae04d1f40 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREpisodeOfCareStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php index 6b4bfd9267..1ff0a56497 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventCapabilityModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php index c7f7cd559b..f649905bff 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php index bfc021b978..a4876a8059 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIREventTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php index 9ee60379d2..fa1f3ad154 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExplanationOfBenefitStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php index ed6dbd67b3..fe95c1056c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php index e00b170ea5..0fe49b1564 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRExtensionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRAllTypesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRAllTypesTest.php index 9d7a0e240d..515acaa95c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRAllTypesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRAllTypesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDefinedTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDefinedTypeTest.php index 2019c3e168..f28a0474d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDefinedTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDefinedTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php index 5fbb212b5f..db526b2f8a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRDeviceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php index d71cd69344..051f9f37f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFHIRSubstanceStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php index af4986ae1f..dc4a525254 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFamilyHistoryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php index 6d881e7573..0f7a9c032d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFilterOperatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php index f08d82c679..75d096509c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFinancialResourceStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php index a7c60908e5..2261c854a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRFlagStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php index fb17fab748..975890cedd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGoalStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php index 0a2a494733..79b9253ec6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGraphCompartmentRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php index 4afbba957a..83c03f14c5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGroupTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php index 1dc254faaa..5e935a9878 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidanceResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php index dd4ba101b5..35be2362ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuideDependencyTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php index cda93c811c..b71fca8d4b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRGuidePageKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php index d675014f4b..d7d4bb6d93 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHTTPVerbTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php index 4d0c4fa105..fa5aeef238 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRHumanNameTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdTest.php index af58c98f5e..5c3790df05 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php index ff3db55f7c..6a7aed55e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php index 079163935f..4223ccb6f9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentifierUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php index c0f849fbcd..eccb3817f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIdentityAssuranceLevelTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php index b7e6a25554..686f998759 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRImmunizationStatusCodesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php index 922ac3dddd..965d7a7454 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstanceAvailabilityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstantTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstantTest.php index dece442c47..29c5b906cb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstantTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRInstantTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php index 5a4c5f1139..edab5d27e0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIntegerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php index 137f271249..486804d490 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueSeverityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php index 4f37cf0e2e..7c667ba654 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRIssueTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php index 403cd9b51f..be98fbfa4a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php index 0dbc5e72f0..b3f58ebb96 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLinkageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListModeTest.php index 6860425dbb..c8028ca4d3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php index fb2818bbcb..1050feb651 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRListStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php index 8442b74718..3a0af2f924 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php index 212efb4761..e9ef98ff6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRLocationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php index d1a9720b8e..ba52a581dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMarkdownTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasmntPrincipleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasmntPrincipleTest.php index 60eefc1407..cfc268250a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasmntPrincipleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasmntPrincipleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php index e7b8b537fb..33094a89b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php index abf012cf29..19f5a0cc60 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMeasureReportTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php index ac705dd6ef..6f2a9909d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationAdministrationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php index 23ae24114e..31885fb333 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationDispenseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php index 799014d32a..5596b38cda 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestPriorityTest.php index 48ca440410..e4e74d3c20 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestStatusTest.php index 3be3636a39..18bf9c33ef 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php index 6ca46dfae7..4e34a41765 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementTakenTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementTakenTest.php index f7a0807863..e1c4d55d75 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementTakenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatementTakenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatusTest.php index a069c3f441..b79c9183ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMedicationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php index 9f02cce48c..252ac3deec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMessageSignificanceCategoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMetaTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMetaTest.php index 2346b5eea4..b12afd1536 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMetaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRMetaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php index c0763f0420..429bb28941 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNameUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php index 89ebc8f2a1..b963b782c4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemIdentifierTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php index 0dc1b1806b..248ebf7263 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNamingSystemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php index b6b175c7f8..977c515bd1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php index 56a9904325..044cdc3046 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNarrativeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php index 3c763eb1c4..6f72fad322 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNoteTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php index d0f8c9353c..ec1d6d168a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRNutritionOrderStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php index a431d68ae4..beee1b26e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationRelationshipTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php index 0981f15fa1..3321edd732 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRObservationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROidTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROidTest.php index ab5ddee697..ad2ae374b0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php index 9b96b3f546..542ea0ad59 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php index 1d76fa7bf9..50e8283905 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIROperationParameterUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php index f1018ceba7..cdeff4c927 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParameterDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php index 855a42163f..5dcb9a2517 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipantRequiredTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php index 3d1bfcfa2a..391f7b14af 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRParticipationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php index 587366360e..799791509c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPeriodTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php index c9744ad8e2..76a723850a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPositiveIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php index 43d97bbe97..3cafd9b50b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyRepresentationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php index 7a7bf00d19..feb015bed4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPropertyTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php index 233203185e..bbb432784a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRProvenanceEntityRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php index d60173f870..e4b9952e27 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRPublicationStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php index fdf2be6a05..cdad18ad15 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQualityTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php index 55b96f1802..d6eeca8182 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRAgeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php index 9ae761157c..1900f16b92 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRCountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php index 0b69068cae..12bd6961b3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDistanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php index dbc6530ea3..c743530b77 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRDurationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php index 644180a7e4..a59ca17607 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantity/FHIRMoneyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php index 0255a27b43..89fe80355a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php index 187366f00c..384fb024c2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuantityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php index 618d15d9ad..ab0c2658ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireItemTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php index efab350b9b..38948851e6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRQuestionnaireResponseStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRangeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRangeTest.php index fe4d1b7fc7..d515279e27 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRangeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRangeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRatioTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRatioTest.php index 995b9848ef..d426b57c86 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRatioTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRatioTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php index 643e788e7d..cd15ad7a14 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceHandlingPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php index 0fc79558be..ade180a774 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php index 44b8d52e77..e65e757232 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRReferenceVersionRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php index fc9a2ad410..a7caddf719 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php index d25cc8050d..d5f932e314 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRelatedArtifactTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php index bb12a94d64..14fe8e6d2c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRemittanceOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php index 57e7857d5f..38de32f966 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRepositoryTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php index 464ad70855..a3fdae67dd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestIntentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php index 8432754b8b..3b00960812 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestPriorityTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php index 3425b9aae8..552d0a39f8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php index 54ba5446da..ac4c5a4ea2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchStudyStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php index b0588a4e0b..5fb7929671 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResearchSubjectStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php index 7baf8c1456..a52819f146 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php index 8270a6654d..53df620cfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResourceVersionPolicyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php index bd67c0c5c4..5e0fb090e1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRResponseTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php index 5f56749f8f..20183953f3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRRestfulCapabilityModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php index 51ee1cb2ac..ecdab783d0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataDataTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php index a291f93a93..9053fe7a28 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSampledDataTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php index 24db5722b8..a460fd6f1b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchComparatorTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php index 26f1c9251f..c8d1bbc914 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchEntryModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php index 9ec8074f05..6e1275fe8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchModifierCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php index b4410a3735..7d8872fdf1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSearchParamTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php index 0c3ac95c17..07081e32ee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSignatureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php index ad3d98aa13..a999949aa6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlicingRulesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php index 497ca60662..9e410da823 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSlotStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php index f4526f0cd1..9ea54cb79e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSpecimenStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStringTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStringTest.php index e14e28ed94..27c41eba40 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStringTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStringTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php index 4e003ac983..ed6101fffc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureDefinitionKindTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php index 1d781d41e1..8a9054a6d8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapContextTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php index 34cca1018d..2d0571765b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapGroupTypeModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php index ad345344f7..ff96715ce0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapInputModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php index 329426c497..efd4f65f7e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapModelModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php index aa2eff98c8..f83d4acf91 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapSourceListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php index b3a3cbf7bb..08da3bd51c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTargetListModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php index fc913c98c5..ea19d63d52 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRStructureMapTransformTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php index cbc0eaa7e1..f3e066a5e9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionChannelTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php index f01c3ee155..32fbd8dfc5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSubscriptionStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php index f8e3f2e2be..8d00e7331e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyDeliveryStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php index abeb22981a..a2f367aefd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSupplyRequestStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php index 0c23ed47de..469771be9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemVersionProcessingModeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemVersionProcessingModeTest.php index 5dce0680e1..2fad27b708 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemVersionProcessingModeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRSystemVersionProcessingModeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php index a10df21385..8b0b5b4bc0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTaskStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php index b8217ccbb3..e1a5cb3a2e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportActionResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php index df13edef5c..d45d57134f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportParticipantTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php index 9c945ced76..d9bbaa171f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportResultTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php index f4cc2b6c5e..d95cd62060 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestReportStatusTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php index e14b6b9299..4460f38af8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTestScriptRequestMethodCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimeTest.php index 3ed4317623..ea1b4c95dc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php index 381d648070..e183477b67 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTiming/FHIRTimingRepeatTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimingTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimingTest.php index 34b252a17b..4eebb8e736 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimingTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTimingTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php index fe53bc2a27..d73e8734c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php index 3999debf6e..245f03f007 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTriggerTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php index 7dacc8d136..6c4ea91614 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeDerivationRuleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php index e6ba52c356..5dbe22fe09 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRTypeRestfulInteractionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php index 83e3dd63bb..eb46b7c279 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUDIEntryTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php index 7ab9cc0b26..54fe13096d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnitsOfTimeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php index 2b423aede1..cc2458fd92 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnknownContentCodeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php index a131b9ca2b..64d5b8f383 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUnsignedIntTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUriTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUriTest.php index fe919e4a69..7abf38744e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUriTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUriTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php index 592b2fd2d9..f32fe4c29d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUsageContextTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUseTest.php index 0d564370b0..515cd6e0c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUuidTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUuidTest.php index 0ebc9a069f..939ee59c0e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUuidTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRUuidTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php index cb387ae5d1..bc45a283c6 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionBaseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php index 0a791959b6..e38456d2da 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRVisionEyesTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php index 2f7f58be09..2fd7546b04 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElement/FHIRXPathUsageTypeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElementTest.php index 55e5a97d13..b722874e8e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIdPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIdPrimitiveTest.php index 51cdebdeca..f2137abee3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIdPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIdPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRInstantPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRInstantPrimitiveTest.php index 18c3701e5d..c19d2a6a96 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRInstantPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRInstantPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIntegerPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIntegerPrimitiveTest.php index a68a804742..3ff42cf4b2 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIntegerPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRIntegerPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php index 9593781673..16d4daa04f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRMarkdownPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIROidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIROidPrimitiveTest.php index c2328d1047..65a45e17ab 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIROidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIROidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php index 89ed7c9d4e..5e167ab6ad 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRPositiveIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php index a968b8d41e..4f0db03049 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBinaryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBundleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBundleTest.php index f836c7e765..500a393a59 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBundleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRBundleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php index 5eb3ff3227..9bde339c64 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAccountTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Account/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Account/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAccount($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Account" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAccount\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php index fbdb147daa..9c1569d75c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRActivityDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ActivityDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ActivityDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRActivityDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ActivityDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRActivityDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php index c633b823d5..61798ba3df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAdverseEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/AdverseEvent/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/AdverseEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAdverseEvent($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AdverseEvent" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAdverseEvent\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php index 9a48d8cc55..83b861a413 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAllergyIntoleranceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/AllergyIntolerance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/AllergyIntolerance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAllergyIntolerance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AllergyIntolerance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAllergyIntolerance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php index 488f81e957..065c384ccf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/AppointmentResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/AppointmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAppointmentResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AppointmentResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAppointmentResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php index ee22824912..bae7d5fac3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAppointmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Appointment/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Appointment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAppointment($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Appointment" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAppointment\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php index c996f1b995..a7a597f9ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRAuditEventTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/AuditEvent/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/AuditEvent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRAuditEvent($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "AuditEvent" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRAuditEvent\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php index 3a7f293f82..500a31acdf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBasicTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Basic/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Basic/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRBasic($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Basic" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRBasic\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php index 99cf7cccfd..393a1acf18 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRBodySiteTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/BodySite/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/BodySite/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRBodySite($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "BodySite" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRBodySite\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php index 97873a3f13..b4a445290d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCapabilityStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/CapabilityStatement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/CapabilityStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCapabilityStatement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CapabilityStatement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCapabilityStatement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php index 29d52a01c9..70893d49ea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCarePlanTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/CarePlan/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/CarePlan/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCarePlan($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CarePlan" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCarePlan\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php index 80534a9375..c34e1da599 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCareTeamTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/CareTeam/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/CareTeam/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCareTeam($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CareTeam" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCareTeam\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php index 0b2157f486..56545b2523 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRChargeItemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ChargeItem/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ChargeItem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRChargeItem($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ChargeItem" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRChargeItem\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php index 51448123f3..0fde06f57f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ClaimResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ClaimResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRClaimResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ClaimResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRClaimResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php index d3612ad1cb..4521de58cf 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClaimTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Claim/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Claim/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRClaim($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Claim" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRClaim\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php index b13c5666f8..bc788257a3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRClinicalImpressionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ClinicalImpression/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ClinicalImpression/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRClinicalImpression($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ClinicalImpression" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRClinicalImpression\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php index 6ed9923579..4c3f601c63 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCodeSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/CodeSystem/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/CodeSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCodeSystem($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CodeSystem" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCodeSystem\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php index 9454a5eed9..128723e33e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/CommunicationRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/CommunicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCommunicationRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CommunicationRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCommunicationRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php index d88ba1614d..dec164790c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCommunicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Communication/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Communication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCommunication($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Communication" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCommunication\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php index 6d7e99af3d..6e7dac1a74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompartmentDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/CompartmentDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/CompartmentDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCompartmentDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "CompartmentDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCompartmentDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php index 789bb859f2..8ef577a84b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCompositionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Composition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Composition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRComposition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Composition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRComposition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php index bb61175d49..950a3bdcf4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConceptMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ConceptMap/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ConceptMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRConceptMap($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ConceptMap" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRConceptMap\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php index 06c642f971..3c323275d9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConditionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Condition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Condition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCondition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Condition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCondition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php index 0a86552bd3..44d3d41b27 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRConsentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Consent/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Consent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRConsent($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Consent" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRConsent\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php index 554e24cee5..bf664b0a44 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRContractTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Contract/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Contract/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRContract($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Contract" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRContract\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php index 599a5399b6..aad203641a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRCoverageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Coverage/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Coverage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRCoverage($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Coverage" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRCoverage\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php index 15a86cca59..493c129af3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDataElementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/DataElement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/DataElement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDataElement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DataElement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDataElement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php index 875beee5f5..e9035afd01 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDetectedIssueTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/DetectedIssue/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/DetectedIssue/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDetectedIssue($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DetectedIssue" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDetectedIssue\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php index 098ab2e0f9..ef00323183 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceComponentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceComponent/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceComponent/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceComponent($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceComponent" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceComponent\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php index 7afff27195..d89bc4ac1f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceMetricTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceMetric/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceMetric/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceMetric($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceMetric" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceMetric\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php index d1a90814d1..502582b5a5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php index 7929ac5b06..4d63d37c0c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Device/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Device/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDevice($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Device" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDevice\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php index dfa3c6fdd9..89e1014039 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDeviceUseStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceUseStatement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/DeviceUseStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDeviceUseStatement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DeviceUseStatement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDeviceUseStatement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php index ee2ebf7959..2dea66ab38 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDiagnosticReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/DiagnosticReport/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/DiagnosticReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDiagnosticReport($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DiagnosticReport" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDiagnosticReport\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php index 59a80a8597..52344f4ee5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/DocumentManifest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/DocumentManifest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDocumentManifest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DocumentManifest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDocumentManifest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php index 024d6e73b4..cec6da2042 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRDocumentReferenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/DocumentReference/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/DocumentReference/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRDocumentReference($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "DocumentReference" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRDocumentReference\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php index 8780f13bfb..9820127199 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/EligibilityRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/EligibilityRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREligibilityRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EligibilityRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREligibilityRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php index 400dada922..5659168a72 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREligibilityResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/EligibilityResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/EligibilityResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREligibilityResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EligibilityResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREligibilityResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php index 5323bd3a36..a69e18da5c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREncounterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Encounter/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Encounter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREncounter($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Encounter" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREncounter\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php index 18c7dc180a..0a78e4a415 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREndpointTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Endpoint/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Endpoint/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREndpoint($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Endpoint" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREndpoint\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php index a5af33b0cf..8a754a8cee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/EnrollmentRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/EnrollmentRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREnrollmentRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EnrollmentRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREnrollmentRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php index 80edcb82c0..cbbd06d7d4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREnrollmentResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/EnrollmentResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/EnrollmentResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREnrollmentResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EnrollmentResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREnrollmentResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php index 36108878a0..d0c11f84a1 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIREpisodeOfCareTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/EpisodeOfCare/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/EpisodeOfCare/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIREpisodeOfCare($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "EpisodeOfCare" from JSON: %s; JSON: %s', + "json_encode output of \"FHIREpisodeOfCare\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExpansionProfileTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExpansionProfileTest.php index 53c09f75c8..e3e195af6c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExpansionProfileTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExpansionProfileTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ExpansionProfile/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ExpansionProfile/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRExpansionProfile($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ExpansionProfile" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRExpansionProfile\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php index 20bb7bc37d..a1990a1d90 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRExplanationOfBenefitTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ExplanationOfBenefit/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ExplanationOfBenefit/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRExplanationOfBenefit($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ExplanationOfBenefit" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRExplanationOfBenefit\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php index 43a1afe468..1d200e55fb 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFamilyMemberHistoryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/FamilyMemberHistory/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/FamilyMemberHistory/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRFamilyMemberHistory($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "FamilyMemberHistory" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRFamilyMemberHistory\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php index e83d9f3346..48d390c121 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRFlagTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Flag/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Flag/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRFlag($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Flag" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRFlag\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php index bc3261cba9..f5e2f00359 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGoalTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Goal/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Goal/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGoal($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Goal" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGoal\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php index 62dba7bbda..a304ba99c3 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGraphDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/GraphDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/GraphDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGraphDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "GraphDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGraphDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php index 676698879b..455a573e58 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Group/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Group/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGroup($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Group" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGroup\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php index 14bcc6c049..f298d482c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRGuidanceResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/GuidanceResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/GuidanceResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRGuidanceResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "GuidanceResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRGuidanceResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php index 801011e112..a177cecd74 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRHealthcareServiceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/HealthcareService/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/HealthcareService/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRHealthcareService($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "HealthcareService" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRHealthcareService\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingManifestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingManifestTest.php index 30be726fbe..c082c6a683 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingManifestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingManifestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ImagingManifest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ImagingManifest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImagingManifest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImagingManifest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImagingManifest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php index db1eaa147c..ae69dd5eec 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImagingStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ImagingStudy/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ImagingStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImagingStudy($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImagingStudy" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImagingStudy\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php index d0aa5b6522..e37ae00315 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationRecommendationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ImmunizationRecommendation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ImmunizationRecommendation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImmunizationRecommendation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImmunizationRecommendation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImmunizationRecommendation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php index 0c8c4c8111..c0daea7ea7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImmunizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Immunization/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Immunization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImmunization($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Immunization" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImmunization\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php index bfb921682a..a1678dfa03 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRImplementationGuideTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ImplementationGuide/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ImplementationGuide/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRImplementationGuide($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ImplementationGuide" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRImplementationGuide\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php index f42a2eccc1..3fefe36d2d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLibraryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Library/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Library/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRLibrary($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Library" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRLibrary\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php index dd2387dcd6..7df503939a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLinkageTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Linkage/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Linkage/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRLinkage($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Linkage" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRLinkage\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php index d3f87db294..5581645d6f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRListTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/List/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/List/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRList($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "List" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRList\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php index 5dfc880aa1..7c9d39397a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRLocationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Location/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Location/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRLocation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Location" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRLocation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php index 1efbd8bebc..93abbfd462 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/MeasureReport/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/MeasureReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMeasureReport($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MeasureReport" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMeasureReport\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php index eddcbee744..61e7826a97 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMeasureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Measure/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Measure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMeasure($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Measure" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMeasure\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php index e4283de254..ad3c8fcb79 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMediaTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Media/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Media/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedia($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Media" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedia\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php index ad992c3e0d..8eb3b94eea 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationAdministrationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationAdministration/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationAdministration/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationAdministration($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationAdministration" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationAdministration\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php index 24abc67929..66bb70746d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationDispenseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationDispense/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationDispense/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationDispense($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationDispense" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationDispense\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php index c3915eb44c..32919c076f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php index 2f13a7bd8f..fc7b4c609e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationStatementTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationStatement/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/MedicationStatement/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedicationStatement($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MedicationStatement" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedicationStatement\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php index 2914ab2964..8cea7ac235 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMedicationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Medication/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Medication/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMedication($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Medication" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMedication\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php index 36a2b90ebd..b0c4a8cf51 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/MessageDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/MessageDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMessageDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MessageDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMessageDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php index 99b244b350..85104d268f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRMessageHeaderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/MessageHeader/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/MessageHeader/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRMessageHeader($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "MessageHeader" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRMessageHeader\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php index 93550223d4..d97c03a674 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNamingSystemTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/NamingSystem/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/NamingSystem/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRNamingSystem($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "NamingSystem" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRNamingSystem\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php index c912c63550..eace57b2a4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRNutritionOrderTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/NutritionOrder/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/NutritionOrder/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRNutritionOrder($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "NutritionOrder" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRNutritionOrder\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php index 1368566744..714d09ee0b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRObservationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Observation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Observation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRObservation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Observation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRObservation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php index 654cc077d2..2bf1a4a738 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/OperationDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/OperationDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROperationDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "OperationDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROperationDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php index cbf1646d29..cf3624a329 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROperationOutcomeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/OperationOutcome/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/OperationOutcome/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROperationOutcome($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "OperationOutcome" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROperationOutcome\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php index 2d2ce55020..3a60c90cfc 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIROrganizationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Organization/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Organization/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIROrganization($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Organization" from JSON: %s; JSON: %s', + "json_encode output of \"FHIROrganization\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php index 6da334cbdc..8713f769df 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPatientTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Patient/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Patient/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPatient($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Patient" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPatient\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php index e17367ef89..e51df9e308 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentNoticeTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/PaymentNotice/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/PaymentNotice/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPaymentNotice($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PaymentNotice" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPaymentNotice\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php index ca81460e09..14a8f9c7ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPaymentReconciliationTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/PaymentReconciliation/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/PaymentReconciliation/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPaymentReconciliation($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PaymentReconciliation" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPaymentReconciliation\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php index c7cbe6dff2..a45922e9a7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Person/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Person/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPerson($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Person" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPerson\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php index 59b60c43bc..73f4f529e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPlanDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/PlanDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/PlanDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPlanDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PlanDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPlanDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php index 952f13ac15..e7bb46c4c0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerRoleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/PractitionerRole/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/PractitionerRole/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPractitionerRole($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "PractitionerRole" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPractitionerRole\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php index 027081c78a..c821299b99 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRPractitionerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Practitioner/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Practitioner/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRPractitioner($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Practitioner" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRPractitioner\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php index e3a11eb2b1..2cb7a4c47d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ProcedureRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ProcedureRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProcedureRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ProcedureRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProcedureRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php index 74b3aeef70..4731f87834 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcedureTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Procedure/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Procedure/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProcedure($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Procedure" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProcedure\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php index a231691957..621e561e7a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ProcessRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ProcessRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProcessRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ProcessRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProcessRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php index 844db5e3ff..eddac0060b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProcessResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ProcessResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ProcessResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProcessResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ProcessResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProcessResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php index 8ef7a8a287..1840dd0375 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRProvenanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Provenance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Provenance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRProvenance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Provenance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRProvenance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php index c7ae5a1442..d9252bf614 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireResponseTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/QuestionnaireResponse/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/QuestionnaireResponse/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRQuestionnaireResponse($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "QuestionnaireResponse" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRQuestionnaireResponse\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php index 6046b6d763..3446ebc692 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRQuestionnaireTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Questionnaire/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Questionnaire/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRQuestionnaire($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Questionnaire" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRQuestionnaire\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php index c52d7c0188..e3a0d5560c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRReferralRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ReferralRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ReferralRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRReferralRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ReferralRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRReferralRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php index d72a793a2c..6e5e281050 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRelatedPersonTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/RelatedPerson/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/RelatedPerson/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRRelatedPerson($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "RelatedPerson" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRRelatedPerson\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php index 18e08b2abb..2bdc0dbe8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRequestGroupTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/RequestGroup/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/RequestGroup/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRRequestGroup($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "RequestGroup" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRRequestGroup\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php index 9c8a9bb94a..5f2f395c9d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchStudyTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ResearchStudy/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ResearchStudy/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRResearchStudy($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ResearchStudy" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRResearchStudy\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php index a1598bd176..fc81a5b8f0 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRResearchSubjectTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ResearchSubject/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ResearchSubject/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRResearchSubject($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ResearchSubject" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRResearchSubject\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php index 0be134321a..2c173481fd 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRRiskAssessmentTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/RiskAssessment/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/RiskAssessment/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRRiskAssessment($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "RiskAssessment" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRRiskAssessment\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php index aaaf637d4f..5bc0fc2e03 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRScheduleTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Schedule/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Schedule/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSchedule($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Schedule" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSchedule\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php index ce971e559c..7520de78ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSearchParameterTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/SearchParameter/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/SearchParameter/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSearchParameter($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SearchParameter" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSearchParameter\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSequenceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSequenceTest.php index 135368ea68..292633ca9b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSequenceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSequenceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Sequence/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Sequence/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSequence($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Sequence" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSequence\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceDefinitionTest.php index d941d4cdd6..59120bfb9f 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRServiceDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ServiceDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ServiceDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRServiceDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ServiceDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRServiceDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php index 82bba5688b..30cfe442e8 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSlotTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Slot/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Slot/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSlot($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Slot" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSlot\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php index abf152c532..51d78ff82a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSpecimenTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Specimen/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Specimen/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSpecimen($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Specimen" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSpecimen\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php index dd03fceef7..8c1fff0b8d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureDefinitionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/StructureDefinition/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/StructureDefinition/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRStructureDefinition($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "StructureDefinition" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRStructureDefinition\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php index 8588d52fad..0133da5900 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRStructureMapTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/StructureMap/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/StructureMap/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRStructureMap($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "StructureMap" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRStructureMap\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php index 0050024980..3b5569d86d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubscriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Subscription/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Subscription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubscription($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Subscription" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubscription\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php index 7176f70ac4..0e8a88c81c 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSubstanceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Substance/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Substance/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSubstance($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Substance" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSubstance\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php index d12eeb2f21..83802dc3ba 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyDeliveryTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/SupplyDelivery/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/SupplyDelivery/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSupplyDelivery($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SupplyDelivery" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSupplyDelivery\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php index 6355db8ab3..3a94498937 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRSupplyRequestTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/SupplyRequest/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/SupplyRequest/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRSupplyRequest($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "SupplyRequest" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRSupplyRequest\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php index 193c14a545..602a85c83b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTaskTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/Task/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/Task/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRTask($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "Task" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRTask\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php index c62d6a29e3..b485bc1797 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestReportTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/TestReport/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/TestReport/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRTestReport($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "TestReport" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRTestReport\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php index 6798012456..bfd47ccfee 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRTestScriptTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/TestScript/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/TestScript/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRTestScript($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "TestScript" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRTestScript\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php index 88f24c8ab1..fa2e074d2a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRValueSetTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/ValueSet/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/ValueSet/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRValueSet($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "ValueSet" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRValueSet\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php index 9b58cd7b64..4783ea575e 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResource/FHIRVisionPrescriptionTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * @@ -84,7 +84,7 @@ public function testCanConstructTypeNoArgs() */ protected function fetchResource($format) { - $url = sprintf('http://hapi.fhir.org/baseDstu3/VisionPrescription/?_count=1&_format=%s&_pretty=true', $format); + $url = sprintf('http://hapi.fhir.org/baseDstu3/VisionPrescription/?_count=1&_format=%s', $format); $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, @@ -190,23 +190,21 @@ public function testJSON() )); return; } - $this->assertCount(1, $bundle->getEntry()); - $entry = $bundle->getEntry()[0]->getResource(); - $json2 = json_encode($entry, JSON_PRETTY_PRINT); - $decoded2 = $this->decodeJSON($json2, true); + + $reEncoded = json_encode($bundle); try { - $type = new FHIRVisionPrescription($decoded2); + $this->assertEquals($decoded, $this->decodeJSON($reEncoded, true)); } catch (\Exception $e) { throw new AssertionFailedError( sprintf( - 'Error building type "VisionPrescription" from JSON: %s; JSON: %s', + "json_encode output of \"FHIRVisionPrescription\" does not match input: %s\nSource:\n%s\nRe-encoded:\n%s\n", $e->getMessage(), - $json2 + $json, + $reEncoded ), $e->getCode(), $e ); } - $this->assertEquals(json_encode($entry, JSON_PRETTY_PRINT), json_encode($type, JSON_PRETTY_PRINT)); } } diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php index b2e1bd1e44..41a9aac2d5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRDomainResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRParametersTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRParametersTest.php index 49f2460ce8..9ce833c8de 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRParametersTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResource/FHIRParametersTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceContainerTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceContainerTest.php index e70b4019f5..6c4625510d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceContainerTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceContainerTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceTest.php index 950b03241c..edc94c2596 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRResourceTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php index 6ea47e36d0..214e89e58b 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRSampledDataDataTypePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRStringPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRStringPrimitiveTest.php index a8faf9c9d7..d82f6ea61a 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRStringPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRStringPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRTimePrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRTimePrimitiveTest.php index e90f479a16..63db9c26c7 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRTimePrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRTimePrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php index 1f36e4a26f..6202b70b42 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUnsignedIntPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUriPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUriPrimitiveTest.php index 511eee9869..59c6c97d6d 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUriPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUriPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUuidPrimitiveTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUuidPrimitiveTest.php index 202e535166..fc3ff6cc70 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUuidPrimitiveTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/FHIRUuidPrimitiveTest.php @@ -5,7 +5,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRConstantsTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRConstantsTest.php index caaaf619cf..77ebb85de5 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRConstantsTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRConstantsTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRTypeMapTest.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRTypeMapTest.php index dd9dc52cfa..0b5e2817ce 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRTypeMapTest.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTests/PHPFHIRTypeMapTest.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeInterface.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeInterface.php index 5536089b61..a39de121a9 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeInterface.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeInterface.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: * diff --git a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeMap.php b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeMap.php index f4a6bb6682..094f29b7e4 100644 --- a/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeMap.php +++ b/src/DCarbone/PHPFHIRGenerated/STU3/PHPFHIRTypeMap.php @@ -6,7 +6,7 @@ * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * - * Class creation date: November 30th, 2019 23:37+0000 + * Class creation date: December 7th, 2019 16:37+0000 * * PHPFHIR Copyright: *